openwebwork / webwork2

Course management front end for WeBWorK
http://webwork.maa.org/wiki/Main_Page
Other
145 stars 165 forks source link

Improvements to the essay "needs_grading" flag. #2270

Closed drgrice1 closed 8 months ago

drgrice1 commented 10 months ago

First, the single problem grader now removes this flag when an essay answer is graded. A new mark_graded parameter for the WebworkWebservice::ProblemActions putUserProblem and putProblemVersion 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.

Alex-Jordan commented 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?

drgrice1 commented 8 months ago

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.

drgrice1 commented 8 months ago

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.

drgrice1 commented 8 months ago

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.