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');
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">';
30 include_once($pluginfile); // Fragment for listing