Commit 56879fe
committed
Add a message to the grade test confirmation dialog when questions are unanswered.
When the "Grade Test" button is clicked, JavaScript parses the
`probstatus` inputs and determines what problems are in the test. Then
it finds the answer inputs in the page and determines if there are any
questions in a problem that are unanswered. If there are any problems
with unanswered questions, then a message stating that is added to the
confirmation dialog.
This is to address the feature request in issue #2183.
Generally, this will work for most answers. However, there are a couple
of cases that don't work right. These are cases where answer inputs are
non-empty even if a student has not actively entered an answer.
Most notable is the case of an answer to a `draggableProof.pl` or
`draggableSubset.pl` question. The JavaScript for those always fills in
a non-empty answer as soon as the problem is loaded into the page.
Another case is if a problem uses the deprecated `PopUp` method from the
`parserPopUp.pl` macro or the deprecated methods from
`PGchoicemacros.pl`. For example, if `PopUp([ '?', 'a', 'b', 'c' ], 1)`
is used. That will have the non-empty value `?` for the default answer.
Unanswered questions that use the `draggableProof.pl` and
`draggableSubset.pl` macros could be determined server side, but the
only way to do so would be to process the problem via PG. There were
several suggestions in issue #2183 to use a server side set "flag" or
have other server queries involved in this. Those really don't help
other than in this case, and generally shouldn't be done. We really do
not want to have a submission to the server that processes all problems
in a test to determine if there are unanswered questions before
submitting a test for grading in which all problems will again be
processed. There was a suggestion to change the "preview test" button
into a "save answers" button, but even that doesn't really help. It
would not be reliable, because the information would only be there if
the button were used first. There is no guarantee it would be used
first, and this needs to have the ability to process the answers
regardless.
Note that attempting to correctly determine if a question that uses
`parserPopUp.pl` or `PGchoicemacros.pl` is unanswered cannot even be
done by processing the problem. This just adds emphasis that those
should not be used anymore.
There may be some other cases that have non-empty answers without
students actively answering a question, but I can't think of any at this
point.
One thing to note is that if a problem has never even been displayed on
the page (for example a `draggableProof.pl` problem that is on a page of
the test the student never goes to) this approach will work correctly
even for the above cases.1 parent a00a004 commit 56879fe
File tree
2 files changed
+61
-0
lines changed- htdocs/js/GatewayQuiz
- templates/ContentGenerator
2 files changed
+61
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
191 | 226 | | |
192 | 227 | | |
193 | 228 | | |
| |||
224 | 259 | | |
225 | 260 | | |
226 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
227 | 279 | | |
228 | 280 | | |
229 | 281 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
727 | 727 | | |
728 | 728 | | |
729 | 729 | | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
730 | 739 | | |
731 | 740 | | |
732 | 741 | | |
| |||
0 commit comments