Gradebook Frontend Documentation - v0.0.0
    Preparing search index...

    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.

    Index

    Constructors

    Properties

    course: undefined | CoursePageInfo = undefined

    The current course information

    currentAverage: undefined | number = undefined

    The current average grade for a student in this course

    user: undefined | User = undefined

    The currently logged-in user

    Accessors

    • get isTeacher(): boolean

      Determines if the current user is the teacher of the course. Used to conditionally display teacher-specific functionality.

      Returns boolean

      True if the current user is the teacher of the course, false otherwise

    Methods

    • Displays a dialog to enroll a new student in the course. Processes the enrollment through the CourseService.

      Returns Promise<void>

    • Calculates the average grade for a student from their grade history.

      Parameters

      • grades: { grade: number }[]

        Array of grade objects for the student

      Returns number

      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.

      Returns void