Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix get_assignments and get_course_members for courses with sections #45

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

calvinatian
Copy link
Member

Summary

Fixes get_assignments and get_course_members for courses with sections. Sections Management documentation from Gradescope.

Details

Courses with sections changes the UI in a couple ways.

  1. Rosters page has a new sections column. This column is not visible if a course does not have sections. Currently, the logic breaks as it expects the num_submissions column in index 3 but it is actually index 4 if a course has sections.

    • Fix is to check the table header to see if Sections is in the header. If it is, offset the num_submissions column index by 1. Note: this is pretty brittle as it relies on string matching so languages other than English will probably break. Looked at some HTML classes/ids but there didn't seem to be a good way to target the section header. Possibly check the aria accessibility tags instead.
  2. Assignments can be selectively released (visible/hidden) to specific sections. This changes the assignments table by adding a drop-down with statues for each section.

    • Fix is to check the assignment type metadata when iterating the assignments table. Only if it is actually an assignment get the assignment info.

Checks

  • Tested changes

Reference to the issue

This should resolve #44 but more extensive testing with courses with and without sections is probably needed.

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.

get_assignments fails
1 participant