When pages are shared - users can delete blocks by accident

Bug #1781844 reported by Kevin Dibble
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Wishlist
Unassigned

Bug Description

Mahara 18.04.02
DB: Mysql
OS: Ubuntu
Browser: Chrome

A lot of users in Mahara create (Template) pages to share out to users. This reduces the setup a new user will have to do to. There is an issue that on their personal copy, the blocks that were so carefully setup can be deleted.

This patch creates a new column in the database called "lockblocks" that can be enabled/disabled on the share page.

When the user copies the page, this setting is copied over and the "delete" icon is hidden from view should the lockblocks setting be enabled.

To unset - the user can open the advanced options in the shared area and disable the lock blocks feature to enable the deletion of the blocks as per normal.

Revision history for this message
Kevin Dibble (digitalskill) wrote :
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Hi Kevin,

Thank you for this new functionality. We'll take it over into the code review system at https://reviews.mahara.org to take a look.

Cheers
Kristina

Changed in mahara:
importance: Undecided → Wishlist
Revision history for this message
Cecilia Vela Gurovic (ceciliavg) wrote :

Hi Kevin,

Your patch is in reviews now here https://reviews.mahara.org/#/c/9015/
You'll have to keep an eye on it to see when it's updated, since there wasn't an email address in the commit.

Cheers,
Cecilia

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/9019

Changed in mahara:
status: New → In Progress
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Hi Kevin,

I had a look at the functionality and think we can include it into Mahara core with a few adjustments and fixing of bugs. Can you please take a look at my comments at https://reviews.mahara.org/#/c/9019 and fix things up?

Thank you
Kristina

Revision history for this message
Kevin Dibble (digitalskill) wrote :

Hi Kristina,

Attached is an updated patch with the bugs addressed and the working/ wording updated.
The settings area now features the lockblocks setting
Copying collections will respect the lockblock setting
Setting the lock block share for a collection will update all pages in the collection.

Revision history for this message
Kevin Dibble (digitalskill) wrote :

Master branch patch - tested.

Still having issues updating via gerrit, will get these sorted.
This is the patch based on the Mahara Master Branch.

Revision history for this message
Mahara Bot (dev-mahara) wrote :

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

Revision history for this message
Kevin Dibble (digitalskill) wrote :

Hi Mahara team,
The commit has been created in Gerrit on its own branch for review:
https://reviews.mahara.org/#/c/9033/

Note:
If the Mac version of "xargs" is being run, this error will appear:
xargs: illegal option -- -

If "sed" on a mac is being run, this error will appear:
sed: illegal option -- r

Linux Sed and xargs are not the same as Mac ones... (silent moan into the void)
Commands for "sed" and "xargs" require that homebrew be installed and these commands be run:

brew install gnu-sed --with-default-names (on a mac - sed is called gsed, the --with-default-names option will make it run as "sed" as per the makefile call)

brew install findutils --with-default-names (or brew reinstall findutils --with-default-names) as the default xargs on a mac runs differently to linux, and hombrew will install the "linux" version as gxargs - the option --with-default-names will make it behave.

These little tips could be be added to the https://wiki.mahara.org/wiki/Developer_Area/Contributing_Code
for those that code on mac.

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Hi Kevin,

Thank you for the tips. You can add them to the wiki yourself as your mahara.org login works on the wiki as well. :-)

Cheers
Kristina

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/9033
Committed: https://git.mahara.org/mahara/mahara/commit/3e76e38e68815c6158a486fd4039e34e6c461dc5
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 3e76e38e68815c6158a486fd4039e34e6c461dc5
Author: Kevin Dibble <email address hidden>
Date: Mon Jul 30 10:03:59 2018 +1200

Bug 1781844: Lock blocks on pages

A lot of users in Mahara create (Template) pages to share out to users.
This reduces the setup a new user will have to do to. There is an issue
that on their personal copy, the blocks that were so carefully setup can
be deleted.

This functionality creates a new column in the database called
"lockblocks" that can be enabled/disabled on the share page.

When the user copies the page, this setting is copied over and the
"delete" icon is hidden from view should the lockblocks setting be
enabled. This only happens on normal portfolio pages.

To unset - the user can edit the page settings and
disable the lock blocks feature to enable the deletion of the blocks as
per normal.

behatnotneeded
Change-Id: I7a2062f77431d6371f95d7f55bedcc499dd7caa2

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
milestone: none → 18.10.0
tags: added: nominatedfeature
removed: blocks locking
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/9071

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

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

commit c4befa28d0175c955a51290849432ff4080e3d25
Author: Robert Lyon <email address hidden>
Date: Thu Aug 16 10:49:29 2018 +1200

Bug 1781844: Lock blocks on pages

Fix for copying view access

behatnotneeded

Change-Id: I90d331a8047140757cbe5a0627399256f6b15160
Signed-off-by: Robert Lyon <email address hidden>

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.