Permalink
Browse files

AICC MDL-21305 mastery score should be set even when lessonstatus <> …

…"completed" - thanks to Matteo Scaramuccia for report and fix. merged from HEAD
  • Loading branch information...
1 parent e7a7712 commit 05d9f028e728afa04da9089bca2cc8cd7a5addaf @danmarsden danmarsden committed Mar 12, 2010
Showing with 11 additions and 12 deletions.
  1. +11 −12 mod/scorm/aicc.php
View
@@ -261,19 +261,18 @@
$id = scorm_insert_track($USER->id, $scorm->id, $sco->id, $attempt, 'cmi.core.lesson_status', 'browsed');
}
if ($mode == 'normal') {
- if ($lessonstatus == 'completed') {
- if ($sco = scorm_get_sco($scoid)) {
- if (!empty($sco->mastery_score)) {
- if (!empty($score)) {
- if ($score >= $sco->mastery_score) {
- $lessonstatus = 'passed';
- } else {
- $lessonstatus = 'failed';
- }
+
+ if ($sco = scorm_get_sco($scoid)) {
+ if (!empty($sco->mastery_score)) {
+ if (!empty($score)) {
+ if ($score >= $sco->mastery_score) {
+ $lessonstatus = 'passed';
+ } else {
+ $lessonstatus = 'failed';
}
}
- $id = scorm_insert_track($USER->id, $scorm->id, $sco->id, $attempt, 'cmi.core.lesson_status', $lessonstatus);
- }
+ }
+ $id = scorm_insert_track($USER->id, $scorm->id, $sco->id, $attempt, 'cmi.core.lesson_status', $lessonstatus);
}
}
}
@@ -372,4 +371,4 @@
echo "error=3\r\nerror_text=Invalid Session ID\r\n";
}
}
-?>
+?>

0 comments on commit 05d9f02

Please sign in to comment.