Commit cbf5573f authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1833664: Enabling 'lock blocks' in group pages"

parents feae1904 4ccfaa8a
......@@ -1246,7 +1246,7 @@ class BlockInstance {
$smarty->assign('strconfigtitletexttooltip', get_string('configureblock2', 'view'));
$smarty->assign('strremovetitletext', $title == '' ? get_string('removethisblock1', 'view', $id) : get_string('removeblock1', 'view', "'$title'", $id));
$smarty->assign('strremovetitletexttooltip', get_string('removeblock2', 'view'));
$smarty->assign('lockblocks', ($this->get_view()->get('lockblocks') && $this->get_view()->get('owner'))); // Only lock blocks for user's portfolio pages
$smarty->assign('lockblocks', ($this->get_view()->get('lockblocks') && ($this->get_view()->get('owner') || $this->get_view()->get('group')))); // Only lock blocks for user's portfolio and group pages
if ( $title) {
$configdata = $this->get('configdata');
......
......@@ -500,7 +500,8 @@ $string['theme'] = 'Theme';
$string['choosethemedesc'] = 'Choose a theme for the page.';
$string['lockblocks'] = "Lock blocks";
$string['lockblocksdescription'] = "You can lock the blocks on the page and prevent them from being removed when people copy the page.";
$string['lockblocksdescription1'] = "You can lock the blocks on the page and prevent them from being removed when you edit the page. You can remove the lock at any time to remove blocks if needed.";
$string['lockblocksdescriptioninstitution'] = "Lock the blocks on the page and prevent them from being removed when people copy the page into their personal or group portfolio area. You can still remove blocks while you are editing this site or institution page.";
$string['instructions'] = 'Instructions';
$string['advanced'] = 'Advanced';
......
......@@ -358,7 +358,7 @@ function get_advanced_elements() {
$elements['lockblocks'] = array(
'type' => 'switchbox',
'title' => get_string('lockblocks', 'view'),
'description' => get_string('lockblocksdescription', 'view'),
'description' => !empty($view->get('institution')) ? get_string('lockblocksdescriptioninstitution', 'view') : get_string('lockblocksdescription1', 'view'),
'defaultvalue' => $view->get('lockblocks'),
);
if (!($group || $institution)) {
......
Supports Markdown
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