Skip to content

Allow adding submission comments for submissions without a grade #112

Description

@JasonGrace2282

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions