WeBWorK Main Forum

BUG with gateway quiz in 2.12

BUG with gateway quiz in 2.12

by Chris Ahrendt -
Number of replies: 11
On a gateway quiz, students are not shown whether their answer is correct or not after clicking the "Grade Test" button regardless of settings. 

For example, when completing a gateway exam using a student account, after clicking the "Grade Test" button, WebWork reports that the submission WAS recorded, and reports the score.  However, for each problem it does _not_ have the "Result" column, nor does it have the colored bar indicating wether or not the answer was correct.

But, when I take the same gateway quiz as an instructor and click the "Grade Test" button, WebWork correctly displays the "Result" column and has the colored bar "This answer is (NOT) correct."

The settings I am using for the gateway quiz are:
Show Scores on Finished Assignments? -- Yes
Show Problems on Finished Tests -- Yes


Is anyone else experiencing this on 2.12?  (We did not have this issue in 2.10 which we were running prior to this semester.)  Or is this an issue with our setup here?

Chris
In reply to Chris Ahrendt

Re: BUG with gateway quiz in 2.12

by Chris Ahrendt -
Update: I have found a workaround.

It appears that this issue occurs in Gateway Quizzes that were created in a prior version of WebWork (in our case 2.10 or earlier).  When I create a new course on our server, I archive the old version, and unarchive it renaming it for the new version of the course.  (I of course then remove the old students, old log files, etc.).  These Gateway Quizzes are all experiencing the issue explained above.

However, if I use "Create" and make a "a new empty set," and then copy over the settings and problems, it _will_ function correctly.  [This is the workaround I am using right; recreating each Gateway Quiz I use.] If I use "Create" and select "a duplicate of the first selected set", then the issue is still there in the new set.  So whatever setting is off in the Gateway Quizzes that were created in prior versions of WebWork, is copied in this process.

I have not yet tried exporting to a .def file and reimporting, and so I don't know if the problem will persist there.
In reply to Chris Ahrendt

Re: BUG with gateway quiz in 2.12

by Chris Ahrendt -
Sorry for continuing to post on this, but it turns out lots of folks at my institution use Gateway quizzes for various things in their courses, and the work around I mentioned in the other post is quite inconvenient.  Also, importing .def files (even version 2 .def files) results in Gateway quizzes that do not show correct/not correct to the students regardless of settings.

As a temporary fix that does not require recreating assignments as I posted before, we have reverted GatewayQuiz.pm to the version right before the commit that seems to have broken this on our server:
https://raw.githubusercontent.com/openwebwork/webwork2/c6368255ec4333e8613a64f2228a689a40d522fd/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm

In particular, I think the commit that seems to have caused the issue is
https://github.com/openwebwork/webwork2/commit/8ac88a9a933292713fcd74752e4e05aa0a00d9fb

So far, this seems to have fixed the problem for us.

Chris


In reply to Chris Ahrendt

Re: BUG with gateway quiz in 2.12

by Alex Jordan -
I think we have a similar issue and I will investigate the workarounds suggested here.

I don't use Gateway quizzes myself, but one instructor reports:
A student took already a quiz. It turned out that he was not able to see the correct answers or solutions afterwards, which until now was always possible for students. I don't remember that I had to change something for that and also could not find anything anywhere to change. The permissions seem to be all correct when I checked them.

And another reports:
In ... classes, after a student takes a quiz, they can open their attempt, and have two options at the end of the quiz: Show Correct Answers, and Show Solutions. They can learn from mistakes this way.

However, in my ... class, those two checkboxes are missing for my students. You can log in as Alex Schmidt and see what I mean (click on his Week1Quiz attempt 1):
I'll be looking at the def files used to create all three quizzes. If I understand correctly, everything is working for the second instructor's first class. So that may be a good sign that there is a setting that can address all this.
In reply to Alex Jordan

Re: BUG with gateway quiz in 2.12

by Gavin LaRose -

I encountered this problem last semester (and this), and after some debugging I think the issue is with the import set function leaving the hide_score_by_problem field for the imported set empty.

A work around if one is able and happy to edit the WeBWorK mysql database:

    mysql> update `[coursename]_set` set hide_score_by_problem='N' where set_id in ('list','of','gateway','sets');

Looking at the import function I haven't yet determined why the import is not correctly initializing the hide_score_by_problem field.

Gavin

In reply to Gavin LaRose

Re: BUG with gateway quiz in 2.12

by Chris Ahrendt -
Gavin~

After we updated to the latest WebWork (2.13) this issue resurfaced, and your fix of manually editing the database took care of it. Thank you much!

Chris
In reply to Chris Ahrendt

Re: BUG with gateway quiz in 2.12

by Larry Riddle -
We are experiencing these problems also with a Gateway quiz where students receive no feedback on whether their submitted solutions are correct or incorrect, and there are no check boxes at the end of the Gateway for "show correct answers" or "show solutions". This worked fine in version 2.12. Our problem started after upgrading (in August) to version 2.13.

The instructor reporting the problem had created the gateway assignment by importing the def file for the gateway from last year's course. Based on one of Chris's comments above, we created a new gateway from scratch. We then got the "incorrect/correct" indication for each submitted solution, but there are still no check boxes at the end for "show correct answers" or "show solutions".

Does Gavin's work around with manually editing the mysql database resolve both issues?

While I have served as the Webwork admin for our server, I have never manually edited the mysql database and I don't want to mess up the database. Could someone provide a few more details about the steps necessary to execute that command to manually edit the database? Thanks.

Larry
In reply to Larry Riddle

Re: BUG with gateway quiz in 2.12

by Larry Riddle -
Oops. Seems that creating the gateway from scratch does indeed resolve both issues with the "incorrect/correct" messages and missing check boxes at the end for showing the correct answers and solutions. Not sure why my first attempt to create a new gateway did not do that, but the second attempt produced a gateway test that works just the way we want. So no need to edit the database.

Hopefully this is a bug that can be resolved for version 2.14 so that creating a gateway via a def file from a previous course will work correctly.

Larry
In reply to Larry Riddle

Re: BUG with gateway quiz in 2.12

by Danny Glin -
Have you tried editing a "broken" gateway and then just clicking Save Changes. I would expect this to write the missing settings to the database, but I haven't tested this.
In reply to Gavin LaRose

Re: BUG with gateway quiz in 2.12

by Betsy Rosalen -
Hi Everyone,

We just updated to WeBWorK version 2.13 a few months ago. And now we are experiencing the problem documented here. I was able to fix one individual gateway test by saving a change to the settings as Danny Glin suggested and that worked, so THANKS! but how would we fix this so that I don't have to do this on every course and every quiz individually? Is the solution Gavin posted above about changing the mysql database a fix for all courses? I just want to be sure what needs to be done before I bug my IT department to fix it...

Thanks!
Betsy
In reply to Betsy Rosalen

Re: BUG with gateway quiz in 2.12

by Danny Glin -
Assuming that one setting is the only one that is missing, then Gavin's mysql command should fix things. Note that you will have to run the command once for each affected course.

I believe that rather than listing the gateway sets, you could get away with the following command to fix all of the sets within the course:
 mysql> update `[coursename]_set` set hide_score_by_problem='N' where hide_score_by_problem is null; 
This will set "hide_score_by_problem" to no for any set where it is undefined.

I haven't tested this, so I recommend running it on a test course and checking that it doesn't break either a gateway quiz or a regular homework set before running it on your live courses.
In reply to Chris Ahrendt

Re: BUG with gateway quiz in 2.12

by David Nawrocki -

I have found that if you change a parameter in the exam setting like time allowed save the settings then change them back to the original and re-save the problem will be resolved.  It may also work if you just click save without changing any exam parameters but I know for certain that the first solution definitely works.