Details
Description
The constants in questionlib.php (http://cvs.moodle.org/moodle/lib/questionlib.php?annotate=1.189#l26) are defined as strings.
However, in questiontype.php (http://cvs.moodle.org/moodle/question/type/questiontype.php?annotate=1.123#l1175) it is expected to be an integer ($state->event is an integer and it's using "!=="). As a result, line 1175 evaluates to true, even though the quiz is over and it should be false. If we don't know what types we will get from the database, then change !== to !=.