Skip to content
Browse files

MDL-30271 Move the page initialization so that we can produce output …

…in param processing sections eventually
  • Loading branch information...
1 parent b8321ca commit 0e99bb1405e4d55ab7f33363107abbc0bf2dd57b @mudrd8mz mudrd8mz committed Nov 24, 2011
Showing with 8 additions and 9 deletions.
  1. +8 −9 mod/workshop/exsubmission.php
View
17 mod/workshop/exsubmission.php
@@ -46,6 +46,14 @@
$workshop = new workshop($workshop, $cm, $course);
$PAGE->set_url($workshop->exsubmission_url($id), array('edit' => $edit));
+$PAGE->set_title($workshop->name);
+$PAGE->set_heading($course->fullname);
+if ($edit) {
+ $PAGE->navbar->add(get_string('exampleediting', 'workshop'));
+} else {
+ $PAGE->navbar->add(get_string('example', 'workshop'));
+}
+$output = $PAGE->get_renderer('mod_workshop');
if ($id) { // example is specified
$example = $workshop->get_example_by_id($id);
@@ -167,16 +175,7 @@
}
}
-$PAGE->set_title($workshop->name);
-$PAGE->set_heading($course->fullname);
-if ($edit) {
- $PAGE->navbar->add(get_string('exampleediting', 'workshop'));
-} else {
- $PAGE->navbar->add(get_string('example', 'workshop'));
-}
-
// Output starts here
-$output = $PAGE->get_renderer('mod_workshop');
echo $output->header();
echo $output->heading(format_string($workshop->name), 2);

0 comments on commit 0e99bb1

Please sign in to comment.
Something went wrong with that request. Please try again.