Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…lating grade merged from HEAD
  • Loading branch information...
commit 119fff55dd5c2f3b47ee81f357a3d141cd1b6d5d 1 parent b8ebff5
@danmarsden danmarsden authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  mod/scorm/locallib.php
View
2  mod/scorm/locallib.php
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.