information code numbers

information code numbers

by David Wong -
Number of replies: 9
Hi all,

When a student takes a quiz and you look in the admin>>reports feature, under the information column you see a series of code numbers particularly when there's been a problem like a student going over the time limit. The question is where do I find a list of what those error codes mean? I posted this in the quiz forum because the codes have to do with a quiz attempt.

see attached png... and for example, 8674 or another one not shown as 8706?
Attachment codenumbers.png
Average of ratings: -
In reply to David Wong

Re: information code numbers

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
That is interesting. Actually, it is a very subtle bug.

To fix it, get someone (either you or an administrator) to go into your database, go into the mdl_log_display table, and find the row that contains 'continue attempt'. Change that to 'continue attemp' (without the final t).

The number is the quiz id.
In reply to Tim Hunt

Re: information code numbers

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
Hi Tim -

Can you elaborate on that fix a bit? Why does that change have to be made? Will this just crop up again?

mike
In reply to Mike Churchward

Re: information code numbers

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Well, in the bad old days, it seems that the log.action column was char(15). Which meant that 'continue attempt' did not fit. On MySQL that was silently truncated to 'continue attemp', and on Postgres it gave a fatal error, so at some point ages ago I changed the add_to_log call to say 'continue attemp', but it was a long time ago, and I did not know what I was doing, so I did not know about the log_display table, and did not change that.

Thinking about this again now it has come up in this thread, and I can't decide what the right solution is. My investigation shows that log.action is now char(40), so perhaps I should do a thing in lib/db/upgrade.php that does UPDATE {log} SET action = 'continue attempt' WHERE 'continue attemp' AND module = 'quiz' - which would be very slow on large sites. And also put some code in restore, that does 'continue attemp' -> 'continue attempt' when restoring logs.

Alternatively, we keep the 'continue attemp' because it is too hard to change, and change the entry in log_actions.

Any thoughs on which is the better solution?
In reply to Tim Hunt

Re: information code numbers

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
Ah... One of those...

(Sidenote - there must be some term for those things; like when a function name gets a spelling mistake in it and remains that way forever...)

Better solution... That's one of those tough choices. It certainly seems to make sense to leave it as "continue attemp" since its been that way for so long. But, it appears that it must still be "continue attempt" somewhere, or it wouldn't have shown up in the table above that way, no?

mike
In reply to Mike Churchward

Re: information code numbers

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
If it is writing "continue attempt" somewhere now, either the upgrade has to change those to "continue attemp", or it needs to be the other. Definitely, it needs to be made consistent.

mike
In reply to Tim Hunt

Re: information code numbers

by David Wong -
Tim,

Does the action "quiz continue attempt" mean that the student closed the quiz window and then reopened or reattempted it? see the picture attached with earlier post here..

wouldn't a normal progression be, quiz view, quiz attempt, quiz close attempt, quiz review?
In reply to David Wong

Re: information code numbers

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Yes, that would be the normal progression for a one-page quiz.

continue attemp(t) happens when when you click the save button in a quiz, or navigate around a multi-page quiz.

Except that very strangely, until 1.9.5/1.8.9, it only logged at most every 3 minutes, but we changed that in MDL-18635.
In reply to Tim Hunt

Re: information code numbers

by David Wong -
thanks Tim...

I didn't see anyplace in Moodle docs that describes what the action descriptors mean under the report action header....
In reply to David Wong

Re: information code numbers

by Drew Smith -

Is there yet a MoodleDoc that explains the action descriptors? It would be truly helpful!