Skip to content

Commit

Permalink
MDL-7028 global $QTYPES is only available if lib/questionlib.php is i…
Browse files Browse the repository at this point in the history
…ncluded.
  • Loading branch information
nicolasconnault committed May 11, 2009
1 parent e51f717 commit abf58c0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mod/quiz/lib.php
Expand Up @@ -1004,6 +1004,10 @@ function quiz_reset_gradebook($courseid, $type='') {
*/
function quiz_reset_userdata($data) {
global $CFG, $QTYPES;

if (empty($QTYPES)) {
require_once($CFG->libdir . '/questionlib.php');
}

// TODO: this should use the delete_attempt($attempt->uniqueid) function in questionlib.php
// require_once($CFG->libdir.'/questionlib.php');
Expand Down

0 comments on commit abf58c0

Please sign in to comment.