[MDL-25639] Fixed page output before redirection

This commit is contained in:
Daren Chandisingh 2011-01-26 12:28:35 +00:00
parent 8cdc85ac62
commit 6110e008cb

View file

@ -8,9 +8,6 @@
$time = optional_param('time', 0, PARAM_INT); $time = optional_param('time', 0, PARAM_INT);
$numcourses = optional_param('numcourses', 20, PARAM_INT); $numcourses = optional_param('numcourses', 20, PARAM_INT);
admin_externalpage_setup('reportcourseoverview');
echo $OUTPUT->header();
if (empty($CFG->enablestats)) { if (empty($CFG->enablestats)) {
if (has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))) { 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); redirect("$CFG->wwwroot/$CFG->admin/settings.php?section=stats", get_string('mustenablestats', 'admin'), 3);
@ -19,6 +16,9 @@
} }
} }
admin_externalpage_setup('reportcourseoverview');
echo $OUTPUT->header();
$course = get_site(); $course = get_site();
stats_check_uptodate($course->id); stats_check_uptodate($course->id);