Merge branch 'MDL-50663-master' of https://github.com/sk-unikent/moodle
This commit is contained in:
+3
-1
@@ -578,7 +578,7 @@ class block_manager {
|
||||
}
|
||||
|
||||
$context = $this->page->context;
|
||||
$contexttest = 'bi.parentcontextid = :contextid2';
|
||||
$contexttest = 'bi.parentcontextid IN (:contextid2, :contextid3)';
|
||||
$parentcontextparams = array();
|
||||
$parentcontextids = $context->get_parent_context_ids();
|
||||
if ($parentcontextids) {
|
||||
@@ -594,12 +594,14 @@ class block_manager {
|
||||
$ccselect = ', ' . context_helper::get_preload_record_columns_sql('ctx');
|
||||
$ccjoin = "LEFT JOIN {context} ctx ON (ctx.instanceid = bi.id AND ctx.contextlevel = :contextlevel)";
|
||||
|
||||
$systemcontext = \context_system::instance();
|
||||
$params = array(
|
||||
'contextlevel' => CONTEXT_BLOCK,
|
||||
'subpage1' => $this->page->subpage,
|
||||
'subpage2' => $this->page->subpage,
|
||||
'contextid1' => $context->id,
|
||||
'contextid2' => $context->id,
|
||||
'contextid3' => $systemcontext->id,
|
||||
'pagetype' => $this->page->pagetype,
|
||||
);
|
||||
if ($this->page->subpage === '') {
|
||||
|
||||
+2
-3
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -104,11 +103,11 @@ if (!isguestuser()) { // Skip default home page for guests
|
||||
}
|
||||
|
||||
// Toggle the editing state and switches
|
||||
if ($PAGE->user_allowed_editing()) {
|
||||
if (!$CFG->forcedefaultmymoodle && $PAGE->user_allowed_editing()) {
|
||||
if ($reset !== null) {
|
||||
if (!is_null($userid)) {
|
||||
require_sesskey();
|
||||
if(!$currentpage = my_reset_page($userid, MY_PAGE_PRIVATE)){
|
||||
if (!$currentpage = my_reset_page($userid, MY_PAGE_PRIVATE)) {
|
||||
print_error('reseterror', 'my');
|
||||
}
|
||||
redirect(new moodle_url('/my'));
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ function my_get_page($userid, $private=MY_PAGE_PRIVATE) {
|
||||
function my_copy_page($userid, $private=MY_PAGE_PRIVATE, $pagetype='my-index') {
|
||||
global $DB;
|
||||
|
||||
if ($customised = $DB->record_exists('my_pages', array('userid' => $userid, 'private' => $private))) {
|
||||
if ($customised = $DB->get_record('my_pages', array('userid' => $userid, 'private' => $private))) {
|
||||
return $customised; // We're done!
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user