eecs-autograder / autograder-server

GNU Lesser General Public License v3.0
8 stars 7 forks source link

Created `has_autograded_submissions` to detect whether student group has at least one non-rejected AG submission #680

Closed Normanwqn closed 6 months ago

Normanwqn commented 7 months ago

To facilitate fixing this bug where we needed an efficient way to tell whether a student group's has submitted any non-rejected submissions, we introduced a new field has_autograded_submissions in data returned by ListHandgradingResultsView Django Rest API. has_autograded_submissions is true if the student group has at least one submission on the autograder whose status is ag_models.Submission.GradingStatus.finished_grading, and false otherwise, when the student group has no submissions or all their submissions have been rejected.

Previous unit tests have been modified to accommodate this change. New unit tests and interfaces have been written to test student groups who only have rejected submissions.

Normanwqn commented 7 months ago

@james-perretta I implemented a draft change to reflect what was mentioned here

Normanwqn commented 6 months ago

@james-perretta I implemented another draft to use _GroupHGDataConfig to handle test student groups with finish_grading status with no handgrading results :)

james-perretta commented 6 months ago

@Normanwqn Thanks! Taking a look now

Normanwqn commented 6 months ago

@james-perretta I took some advice and experimented with match to hopefully have a clearer mapping between the code and the cases. :)

Normanwqn commented 6 months ago

@james-perretta I merged in the helper functions. You may take a look when you got time :)

james-perretta commented 6 months ago

@Normanwqn Looks good! Let me figure out why CI isn't running... In the meantime, make sure that pycodestyle (pycodestyle autograder) and mypy (bash run_mypy.sh) come up clean if you haven't already.

james-perretta commented 6 months ago

Going to try closing and reopening to get CI to run.

james-perretta commented 6 months ago

Looks like that didn't work. @Normanwqn, can you open a fresh PR for this?