mirror of
https://github.com/moodle/moodle.git
synced 2025-02-15 13:24:56 +01:00
Merge branch 'wip-MDL-30540-master' of git://github.com/phalacee/moodle
This commit is contained in:
commit
ae8c201905
@ -197,20 +197,18 @@ if (!empty($userid)) {
|
|||||||
|
|
||||||
$courseid = (empty($courseid)) ? SITEID : $courseid;
|
$courseid = (empty($courseid)) ? SITEID : $courseid;
|
||||||
|
|
||||||
if (!empty($courseid)) {
|
if (empty($entryid) && empty($modid) && empty($groupid)) {
|
||||||
$PAGE->set_context(get_context_instance(CONTEXT_COURSE, $courseid));
|
$PAGE->set_context(context_user::instance($USER->id));
|
||||||
}
|
} else if (!empty($modid)) {
|
||||||
|
$PAGE->set_context(context_module::instance($modid));
|
||||||
if (!empty($modid)) {
|
} else if (!empty($courseid)) {
|
||||||
$PAGE->set_context(get_context_instance(CONTEXT_MODULE, $modid));
|
$PAGE->set_context(context_course::instance($courseid));
|
||||||
|
} else {
|
||||||
|
$PAGE->set_context(context_system::instance());
|
||||||
}
|
}
|
||||||
|
|
||||||
$blogheaders = blog_get_headers();
|
$blogheaders = blog_get_headers();
|
||||||
|
|
||||||
if (empty($entryid) && empty($modid) && empty($groupid)) {
|
|
||||||
$PAGE->set_context(get_context_instance(CONTEXT_USER, $USER->id));
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($CFG->enablerssfeeds) {
|
if ($CFG->enablerssfeeds) {
|
||||||
$rsscontext = null;
|
$rsscontext = null;
|
||||||
$filtertype = null;
|
$filtertype = null;
|
||||||
|
@ -314,7 +314,7 @@ function blog_get_context_url($context=null) {
|
|||||||
|
|
||||||
// Change contextlevel to SYSTEM if viewing the site course
|
// Change contextlevel to SYSTEM if viewing the site course
|
||||||
if ($context->contextlevel == CONTEXT_COURSE && $context->instanceid == SITEID) {
|
if ($context->contextlevel == CONTEXT_COURSE && $context->instanceid == SITEID) {
|
||||||
$context->contextlevel = CONTEXT_SYSTEM;
|
$context = context_system::instance();
|
||||||
}
|
}
|
||||||
|
|
||||||
$filterparam = '';
|
$filterparam = '';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user