Quiz results vanished and new attempts not saving

Quiz results vanished and new attempts not saving

by Debbie Kay -
Number of replies: 10

Hi

Our host moved us to 'the cloud' this week and we have discovered several problems with our moodle installation since the move.

One major one is that quiz results for some, but not all quizzes vanished and even worse, those quizzes affected, whilst they can still be done and the timer works - results are not saved for new attempts since the move either!

I have found this out in testing - I have had to stop assessments being available until we can fix this - can anyone help?

I posted some images on another post here yesterday but as the issue is now expanded due to further testing, I have started a new thread with a closer description of the issue - I hope this is OK - previous post here https://moodle.org/mod/forum/discuss.php?d=231136

We are on 1.9.4 without issue till the move. 

Thanks in advance!

Average of ratings: -
In reply to Debbie Kay

Re: Quiz results vanished and new attempts not saving

by Jean-Michel Védrine -

Hello Debbie,

I don't think it is possible to understand the problem without more informations.

You need to set the debugging level to DEVELOPER so tha errors are displayed and we understand what is happening.

To do that in Moodle 1.9.4 (I had to search the docs to remember how to do that in Moodle 1.9 big grin) on the front page in the "Site Administration" block, click on "Server" then "Debugging" and choose "DEVELOPER: extra Moodle debug messages for developers" in the drop down menu near "Debug messages". Save changes.

Then as a student take one of the affected quiz and see if any error message is displayed.

 

In reply to Jean-Michel Védrine

Re: Quiz results vanished and new attempts not saving

by Debbie Kay -

Hi Jean-Michel and thanks for your post and help - I know you are not a fan of of 1.9.4 smile

I have done as suggested and can confirm when I take the test as a student, it all appears to work and submit as normal - BUT...

When I then return to my usual role (Admin) to try to view the 'students' submission, the Quizzes > info page shows the increased number in 'Attempts' as if the submission is saved, but then clicking on 'Attempts' link or 'Results' tab to view results show the second image posted previously.

Also I can confirm not all tests are affected and bizarrely the one I took the sceenshot of to show the issue yesterday has changed its behaviour and now DOES show the 'results' when accessing the 'results' tab! The screenshot clearly shows different behaviour in the same test yesterday.

This itself is a concern as it is important assessments are robust and reliable, which till now they seemed to be!

Any help/advice/suggestions appreciated smile

 

In reply to Debbie Kay

Re: Quiz results vanished and new attempts not saving

by Jean-Michel Védrine -

Hello Debbie,

If no error message is displayed, i don't really know what to suggest next sad.

I am also puzzled by the fact results change from one day to the other for the same quiz.

This may be related to the fact your Moodle is now hosted "in the cloud" but I have no experience about that.

In reply to Jean-Michel Védrine

Re: Quiz results vanished and new attempts not saving

by Debbie Kay -

Hi Jean-Michel

Thanks again for your reply, it is appreciated, even it you cannot help!

The change in behaviour is a real worry and a puzzle - if I hadn't taken the screenshot the day before, I might have doubted myself and thought maybe I made a mistake and was looking at one of the tests not affected, but not so. 

I have not used the developer debugging before, can I ask where do the errors show if there are any, maybe I have just not seen them?

Do they pop up on screen, or do I have to go somewhere and look for them?

 

In reply to Debbie Kay

Re: Quiz results vanished and new attempts not saving

by Debbie Kay -

Ahh - I found the error logs and the following error appears often:

File does not exist: /services/users/a17d2fa9-d0bc-4b58-9af3-1fe800529c05/hostname/www/domain.com/moodle/mod/quiz/itestwin.html

Though if the file is missing I would think the results would never be available?

Occasionally the error below appears also:

