mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Merge branch 'MDL-56319-m' of https://github.com/micaherne/moodle
This commit is contained in:
commit
c405d31bef
@ -381,7 +381,7 @@ class cc2moodle {
|
||||
if (!empty($format['defaultblocks'])) {
|
||||
$blocknames = $format['defaultblocks'];
|
||||
} else {
|
||||
if (!empty($CFG->defaultblocks)) {
|
||||
if (isset($CFG->defaultblocks)) {
|
||||
$blocknames = $CFG->defaultblocks;
|
||||
} else {
|
||||
$blocknames = 'participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity';
|
||||
|
@ -477,7 +477,7 @@ abstract class format_base {
|
||||
*/
|
||||
public function get_default_blocks() {
|
||||
global $CFG;
|
||||
if (!empty($CFG->defaultblocks)){
|
||||
if (isset($CFG->defaultblocks)) {
|
||||
return blocks_parse_default_blocks_list($CFG->defaultblocks);
|
||||
}
|
||||
$blocknames = array(
|
||||
|
@ -2221,7 +2221,7 @@ function blocks_parse_default_blocks_list($blocksstr) {
|
||||
function blocks_get_default_site_course_blocks() {
|
||||
global $CFG;
|
||||
|
||||
if (!empty($CFG->defaultblocks_site)) {
|
||||
if (isset($CFG->defaultblocks_site)) {
|
||||
return blocks_parse_default_blocks_list($CFG->defaultblocks_site);
|
||||
} else {
|
||||
return array(
|
||||
@ -2239,13 +2239,13 @@ function blocks_get_default_site_course_blocks() {
|
||||
function blocks_add_default_course_blocks($course) {
|
||||
global $CFG;
|
||||
|
||||
if (!empty($CFG->defaultblocks_override)) {
|
||||
if (isset($CFG->defaultblocks_override)) {
|
||||
$blocknames = blocks_parse_default_blocks_list($CFG->defaultblocks_override);
|
||||
|
||||
} else if ($course->id == SITEID) {
|
||||
$blocknames = blocks_get_default_site_course_blocks();
|
||||
|
||||
} else if (!empty($CFG->{'defaultblocks_' . $course->format})) {
|
||||
} else if (isset($CFG->{'defaultblocks_' . $course->format})) {
|
||||
$blocknames = blocks_parse_default_blocks_list($CFG->{'defaultblocks_' . $course->format});
|
||||
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user