"Lock blocks" doesn't work in group pages

Bug #1833664 reported by Kristina Hoeppner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Wishlist
Cecilia Vela Gurovic

Bug Description

Tested in Mahara 19.04 and master.

When you create a group page and use the "Lock blocks" functionality, the blocks still display the "Delete" button and it can be pressed. The "Delete" button should not be there at all.

To replicate:

1. Create a group.
2. Create a page in the group and set "Lock blocks" to "Yes" in the "Advanced" panel.
3. Drag a block onto the page and save it.
Expected result: You only see the "Configure" icon but not the "Delete" icon.
Actual result: You see both the "Configure" and "Delete" icons.

When a solution is found, this functionality needs to be tested also for personal, institution, and site pages to ensure that the behavior is still correct there.

Changed in mahara:
milestone: none → 19.10.0
Changed in mahara:
milestone: 19.10.0 → 20.04.0
Changed in mahara:
assignee: nobody → Cecilia Vela Gurovic (ceciliavg)
Revision history for this message
Cecilia Vela Gurovic (ceciliavg) wrote :

Looks like the original bug to create this feature considered only personal portfolios could set the lock blocks option:
https://bugs.launchpad.net/mahara/+bug/1781844

We have to decide:

- If we want to keep this lock block setting only for personal portfolios, then we need to remove the 'lock blocks' switch from the settings section for the rest of the views (group, sites, institutions)

- If we want to have the lock blocks option for all the views in the sites, then we need to fix the condition when the block is being rendered:
function render_editing in file blocktype/lib.php, when assigning a value to 'lockblocks' in smarty object

Changed in mahara:
status: Confirmed → Incomplete
Revision history for this message
Cecilia Vela Gurovic (ceciliavg) wrote :

Institution and site pages also have the 'lock block' options but that isn't working either.
Setting the 'lock blocks' to true and adding blocks to the page, will still show the 'delete' button

Revision history for this message
Cecilia Vela Gurovic (ceciliavg) wrote :

The original bug report for this feature
https://bugs.launchpad.net/mahara/+bug/1781844

It explains that lock blocks only work for personal portfolios. We can set the setting to true for any page, but the idea is that it should lock the blocks when a normal user makes a copy of the page.
We can set lock blocks = true for any group/institution/site page, this doesn't mean the blocks won't show the delete icon in view edit mode. However, if we make a copy of the page for our personal portfolio, then the blocks will be blocked.

Trying to also lock the blocks in group/institution/site pages should be a new feature rather than an error since it wasn't considered in the original bug report

Changed in mahara:
importance: Medium → Wishlist
status: Incomplete → Confirmed
Revision history for this message
Cecilia Vela Gurovic (ceciliavg) wrote :

it was decided to:

- Have the 'lock blocks' functionality also working for group views
- Have a different description for the 'Lock blocks' switch in views setting if the view belongs to an institution or the site (institution = 'mahara')

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/10812

Changed in mahara:
status: Confirmed → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/10812
Committed: https://git.mahara.org/mahara/mahara/commit/4ccfaa8acc34e0ca4ae8b436ced847036e36f639
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 4ccfaa8acc34e0ca4ae8b436ced847036e36f639
Author: Cecilia Vela Gurovic <email address hidden>
Date: Mon Mar 9 11:49:07 2020 +1300

Bug 1833664: Enabling 'lock blocks' in group pages

When turning on 'Lock blocks' for a group page, prevent group members
from removing the lock. Added a language string for site and institution
pages to make it clearer that the locking only affects pages that are
copied.

behatnotneeded

Change-Id: I26ebccb659f1c05333538dea24735ca11484b360

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
tags: added: usermanualupdate
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.