Skip to content

Commit b7986b8

Browse files
committed
Add template information for when grader feedback has been received
This can be used e.g. to show feedback messages from the grading services that don't want to be permanently shown in the student feedback, like "Feedback received" in mooc-jutut.
1 parent 849a1b9 commit b7986b8

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

exercise/templates/exercise/exercise_plain.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@
203203
{% if disable_submit %}
204204
data-aplus-disable-submit="true"
205205
{% endif %}
206+
{% if grader_feedback_just_received %}
207+
data-aplus-grader-feedback-just-received="true"
208+
{% endif %}
206209
>
207210
{% include "_messages.html" %}
208211
{% include "exercise/_submit_progress.html" %}

exercise/views.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,11 @@ def post(self, request: HttpRequest, *args: Any, **kwargs: Any) -> HttpResponse:
248248
return self.redirect(request.GET["__r"], backup=self.exercise);
249249

250250
return self.render_to_response(self.get_context_data(
251-
page=page, students=students, submission=new_submission))
251+
page=page,
252+
students=students,
253+
submission=new_submission,
254+
grader_feedback_just_received=True,
255+
))
252256

253257
def submission_check(self, request=None):
254258
if self.exercise.grading_mode == BaseExercise.GRADING_MODE.LAST:

0 commit comments

Comments
 (0)