Skip to content

Commit

Permalink
MDL-60749 scorm: Remove   from files when downloading
Browse files Browse the repository at this point in the history
  • Loading branch information
sarjona committed Nov 9, 2017
1 parent f42720e commit adfc2dd
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions mod/scorm/report/interactions/classes/report.php
Expand Up @@ -475,6 +475,7 @@ public function display($scorm, $cm, $course, $download) {
$row[] = scorm_grade_user_attempt($scorm, $scouser->userid, $scouser->attempt);
}
// Print out all scores of attempt.
$emptyrow = $download ? '' : ' ';
foreach ($scoes as $sco) {
if ($sco->launch != '') {
if ($trackdata = scorm_get_tracks($sco->id, $scouser->userid, $scouser->attempt)) {
Expand Down Expand Up @@ -508,15 +509,15 @@ public function display($scorm, $cm, $course, $download) {
if (isset($trackdata->$element)) {
$row[] = s($trackdata->$element);
} else {
$row[] = ' ';
$row[] = $emptyrow;
}
}
if ($displayoptions['resp']) {
$element = 'cmi.interactions_'.$i.'.student_response';
if (isset($trackdata->$element)) {
$row[] = s($trackdata->$element);
} else {
$row[] = ' ';
$row[] = $emptyrow;
}
}
if ($displayoptions['right']) {
Expand All @@ -534,15 +535,15 @@ public function display($scorm, $cm, $course, $download) {
}
$row[] = $rightans;
} else {
$row[] = ' ';
$row[] = $emptyrow;
}
}
if ($displayoptions['result']) {
$element = 'cmi.interactions_'.$i.'.result';
if (isset($trackdata->$element)) {
$row[] = s($trackdata->$element);
} else {
$row[] = ' ';
$row[] = $emptyrow;
}
}
}
Expand All @@ -558,7 +559,7 @@ public function display($scorm, $cm, $course, $download) {
}
// Complete the empty cells.
for ($i = 0; $i < count($columns) - $nbmaincolumns; $i++) {
$row[] = '&nbsp;';
$row[] = $emptyrow;
}
}
}
Expand Down

0 comments on commit adfc2dd

Please sign in to comment.