mod_fcgid: stderr: PHP Notice:  BIGINT UNSIGNED value is out of range in '(`database_name`.`qa`.`timefinish` - `database_name`.`qa`.`timestart`)'<br /><br />SELECT CONCAT(u.id,'#', IFNULL(qa.attempt, 0) ) AS uniqueid, (CASE    WHEN qa.sumgrades = (SELECT MAX(qa2.sumgrades) FROM mdl_quiz_attempts qa2 WHERE qa2.quiz = qa.quiz AND qa2.userid = qa.userid) AND qa.timestart = (SELECT MIN(qa3.timestart) FROM mdl_quiz_attempts qa3 WHERE qa3.quiz = qa.quiz AND qa3.userid = qa.userid AND qa3.sumgrades = qa.sumgrades) THEN 1 

I have been doing further testing today and discovered another piece of info. which may help.

After retaking a quiz 3 times where 'Attempts' results were missing - 'magically' the proper page showing ALL the results re appeared!

When I deleted the test entries to leave just the students tests there - the 'Attempts' showed 'nothing to display again, even though the 'Attempts' number shown is correct i.e there are some.

 

In reply to Debbie Kay

Re: Quiz results vanished and new attempts not saving

by Jean-Michel Védrine -

This is just the info I needed big grin the "BIGINT UNSIGNED value is out of range in .." bit reminded me immediately of the problem.

You are experiencing problems with the subtraction of 2 bigints

This is MDL-26937 and it was fixed in Moodle 1.9.12 !

so if you can't run anything more recent than Moodle 1.9, I suggest to upgrade to the latest version of Moodle 1.9 (Moodle 1.9.19+)

If you can't make any upgrade (for instance if you have many customizations) and you need to fix the problem very quickly, you will need to edit mod/quiz/report/overview/report.php to do the same changes that were done to fix MDL-26937 but I really think this is not the best way to go because there are surely a ton of other bugfix between 1.9.4 and 1.9.19+

Really you should upgrade to 1.9.19+

Average of ratings: Useful (1)
In reply to Jean-Michel Védrine

Re: Quiz results vanished and new attempts not saving

by Jean-Michel Védrine -

Something else:

 quoting you from the other thread

The host says:

"The only thing we can do in this case is to restore your database from a backup from a date when the statistics of the completed assessments and grades were existing. Note that this will automatically erase the newest information inserted in the database.
According to me this is the only way to restore the old data but the risk for deleting the new entries is high."

On telling host to go ahead, they report none of their backups have any content in so cannot actually do it now anyway!!

Obviously your host was wrong and all the backups had content ! All the attempts were in the database.

So additionally to upgrading Moodle my advice is also to "upgrade" to a better hosting company !

 

In reply to Jean-Michel Védrine

Re: Quiz results vanished and new attempts not saving

by Debbie Kay -

Hi Jean-Michel and thanks - glad the extra info. was helpful and for taking the time to post on how to fix! big grin

I do not know what a 'bigint' is but will have another look at upgrading to the latest 1.9 for the fix as you suggest smile

Funny how it has not shown this problem before the 'cloud' upgrade, that appears to have brought it out! 

I will also be exploring your other suggestion re 'upgrading' too - Big thanks again! smile

Time for me to do more research!

 

In reply to Debbie Kay

Re: Quiz results vanished and new attempts not saving

by Jean-Michel Védrine -

Happy if I have been of some help.

If you can't upgrade immediately, I can send you a modified mod/quiz/report/overview/report.php for Moodle 1.9.4 so that you can re-activate quiz for your students without needing to wait to upgrade to 1.9.19+

It would not take me long to do it.

 

In reply to Jean-Michel Védrine

Re: Quiz results vanished and new attempts not saving

by Debbie Kay -

Hi Jean-Michel

Thanks for your kind offer to provide a modified file to fix the issue!

As you might have gathered, I am not a coder smile

Bearing in mind your comments about 1.9.19+ having lots of bug fixes over 1.9.4 (though 1.9.4 has been working well for us till the move to the 'cloud!) I wonder if this might be a better solution to proceed with now?

I would have to look to employ someone to do this I think as would not want to risk breaking it completely!