Skip to content

Commit

Permalink
Adding new pluggable reports
Browse files Browse the repository at this point in the history
  • Loading branch information
ikawhero committed Mar 10, 2006
1 parent 73a60fc commit eaad0cb
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion admin/index.php
Expand Up @@ -432,7 +432,7 @@
$table->data[] = array('<strong><a href="stickyblocks.php">'.get_string('stickyblocks','admin').'</a></strong>',
'<div class="explanation">'.get_string('adminhelpstickyblocks').'</div>');
if (!empty($CFG->enablestats)) {
$table->data[] = array('<strong><a href="reports.php">'.get_string('reports').'</a></strong>',
$table->data[] = array('<strong><a href="report.php">'.get_string('reports').'</a></strong>',
'<div class="explanation">'.get_string('adminhelpreports').'</div>');
}
$table->data[] = array('<strong><a href="environment.php">'.get_string('environment','admin').'</a></strong>',
Expand Down
26 changes: 26 additions & 0 deletions admin/report.php
@@ -0,0 +1,26 @@
<?php // $Id$
// Display all the reports available in admin/report

require_once('../config.php');

if (!isadmin()) {
error("You are not allowed to look at this page");
}

$stradmin = get_string('administration');
$strreports = get_string('reports');

print_header($strreports, $strreports,
'<a href="index.php">'.$stradmin.'</a> -> '.$strreports);

$directories = get_list_of_plugins('admin/report');

foreach ($directories as $directory) {
echo '<div class="plugin '.$directory.'">';
include_once($CFG->dirroot.'/admin/report/'.$directory.'/mod.php'); // Fragment for listing
echo '</div>';
}

print_footer();
?>

0 comments on commit eaad0cb

Please sign in to comment.