Prevent editing sign-off blocks and preserve config from a templates

Bug #1964428 reported by Doris Tam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Wishlist
Doris Tam

Bug Description

We should preserve the config settings of a sign-off block on template page copies.

Note: a template is one where a page has its 'Template' switch set to 'Yes'.

For institution collection, this is easier as institution collection have the 'Template' functionality which turns all the collection pages to templates.

For personal collections, each page with a sign-off block needs to ensure that its 'Template' switch is set to 'Yes'.

- Disable edits to the sign-off block config
- Hide the delete button
- Keep the config of the original template

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

Patch for "main" branch: https://reviews.mahara.org/12491

Doris Tam (doristam)
Changed in mahara:
assignee: nobody → Doris Tam (doristam)
Revision history for this message
Doris Tam (doristam) wrote :

Hiding the edit button means that when someone wants to add a sign-off block back to the page, they cannot press 'save' and therefore submit the block to register in the db and is not displayed on the page.

A better solution is to mirror the config of its original template block and to disable the editing of the config.

We can do this because the relationship between sign-off blocks and pages is 1:1.

summary: - Prevent editing sign-off blocks that are create from a template
+ Prevent editing sign-off blocks that are created from a template
summary: - Prevent editing sign-off blocks that are created from a template
+ Prevent editing sign-off blocks and preserve config from a templates
description: updated
Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "main" branch: https://reviews.mahara.org/12503

Doris Tam (doristam)
description: updated
Changed in mahara:
status: New → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/12503
Committed: https://git.mahara.org/mahara/mahara/commit/9591ed85bdb16ce4f6fe20e3f758cb6d7bf815ee
Submitter: Robert Lyon (<email address hidden>)
Branch: main

commit 9591ed85bdb16ce4f6fe20e3f758cb6d7bf815ee
Author: Doris Tam <email address hidden>
Date: Thu Mar 17 16:39:53 2022 +1300

Bug 1964428: Preserve sign-off block config in template copies

Prevent deleting and editing the block instance.

Note for personal collections:
As the functionality for collection templates only
exist on an institution level at this point, you will
need to set 'Template' to 'Yes' for all pages in a
personal collection to ensure copies will preserve
the sign-off block config in all the pages in copies
of the collection.

The view_instruction_lock table only watches for individual
pages with the 'Template' switch set to 'Yes'/

Change-Id: Ie18073a5bb4d6c822f15ca023ae9a0eab4876033

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
milestone: none → 22.04.0
importance: Undecided → High
Changed in mahara:
importance: High → Wishlist
tags: added: newfeature
Gold (gold.catalyst)
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.