Permalink
Browse files

SCORM MDL-25739 check var set before using - Thanks to Howard for rep…

…ort - This only affects 1.9stable, fix already in head
  • Loading branch information...
danmarsden committed Dec 20, 2010
1 parent 3703965 commit cb1e1bc1caa3a2dddbf4c0ac98c823e6b143ba8b
Showing with 1 addition and 1 deletion.
  1. +1 −1 mod/scorm/locallib.php
View
@@ -445,7 +445,7 @@ function scorm_grade_user_attempt($scorm, $userid, $attempt=1, $time=false) {
if (($userdata->status == 'completed') || ($userdata->status == 'passed')) {
$attemptscore->scoes++;
}
if (!empty($userdata->score_raw) || ($scorm->type=='sco' && isset($userdata->score_raw))) {
if (!empty($userdata->score_raw) || (isset($scorm->type) && $scorm->type=='sco' && isset($userdata->score_raw))) {
$attemptscore->values++;
$attemptscore->sum += $userdata->score_raw;
$attemptscore->max = ($userdata->score_raw > $attemptscore->max)?$userdata->score_raw:$attemptscore->max;

0 comments on commit cb1e1bc

Please sign in to comment.