Commit fc8cb197 authored by Edward Murrell's avatar Edward Murrell
Browse files

Changed default 'Display Shared pages?' to Yes (bug #783826)



This patch also set the default configdata for blocktype of
groupviews so that the database matches the configuration
screen for new views. Where the configdata is null for
already existing groupviews, the configdata will be set
to the new defaults during rendering.

Change-Id: I22effce47b050892f881074659b60e0ca3c262e0
Signed-off-by: default avatarEdward Murrell <edwardm@catalyst.net.nz>
parent 63d8877b
...@@ -60,6 +60,9 @@ class PluginBlocktypeGroupViews extends SystemBlocktype { ...@@ -60,6 +60,9 @@ class PluginBlocktypeGroupViews extends SystemBlocktype {
// If not set, use default // If not set, use default
$configdata['showgroupviews'] = 1; $configdata['showgroupviews'] = 1;
} }
if (!isset($configdata['showsharedviews'])) {
$configdata['showsharedviews'] = 1;
}
$groupid = $instance->get_view()->get('group'); $groupid = $instance->get_view()->get('group');
if (!$groupid) { if (!$groupid) {
return ''; return '';
...@@ -116,7 +119,7 @@ class PluginBlocktypeGroupViews extends SystemBlocktype { ...@@ -116,7 +119,7 @@ class PluginBlocktypeGroupViews extends SystemBlocktype {
0 => get_string('no'), 0 => get_string('no'),
), ),
'separator' => '<br>', 'separator' => '<br>',
'defaultvalue' => isset($configdata['showsharedviews']) ? $configdata['showsharedviews'] : 0, 'defaultvalue' => isset($configdata['showsharedviews']) ? $configdata['showsharedviews'] : 1,
), ),
); );
} }
......
...@@ -1742,7 +1742,7 @@ function install_system_grouphomepage_view() { ...@@ -1742,7 +1742,7 @@ function install_system_grouphomepage_view() {
'blocktype' => 'groupviews', 'blocktype' => 'groupviews',
'title' => '', 'title' => '',
'column' => 1, 'column' => 1,
'config' => null, 'config' => array('showgroupviews' => 1, 'showsharedviews' => 1),
), ),
array( array(
'blocktype' => 'groupmembers', 'blocktype' => 'groupmembers',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment