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
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:
| Component | Field | Data Type | How It's Measured |
|---|---|---|---|
| Video Completion | video_completed | Boolean | Set to true when watch progress reaches completion threshold |
| Homework Score | homework_score / homework_max | Numeric(5,2) | Admin-assigned score on homework submission |
| Test Score | test_score / test_max | Numeric(5,2) | Auto-calculated from test attempt answers |
| Overall Score | overall_score | Numeric(5,2) | Computed overall percentage |
| Letter Grade | overall_grade | String(5) | A (90+), B (80-89), C (70-79), D (60-69), F (<60) |
| Status | grade_status | String(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:
| Field | Description |
|---|---|
| watched_seconds | Total seconds of video watched |
| total_seconds | Total video duration |
| percentage_watched | Computed percentage (0-100) |
| is_completed | Whether the video is considered fully watched |
| last_position_seconds | Resume position for the player |
| watch_count | Number 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.