Skip to content

Fix --missing flag ignored when using --assignment filter#276

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/fix-missing-results-flag
Draft

Fix --missing flag ignored when using --assignment filter#276
Copilot wants to merge 2 commits intomasterfrom
copilot/fix-missing-results-flag

Conversation

Copy link
Contributor

Copilot AI commented Jan 6, 2026

The --missing flag only worked with --assignment-group (-A) and --module (-M), but was silently ignored when filtering by individual assignments (-a), always returning grades instead.

Changes

Modified summarize_assignments() in results.nw:

  • Added conditional branch to check args.missing flag
  • When set, iterates through courses and invokes missing_assignments() function (same logic as assignment groups)
  • Outputs format: <course> <assignment> <login_id> <assignment> <reason>
  • Assignment name appears as both "component" and "missing item" to maintain CSV format consistency with groups/modules

Updated help text:

  • Changed "This option only has effect when working with assignment groups" → "Works with assignment groups, modules, and individual assignments"

Example usage now supported

# Previously ignored --missing, returned grades
canvaslms results -M -a "Lab 1" -c "CS101"

# Now correctly returns missing results
# Output: CS101,Lab 1,student@edu,Lab 1,not submitted

Note: Uses login_id for missing results (student contact) vs integration_id for grades (system export) per existing convention in assignment groups.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https /usr/lib/apt/methods/https (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Using --assignment causes --missing to be ignored when retrieving results</issue_title>
<issue_description>When trying to retrieve missing results from a specific assignment (and not an assignment group) with "canvaslms results -M -a ASSIGNMENT" the -M or --missing flag is ignored and we instead receive passing grades.

expected result:
expected would be for results to work the same with the -a "assignment" flag as it does with the -A "group" flag;
Returning the missing results in the form of " "

actual result:
We receive passing grades for the submissions of the assignment, the same as if we didn't include the -M / --missing flag in the other format: " <graders ...>"

Image</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Modified summarize_assignments to check args.missing flag and produce missing
assignment results when specified. Updated help text to indicate --missing now
works with individual assignments.

Co-authored-by: dbosk <237222+dbosk@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix --missing flag being ignored with --assignment Fix --missing flag ignored when using --assignment filter Jan 6, 2026
Copilot AI requested a review from dbosk January 6, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using --assignment causes --missing to be ignored when retrieving results

2 participants