Permalink
Browse files

Merge branch 'MDL-29646-master' of git://github.com/ankitagarwal/moodle

  • Loading branch information...
2 parents c11ccbf + e5e6c96 commit b077de82f9bf3a40fc66e379339e6e427a10eeeb @nebgor nebgor committed Oct 24, 2011
Showing with 11 additions and 11 deletions.
  1. +11 −11 mod/scorm/userreport.php
View
@@ -44,18 +44,18 @@
if (!empty($id)) {
$url->param('id', $id);
$cm = get_coursemodule_from_id('scorm', $id, 0, false, MUST_EXIST);
- $course = $DB->get_record('course', array('id'=>$cm->course), '*', MUST_EXIST);
- $scorm = $DB->get_record('scorm', array('id'=>$cm->instance), '*', MUST_EXIST);
+ $course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
+ $scorm = $DB->get_record('scorm', array('id' => $cm->instance), '*', MUST_EXIST);
} else {
if (!empty($b)) {
$url->param('b', $b);
- $sco = $DB->get_record('scorm_scoes', array('id'=>$b), '*', MUST_EXIST);
- $a = $sco->scorm;
+ $selsco = $DB->get_record('scorm_scoes', array('id' => $b), '*', MUST_EXIST);
+ $a = $selsco->scorm;
}
if (!empty($a)) {
$url->param('a', $a);
- $scorm = $DB->get_record('scorm', array('id'=>$a), '*', MUST_EXIST);
- $course = $DB->get_record('course', array('id'=>$scorm->course), '*', MUST_EXIST);
+ $scorm = $DB->get_record('scorm', array('id' => $a), '*', MUST_EXIST);
+ $course = $DB->get_record('course', array('id' => $scorm->course), '*', MUST_EXIST);
$cm = get_coursemodule_from_instance('scorm', $scorm->id, $course->id, false, MUST_EXIST);
}
}
@@ -84,7 +84,7 @@
}
} else {
$PAGE->navbar->add("$strattempt $attempt - ".fullname($userdata), new moodle_url('/mod/scorm/userreport.php', array('a'=>$a, 'user'=>$user, 'attempt'=>$attempt)));
- $PAGE->navbar->add($sco->title);
+ $PAGE->navbar->add($selsco->title);
}
echo $OUTPUT->header();
echo $OUTPUT->heading(format_string($scorm->name));
@@ -153,10 +153,10 @@
if (!empty($b)) {
echo $OUTPUT->box_start('generalbox boxaligncenter');
- echo $OUTPUT->heading('<a href="'.$CFG->wwwroot.'/mod/scorm/player.php?a='.$scorm->id.'&amp;mode=browse&amp;scoid='.$sco->id.'" target="_new">'.format_string($sco->title).'</a>');
+ echo $OUTPUT->heading('<a href="'.$CFG->wwwroot.'/mod/scorm/player.php?a='.$scorm->id.'&amp;mode=browse&amp;scoid='.$selsco->id.'" target="_new">'.format_string($selsco->title).'</a>');
echo '<div class="mdl-align">'."\n";
$scoreview = '';
- if ($trackdata = scorm_get_tracks($sco->id, $user, $attempt)) {
+ if ($trackdata = scorm_get_tracks($selsco->id, $user, $attempt)) {
if ($trackdata->score_raw != '') {
$scoreview = get_string('score', 'scorm').':&nbsp;'.$trackdata->score_raw;
}
@@ -210,7 +210,7 @@
$row[] = s(scorm_format_duration($trackdata->$element));
break;
default:
- s($trackdata->$element);
+ $row[] = s($trackdata->$element);
break;
}
$table->data[] = $row;
@@ -337,7 +337,7 @@
} else if (stristr($element, '.learner_response') !== false) {
$string="interactionslearnerresponse";
} else if (stristr($element, '.score.min') !== false) {
- $string="interactionslscoremin";
+ $string="interactionsscoremin";
} else if (stristr($element, '.score.max') !== false) {
$string="interactionsscoremax";
} else if (stristr($element, '.score.raw') !== false) {

0 comments on commit b077de8

Please sign in to comment.