Permalink
Browse files

SCORM MDL-22423 don't include empty raw scores from assets when calcu…

…lating grade merged from HEAD
  • Loading branch information...
1 parent b8ebff5 commit 119fff55dd5c2f3b47ee81f357a3d141cd1b6d5d @danmarsden danmarsden committed Jul 8, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 mod/scorm/locallib.php
View
@@ -451,7 +451,7 @@ function scorm_grade_user_attempt($scorm, $userid, $attempt=1, $time=false) {
if (($userdata->status == 'completed') || ($userdata->status == 'passed')) {
$attemptscore->scoes++;
}
- if (isset($userdata->score_raw)) {
+ if (!empty($userdata->score_raw) || ($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 119fff5

Please sign in to comment.