From e12459baa2c946ab91c637c4367b919bf215c794 Mon Sep 17 00:00:00 2001 From: Ankit Kumar Agarwal Date: Thu, 15 Dec 2011 11:33:18 +0530 Subject: [PATCH 1/3] MDL-30652 Scorm adding proper comments --- mod/scorm/report/basic/report.php | 4 +--- mod/scorm/report/interactions/report.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/mod/scorm/report/basic/report.php b/mod/scorm/report/basic/report.php index d2f9f6840ea..032f0dd7f77 100644 --- a/mod/scorm/report/basic/report.php +++ b/mod/scorm/report/basic/report.php @@ -155,11 +155,9 @@ class scorm_basic_report extends scorm_default_report { $table->sortable(true); $table->collapsible(true); + // This is done to prevent redundant data, when a user has multiple attempts $table->column_suppress('picture'); $table->column_suppress('fullname'); - // I wonder why it is doing all this suppress malarkey? - // However, if it was suppressing idnumber field before, I guess - // it needs to suppress all the user identity fields now foreach ($extrafields as $field) { $table->column_suppress($field); } diff --git a/mod/scorm/report/interactions/report.php b/mod/scorm/report/interactions/report.php index 12e61abdeb9..414728dc5af 100644 --- a/mod/scorm/report/interactions/report.php +++ b/mod/scorm/report/interactions/report.php @@ -211,9 +211,9 @@ class scorm_interactions_report extends scorm_default_report { $table->sortable(true); $table->collapsible(true); + // This is done to prevent redundant data, when a user has multiple attempts $table->column_suppress('picture'); $table->column_suppress('fullname'); - // This is done to prevent redundant data, when a user has multiple attempts foreach ($extrafields as $field) { $table->column_suppress($field); } From 2af0e47259bd962cb667b0e8e72aa58f2aeff8cf Mon Sep 17 00:00:00 2001 From: Ankit Kumar Agarwal Date: Fri, 16 Dec 2011 13:26:00 +0530 Subject: [PATCH 2/3] MDL-30652 SCORM Fixing report prefrences display issue for basic report --- mod/scorm/report/basic/report.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mod/scorm/report/basic/report.php b/mod/scorm/report/basic/report.php index 032f0dd7f77..a201cd444eb 100644 --- a/mod/scorm/report/basic/report.php +++ b/mod/scorm/report/basic/report.php @@ -519,17 +519,18 @@ class scorm_basic_report extends scorm_default_report { echo ''; } } - if (!$download) { - $mform->set_data(compact('detailedrep', 'pagesize', 'attemptsmode')); - $mform->display(); - } } else { if ($candelete && !$download) { echo ''; echo ''; + $table->finish_output(); } echo ''; - echo $OUTPUT->notification(get_string('noactivity', 'scorm')); + } + // Show preferences form irrespective of attempts are there to report or not + if (!$download) { + $mform->set_data(compact('detailedrep', 'pagesize', 'attemptsmode')); + $mform->display(); } if ($download == 'Excel' or $download == 'ODS') { $workbook->close(); From 85e976e5148a80add66ac8159791ebfe6c612f8e Mon Sep 17 00:00:00 2001 From: Ankit Kumar Agarwal Date: Tue, 3 Jan 2012 10:36:40 +0530 Subject: [PATCH 3/3] MDL-30652 SCORM Fixing report prefrences display for interactions report --- mod/scorm/report/interactions/report.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mod/scorm/report/interactions/report.php b/mod/scorm/report/interactions/report.php index 414728dc5af..930d8356682 100644 --- a/mod/scorm/report/interactions/report.php +++ b/mod/scorm/report/interactions/report.php @@ -583,17 +583,18 @@ class scorm_interactions_report extends scorm_default_report { echo ''; } } - if (!$download) { - $mform->set_data(compact('detailedrep', 'pagesize', 'attemptsmode')); - $mform->display(); - } } else { if ($candelete && !$download) { echo ''; echo ''; + $table->finish_output(); } echo ''; - echo $OUTPUT->notification(get_string('noactivity', 'scorm')); + } + // Show preferences form irrespective of attempts are there to report or not + if (!$download) { + $mform->set_data(compact('detailedrep', 'pagesize', 'attemptsmode')); + $mform->display(); } if ($download == 'Excel' or $download == 'ODS') { $workbook->close();