MDL-10870 A few more fixes to the file.php page's navigation
[moodle-pu.git] / course / report.php
blob5954b3f597a4dbb2226ec6be16416aff0d444bbf
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_login($course->id);
14 require_capability('moodle/site:viewreports', get_context_instance(CONTEXT_COURSE, $course->id));
16 $strreports = get_string('reports');
18 print_header($course->fullname.': '.$strreports, $course->fullname.': '.$strreports,
19 '<a href="view.php?id='.$course->id.'">'.$course->shortname.'</a> -> '.$strreports);
21 $directories = get_list_of_plugins('course/report');
23 foreach ($directories as $directory) {
24 $pluginfile = $CFG->dirroot.'/course/report/'.$directory.'/mod.php';
25 if (file_exists($pluginfile)) {
26 echo '<div class="plugin">';
27 //echo $pluginfile;
28 include_once($pluginfile); // Fragment for listing
29 echo '</div>';
33 print_footer();