Issue Details (XML | Word | Printable)

Key: MDL-20207
Type: Sub-task Sub-task
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Sam Hemelryk
Reporter: Martin Dougiamas
Votes: 0
Watchers: 1
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle
MDL-14632

Settings block can be deleted and is difficult to get back again

Created: 03/Sep/09 04:52 PM   Updated: 11/Sep/09 02:54 PM
Return to search
Component/s: Blocks
Affects Version/s: 2.0
Fix Version/s: 2.0

Participants: Martin Dougiamas, Sam Hemelryk and Tim Hunt
Security Level: None
QA Assignee: Tim Hunt
Resolved date: 11/Sep/09
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
As admin, go into a course, and delete the settings block.
You have deleted the settings block for all users on the entire system (and can do the same for Navigation).

I think these two blocks should not display delete buttons at all in the GUI when editing is on.

Can we put a check in the block drawing codefor a new method in the block that prevents the delete button showing?

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Martin Dougiamas made changes - 03/Sep/09 04:52 PM
Field Original Value New Value
Assignee Tim Hunt [ timhunt ] Sam Hemelryk [ samhemelryk ]
Tim Hunt added a comment - 03/Sep/09 11:28 PM
I am a bit hesitant about allowing block authors to disable delete. Perhpas a hard-coded list, or $CFG->undeletableblocktypes would be better.

Sam Hemelryk added a comment - 04/Sep/09 11:32 AM
Cool thanks Tim, I was keen to see what you thought was the right way around this.
I'll have a think about where this should go and purpose a solution

Martin Dougiamas added a comment - 04/Sep/09 11:41 AM
A config setting called undeletableblocktypes that is a comma-separated list of block names would be a good idea.

Default: settings_navigation_tree, global_navigation_tree

Arg, now I wish these blocks were just called "navigation" and "settings" ...


Sam Hemelryk committed 2 files to 'Moodle CVS' - 11/Sep/09 02:00 PM
blocklib MDL-20207 Added $CFG->undeletableblocktypes and documented in config-dist
MODIFY config-dist.php   Rev. 1.120    (+6 -1 lines)
MODIFY lib/blocklib.php   Rev. 1.218    (+11 -3 lines)
Sam Hemelryk added a comment - 11/Sep/09 02:54 PM
Resolved, have added $CFG->undeletableblocktypes and commented in config-dist

Sam Hemelryk made changes - 11/Sep/09 02:54 PM
QA Assignee samhemelryk timhunt
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]