WeBWorK Main Forum

Some questions in gateway/quiz mode not being graded

by James Mc Laughlin -
Number of replies: 4

I just gave an exam this afternoon, using the gateway/quiz mode.

I found that for some graph theory questions (which work fine in homework mode), where students had to check boxes, neither the student answers nor the correct answer would show up when I clicked "check test", with "Show Correct Answers" and "Show Solutions" both checked.

I could still see the boxes the student had checked, but the usual

Entered Answer Preview Correct Result

array was empty.

Specifically, these problems were in Open Problem Library->Graph Theory->Terminology->Misc.

Library/NAU/setGraphTheory/IsBipartite.pg

Which of the following graphs are bipartite?

Library/NAU/setGraphTheory/IsIsomorphic.pg.

Which of the following graphs are isomophic?

Another problem from Open Problem Library->Graph Theory->Trees->Misc had the same issue:

Library/NAU/setGraphTheory/IsTree.pg

Which of the following are trees and which are forests?

Hopefully that is enough information for anyone interested to duplicate the problem. If not, let me know what additional information I need to provide.

Looking around the forum I saw some mention of similar issues, but could not find the resolution.

Does anyone know of a fix?

Any help/guidance here greatly appreciated.

Tags:
In reply to James Mc Laughlin

Re: Some questions in gateway/quiz mode not being graded

by Glenn Rice -
The issue is that these problems use an incorrect method of naming the answer blanks in the problem via a custom NAU macro. This incorrect method is prevalent with many of the problems in the open problem library that use named answer blanks. What happens is that the custom NAU macro creates answer names, but it does not use the quiz prefix for those names when the names are passed to the NAMED_ANS_... methods.

To fix this you will need to fix the macro.  For the problem Library/NAU/setGraphTheory/IsTree.pg, you will need to fix the macro located (by default) at /opt/webwork/libraries/webwork-open-problem-library/OpenProblemLibrary/macros/NAU/PGnauGraphics.pl.  Change lines 137 and 138 of that file from

$$val3[j] = (j ? NAMED_ANS_CHECKBOX_OPTION(name, letter, lab): NAMED_ANS_CHECKBOX(name, letter, lab)); to$$
val3[$j] = ($j ? NAMED_ANS_CHECKBOX_OPTION($main::PG->{QUIZ_PREFIX} .$name, $letter,$lab):
NAMED_ANS_CHECKBOX($main::PG->{QUIZ_PREFIX} .$name, $letter,$lab));

This will still work with homework problems.  This may fix the other problems as well if they use the same method in that macro.  If they use similar methods from that macro or from other custom NAU macros, those macros will need similar fixes.
In reply to Glenn Rice

Re: Some questions in gateway/quiz mode not being graded

by James Mc Laughlin -
Thanks very much, Glenn.

Since I could not find a way to navigate to that file, I take it that it is whoever the local WebWork site administrator here is the person who will have to make that change?
In reply to James Mc Laughlin

Re: Some questions in gateway/quiz mode not being graded

by Glenn Rice -

You would have to have system administrative access to change that file.  However, you could copy the macro file to the course's templates/macro directory and modify the local file as I said above.  That file would then be used instead of the one in the library.  You could download the file from github if you can't access it on the system.

In reply to Glenn Rice

Re: Some questions in gateway/quiz mode not being graded

by James Mc Laughlin -

There was a copy of that file already in my  templates/macro directory, so I modified that as you described, tested it on a made-up sample test, and grading now works perfectly.

I also checked that it still works in homework mode.

Fantastic bit of diagnosis!!!

Thanks again.