"MDL-15592, change js function name toggle() to menu_toggle(), to be friendly with...
[moodle-linuxchix.git] / course / report.php
blob515e0bb5d4d8d0e786859419441f601ce4fc020f
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 $navlinks = array();
19 $navlinks[] = array('name' => $strreports, 'link' => null, 'type' => 'misc');
20 $navigation = build_navigation($navlinks);
21 print_header($course->fullname.': '.$strreports, $course->fullname.': '.$strreports, $navigation);
23 $directories = get_list_of_plugins('course/report');
25 foreach ($directories as $directory) {
26 $pluginfile = $CFG->dirroot.'/course/report/'.$directory.'/mod.php';
27 if (file_exists($pluginfile)) {
28 echo '<div class="plugin">';
29 //echo $pluginfile;
30 include_once($pluginfile); // Fragment for listing
31 echo '</div>';
35 print_footer();