The current course information
The current average grade for a student in this course
The currently logged-in user
Determines if the current user is the teacher of the course. Used to conditionally display teacher-specific functionality.
True if the current user is the teacher of the course, false otherwise
Displays a dialog to add a grade for a student. Updates the UI with the new grade upon successful addition.
The student to add a grade for
Displays a confirmation dialog to delete a grade. Updates the UI by removing the grade upon successful deletion.
The student whose grade is being deleted
The grade object to delete
Displays a dialog to edit an existing grade. Updates the UI with the modified grade upon successful edit.
The student whose grade is being edited
The grade object to edit
Displays a dialog to enroll a new student in the course. Processes the enrollment through the CourseService.
Calculates the average grade for a student from their grade history.
Array of grade objects for the student
The calculated average grade, rounded to 2 decimal places
Initializes the component by loading course data. Retrieves course details based on the route parameter. Calculates current average grade for students.
Component responsible for displaying and managing a single course. Handles course details, student enrollment, grade management, and student performance tracking. Different functionality is available based on whether the logged-in user is a teacher or student.