From 3bf7fc74a4e7637a5f8fdbb88f22bd8b47a80921 Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 9 Mar 2006 07:37:40 +0000 Subject: [PATCH] New report plugin structure for all course reports. More to be added soon. --- course/report.php | 26 +++++++++++++++++++ .../stats/graph.php} | 0 course/{stats.php => report/stats/index.php} | 8 +++--- course/report/stats/mod.php | 6 +++++ 4 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 course/report.php rename course/{statsgraph.php => report/stats/graph.php} (100%) rename course/{stats.php => report/stats/index.php} (97%) create mode 100644 course/report/stats/mod.php diff --git a/course/report.php b/course/report.php new file mode 100644 index 0000000000..66e726a863 --- /dev/null +++ b/course/report.php @@ -0,0 +1,26 @@ +fullname.': '.$strreports, $course->fullname.': '.$strreports, + ''.$course->shortname.' -> '.$strreports); + + $directories = get_list_of_plugins('course/report'); + + foreach ($directories as $directory) { + echo '
'; + include_once($CFG->dirroot.'/course/report/'.$directory.'/mod.php'); // Fragment for listing + echo '
'; + } + + print_footer(); +?> diff --git a/course/statsgraph.php b/course/report/stats/graph.php similarity index 100% rename from course/statsgraph.php rename to course/report/stats/graph.php diff --git a/course/stats.php b/course/report/stats/index.php similarity index 97% rename from course/stats.php rename to course/report/stats/index.php index e3bb3268a6..47dfc2e2b5 100644 --- a/course/stats.php +++ b/course/report/stats/index.php @@ -1,6 +1,6 @@ dirroot.'/lib/statslib.php'); if (empty($CFG->enablestats)) { @@ -188,9 +188,9 @@ echo "(".get_string("gdneed").")"; } else { if ($mode == STATS_MODE_DETAILED) { - echo '
'; + echo '
'; } else { - echo '
'; + echo '
'; } } @@ -219,4 +219,4 @@ print_footer(); -?> \ No newline at end of file +?> diff --git a/course/report/stats/mod.php b/course/report/stats/mod.php new file mode 100644 index 0000000000..264e756f39 --- /dev/null +++ b/course/report/stats/mod.php @@ -0,0 +1,6 @@ +enablestats)) { + echo ''.get_string('stats').''; + } +?> -- 2.39.5