Skip to content

Commit

Permalink
Merge branch 'm20_MDL-26672_aiccfix' of git://github.com/danmarsden/m…
Browse files Browse the repository at this point in the history
…oodle
  • Loading branch information
stronk7 committed Mar 7, 2011
2 parents 500422e + 69c3d39 commit 51ecc32
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mod/scorm/aicc.php
Expand Up @@ -93,7 +93,7 @@
if ($sco = scorm_get_sco($scoid)) {
$userdata->course_id = $sco->identifier;
$userdata->datafromlms = isset($sco->datafromlms)?$sco->datafromlms:'';
$userdata->mastery_score = isset($sco->mastery_score)?$sco->mastery_score:'';
$userdata->mastery_score = isset($sco->mastery_score) && is_numeric($sco->mastery_score)?trim($sco->mastery_score):'';
$userdata->max_time_allowed = isset($sco->max_time_allowed)?$sco->max_time_allowed:'';
$userdata->time_limit_action = isset($sco->time_limit_action)?$sco->time_limit_action:'';

Expand Down Expand Up @@ -278,9 +278,9 @@
}
if ($mode == 'normal') {
if ($sco = scorm_get_sco($scoid)) {
if (!empty($sco->mastery_score)) {
if (!empty($score)) {
if ($score >= $sco->mastery_score) {
if (isset($sco->mastery_score) && is_numeric($sco->mastery_score)) {
if ($score != '') { // $score is correctly initialized w/ an empty string, see above
if ($score >= trim($sco->mastery_score)) {
$lessonstatus = 'passed';
} else {
$lessonstatus = 'failed';
Expand Down

0 comments on commit 51ecc32

Please sign in to comment.