Skip to content
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

Dropped Courses #2262

Draft
wants to merge 52 commits into
base: main
Choose a base branch
from
Draft

Dropped Courses #2262

wants to merge 52 commits into from

Conversation

fekoch
Copy link
Collaborator

@fekoch fekoch commented Aug 5, 2024

fixes #991

(@janno42) As discussed, we want:

  • A check-box "Allow drop-out?" when creating new evaluations
  • A setting "DROPOUT_QUESTIONNAIRE_ID" to set which questionnaire should be shown when using the drop-out function.
  • The "I dropped this course" button should be shown only on the student index and only for evaluations that "allow drop-out"
  • Show Dropout Questionnaire answers in Result UI
    • (only shown to people who can see general text answers)
  • Dropout questionnaire Textanswers should not be shown in the textanswer review

@fekoch fekoch force-pushed the 991/dropped-courses branch from 6545c8d to 9ea80f3 Compare August 5, 2024 18:55
evap/evaluation/models.py Outdated Show resolved Hide resolved
evap/static/font-awesome/scss/_mixins.scss Outdated Show resolved Hide resolved
evap/static/font-awesome/scss/fontawesome.scss Outdated Show resolved Hide resolved
evap/student/templates/student_index_evaluate_or_drop.html Outdated Show resolved Hide resolved
@fekoch fekoch force-pushed the 991/dropped-courses branch 3 times, most recently from d91a83b to 2f42c54 Compare October 14, 2024 17:02
@fekoch fekoch force-pushed the 991/dropped-courses branch from 2f42c54 to e2e836e Compare October 14, 2024 19:07
Questionnaire.objects.active_dropout_questionnaire().update(is_active_dropout_questionnaire=False)
self.is_active_dropout_questionnaire = True
self.save()
# TODO@Felix: why does this not work [wip]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the (unique=True, blank=True, null=True) tri-state approach forces us to have at most one instance with value True and all other instance with value None/NULL. The update above sets it to False, which would give it a unique validation failure. Guess that's one issue here

@@ -162,6 +163,12 @@ def general_questionnaires(self):
def contributor_questionnaires(self):
return super().get_queryset().filter(type=Questionnaire.Type.CONTRIBUTOR)

def dropout_questionnaires(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're touching these and it's no trouble, it would probably be nice if you could also add the return type annotation (-> QuerySet[Questionnaire] or whatever it should be)

(same for the views below that return HttpResponse. It's a bit annoying, but for backwards compatibility, no annotation always means "Any", even if the method always returns some specific type. I wonder if mypy issue 4409 will one day be implemented.)

evap/evaluation/models.py Outdated Show resolved Hide resolved
Comment on lines 242 to 243
if self.type != Questionnaire.Type.DROPOUT:
raise ValueError("Can only set DROPOUT-type Questionnaires as active dropout questionnaire.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably fair to just use an assertion -- or do we expect this to ever happen for a correct program execution?

evap/staff/templates/staff_questionnaire_index_list.html Outdated Show resolved Hide resolved
@fekoch fekoch force-pushed the 991/dropped-courses branch from c24d5dd to 178fc31 Compare October 21, 2024 16:50
@fekoch fekoch force-pushed the 991/dropped-courses branch from 0c1711f to 2f3043b Compare October 28, 2024 17:07
@fekoch fekoch force-pushed the 991/dropped-courses branch 2 times, most recently from dc783bf to 96e9dc7 Compare November 11, 2024 17:09
@fekoch fekoch force-pushed the 991/dropped-courses branch 2 times, most recently from 1fa6eb3 to 5a312ec Compare November 25, 2024 18:31
@fekoch fekoch force-pushed the 991/dropped-courses branch 5 times, most recently from 2cb0daf to cfcf4fd Compare December 2, 2024 21:38
Comment on lines +8 to +15
{% blocktranslate %}
If you mark this course as dropped, you can still give feedback like normal, but your answers will only
be visible to contributors.
{% endblocktranslate %}
<br>
{% blocktranslate %}
You will not be able to vote for this course afterwards.
{% endblocktranslate %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would be fine

Suggested change
{% blocktranslate %}
If you mark this course as dropped, you can still give feedback like normal, but your answers will only
be visible to contributors.
{% endblocktranslate %}
<br>
{% blocktranslate %}
You will not be able to vote for this course afterwards.
{% endblocktranslate %}
{% blocktranslate %}
If you mark this course as dropped, you will still be able to provide feedback as usual. However, you can only submit the questionnaire once.
{% endblocktranslate %}

@fekoch fekoch force-pushed the 991/dropped-courses branch from cfcf4fd to 0f5c592 Compare December 16, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Dropped courses
3 participants