-
Notifications
You must be signed in to change notification settings - Fork 146
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
Assign contributor questionnaires per course type #2373
base: main
Are you sure you want to change the base?
Conversation
evap/staff/templates/staff_semester_questionnaire_assign_form.html
Outdated
Show resolved
Hide resolved
Currently there are two tests doing similiar things to test the questionaire assignment. |
@jooooosef If merging the tests makes your life easier for your testing here, feel free to do it, otherwise consider opening a separate PR - or we can show you how to clean up the commits on your branch next week and make it into two commits here :) |
@niklasmohrin I'll take the 2 commits option 👷 |
ad2fbb8
to
d9a9d31
Compare
added the option to specify course types, where specific contributor questionaires should be added to all such courses
one test that tests questionaire assignemnt was 3k lines below the other one
d9a9d31
to
19083b5
Compare
) | ||
|
||
for course_type in course_types: | ||
self.fields["general-" + str(course_type.id)] = forms.ModelMultipleChoiceField( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think f-strings are more concise here, below, in the test and the other view
self.fields["general-" + str(course_type.id)] = forms.ModelMultipleChoiceField( | |
self.fields[f"general-{course_type.id}"] = forms.ModelMultipleChoiceField( |
self.assertEqual(evaluation.general_contribution.questionnaires.count(), 1) | ||
self.assertEqual(evaluation.general_contribution.questionnaires.get(), self.questionnaire_general) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.assertEqual(evaluation.general_contribution.questionnaires.count(), 1) | |
self.assertEqual(evaluation.general_contribution.questionnaires.get(), self.questionnaire_general) | |
self.assertQuerySetEqual(evaluation.general_contribution.questionnaires, [self.questionnaire_general]) |
maybe also below?
fix #2299