Admin Guide

Grade Management

The grading system tracks student progress across three components: video completion, homework scores, and test results. Grades are calculated per-episode for each student.

Student Grade Flow

STUDENT LEARNING PATH Watch Video Track % watched ✓ video_completed Submit Homework Text + attachment homework_score / max Take Test Auto-graded MC/TF test_score / max Grade Calculated overall_score + letter grade A / B / C / D / F GRADE RECORD (roku.grades table) Video Completion Boolean: true / false Homework Score score / max (numeric) Test Score score / max (numeric) Overall Score Computed percentage Letter Grade A, B, C, D, F

Figure 7: Student Grade Flow -- Watch Video through Grade Calculation

Grade Calculation

Each student's grade for an episode is composed of three weighted components stored in the roku.grades table:

ComponentFieldData TypeHow It's Measured
Video Completionvideo_completedBooleanSet to true when watch progress reaches completion threshold
Homework Scorehomework_score / homework_maxNumeric(5,2)Admin-assigned score on homework submission
Test Scoretest_score / test_maxNumeric(5,2)Auto-calculated from test attempt answers
Overall Scoreoverall_scoreNumeric(5,2)Computed overall percentage
Letter Gradeoverall_gradeString(5)A (90+), B (80-89), C (70-79), D (60-69), F (<60)
Statusgrade_statusString(20)in_progress | completed
Current Limitation: The grade records exist in the database schema, but there is currently no automated grade calculation endpoint. Grade records must be populated through future development. The student-facing grade view endpoints (GET /api/grades) are ready and functional.

Grade Book View

Students can view their grades at /student/grades. The grade book shows:

  • Per-Episode Grades -- Each episode shows video completion status, homework score, test score, and overall grade
  • Grade Status -- Whether the grade is still in_progress or completed
  • Channel Context -- Grades are grouped by channel using the channel_id foreign key

API Endpoints for Grades

bash
# Get all my grades (student view)
curl http://localhost:8065/api/grades \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

# Get grade for a specific episode
curl http://localhost:8065/api/grades/{episode_id} \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Watch Progress Tracking

The watch progress system tracks how much of each video a student has watched:

FieldDescription
watched_secondsTotal seconds of video watched
total_secondsTotal video duration
percentage_watchedComputed percentage (0-100)
is_completedWhether the video is considered fully watched
last_position_secondsResume position for the player
watch_countNumber of times the student has watched this video
bash
# Update watch progress (upsert)
curl -X POST http://localhost:8065/api/progress \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "collection_item_id": "{episode_id}",
    "video_asset_id": "{video_id}",
    "watched_seconds": 900,
    "total_seconds": 1800,
    "last_position_seconds": 900,
    "is_completed": false
  }'
Watch progress uses upsert behavior: if a progress record already exists for the user+episode combination, it updates the existing record. The watch_count increments on each new viewing session.