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