Closed drgrice1 closed 8 months ago
Suppose a student answered an essay, and the instructor graded it. The student returns to the problem and clicks submit again, without changing anything. They see the feedback button that says "Graded", and it does not have an additional message about being graded at a later time. So far, so good.
Then, without changing anything, the student hits submit again. Now the feedback is "Ungraded" with "This answer will be graded at a later time." So one or the other of these last two submissions reset something to mark the problem as needing to be graded.
Would it be possible to compare the essay answer text currently being submitted with the essay answer text that is stored from the previous submission, and don't change the status for needing to be graded if there is no change in the essay text content?
That can be done. However, there is a caveat. If a problem has multiple essay answers, and the problem was graded, then if the student changes one of the essay answers but not the other, both will still show up as needing grading. There is only one flag and it is per problem, not per answer.
I set it up so that if a student submits a problem that has been graded without changing any of the essay answers in the problem, then the answer remains marked as having been graded (and is reported as such in the feedback). Of course, the caveat in my previous comment applies to problems with multiple essay answers.
Note that if a student answered an essay question previously so that the answer has been marked as needing grading (and the instructor has not graded it), and then the student deletes the answer entirely and submits that, then the flag marking the answer as needing grading will be removed.
That is actually an unintended consequence of how I set up the logic. I realized this, and was going to fix it. However, I think that is actually good. So I will leave it. An empty answer should not be marked as needing grading.
First, the single problem grader now removes this flag when an essay answer is graded. A new
mark_graded
parameter for the WebworkWebservice::ProblemActionsputUserProblem
andputProblemVersion
methods is added to accomodate this.When a problem is rendered this flag now needs to be passed to PG to indicated whether a problem still needs to be graded so that essay answers can not always show "Ungraded". This is needed for https://github.com/openwebwork/pg/pull/979.
The
create_ans_str_from_responses
method now handles adding this flag instead of that code being duplicated in ProblemProcessing.pm and GatewayQuiz.pm.