New report plugin structure for all course reports.

More to be added soon.
This commit is contained in:
moodler
2006-03-09 07:37:40 +00:00
parent 7064007f5b
commit 3bf7fc74a4
4 changed files with 36 additions and 4 deletions
+26
View File
@@ -0,0 +1,26 @@
<?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 = get_record('course', 'id', $id)) {
error("That's an invalid course id");
}
$strreports = get_string('reports');
print_header($course->fullname.': '.$strreports, $course->fullname.': '.$strreports,
'<a href="view.php?id='.$course->id.'">'.$course->shortname.'</a> -> '.$strreports);
$directories = get_list_of_plugins('course/report');
foreach ($directories as $directory) {
echo '<div class="plugin">';
include_once($CFG->dirroot.'/course/report/'.$directory.'/mod.php'); // Fragment for listing
echo '</div>';
}
print_footer();
?>
@@ -1,6 +1,6 @@
<?php
require_once(dirname(dirname(__FILE__)).'/config.php');
require_once('../../../config.php');
require_once($CFG->dirroot.'/lib/statslib.php');
if (empty($CFG->enablestats)) {
@@ -188,9 +188,9 @@
echo "(".get_string("gdneed").")";
} else {
if ($mode == STATS_MODE_DETAILED) {
echo '<center><img src="'.$CFG->wwwroot.'/course/statsgraph.php?mode='.$mode.'&course='.$course->id.'&time='.$time.'&report='.$report.'&userid='.$userid.'" /></center>';
echo '<center><img src="'.$CFG->wwwroot.'/course/graph.php?mode='.$mode.'&course='.$course->id.'&time='.$time.'&report='.$report.'&userid='.$userid.'" /></center>';
} else {
echo '<center><img src="'.$CFG->wwwroot.'/course/statsgraph.php?mode='.$mode.'&course='.$course->id.'&time='.$time.'&report='.$report.'" /></center>';
echo '<center><img src="'.$CFG->wwwroot.'/course/graph.php?mode='.$mode.'&course='.$course->id.'&time='.$time.'&report='.$report.'" /></center>';
}
}
@@ -219,4 +219,4 @@
print_footer();
?>
?>
+6
View File
@@ -0,0 +1,6 @@
<?php
if (!empty($CFG->enablestats)) {
echo '<a href="'.$CFG->wwwroot.'/course/report/stats/index.php?course='.$course->id.'">'.get_string('stats').'</a>';
}
?>