SCORM MDL-23492 tidy up grading method display/calculation
authorDan Marsden <Dan@digitalclay.co.nz>
Fri, 23 Jul 2010 09:33:30 +0000 (09:33 +0000)
committerDan Marsden <Dan@digitalclay.co.nz>
Fri, 23 Jul 2010 09:33:30 +0000 (09:33 +0000)
mod/scorm/locallib.php

index beafa22..4b3c18c 100755 (executable)
@@ -784,7 +784,7 @@ function scorm_view_display ($user, $scorm, $action, $cm, $boxwidth='') {
                       if ($incomplete === false) {
                           echo '<input type="hidden" name="newattempt" value="on" />'."\n";
                       }
-                  } elseif ($attemptcount != 0 && ($incomplete === false) && (($result->attemptleft > 0)||($scorm->maxattempt == 0))) {
+                  } elseif (!empty($attemptcount) && ($incomplete === false) && (($result->attemptleft > 0)||($scorm->maxattempt == 0))) {
 ?>
                       <br />
                       <input type="checkbox" id="a" name="newattempt" />