Skip to content

Commit

Permalink
Add validation for the exercise grading_mode setting
Browse files Browse the repository at this point in the history
The validation rejected courses that used the grading_mode setting
since the validation code did not include those settings at all.
  • Loading branch information
markkuriekkinen committed Feb 9, 2023
1 parent 5b7c89f commit cbcd505
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions access/course.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ class Exercise(Item):
points_to_pass: NotRequired[NonNegativeInt]
reveal_submission_feedback: NotRequired[RevealRuleOptions]
reveal_model_solutions: NotRequired[RevealRuleOptions]
grading_mode: NotRequired[Literal["best", "last"]]
_config_obj: Optional[ExerciseConfig] = PrivateAttr(default=None)

def config_file_info(self, course_dir: str, grader_config_dir: str) -> Optional[Tuple[str, str]]:
Expand Down

0 comments on commit cbcd505

Please sign in to comment.