Skip to content

Commit

Permalink
Tweaked form to match actual behavior.
Browse files Browse the repository at this point in the history
  • Loading branch information
rahularya50 committed Jan 8, 2020
1 parent dd3f290 commit 0d53c11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,13 +702,13 @@ class EffortGradingForm(BaseForm):
description="Decimal ratio that is multiplied to the final score of a late submission.")

class ExportGradesForm(BaseForm):
included = MultiCheckboxField('Included Assignments', description='Assignments with any published scores are checked by default')
included = MultiCheckboxField('Included Assignments', description='You can only export assignments with published scores')
export_submit_times = BooleanField('Export submission times', default=False)

def __init__(self, assignments):
super().__init__()

self.included.choices = [(str(a.id), a.display_name) for a in assignments]
self.included.choices = [(str(a.id), a.display_name) for a in assignments if a.published_scores]

if self.included.data is None:
self.included.data = [str(a.id) for a in assignments if a.published_scores]
Expand Down

0 comments on commit 0d53c11

Please sign in to comment.