allow plugins to register admin menu items

Bug #1431540 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Robert Lyon

Bug Description

Currently plugins can register menu items and right nav menu items - it would be useful if they can also register:

* admin menu items
* institution admin menu items
* institution staff menu items

It will be a matter of duplicating the code that we use for right nav menu items

This will allow us to have less hardcoded menu items in lib/web.php and instead have the menu items controlled by the plugins themselves.

I'll mark the bug high as I need it for https://bugs.launchpad.net/mahara/+bug/1409546

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

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

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

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

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

Revision history for this message
Robert Lyon (robertl-9) wrote :

I've added a dummy module to use test this change. You should be able to extract it in your htdocs/module/ directory.

Install it under Administration -> Extensions then you should be able to visit the admin section and see different menus for

1) Site admin

2) Institution admin

3) Site/institution staff

Revision history for this message
Jinelle Foley-Barnes (jinelleb) wrote :

Thanks for that! :)

Revision history for this message
Robert Lyon (robertl-9) wrote :

Ok I've added a more fleshed out dummymenu module that has a couple of pages

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

Reviewed: https://reviews.mahara.org/4381
Committed: http://gitorious.org/mahara/mahara/commit/14f824181de123c430a3c1115391d10ef71e029b
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit 14f824181de123c430a3c1115391d10ef71e029b
Author: Robert Lyon <email address hidden>
Date: Fri Mar 13 09:03:39 2015 +1300

Allow plugins to register admin menu items (Bug #1431540)

To test add to a plugin:
function admin_menu_items() { }
function institution_menu_items() { }
function institution_staff_menu_items() { }

where each has proper markup for a menu item

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

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

Patch for "15.04_STABLE" branch: https://reviews.mahara.org/4492

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

Reviewed: https://reviews.mahara.org/4492
Committed: http://gitorious.org/mahara/mahara/commit/45175b13bc40209107d2e308acb46087d1460651
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.04_STABLE

commit 45175b13bc40209107d2e308acb46087d1460651
Author: Robert Lyon <email address hidden>
Date: Fri Mar 13 09:03:39 2015 +1300

Allow plugins to register admin menu items (Bug #1431540)

To test add to a plugin:
function admin_menu_items() { }
function institution_menu_items() { }
function institution_staff_menu_items() { }

where each has proper markup for a menu item

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

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/4428
Committed: http://gitorious.org/mahara/mahara/commit/25830eb25e48edb322bd6c4c1f1025f37b620670
Submitter: Son Nguyen (<email address hidden>)
Branch: master

commit 25830eb25e48edb322bd6c4c1f1025f37b620670
Author: Robert Lyon <email address hidden>
Date: Tue Mar 17 16:40:08 2015 +1300

Moving the webservice menu to be all in the plugin (Bug #1431540)

And fixing up problem when no protocols are enabled on test client page

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

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

Reviewed: https://reviews.mahara.org/4436
Committed: http://gitorious.org/mahara/mahara/commit/807c06022c6db3633aa32e09911983ef5cce0926
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 807c06022c6db3633aa32e09911983ef5cce0926
Author: Jinelle Foley-Barnes <email address hidden>
Date: Wed Mar 18 14:33:24 2015 +1300

Behat Test: Accessing webservices test client page (Bug 1431540)

Change-Id: I56b8df3ba6e8faa8fda7e386f246c1bd5eff6a39

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

Patch for "15.04_STABLE" branch: https://reviews.mahara.org/4560

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

Patch for "15.04_STABLE" branch: https://reviews.mahara.org/4561

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

Reviewed: https://reviews.mahara.org/4560
Committed: http://gitorious.org/mahara/mahara/commit/b6a758faa9b219768688edf660b56d4081addfd7
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.04_STABLE

commit b6a758faa9b219768688edf660b56d4081addfd7
Author: Robert Lyon <email address hidden>
Date: Tue Mar 17 16:40:08 2015 +1300

Moving the webservice menu to be all in the plugin (Bug #1431540)

And fixing up problem when no protocols are enabled on test client page

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

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

Reviewed: https://reviews.mahara.org/4561
Committed: http://gitorious.org/mahara/mahara/commit/c8d16cb78d1146d36a1a486281f0cd9cd1492f35
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.04_STABLE

commit c8d16cb78d1146d36a1a486281f0cd9cd1492f35
Author: Jinelle Foley-Barnes <email address hidden>
Date: Wed Mar 18 14:33:24 2015 +1300

Behat Test: Accessing webservices test client page (Bug 1431540)

Change-Id: I56b8df3ba6e8faa8fda7e386f246c1bd5eff6a39

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.