mirror of
https://github.com/moodle/moodle.git
synced 2025-08-03 08:09:47 +02:00
Merge branch 'MDL-84597-405' of https://github.com/paulholden/moodle into MOODLE_405_STABLE
This commit is contained in:
commit
01b016b2cb
1 changed files with 8 additions and 8 deletions
|
@ -62,13 +62,6 @@ if ($id) {
|
||||||
|
|
||||||
$sitecontext = context_system::instance();
|
$sitecontext = context_system::instance();
|
||||||
$usercontext = context_user::instance($userid);
|
$usercontext = context_user::instance($userid);
|
||||||
if ($modid) {
|
|
||||||
$PAGE->set_context($sitecontext);
|
|
||||||
} else {
|
|
||||||
$PAGE->set_context($usercontext);
|
|
||||||
$blognode = $PAGE->settingsnav->find('blogadd', null);
|
|
||||||
$blognode->make_active();
|
|
||||||
}
|
|
||||||
|
|
||||||
require_login($courseid);
|
require_login($courseid);
|
||||||
|
|
||||||
|
@ -80,8 +73,15 @@ if (isguestuser()) {
|
||||||
throw new \moodle_exception('noguest');
|
throw new \moodle_exception('noguest');
|
||||||
}
|
}
|
||||||
|
|
||||||
$returnurl = new moodle_url('/blog/index.php');
|
if ($modid) {
|
||||||
|
$PAGE->set_context($sitecontext);
|
||||||
|
} else {
|
||||||
|
$PAGE->set_context($usercontext);
|
||||||
|
$blognode = $PAGE->settingsnav->find('blogadd', null);
|
||||||
|
$blognode->make_active();
|
||||||
|
}
|
||||||
|
|
||||||
|
$returnurl = new moodle_url('/blog/index.php');
|
||||||
if (!empty($courseid) && empty($modid)) {
|
if (!empty($courseid) && empty($modid)) {
|
||||||
$returnurl->param('courseid', $courseid);
|
$returnurl->param('courseid', $courseid);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue