moodle-an-hochschulen / moodle-local_boostnavigation

Moodle plugin which tries to overcome some fixed appearance behaviours of Boost's nav drawer in a clean way
GNU General Public License v3.0
39 stars 28 forks source link

Editing Toggle #18

Closed scotthardwick closed 5 years ago

scotthardwick commented 5 years ago

Hello! This is a very minor feature request and may not be useful to others, but....

Since we can add nodes to a course node section and now have access to placeholders {couresid} and {sesskey} my thought was to add the Turn Editing On/Off as a link into the boost navigation. However, I would need to render it as two links right now so that one was /course/view.php?id={courseid}&sesskey={sesskey}&edit=off and one was /course/view.php?id={courseid}&sesskey={sesskey}&edit=on

Would there be some way to add a {edittoggle} placeholder that knew what the current status is and choose the appropriate opposite one?

Thanks!

abias commented 5 years ago

Hi Scott,

I have thought of this placeholder already when I added the placeholder feature initially, but didn't add it as we didn't need it here in Ulm and as I hesitated at first to add another mechanism to add placeholders to the node names.

Now, after https://github.com/moodleuulm/moodle-local_boostnavigation/commit/ad5627d8b28f73ac39d5b86df27988a705d2a673 and https://github.com/moodleuulm/moodle-local_boostnavigation/commit/67e7f08f5823cca6335915ec88f21078e2f5e309, you can now add a toggle editing node with something like

{editingtoggle}|{pagepath}&sesskey={sesskey}&edit={editingtoggle}

A new version with the patch will be published to the Moodle plugin repo soon.

Have fun! Alex

scotthardwick commented 5 years ago

Thanks so much Alex! This is wonderful news ;-)

All the best! Scott