MDL-10364 Added the showcalculations preference and re-factored preferences_form...
[moodle-pu.git] / course / report.php
blobb846ac0fad65a3717fcbace08873192f9c1c8898
1 <?php // $Id$
2 // Display all the interfaces for importing data into a specific course
4 require_once('../config.php');
6 $id = required_param('id', PARAM_INT); // course id to import TO
8 if (!$course = get_record('course', 'id', $id)) {
9 error("That's an invalid course id");
12 require_capability('moodle/site:viewreports', get_context_instance(CONTEXT_COURSE, $id));
14 $strreports = get_string('reports');
16 print_header($course->fullname.': '.$strreports, $course->fullname.': '.$strreports,
17 '<a href="view.php?id='.$course->id.'">'.$course->shortname.'</a> -> '.$strreports);
19 $directories = get_list_of_plugins('course/report');
21 foreach ($directories as $directory) {
22 $pluginfile = $CFG->dirroot.'/course/report/'.$directory.'/mod.php';
23 if (file_exists($pluginfile)) {
24 echo '<div class="plugin">';
25 //echo $pluginfile;
26 include_once($pluginfile); // Fragment for listing
27 echo '</div>';
31 print_footer();