- View the diff current.
- View the source.
- Go to Moodle/Programming/2.2.
3: 2012-04-15 (Sun) 03:35:47 iseki | 4: 2012-04-21 (Sat) 11:57:57 iseki | ||
---|---|---|---|
Line 46: | Line 46: | ||
- required_param('course', PARAM_INT); | - required_param('course', PARAM_INT); | ||
- optional_param('mode', default, PARAM_ALPHA); | - optional_param('mode', default, PARAM_ALPHA); | ||
+ | #br | ||
+ | |||
+ | *** PAGE, OUTPUT [#p5713263] | ||
+ | **** エラー: The theme has already been set up for this page ready for output. Therefore, you can no longer change the theme, or anything that might affect what the current theme is, for example, the course. [#ocfe165c] | ||
+ | - 通常は require_login() を実行してから ヘッダーを書く. | ||
+ | - ヘッダーを書いた後に require_login() を実行すると,上記のエラーが出る. | ||
+ | - 対策: require_login() を実行してから ヘッダーを書く. | ||
+ | $PAGE->set_title($title); | ||
+ | $PAGE->set_heading($heading); | ||
+ | $PAGE->set_cacheable($cache); // true | ||
+ | $PAGE->set_button($button); // ' ' | ||
+ | $PAGE->set_headingmenu($menu); | ||
+ | |||
+ | require_login($course->id); | ||
+ | echo $OUTPUT->header(); | ||
#br | #br | ||
- Backup list of Moodle/Programming/2.2
- Backup diff of Moodle/Programming/2.2(No. All)