Skip to content

Commit

Permalink
Merge branch 'MDL-29646-master' of git://github.com/ankitagarwal/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
Aparup Banerjee committed Oct 24, 2011
2 parents c11ccbf + e5e6c96 commit b077de8
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions mod/scorm/userreport.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -210,7 +210,7 @@
$row[] = s(scorm_format_duration($trackdata->$element));
break;
default:
s($trackdata->$element);
$row[] = s($trackdata->$element);
break;
}
$table->data[] = $row;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit b077de8

Please sign in to comment.