Currently, we only allow adding comments to submissions with a grade:
|
{% if submission.complete and submission.has_been_graded %} |
|
{% if is_teacher or request.user.is_superuser %} |
|
<h2 style="border-top:1px solid lightgray;padding-top:15px;">Add Comment</h2> |
|
<form action="{% url 'submissions:comment' submission.id %}" method="post"> |
|
{% csrf_token %} |
|
<textarea name="comment" placeholder="Comment" rows="5" cols="120"></textarea> |
|
<br> |
|
<br> |
|
<label for="point_override">Point Override:</label> |
|
<input type="number" name="point_override" value="0" min="-999" max="999" step="0.5"> |
|
<br> |
|
<br> |
|
<input type="submit" value="Add Comment (and publish)"> |
|
</form> |
|
{% endif %} |
|
{% endif %} |
Ideally we should allow adding comments to any submission, regardless of if it has a grade or not. However, there are a multitude of places within Tin's code where it assumes that the submission has a grade when dealing with comments.
Cue the Mission Impossible music: your mission, should you choose to accept it, is to allow adding comments to ungraded submissions, without introducing any new logic bugs. This message will self-destruct in 3. 2. 1.
Currently, we only allow adding comments to submissions with a grade:
tin/tin/templates/submissions/show.html
Lines 244 to 259 in 7a18b1c
Ideally we should allow adding comments to any submission, regardless of if it has a grade or not. However, there are a multitude of places within Tin's code where it assumes that the submission has a grade when dealing with comments.
Cue the Mission Impossible music: your mission, should you choose to accept it, is to allow adding comments to ungraded submissions, without introducing any new logic bugs. This message will self-destruct in 3. 2. 1.