Get My Course Requirements
get_my_course_requirementsWhat the authenticated student still has to DO in one course: a per-module requirement graph where every row names the Canvas endpoint and field its verdict came from.
Instructions
What the authenticated student still has to DO in one course: a per-module requirement graph where every row names the Canvas endpoint and field its verdict came from. Richer than list_modules plus list_module_items, which return a raw completion_requirement without the cross-references that make it truthful; for grade outcomes use project_grade or explain_grade instead, and for cross-course context list_my_planner_items. Five things to read before acting on the output: (1) unknown is a real state and is NOT "unsatisfied" — Canvas attaches completion_requirement.completed only where it loaded a module progression, which happens only for a student caller, so an educator or admin token gets unknown on every row rather than a course full of incomplete work. (2) A module with requirement_type: "one" is COMPLETE as soon as any single requirement is met, so counting its unsatisfied rows invents work. (3) summary gives five counts and never one "things left to do" number: that number cannot be computed honestly across mixed requirement_type values and a non-zero unknown count. (4) Numeric threshold rows are re-evaluated by Canvas on every pass and can revert from met to unmet with no student action (a regrade, a posting-policy change); the other four requirement types latch. (5) canvas_state and derived_state are both reported and a mismatch is flagged in state_disagreement rather than resolved. Read-only and current-user-only: no student_id parameter, no attempt started, no LTI launch, nothing marked as viewed or done.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| course_id | Yes | Canvas course ID. | |
| max_modules | No | Maximum modules to walk (default 50, maximum 200). When the limit is reached, `truncated` is true and `truncation_note` says what to change. | |
| include_context | No | Attach planner context (`plannable_date`, submission status) to each row. Default false. Context NEVER changes a row’s state — it is attached after the state is decided. Note Canvas’s planner defaults to a ~2-week window, so most rows will have `context: null` even with this on. | |
| include_discussions | No | Add the discussion obligations that are not module completion requirements: the `require_initial_post` row (derived from the topic’s `require_initial_post` and `user_can_see_posts`, valid only for a student caller) and the two rows of a checkpointed discussion. Default true. Costs one course-level discussions call, plus one call per group the student owns a child topic in. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | Yes | ||
| modules | Yes | ||
| summary | Yes | ||
| course_id | Yes | ||
| truncated | Yes | ||
| course_name | Yes | ||
| truncation_note | Yes | ||
| caller_is_student | Yes |