Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 34 additions & 33 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
## [1.123.1](https://github.com/hei-school/hei-admin-api/compare/v1.123.0...v1.123.1) (2025-10-08)


### Bug Fixes

* Cor store status ([405f96b](https://github.com/hei-school/hei-admin-api/commit/405f96bfb73500cb6e4b85425ab7f8ae1869d761))



# [1.123.0](https://github.com/hei-school/hei-admin-api/compare/v1.122.1...v1.123.0) (2025-10-08)


### Bug Fixes

* add logs and tests to AdvancedFeeStatsService for receipt type ([6e4c63c](https://github.com/hei-school/hei-admin-api/commit/6e4c63ca32d4a7848c1f34d65f6b6a01a732f7ce))
* filter retake exam session by title ([7a5cf22](https://github.com/hei-school/hei-admin-api/commit/7a5cf22fbe180a8e4847e17b5c5e15664834ce17))
* payment duplication on Mpbs re-verification ([c1c31d2](https://github.com/hei-school/hei-admin-api/commit/c1c31d25f695e00c5e88e915068ae31cc807f637))


### Features

* **doc:** add retake exam status ([f228859](https://github.com/hei-school/hei-admin-api/commit/f228859127bc278c936d2a63e0082e6a4dd79dce))



## [1.122.1](https://github.com/hei-school/hei-admin-api/compare/v1.122.0...v1.122.1) (2025-10-02)


### Bug Fixes

* increase stack size for build ([19092e9](https://github.com/hei-school/hei-admin-api/commit/19092e9f4570c356a0f45a81d995c8beb6964b80))



# [1.122.0](https://github.com/hei-school/hei-admin-api/compare/v1.121.0...v1.122.0) (2025-10-02)


Expand Down Expand Up @@ -96,36 +130,3 @@



## [1.116.2](https://github.com/hei-school/hei-admin-api/compare/v1.116.1...v1.116.2) (2025-09-18)


### Bug Fixes

* course-result fetch course by student exam participation ([c66dc95](https://github.com/hei-school/hei-admin-api/commit/c66dc95450e5158068ca99fd042d2d79c7a495b2))
* **remedial:** restructure remedial component ([b15c9bf](https://github.com/hei-school/hei-admin-api/commit/b15c9bfdc19257c4c4c58447b12c60e17f7499f2))



## [1.116.1](https://github.com/hei-school/hei-admin-api/compare/v1.116.0...v1.116.1) (2025-09-17)


### Bug Fixes

* **remedial:** restructure remedial component ([e43b116](https://github.com/hei-school/hei-admin-api/commit/e43b116776ddb8e91f19c4202f93c721cfac1be2))



# [1.116.0](https://github.com/hei-school/hei-admin-api/compare/v1.115.0...v1.116.0) (2025-09-10)


### Bug Fixes

* yearly result transcript generation blocked on GENERATING ([68c718e](https://github.com/hei-school/hei-admin-api/commit/68c718e730171a0853ab262e0f49a9fdfdcdebd8))


### Features

* **not-implemented:** add remedial spec ([2b2cc04](https://github.com/hei-school/hei-admin-api/commit/2b2cc046816831547f036b19663cdd9ac1d0b897))



75 changes: 68 additions & 7 deletions doc/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1502,7 +1502,36 @@ paths:
$ref: '#/components/responses/429'
'500':
$ref: '#/components/responses/500'
/retake_exam_sessions/{session_id}/retakeExams:
/retake_exam_sessions/{session_id}:
get:
tags:
- RetakeExam
summary: Get retake exam session by identifier
parameters:
- name: session_id
in: path
required: true
schema:
type: string
operationId: getRetakeExamSessionById
responses:
'200':
description: Retake exam session by identifier
content:
application/json:
schema:
$ref: '#/components/schemas/RetakeExamSession'
'400':
$ref: '#/components/responses/400'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
'500':
$ref: '#/components/responses/500'
/retake_exam_sessions/{session_id}/retake_exams:
### TODO later
get:
tags:
Expand All @@ -1520,6 +1549,7 @@ paths:
example: PROG1
schema:
type: string
- $ref: '#/components/parameters/RetakeExamStatuses'
- $ref: '#/components/parameters/DatetimeFromFilter'
- $ref: '#/components/parameters/DatetimeToFilter'
- $ref: '#/components/parameters/Page'
Expand Down Expand Up @@ -1595,6 +1625,11 @@ paths:
required: true
schema:
type: string
- name: course_code
in: query
required: false
schema:
type: string
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/PageSize'
operationId: getRetakeExamCoursesBySessionId
Expand All @@ -1617,7 +1652,7 @@ paths:
$ref: '#/components/responses/429'
'500':
$ref: '#/components/responses/500'
/retake_exam_sessions/{session_id}/retake_exam_courses/{course_id}/students:
/retake_exam_sessions/{session_id}/retake_exam_courses/{course_id}/participants:
get:
tags:
- RetakeExam
Expand All @@ -1633,6 +1668,7 @@ paths:
required: true
schema:
type: string
- $ref: '#/components/parameters/StudentRef'
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/PageSize'
operationId: getRetakeExamParticipantByCourseIdAndSessionId
Expand All @@ -1655,7 +1691,7 @@ paths:
$ref: '#/components/responses/429'
'500':
$ref: '#/components/responses/500'
/students/{student_id}/sessions/{session_id}/retakeExams:
/students/{student_id}/sessions/{session_id}/retake_exams:
get:
tags:
- RetakeExam
Expand Down Expand Up @@ -6749,6 +6785,15 @@ components:
required: true
schema:
type: string
RetakeExamStatuses:
name: retake_exam_status
in: query
required: false
description: Filter by retake exam actual status
schema:
type: array
items:
$ref: '#/components/schemas/RetakeExamStatus'
responses:
'400':
description: Bad request
Expand Down Expand Up @@ -7437,6 +7482,8 @@ components:
registration_date:
type: string
format: date-time
status:
$ref: "#/components/schemas/RetakeExamStatus"
CrupdateRetakeExam:
type: object
properties:
Expand All @@ -7448,6 +7495,8 @@ components:
type: string
student_id:
type: string
status:
$ref: "#/components/schemas/RetakeExamStatus"
StudentRetakeExam:
type: object
allOf:
Expand All @@ -7456,6 +7505,12 @@ components:
### TODO: must be Student resource ou some attributes only ?
student_identifier:
$ref: "#/components/schemas/UserIdentifier"
RetakeExamStatus:
type: string
enum:
- REGISTERED
- TO_CANCEL
- CANCELED
CreateAttendanceMovement:
type: object
properties:
Expand Down Expand Up @@ -8330,34 +8385,40 @@ components:
interview_date:
type: string
format: date-time
status:
$ref: '#/components/schemas/CorStatus'
CrupdateCor:
type: object
allOf:
- $ref: '#/components/schemas/CorBase'
properties:
concerned_student_id:
type: string
interviewer_ids:
type: array
items:
type: string
Cor:
type: object
allOf:
- $ref: "#/components/schemas/CorBase"
properties:
concerned_student:
$ref: "#/components/schemas/UserIdentifier"
interviewers:
type: array
items:
$ref: "#/components/schemas/UserIdentifier"
creation_datetime:
type: string
format: date-time
status:
$ref: '#/components/schemas/CorStatus'
comments:
type: array
items:
$ref: '#/components/schemas/CorComment'
CorCommentInfo:
type: object
properties:
status:
$ref: '#/components/schemas/CorStatus'
comment:
type: string
description: explanation of the reason or comment on change of status
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=1.122.0
version=1.123.1
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import school.hei.haapi.endpoint.rest.model.CorCommentInfo;
import school.hei.haapi.endpoint.rest.model.CorStatus;
import school.hei.haapi.endpoint.rest.model.CrupdateCor;
import school.hei.haapi.endpoint.rest.validator.CorValidator;
import school.hei.haapi.model.BoundedPageSize;
import school.hei.haapi.model.PageFromOne;
import school.hei.haapi.model.pagination.PaginationFromPageAndPageSize;
Expand All @@ -31,14 +32,16 @@ public class CorController {
private final CorCommentMapper corCommentMapper;
private final PaginationFromPageAndPageSize paginationFromPageAndPageSize;
private final CorCommentService corCommentService;
private final CorValidator validator;

@GetMapping("/cors")
public List<Cor> getCors(
@RequestParam(required = false) Instant from,
@RequestParam(required = false) Instant to,
@RequestParam(name = "student_ref", required = false) String studentRef,
@RequestParam(name = "group_ref", required = false) String groupRef,
@RequestParam(name = "cor_status", required = false) List<CorStatus> statuses,
@RequestParam(name = "cor_status", required = false, defaultValue = "")
List<CorStatus> statuses,
@RequestParam(name = "page", required = false) PageFromOne page,
@RequestParam(name = "page_size", required = false) BoundedPageSize pageSize) {
return corMapper.toRest(
Expand All @@ -47,7 +50,7 @@ public List<Cor> getCors(
to,
studentRef,
groupRef,
corMapper.toDomain(statuses),
corMapper.toDomainStatus(statuses),
paginationFromPageAndPageSize.apply(page, pageSize)));
}

Expand Down Expand Up @@ -75,6 +78,7 @@ public List<Cor> getStudentCors(
@PutMapping("/students/{student_id}/cors")
public Cor crupdateStudentCors(
@PathVariable(name = "student_id") String studentId, @RequestBody CrupdateCor cors) {
return corMapper.toRest(corService.save(corMapper.toDomain(cors, studentId)));
validator.accept(cors);
return corMapper.toRest(corService.save(corMapper.toDomain(cors)));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,29 @@
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import school.hei.haapi.endpoint.rest.mapper.CourseMapper;
import school.hei.haapi.endpoint.rest.mapper.RetakeExamMapper;
import school.hei.haapi.endpoint.rest.mapper.UserMapper;
import school.hei.haapi.endpoint.rest.model.Course;
import school.hei.haapi.endpoint.rest.model.CrupdateRetakeExam;
import school.hei.haapi.endpoint.rest.model.RetakeExam;
import school.hei.haapi.endpoint.rest.model.Student;
import school.hei.haapi.endpoint.rest.model.StudentRetakeExam;
import school.hei.haapi.model.BoundedPageSize;
import school.hei.haapi.model.PageFromOne;
import school.hei.haapi.service.RetakeExamService;

@RestController
@RequestMapping
@AllArgsConstructor
public class RetakeExamController {
private final RetakeExamService retakeExamService;
private final RetakeExamMapper retakeExamMapper;
private final CourseMapper courseMapper;
private final UserMapper userMapper;

@PutMapping("/retake_exam_sessions/{session_id}/retakeExams")
@PutMapping("/retake_exam_sessions/{session_id}/retake_exams")
public List<StudentRetakeExam> createOrUpdateRetakeExam(
@PathVariable("session_id") String sessionId,
@RequestBody List<CrupdateRetakeExam> crupdateRetakeExams) {
Expand All @@ -33,19 +37,39 @@ public List<StudentRetakeExam> createOrUpdateRetakeExam(
.toList();
}

@GetMapping("students/{student_id}/sessions/{session_id}/retakeExams")
@GetMapping("students/{student_id}/sessions/{session_id}/retake_exams")
public List<RetakeExam> getStudentRetakeExamBySession(
@PathVariable("student_id") String studentId, @PathVariable("session_id") String sessionId) {
return retakeExamMapper.toRestList(
retakeExamService.getStudentRetakeExams(sessionId, studentId));
}

@GetMapping("/retake_exam_sessions/{session_id}/retakeExams")
@GetMapping("/retake_exam_sessions/{session_id}/retake_exams")
public List<StudentRetakeExam> getRetakeExamBySessionId(
@PathVariable("session_id") String sessionId,
@RequestParam(value = "page", defaultValue = "1") PageFromOne page,
@RequestParam(value = "pageSize", defaultValue = "15") BoundedPageSize pageSize) {
@RequestParam(value = "page_size", defaultValue = "15") BoundedPageSize pageSize) {
return retakeExamMapper.toStudentRetakeRestList(
retakeExamService.getAllRetakeExamBySessionId(sessionId, page, pageSize));
}

@GetMapping("/retake_exam_sessions/{session_id}/retake_exam_courses")
public List<Course> getRetakeExamCoursesBySessionId(
@PathVariable("session_id") String sessionId,
@RequestParam(value = "page", defaultValue = "1") PageFromOne page,
@RequestParam(value = "page_size", defaultValue = "15") BoundedPageSize pageSize) {
return courseMapper.toRests(
retakeExamService.getAllRetakeExamCoursesBySessionId(sessionId, page, pageSize));
}

@GetMapping("/retake_exam_sessions/{session_id}/retake_exam_courses/{course_id}/participants")
public List<Student> getRetakeExamParticipantByCourseIdAndSessionId(
@PathVariable("session_id") String sessionId,
@PathVariable("course_id") String courseId,
@RequestParam(value = "page", defaultValue = "1") PageFromOne page,
@RequestParam(value = "page_size", defaultValue = "15") BoundedPageSize pageSize) {
return userMapper.toRestStudents(
retakeExamService.getAllRetakeExamParticipantByCourseAndBySessionId(
sessionId, courseId, page, pageSize));
}
}
Loading
Loading