Moodle

When a student has gone over-time it a quiz, it should be obvious to teachers in the UI

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.6
  • Fix Version/s: 2.3
  • Component/s: Quiz
  • Labels:
    None
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_23_STABLE

Description

Recently i have found a pretty substantial bug in the way moodle handle's quizzes. I've found out that when you inject some javascript onto the quiz page, you can kill the countdown timer, allowing intentional fast 5 minuite timed quizzes to last an hour. And moodle doesn't really care! (Note this really only works if a person has a portable browser or control of their browser for the injecting to work). BTW, this was tested in "secure" quiz mode.

To do this, you must have someway of injecting code into a webpage. This can be accomplised through Firebug, greasemonkey, or an unlocked address bar (forcing all popups to open in a new tab prevents the address bar from being locked). In greasemonkey, i did this:

GM_registerMenuCommand('MoodleKill - Kill function',function() {
main();
});

function main() {
for(var i=0; i<500; i++) { window.clearTimeout(i); }
document.getElementById('clock').innerHTML = "<b>UNLIMITED</b><br>Hacked by Lord.Quackstar"
}

If you have access to firebug or any other javascript debugger program, run this:
for(var i=0; i<500; i++) {window.clearTimeout(i);}document.getElementById('clock').innerHTML = "<b>UNLIMITED</b><br>Hacked by Lord.Quackstar";

If you can force all popups in new tabs, simply copy this into the address bar and press enter:
javascript:for(var i=0; i<500; i++) {window.clearTimeout(i);}document.getElementById('clock').innerHTML = "<b>UNLIMITED</b><br>Hacked by Lord.Quackstar";void(0);

Attached is screenshots of the result from 3 pages.

Now what I'm wondering is why moodle doesn't notify anyone that someone has taken a 5 minute quiz in an hour! While moodle does have server side time checking, it doesn't do anything with the times. Right now the only way to find out this info is to manually scan each person's activity report regularly, a unfesable goal.

EDIT: I didn't know this before (i don't actually run a moodle site), but you can view times by going to the results tab of the quiz. This still however rely's on the teacher manually checking the quiz, not an automated system warning them.

For those of you thinking that no can really do this due to lack of knowledge, any student taking a web programming class that study's javascript knows how to run this (this is usually the type of class that would have a moodle website). This is a major threat to any people that use online quizzes in a programming class.

BTW, unless there was a major rewrite from v1.8* to v1.9*, all versions are affected.

Issue Links

Activity

Hide
Leon added a comment -

Didn't see way to check quiz times...

Show
Leon added a comment - Didn't see way to check quiz times...
Hide
Tim Hunt added a comment -

The time limit is not enforced on the client side. The countdown timer is purely a convenience for students.

The actual time limit is enforced on the server. Moodle will still accept answers that are submitted late - that is it will accept the students answers and save them in the database. However, later answers will not be graded. (Well, there is a small time allowance to cope with network lag, if the submission is just processed a few seconds late, Moodle ignores that. I think the amount of grace time is 5% of the quiz time limit.)

I suggest the following experiment:

1. start a quiz attempt.
2. apply your timer hack.
3, type in all the right answers, but don't save or anything.
4. When it is well past the correct time limit, submit the quiz. The answers should be accepted (and graded correct,I think) but the student should achieve a grade of 0.

Show
Tim Hunt added a comment - The time limit is not enforced on the client side. The countdown timer is purely a convenience for students. The actual time limit is enforced on the server. Moodle will still accept answers that are submitted late - that is it will accept the students answers and save them in the database. However, later answers will not be graded. (Well, there is a small time allowance to cope with network lag, if the submission is just processed a few seconds late, Moodle ignores that. I think the amount of grace time is 5% of the quiz time limit.) I suggest the following experiment: 1. start a quiz attempt. 2. apply your timer hack. 3, type in all the right answers, but don't save or anything. 4. When it is well past the correct time limit, submit the quiz. The answers should be accepted (and graded correct,I think) but the student should achieve a grade of 0.
Hide
Leon added a comment -

I see the checking now, i spoke too soon.

Moodle though should have something alerting the teacher that the quiz is overdue. There is no explanation on why a student would "accedentially" over take a quiz. Maybe a popup, a notification, something to warn the teacher that a student is attempting to bypass their system.

BTW, this can be labeled as fixed.

Show
Leon added a comment - I see the checking now, i spoke too soon. Moodle though should have something alerting the teacher that the quiz is overdue. There is no explanation on why a student would "accedentially" over take a quiz. Maybe a popup, a notification, something to warn the teacher that a student is attempting to bypass their system. BTW, this can be labeled as fixed.
Hide
Tim Hunt added a comment -

Actually, no need to close this bug. I've repurposed it for making the UI clearer to teachers.

Show
Tim Hunt added a comment - Actually, no need to close this bug. I've repurposed it for making the UI clearer to teachers.
Hide
Tim Hunt added a comment -

This should be fixed in the work I am doing on MDL-3030.

Show
Tim Hunt added a comment - This should be fixed in the work I am doing on MDL-3030.
Hide
Tim Hunt added a comment -

Hopefully the changes for MDL-3030 have now dealt with this. Please test it. If you think there are still concerns, please can we discuss it in the quiz forum: http://moodle.org/mod/forum/view.php?id=737

Show
Tim Hunt added a comment - Hopefully the changes for MDL-3030 have now dealt with this. Please test it. If you think there are still concerns, please can we discuss it in the quiz forum: http://moodle.org/mod/forum/view.php?id=737

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: