MDL-36168 SCORM: fix reset of course completion settings.
authorDan Marsden <dan@danmarsden.com>
Thu, 25 Oct 2012 04:12:52 +0000 (17:12 +1300)
committerDan Marsden <dan@danmarsden.com>
Thu, 25 Oct 2012 04:15:38 +0000 (17:15 +1300)
mod/scorm/mod_form.php

index 4b0837c..a9f61e6 100644 (file)
@@ -499,7 +499,7 @@ class mod_scorm_mod_form extends moodleform_mod {
         }
 
         // Turn off completion settings if the checkboxes aren't ticked
-        $autocompletion = !empty($data->completion) && $data->completion == COMPLETION_TRACKING_AUTOMATIC;
+        $autocompletion = isset($data->completion) && $data->completion == COMPLETION_TRACKING_AUTOMATIC;
 
         if (isset($data->completionstatusrequired) && is_array($data->completionstatusrequired)) {
             $total = 0;