Quiz

Broken quizzes after 2.2 -> 2.3 upgrade

This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.
Re: Broken quizzes after 2.2 -> 2.3 upgrade

This is very odd.

Permissions make almost no difference to what happens when at attempt at some questions is started. Well, that is not really true, but they make no difference to how the choices of a multiple choice question are loaded and shuffled.

So, I don't understand why it works for admins but not for students. Are you sure the situation is not: it works for new attempts created now, but does not work for attempts created before the upgrade?

The upgrade from 2.2 to 2.3 did not do very much quiz-related. I am just looking through mod/quiz/db/upgrade.php.

Ah, you might be suffering from a similar problem to MDL-32727, and the work-around we put in place to fix that issue may have caused bigger problems for you. Would you be able to run this database query: http://docs.moodle.org/dev/Overview_of_the_Moodle_question_engine#Detailed_data_about_an_attempt to extract the data for one of the affected quiz attempts, and then attach it here, or email it to me. (Note that the

timestamptz 'epoch'+ qas.timecreated * interval '1 second',

bit is Postgres specific, if you are on MySQL change that to FROM_UNIXTIME(qas.timecreated).)

Average of ratings: -
Re: Broken quizzes after 2.2 -> 2.3 upgrade

Thanks for the response. We've been looking into it a bit more of course, and found a bunch of entries in the upgrade logs that refer to
"Ignoring extra finish states in attempt at question 295"

and

"Two inconsistent finish states found for question session 7447 in attempt at question 309 keeping the later one."

I'll send over the results of that query shortly. In the meantime, does this issue seem like something can be solved, or is it more serious and, er, catastrophic than that? Mainly I just want to determine if we should roll back to 2.2 ASAP, to minimize data lost if we can't fix this, or if it seems like there is a reasonable chance of a fix, we can save the hassle of a roll-back and keep working on it...

Thanks,

Oshyan

Average of ratings: -
Re: Broken quizzes after 2.2 -> 2.3 upgrade

The upgrade log you refer to relates to the upgrade between 2.0 and 2.1. It is not relevant to this problem.

Are you sure the data you gave corresponds to an attempt that is broken when you review it? It looks to me as if it should work.

I think this will be fixable, but I cannot be sure because we don't yet know what happened.

Average of ratings: -
Re: Broken quizzes after 2.2 -> 2.3 upgrade

The data was from a query run against a quiz where the *admin review* shows the problem. I was not able to get data from the database where we had tested from the student side, but the issue has the same symptoms whether viewed from student or admin side. I did not test the student view on the data set we attached, but can do so tomorrow.

What would be the best way to expedite the continued investigation of this problem? We can give you admin and full cpanel/sql access to a sandbox server with the issue replicated.

Thanks so much for your help thus far!

- Oshyan

Average of ratings: -
Re: Broken quizzes after 2.2 -> 2.3 upgrade

This issue has now been resolved. It turned out it was an incomplete import from our old Moodle 2.2 database to one on a new host. It's an 800MB total database size and I guess it just timed out or something. Moodle handled the issue surprisingly "gracefully", but at the same time unhelpfully (in that it didn't know there was incomplete data in the table). But I understand it's a bit much to expect Moodle to be able to self-diagnose that.

In any case thanks for the help Tim, and sorry for the wild goose chase on the problem.

- Oshyan

Average of ratings: -
Re: Broken quizzes after 2.2 -> 2.3 upgrade

I am glad you tracked the problem down and fixed it.

I agree, the symptoms that Moodle displayed as a result of this problem are odd.

Average of ratings: -
Re: Broken quizzes after 2.2 -> 2.3 upgrade

We're on MySQL. We attempted to run the query but it says the result set is empty.

- Oshyan

Average of ratings: -
Re: Broken quizzes after 2.2 -> 2.3 upgrade

Ok, result set was empty for one quiz ID that we tried it on, that we *are* having the problem with. But some others produced output. Attached is output from another that has the same issue.

- Oshyan

Average of ratings: -