diff --git a/lib.php b/lib.php index c0bac58d..5b322f3c 100755 --- a/lib.php +++ b/lib.php @@ -73,6 +73,17 @@ function studentquiz_supports($feature) { } } +/** + * Callback immediately after require_login succeeds. + */ +function studentquiz_after_require_login() { + global $PAGE, $CFG; + + if ($PAGE->activityname === 'studentquiz') { + $CFG->forceclean = true; + } +} + /** * Saves a new instance of the StudentQuiz into the database *