forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
report.php
37 lines (27 loc) · 1.18 KB
/
report.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php // $Id$
// Display all the interfaces for importing data into a specific course
require_once('../config.php');
$id = required_param('id', PARAM_INT); // course id to import TO
if (!$course = $DB->get_record('course', array('id'=>$id))) {
print_error("That's an invalid course id");
}
require_login($course->id);
$context=get_context_instance(CONTEXT_COURSE, $course->id);
require_capability('moodle/site:viewreports', $context);
$strreports = get_string('reports');
$navlinks = array();
$navlinks[] = array('name' => $strreports, 'link' => null, 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header($course->fullname.': '.$strreports, $course->fullname.': '.$strreports, $navigation);
$directories = get_list_of_plugins('course/report');
foreach ($directories as $directory) {
$pluginfile = $CFG->dirroot.'/course/report/'.$directory.'/mod.php';
if (file_exists($pluginfile)) {
echo '<div class="plugin">';
//echo $pluginfile;
include_once($pluginfile); // Fragment for listing
echo '</div>';
}
}
print_footer();
?>