Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-28277 small bug fixes

	modified:   mod/scorm/report/interactions/report.php
	modified:   mod/scorm/report/interactions/responsessettings_form.php
	modified:   mod/scorm/report/reportlib.php
  • Loading branch information...
commit 769a621dc0dac9e543c0b69608d22889c3f3c5a4 1 parent 35540ec
@ankitagarwal ankitagarwal authored
View
10 mod/scorm/report/interactions/report.php
@@ -48,19 +48,16 @@ function display($scorm, $cm, $course, $download) {
// detailed report
$mform = new mod_scorm_report_interactions_settings($PAGE->url, compact('currentgroup'));
if ($fromform = $mform->get_data()) {
- $detailedrep = $fromform->detailedrep;
$pagesize = $fromform->pagesize;
$includeqtext = $fromform->qtext;
$includeresp = $fromform->resp;
$includeright = $fromform->right;
$attemptsmode = !empty($fromform->attemptsmode) ? $fromform->attemptsmode : SCORM_REPORT_ATTEMPTS_ALL_STUDENTS;
- set_user_preference('scorm_report_detailed', $detailedrep);
set_user_preference('scorm_report_pagesize', $pagesize);
set_user_preference('scorm_report_interactions_qtext', $includeqtext);
set_user_preference('scorm_report_interactions_resp', $includeresp);
set_user_preference('scorm_report_interactions_right', $includeright);
} else {
- $detailedrep = get_user_preferences('scorm_report_detailed', false);
$pagesize = get_user_preferences('scorm_report_pagesize', 0);
$attemptsmode = optional_param('attemptsmode', SCORM_REPORT_ATTEMPTS_STUDENTS_WITH, PARAM_INT);
$includeqtext = get_user_preferences('scorm_report_interactions_qtext', 0);
@@ -142,7 +139,7 @@ function display($scorm, $cm, $course, $download) {
$headers[]= get_string('last', 'scorm');
$columns[]= 'score';
$headers[]= get_string('score', 'scorm');
- if ($detailedrep && $scoes = $DB->get_records('scorm_scoes', array("scorm"=>$scorm->id), 'id')) {
+ if ($scoes = $DB->get_records('scorm_scoes', array("scorm"=>$scorm->id), 'id')) {
foreach ($scoes as $sco) {
if ($sco->launch!='') {
$columns[]= 'scograde'.$sco->id;
@@ -584,6 +581,11 @@ function display($scorm, $cm, $course, $download) {
$mform->display();
}
} else {
+ if ($candelete && !$download) {
+ echo '</div>';
+ echo '</form>';
+ }
+ echo '</div>';
echo $OUTPUT->notification(get_string('noactivity', 'scorm'));
}
if ($download == 'Excel' or $download == 'ODS') {
View
2  mod/scorm/report/interactions/responsessettings_form.php
@@ -44,8 +44,6 @@ function definition() {
$mform->addElement('text', 'pagesize', get_string('pagesize', 'scorm'));
$mform->setType('pagesize', PARAM_INT);
- $mform->addElement('selectyesno', 'detailedrep', get_string('details', 'scorm'));
-
$this->add_action_buttons(false, get_string('savepreferences'));
}
}
View
2  mod/scorm/report/reportlib.php
@@ -52,8 +52,8 @@ function get_scorm_question_count($scoes,$attempts)
$count=0;
foreach($attempts as $scouser){
foreach($scoes as $sco) {
+ $i=0;
if ($trackdata = scorm_get_tracks($sco->id, $scouser->userid, $scouser->attempt)) {
- $i=0;
$element='cmi.interactions_'.$i.'.id';
while(isset($trackdata->$element)) {
$i++;

0 comments on commit 769a621

Please sign in to comment.
Something went wrong with that request. Please try again.