Skip to content

Commit

Permalink
fix(AssignmentGradingConfigurationUpdateView): corrected changing gra…
Browse files Browse the repository at this point in the history
…ding for assignments
  • Loading branch information
Levijatan committed Oct 25, 2023
1 parent a3355fe commit 663645f
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions devilry/devilry_admin/views/assignment/gradingconfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,16 @@ def __create_point_to_grade_map(self, form, assignment):

def form_valid(self, form):
assignment = self.request.cradmin_role
assignment.grading_system_plugin_id = form.cleaned_data['grading_system_plugin_id']
assignment.points_to_grade_mapper = form.cleaned_data['points_to_grade_mapper']
assignment.passing_grade_min_points = form.cleaned_data['passing_grade_min_points']
assignment.max_points = form.cleaned_data['max_points']
grading_system_plugin_id = form.cleaned_data['grading_system_plugin_id']
points_to_grade_mapper = form.cleaned_data['points_to_grade_mapper']
passing_grade_min_points = form.cleaned_data['passing_grade_min_points']
max_points = form.cleaned_data['max_points']
assignment.setup_grading(
grading_system_plugin_id,
points_to_grade_mapper,
passing_grade_min_points,
max_points
)
assignment.full_clean()
with transaction.atomic():
assignment.save()
Expand Down

0 comments on commit 663645f

Please sign in to comment.