From a2a444ab7534b689675ee60e0648c6bc94d43184 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Thu, 3 Nov 2011 10:34:47 +0100 Subject: [PATCH] MDL-29030 migration and cleanup of stats report AMOS BEGIN MOV [pluginpagetype,coursereport_stats],[pluginpagetype,report_stats] MOV [stats:view,coursereport_stats],[stats:view,report_stats] AMOS END --- course/report/stats/index.php | 77 ------------ course/report/stats/lib.php | 108 ----------------- course/report/stats/mod.php | 18 --- course/report/stats/version.php | 29 ----- lib/pluginlib.php | 2 +- {course/report => report}/stats/db/access.php | 4 +- report/stats/db/install.php | 33 +++++ {course/report => report}/stats/graph.php | 14 +-- report/stats/index.php | 100 +++++++++++++++ report/stats/lang/en/report_stats.php | 6 +- report/stats/lib.php | 61 ++++++++++ .../report.php => report/stats/locallib.php | 114 +++++++++++++++--- report/stats/settings.php | 25 +++- .../stats/version.php | 18 +-- 14 files changed, 340 insertions(+), 269 deletions(-) delete mode 100644 course/report/stats/index.php delete mode 100644 course/report/stats/lib.php delete mode 100644 course/report/stats/mod.php delete mode 100644 course/report/stats/version.php rename {course/report => report}/stats/db/access.php (95%) create mode 100644 report/stats/db/install.php rename {course/report => report}/stats/graph.php (93%) create mode 100644 report/stats/index.php create mode 100644 report/stats/lib.php rename course/report/stats/report.php => report/stats/locallib.php (70%) rename course/report/stats/lang/en/coursereport_stats.php => report/stats/version.php (59%) diff --git a/course/report/stats/index.php b/course/report/stats/index.php deleted file mode 100644 index 6af3bc74a62..00000000000 --- a/course/report/stats/index.php +++ /dev/null @@ -1,77 +0,0 @@ -dirroot.'/lib/statslib.php'); - require_once($CFG->dirroot.'/course/report/stats/lib.php'); - require_once($CFG->libdir.'/adminlib.php'); - - $courseid = optional_param('course', SITEID, PARAM_INT); - $report = optional_param('report', 0, PARAM_INT); - $time = optional_param('time', 0, PARAM_INT); - $mode = optional_param('mode', STATS_MODE_GENERAL, PARAM_INT); - $userid = optional_param('userid', 0, PARAM_INT); - $roleid = 0; - - if ($report > 50) { - $roleid = substr($report,1); - $report = 5; - } - - if ($report == STATS_REPORT_USER_LOGINS) { - $courseid = SITEID; //override - } - - if ($mode == STATS_MODE_RANKED) { - redirect($CFG->wwwroot.'/course/report/stats/index.php?time='.$time); - } - - if (!$course = $DB->get_record("course", array("id"=>$courseid))) { - print_error("invalidcourseid"); - } - - if (!empty($userid)) { - if (!$user = $DB->get_record('user', array('id'=>$userid))) { - print_error("nousers"); - } - } - - require_login($course); - $context = get_context_instance(CONTEXT_COURSE, $course->id); - require_capability('coursereport/stats:view', $context); - - $PAGE->set_url(new moodle_url('/course/report/stats/index.php', array('course' => $course->id, - 'report' => $report, - 'time' => $time, - 'mode' => $mode, - 'userid' => $userid))); - - add_to_log($course->id, "course", "report stats", "report/stats/index.php?course=$course->id", $course->id); - stats_check_uptodate($course->id); - - if ($course->id == SITEID) { - admin_externalpage_setup('reportstats'); - echo $OUTPUT->header(); - } else { - $strreports = get_string("reports"); - $strstats = get_string('stats'); - - $PAGE->set_title("$course->shortname: $strstats"); - $PAGE->set_heading($course->fullname); - $PAGE->set_pagelayout('report'); - $PAGE->set_headingmenu(report_stats_mode_menu($course, $mode, $time, "$CFG->wwwroot/course/report/stats/index.php")); - echo $OUTPUT->header(); - } - - require($CFG->dirroot.'/course/report/stats/report.php'); - - if (empty($CFG->enablestats)) { - if (has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))) { - redirect("$CFG->wwwroot/$CFG->admin/settings.php?section=stats", get_string('mustenablestats', 'admin'), 3); - } else { - print_error('statsdisable'); - } - } - - echo $OUTPUT->footer(); - - diff --git a/course/report/stats/lib.php b/course/report/stats/lib.php deleted file mode 100644 index 974463cdd63..00000000000 --- a/course/report/stats/lib.php +++ /dev/null @@ -1,108 +0,0 @@ -. - -/** - * This file contains functions used by the log reports - * - * This file is also required by /admin/reports/stats/index.php. - * - * @package course-report - * @copyright 1999 onwards Martin Dougiamas http://moodle.com - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ - -require_once($CFG->dirroot.'/lib/statslib.php'); - -function report_stats_mode_menu($course, $mode, $time, $url) { - global $CFG, $OUTPUT; - /* - $reportoptions = stats_get_report_options($course->id, $mode); - $timeoptions = report_stats_timeoptions($mode); - if (empty($timeoptions)) { - print_error('nostatstodisplay', '', $CFG->wwwroot.'/course/view.php?id='.$course->id); - } - */ - - $options = array(); - $options[STATS_MODE_GENERAL] = get_string('statsmodegeneral'); - $options[STATS_MODE_DETAILED] = get_string('statsmodedetailed'); - if (has_capability('coursereport/stats:view', get_context_instance(CONTEXT_SYSTEM))) { - $options[STATS_MODE_RANKED] = get_string('reports'); - } - $popupurl = $url."?course=$course->id&time=$time"; - $select = new single_select(new moodle_url($popupurl), 'mode', $options, $mode, null); - $select->formid = 'switchmode'; - return $OUTPUT->render($select); -} - - -function report_stats_timeoptions($mode) { - global $CFG, $DB; - - if ($mode == STATS_MODE_DETAILED) { - $earliestday = $DB->get_field_sql('SELECT MIN(timeend) FROM {stats_user_daily}'); - $earliestweek = $DB->get_field_sql('SELECT MIN(timeend) FROM {stats_user_weekly}'); - $earliestmonth = $DB->get_field_sql('SELECT MIN(timeend) FROM {stats_user_monthly}'); - } else { - $earliestday = $DB->get_field_sql('SELECT MIN(timeend) FROM {stats_daily}'); - $earliestweek = $DB->get_field_sql('SELECT MIN(timeend) FROM {stats_weekly}'); - $earliestmonth = $DB->get_field_sql('SELECT MIN(timeend) FROM {stats_monthly}'); - } - - - if (empty($earliestday)) $earliestday = time(); - if (empty($earliestweek)) $earliestweek = time(); - if (empty($earliestmonth)) $earliestmonth = time(); - - $now = stats_get_base_daily(); - $lastweekend = stats_get_base_weekly(); - $lastmonthend = stats_get_base_monthly(); - - return stats_get_time_options($now,$lastweekend,$lastmonthend,$earliestday,$earliestweek,$earliestmonth); -} - -/** - * This function extends the navigation with the report items - * - * @param navigation_node $navigation The navigation node to extend - * @param stdClass $course The course to object for the report - * @param stdClass $context The context of the course - */ -function stats_report_extend_navigation($navigation, $course, $context) { - global $CFG, $OUTPUT; - if (has_capability('coursereport/stats:view', $context)) { - if (!empty($CFG->enablestats)) { - $url = new moodle_url('/course/report/stats/index.php', array('course'=>$course->id)); - $navigation->add(get_string('stats'), $url, navigation_node::TYPE_SETTING, null, null, new pix_icon('i/report', '')); - } - } -} - -/** - * Return a list of page types - * @param string $pagetype current page type - * @param stdClass $parentcontext Block's parent context - * @param stdClass $currentcontext Current context of block - */ -function stats_page_type_list($pagetype, $parentcontext, $currentcontext) { - $array = array( - '*' => get_string('page-x', 'pagetype'), - 'course-report-*' => get_string('page-course-report-x', 'pagetype'), - 'course-report-stats-index' => get_string('pluginpagetype', 'coursereport_stats') - ); - return $array; -} \ No newline at end of file diff --git a/course/report/stats/mod.php b/course/report/stats/mod.php deleted file mode 100644 index 1f70b7af2bc..00000000000 --- a/course/report/stats/mod.php +++ /dev/null @@ -1,18 +0,0 @@ -enablestats)) { - echo '

'; - echo ''.get_string('stats').''; - echo '

'; - } else { - echo '

'; - echo get_string('statsoff'); - echo '

'; - } - } - diff --git a/course/report/stats/version.php b/course/report/stats/version.php deleted file mode 100644 index 819c2f13db1..00000000000 --- a/course/report/stats/version.php +++ /dev/null @@ -1,29 +0,0 @@ -version = 2010090501; -$plugin->requires = 2010090501; - - diff --git a/lib/pluginlib.php b/lib/pluginlib.php index 5f3520cff49..c770b68b2db 100644 --- a/lib/pluginlib.php +++ b/lib/pluginlib.php @@ -304,7 +304,7 @@ class plugin_manager { ), 'coursereport' => array( - 'stats' + //deprecated! ), 'datafield' => array( diff --git a/course/report/stats/db/access.php b/report/stats/db/access.php similarity index 95% rename from course/report/stats/db/access.php rename to report/stats/db/access.php index a4acc1e98c6..c5b2525084d 100644 --- a/course/report/stats/db/access.php +++ b/report/stats/db/access.php @@ -25,7 +25,7 @@ $capabilities = array( - 'coursereport/stats:view' => array( + 'report/stats:view' => array( 'riskbitmask' => RISK_PERSONAL, 'captype' => 'read', 'contextlevel' => CONTEXT_COURSE, @@ -35,7 +35,7 @@ $capabilities = array( 'manager' => CAP_ALLOW ), - 'clonepermissionsfrom' => 'moodle/site:viewreports', + 'clonepermissionsfrom' => 'coursereport/stats:view', ) ); diff --git a/report/stats/db/install.php b/report/stats/db/install.php new file mode 100644 index 00000000000..a74ff210153 --- /dev/null +++ b/report/stats/db/install.php @@ -0,0 +1,33 @@ +. + +/** + * Post installation and migration code. + * + * @package report + * @subpackage stats + * @copyright 2011 Petr Skoda {@link http://skodak.org} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die; + +function xmldb_report_stats_install() { + // this is a hack which is needed for cleanup of original coursereport_stats stuff + unset_all_config_for_plugin('coursereport_stats'); + capabilities_cleanup('coursereport_stats'); +} + diff --git a/course/report/stats/graph.php b/report/stats/graph.php similarity index 93% rename from course/report/stats/graph.php rename to report/stats/graph.php index d3b1659464c..74fac12302f 100644 --- a/course/report/stats/graph.php +++ b/report/stats/graph.php @@ -1,5 +1,4 @@ dirroot.'/lib/statslib.php'); require_once($CFG->dirroot.'/lib/graphlib.php'); @@ -34,7 +34,7 @@ $mode = required_param('mode', PARAM_INT); $userid = optional_param('userid', 0, PARAM_INT); $roleid = optional_param('roleid',0,PARAM_INT); -$url = new moodle_url('/course/report/stats/graph.php', array('course'=>$courseid, 'report'=>$report, 'time'=>$time, 'mode'=>$mode)); +$url = new moodle_url('/report/stats/graph.php', array('course'=>$courseid, 'report'=>$report, 'time'=>$time, 'mode'=>$mode)); if ($userid !== 0) { $url->param('userid', $userid); } @@ -57,7 +57,7 @@ require_login($course); $context = get_context_instance(CONTEXT_COURSE, $course->id); if (!$course->showreports or $USER->id != $userid) { - require_capability('coursereport/stats:view', $context); + require_capability('report/stats:view', $context); } stats_check_uptodate($course->id); diff --git a/report/stats/index.php b/report/stats/index.php new file mode 100644 index 00000000000..ef2c1707a3e --- /dev/null +++ b/report/stats/index.php @@ -0,0 +1,100 @@ +. + +/** + * stats report + * + * @package report + * @subpackage stats + * @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com) + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +require_once('../../config.php'); +require_once($CFG->dirroot.'/lib/statslib.php'); +require_once($CFG->dirroot.'/report/stats/locallib.php'); +require_once($CFG->libdir.'/adminlib.php'); + +$courseid = optional_param('course', SITEID, PARAM_INT); +$report = optional_param('report', 0, PARAM_INT); +$time = optional_param('time', 0, PARAM_INT); +$mode = optional_param('mode', STATS_MODE_GENERAL, PARAM_INT); +$userid = optional_param('userid', 0, PARAM_INT); +$roleid = 0; + +if ($report > 50) { + $roleid = substr($report,1); + $report = 5; +} + +if ($report == STATS_REPORT_USER_LOGINS) { + $courseid = SITEID; //override +} + +if ($mode == STATS_MODE_RANKED) { + redirect($CFG->wwwroot.'/report/stats/index.php?time='.$time); +} + +if (!$course = $DB->get_record("course", array("id"=>$courseid))) { + print_error("invalidcourseid"); +} + +if (!empty($userid)) { + $user = $DB->get_record('user', array('id'=>$userid), '*', MUST_EXIST); +} else { + $user = null; +} + +require_login($course); +$context = get_context_instance(CONTEXT_COURSE, $course->id); +require_capability('report/stats:view', $context); + +$PAGE->set_url(new moodle_url('/report/stats/index.php', array('course' => $course->id, + 'report' => $report, + 'time' => $time, + 'mode' => $mode, + 'userid' => $userid))); + +add_to_log($course->id, "course", "report stats", "report/stats/index.php?course=$course->id", $course->id); +stats_check_uptodate($course->id); + +if ($course->id == SITEID) { + admin_externalpage_setup('reportstats'); + echo $OUTPUT->header(); +} else { + $strreports = get_string("reports"); + $strstats = get_string('stats'); + + $PAGE->set_title("$course->shortname: $strstats"); + $PAGE->set_heading($course->fullname); + $PAGE->set_pagelayout('report'); + $PAGE->set_headingmenu(report_stats_mode_menu($course, $mode, $time, "$CFG->wwwroot/report/stats/index.php")); + echo $OUTPUT->header(); +} + +report_stats_report($course, $report, $mode, $user, $roleid, $time); + +if (empty($CFG->enablestats)) { + if (has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))) { + redirect("$CFG->wwwroot/$CFG->admin/settings.php?section=stats", get_string('mustenablestats', 'admin'), 3); + } else { + print_error('statsdisable'); + } +} + +echo $OUTPUT->footer(); + + diff --git a/report/stats/lang/en/report_stats.php b/report/stats/lang/en/report_stats.php index 5b8841bb5a8..98a26cc6d27 100644 --- a/report/stats/lang/en/report_stats.php +++ b/report/stats/lang/en/report_stats.php @@ -15,12 +15,14 @@ // along with Moodle. If not, see . /** - * Strings for component 'report_stats' + * Strings * * @package report * @subpackage stats - * @copyright 2011 Petr Skoda (http://skodak.org) + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ $string['pluginname'] = 'Statistics'; +$string['pluginpagetype'] = 'Statistics course report'; +$string['stats:view'] = 'View course statistics report'; diff --git a/report/stats/lib.php b/report/stats/lib.php new file mode 100644 index 00000000000..216d3c6a41f --- /dev/null +++ b/report/stats/lib.php @@ -0,0 +1,61 @@ +. + +/** + * This file contains functions used by the log reports + * + * This file is also required by /admin/reports/stats/index.php. + * + * @package report + * @subpackage stats + * @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com) + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die; + +/** + * This function extends the navigation with the report items + * + * @param navigation_node $navigation The navigation node to extend + * @param stdClass $course The course to object for the report + * @param stdClass $context The context of the course + */ +function report_stats_extend_navigation_course($navigation, $course, $context) { + global $CFG, $OUTPUT; + if (has_capability('report/stats:view', $context)) { + if (!empty($CFG->enablestats)) { + $url = new moodle_url('/report/stats/index.php', array('course'=>$course->id)); + $navigation->add(get_string('pluginname', 'report_stats'), $url, navigation_node::TYPE_SETTING, null, null, new pix_icon('i/report', '')); + } + } +} + +/** + * Return a list of page types + * @param string $pagetype current page type + * @param stdClass $parentcontext Block's parent context + * @param stdClass $currentcontext Current context of block + * @return array + */ +function report_stats_page_type_list($pagetype, $parentcontext, $currentcontext) { + $array = array( + '*' => get_string('page-x', 'pagetype'), + 'course-report-*' => get_string('page-course-report-x', 'pagetype'), + 'course-report-stats-index' => get_string('pluginpagetype', 'report_stats') + ); + return $array; +} \ No newline at end of file diff --git a/course/report/stats/report.php b/report/stats/locallib.php similarity index 70% rename from course/report/stats/report.php rename to report/stats/locallib.php index c6a2108c4ac..217fa1895b2 100644 --- a/course/report/stats/report.php +++ b/report/stats/locallib.php @@ -1,7 +1,87 @@ . - if (!defined('MOODLE_INTERNAL')) { - die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page +/** + * Reports implementation + * + * @package report + * @subpackage stats + * @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com) + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die; + +require_once(dirname(__FILE__).'/lib.php'); + + +function report_stats_mode_menu($course, $mode, $time, $url) { + global $CFG, $OUTPUT; + /* + $reportoptions = stats_get_report_options($course->id, $mode); + $timeoptions = report_stats_timeoptions($mode); + if (empty($timeoptions)) { + print_error('nostatstodisplay', '', $CFG->wwwroot.'/course/view.php?id='.$course->id); + } + */ + + $options = array(); + $options[STATS_MODE_GENERAL] = get_string('statsmodegeneral'); + $options[STATS_MODE_DETAILED] = get_string('statsmodedetailed'); + if (has_capability('report/stats:view', get_context_instance(CONTEXT_SYSTEM))) { + $options[STATS_MODE_RANKED] = get_string('reports'); + } + $popupurl = $url."?course=$course->id&time=$time"; + $select = new single_select(new moodle_url($popupurl), 'mode', $options, $mode, null); + $select->formid = 'switchmode'; + return $OUTPUT->render($select); +} + +function report_stats_timeoptions($mode) { + global $CFG, $DB; + + if ($mode == STATS_MODE_DETAILED) { + $earliestday = $DB->get_field_sql('SELECT MIN(timeend) FROM {stats_user_daily}'); + $earliestweek = $DB->get_field_sql('SELECT MIN(timeend) FROM {stats_user_weekly}'); + $earliestmonth = $DB->get_field_sql('SELECT MIN(timeend) FROM {stats_user_monthly}'); + } else { + $earliestday = $DB->get_field_sql('SELECT MIN(timeend) FROM {stats_daily}'); + $earliestweek = $DB->get_field_sql('SELECT MIN(timeend) FROM {stats_weekly}'); + $earliestmonth = $DB->get_field_sql('SELECT MIN(timeend) FROM {stats_monthly}'); + } + + + if (empty($earliestday)) $earliestday = time(); + if (empty($earliestweek)) $earliestweek = time(); + if (empty($earliestmonth)) $earliestmonth = time(); + + $now = stats_get_base_daily(); + $lastweekend = stats_get_base_weekly(); + $lastmonthend = stats_get_base_monthly(); + + return stats_get_time_options($now,$lastweekend,$lastmonthend,$earliestday,$earliestweek,$earliestmonth); +} + +function report_stats_report($course, $report, $mode, $user, $roleid, $time) { + global $CFG, $DB, $OUTPUT; + + if ($user) { + $userid = $user->id; + } else { + $userid = 0; } $courses = get_courses('all','c.shortname','c.id,c.shortname,c.fullname'); @@ -10,7 +90,7 @@ foreach ($courses as $c) { $context = get_context_instance(CONTEXT_COURSE, $c->id); - if (has_capability('coursereport/stats:view', $context)) { + if (has_capability('report/stats:view', $context)) { $courseoptions[$c->id] = format_string($c->shortname, true, array('context' => $context)); } } @@ -21,6 +101,7 @@ print_error('nostatstodisplay', '', $CFG->wwwroot.'/course/view.php?id='.$course->id); } + $users = array(); $table = new html_table(); $table->width = 'auto'; @@ -116,9 +197,9 @@ echo "(".get_string("gdneed").")"; } else { if ($mode == STATS_MODE_DETAILED) { - echo '
'.get_string('statisticsgraph').''.get_string('statisticsgraph').''.get_string('statisticsgraph').'
'; + echo '
'.get_string('statisticsgraph').'
'; } } @@ -138,15 +219,17 @@ $table->head[] = $param->line2; } } - if (empty($param->crosstab)) { + if (!file_exists($CFG->dirroot.'/report/log/index.php')) { + // bad luck, we can not link other report + } else if (empty($param->crosstab)) { foreach ($stats as $stat) { $a = array(userdate($stat->timeend-(60*60*24),get_string('strftimedate'),$CFG->timezone),$stat->line1); if (isset($stat->line2)) { $a[] = $stat->line2; } if (empty($CFG->loglifetime) || ($stat->timeend-(60*60*24)) >= (time()-60*60*24*$CFG->loglifetime)) { - if (has_capability('coursereport/log:view', get_context_instance(CONTEXT_COURSE, $course->id))) { - $a[] = 'wwwroot.'/report/log/index.php?id='. $course->id.'&chooselog=1&showusers=1&showcourses=1&user=' .$userid.'&date='.usergetmidnight($stat->timeend-(60*60*24)).'">' .get_string('course').' ' .get_string('logs').' '; @@ -202,8 +285,8 @@ krsort($rolesdata); $row = array_merge(array($times[$time]),$rolesdata); if (empty($CFG->loglifetime) || ($stat->timeend-(60*60*24)) >= (time()-60*60*24*$CFG->loglifetime)) { - if (has_capability('coursereport/log:view', get_context_instance(CONTEXT_COURSE, $course->id))) { - $row[] = 'wwwroot.'/report/log/index.php?id=' .$course->id.'&chooselog=1&showusers=1&showcourses=1&user='.$userid .'&date='.usergetmidnight($time-(60*60*24)).'">' .get_string('course').' ' .get_string('logs').' '; @@ -217,12 +300,11 @@ $table->head = array_merge($table->head,$roles); } $table->head[] = get_string('logs'); - if (!empty($lastrecord)) { - $lastrecord[] = $lastlink; - $table->data[] = $lastrecord; - } + //if (!empty($lastrecord)) { + //$lastrecord[] = $lastlink; + //$table->data[] = $lastrecord; + //} echo html_writer::table($table); } } - - +} \ No newline at end of file diff --git a/report/stats/settings.php b/report/stats/settings.php index 9f19d21713e..c92ec339bba 100644 --- a/report/stats/settings.php +++ b/report/stats/settings.php @@ -1,9 +1,32 @@ . + +/** + * Version info + * + * @package report + * @subpackage stats + * @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com) + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ defined('MOODLE_INTERNAL') || die; // just a link to course report -$ADMIN->add('reports', new admin_externalpage('reportstats', get_string('stats', 'admin'), "$CFG->wwwroot/course/report/stats/index.php", 'coursereport/stats:view')); +$ADMIN->add('reports', new admin_externalpage('reportstats', get_string('pluginname', 'report_stats'), "$CFG->wwwroot/report/stats/index.php", 'report/stats:view')); // no report settings $settings = null; diff --git a/course/report/stats/lang/en/coursereport_stats.php b/report/stats/version.php similarity index 59% rename from course/report/stats/lang/en/coursereport_stats.php rename to report/stats/version.php index 38815c85898..feb039b19bd 100644 --- a/course/report/stats/lang/en/coursereport_stats.php +++ b/report/stats/version.php @@ -1,5 +1,4 @@ . /** - * Strings for component 'coursereport_stats', language 'en', branch 'MOODLE_20_STABLE' + * Version info * - * @package coursereport_stats - * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package report + * @subpackage stats + * @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com) + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -$string['pluginname'] = 'Course statistics'; -$string['pluginpagetype'] = 'Statistics course report'; -$string['stats:view'] = 'View course statistics report'; +defined('MOODLE_INTERNAL') || die; + +$plugin->version = 2011110200; // The current plugin version (Date: YYYYMMDDXX) +$plugin->requires = 2011102700.01; // Requires this Moodle version +$plugin->component = 'report_stats'; // Full name of the plugin (used for diagnostics)