mirror of
https://github.com/moodle/moodle.git
synced 2025-07-12 01:46:32 +02:00
MDL-23310 fixed undefined page layouts
This commit is contained in:
@ -44,7 +44,7 @@ if ($id !== null) {
|
|||||||
}
|
}
|
||||||
$PAGE->set_url($url);
|
$PAGE->set_url($url);
|
||||||
$PAGE->set_context($context);
|
$PAGE->set_context($context);
|
||||||
$PAGE->set_pagelayout('general');
|
$PAGE->set_pagelayout('standard');
|
||||||
|
|
||||||
$returnurl = new moodle_url('/blog/external_blogs.php');
|
$returnurl = new moodle_url('/blog/external_blogs.php');
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ $blogs = $DB->get_records('blog_external', array('userid' => $USER->id));
|
|||||||
|
|
||||||
$PAGE->set_heading("$SITE->shortname: $strblogs: $strexternalblogs", $SITE->fullname);
|
$PAGE->set_heading("$SITE->shortname: $strblogs: $strexternalblogs", $SITE->fullname);
|
||||||
$PAGE->set_title("$SITE->shortname: $strblogs: $strexternalblogs");
|
$PAGE->set_title("$SITE->shortname: $strblogs: $strexternalblogs");
|
||||||
$PAGE->set_pagelayout('general');
|
$PAGE->set_pagelayout('standard');
|
||||||
|
|
||||||
echo $OUTPUT->header();
|
echo $OUTPUT->header();
|
||||||
echo $OUTPUT->heading($strexternalblogs, 2);
|
echo $OUTPUT->heading($strexternalblogs, 2);
|
||||||
|
@ -281,7 +281,7 @@ function blog_is_enabled_for_user() {
|
|||||||
/**
|
/**
|
||||||
* This function gets all of the options available for the current user in respect
|
* This function gets all of the options available for the current user in respect
|
||||||
* to blogs.
|
* to blogs.
|
||||||
*
|
*
|
||||||
* It loads the following if applicable:
|
* It loads the following if applicable:
|
||||||
* - Module options {@see blog_get_options_for_module}
|
* - Module options {@see blog_get_options_for_module}
|
||||||
* - Course options {@see blog_get_options_for_course}
|
* - Course options {@see blog_get_options_for_course}
|
||||||
@ -417,7 +417,7 @@ function blog_get_options_for_course(stdClass $course, stdClass $user=null) {
|
|||||||
global $CFG, $USER;
|
global $CFG, $USER;
|
||||||
// Cache
|
// Cache
|
||||||
static $courseoptions = array();
|
static $courseoptions = array();
|
||||||
|
|
||||||
$options = array();
|
$options = array();
|
||||||
|
|
||||||
// User must be logged in and blogs must be enabled
|
// User must be logged in and blogs must be enabled
|
||||||
@ -441,7 +441,7 @@ function blog_get_options_for_course(stdClass $course, stdClass $user=null) {
|
|||||||
if (array_key_exists($key, $courseoptions)) {
|
if (array_key_exists($key, $courseoptions)) {
|
||||||
return $courseoptions[$key];
|
return $courseoptions[$key];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (has_capability('moodle/blog:view', get_context_instance(CONTEXT_COURSE, $course->id))) {
|
if (has_capability('moodle/blog:view', get_context_instance(CONTEXT_COURSE, $course->id))) {
|
||||||
// We can view!
|
// We can view!
|
||||||
if ($CFG->bloglevel >= BLOG_SITE_LEVEL) {
|
if ($CFG->bloglevel >= BLOG_SITE_LEVEL) {
|
||||||
@ -648,7 +648,7 @@ function blog_get_headers() {
|
|||||||
$course = $DB->get_record('course', array('id' => $group->courseid));
|
$course = $DB->get_record('course', array('id' => $group->courseid));
|
||||||
}
|
}
|
||||||
|
|
||||||
$PAGE->set_pagelayout('general');
|
$PAGE->set_pagelayout('standard');
|
||||||
|
|
||||||
if (!empty($modid) && $CFG->useblogassociations && has_capability('moodle/blog:associatemodule', $sitecontext)) { // modid always overrides courseid, so the $course object may be reset here
|
if (!empty($modid) && $CFG->useblogassociations && has_capability('moodle/blog:associatemodule', $sitecontext)) { // modid always overrides courseid, so the $course object may be reset here
|
||||||
$headers['filters']['module'] = $modid;
|
$headers['filters']['module'] = $modid;
|
||||||
|
@ -53,7 +53,7 @@ if ($groupid !== null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$PAGE->set_url($url);
|
$PAGE->set_url($url);
|
||||||
$PAGE->set_pagelayout('general');
|
$PAGE->set_pagelayout('standard');
|
||||||
|
|
||||||
if ($courseid == SITEID) {
|
if ($courseid == SITEID) {
|
||||||
require_login();
|
require_login();
|
||||||
|
Reference in New Issue
Block a user