Creates an instance of CourseController.
Service for handling course-related business logic
Adds a grade for a student in a course. Only accessible to users with Teacher role. Protected by JWT authentication.
The HTTP request containing the authenticated user (teacher)
Contains course ID, student email, and grade value
The newly created grade object
Creates a new course. Only accessible to users with Teacher role.
Contains course title, description, and teacher email
The newly created course entity
Deletes (soft delete) an existing grade for a student. Only accessible to users with Teacher role who own the course. Protected by JWT authentication.
The HTTP request containing the authenticated user (teacher)
Contains the grade ID to delete
A boolean indicating success
Deletes an existing course. Only accessible to users with Teacher role who own the course.
Contains course title and teacher email
A success message upon successful deletion
Edits an existing grade for a student. Only accessible to users with Teacher role who own the course. Protected by JWT authentication.
The HTTP request containing the authenticated user (teacher)
Contains grade ID and the new grade value
A boolean indicating success
Enrolls a student in a course. Only accessible to users with Teacher role.
Contains course title, student email, and teacher email
A success message upon successful enrollment
Retrieves all courses in which a specific student is enrolled. Protected by JWT authentication.
Contains the student's email
An array of courses in which the student is enrolled
Retrieves all courses taught by a specific teacher. Protected by JWT authentication.
Contains the teacher's email
An array of courses taught by the specified teacher
Retrieves detailed information about a specific course. Access control is handled in the service based on the user's role. Protected by JWT authentication.
The HTTP request containing the authenticated user
The ID of the course to retrieve
Detailed information about the course, including teacher info and conditionally students/grades
Retrieves the list of students enrolled in a specific course. Protected by JWT authentication.
Contains the course title
An array of students enrolled in the specified course
Submits multiple grades for students in a course at once. Only accessible to users with Teacher role who own the course. Protected by JWT authentication.
The HTTP request containing the authenticated user (teacher)
Contains course ID and an array of student emails with grades
A success message upon successful submission
Controller responsible for handling all course-related HTTP requests. Provides endpoints for course management, student enrollment, and grade operations.