New report plugin structure for all course reports.
More to be added soon.
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
@@ -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>';
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user