MDL-30652 SCORM Fixing report prefrences display for interactions report
authorAnkit Kumar Agarwal <ankit@moodle.com>
Tue, 3 Jan 2012 05:06:40 +0000 (10:36 +0530)
committerAnkit Kumar Agarwal <ankit@moodle.com>
Tue, 3 Jan 2012 05:08:41 +0000 (10:38 +0530)
mod/scorm/report/interactions/report.php

index 414728d..930d835 100644 (file)
@@ -583,17 +583,18 @@ class scorm_interactions_report extends scorm_default_report {
                         echo '</tr></table>';
                     }
                 }
-                if (!$download) {
-                    $mform->set_data(compact('detailedrep', 'pagesize', 'attemptsmode'));
-                    $mform->display();
-                }
             } else {
                 if ($candelete && !$download) {
                     echo '</div>';
                     echo '</form>';
+                    $table->finish_output();
                 }
                 echo '</div>';
-                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();