mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 09:56:38 +02:00
MDL-14460, fix get_context_instance, see tracker
This commit is contained in:
parent
fd968fb1b5
commit
09ee7b0d9e
6 changed files with 8 additions and 8 deletions
|
@ -14,14 +14,14 @@
|
|||
$reportoptions = stats_get_report_options($course->id, $mode);
|
||||
$timeoptions = report_stats_timeoptions($mode);
|
||||
if (empty($timeoptions)) {
|
||||
error(get_string('nostatstodisplay'), $CFG->wwwroot.'/course/view.php?id='.$course->id);
|
||||
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('moodle/site:viewreports', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
|
||||
if (has_capability('moodle/site:viewreports', get_context_instance(CONTEXT_SYSTEM))) {
|
||||
$options[STATS_MODE_RANKED] = get_string('reports');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue