project_grade
Project the minimum percentage required on remaining assignments to reach a target course grade. Accounts for assignment weights, drop rules, and grading schemes.
Instructions
Projects the minimum score needed on remaining assignments to reach a target course grade.
Given a target (as a percentage, e.g. 90, or a letter grade, e.g. "A") and the student's current scores, computes the minimum uniform percentage that must be earned on all remaining (not yet graded) assignments for the overall course grade to reach the target. Accounts for assignment-group weights, drop_lowest / drop_highest / never_drop rules, and the course grading scheme (for letter-grade targets and output letter mapping).
Returns:
minimum_pct_on_remaining: the uniform percentage needed on all remaining items.
feasibility: 'achievable' | 'already_secured' | 'impossible'.
Per-group breakdown of locked-in scores and remaining assignments.
A plain-language summary.
Limitations:
Uses a uniform-x model: the same percentage is assumed for every remaining item. This is the natural interpretation of "minimum average needed." Per-item optimization is not supported.
Drop rules are frozen at their current state (based on already-graded scores); which items are dropped may shift as remaining assignments are graded.
Late-submission penalties are not factored in.
V1 computes one student per call. Omit student_id to compute for the authenticated user. When CANVAS_PSEUDONYMIZE_STUDENTS is enabled, resolve the pseudonym first via resolve_pseudonym.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| course_id | Yes | Canvas course ID to compute the grade projection for. | |
| student_id | No | Canvas user_id of the student to compute for. Omit to compute for the authenticated user. Instructors may pass any enrolled student's user_id. When CANVAS_PSEUDONYMIZE_STUDENTS is enabled, pass the numeric Canvas user_id after resolving the pseudonym via resolve_pseudonym. | |
| target_letter | No | Target course grade as a letter (e.g. "A", "B+"). Requires the course to have a grading standard configured. Exactly one of target_percentage or target_letter must be provided. Case-insensitive. | |
| target_percentage | No | Target course grade as a percentage (0–100). Exactly one of target_percentage or target_letter must be provided. Example: 90.0 for a 90% target. |