project: Moodle
summary: Navigation overhaul: User context
description: This issue will hold all the tasks related to the _user context_ from the specification describes what we plan to tackle in 2.9. Mockup of this spec is here It is envisaged that the general flow of development will be: User menu My grades My home Context header User preferences (and excising existing Administration block entries) My profile Checking for context inconsistencies Trimming user-context Navigation block. While the ultimate goal of this epic is to trim down the user-context Navigation block (and thereby improve navigation within Moodle), it should be noted that due to the interconnected nature of this major improvement, this goal cannot be reached without implementing all of the tasks and addressing all of the issues described. If circumstances limit our ability to address this entire list, we suggest that effort be primarily expended upon those items that we have bolded in the list above, as those items are only lightly coupled to other sections of Moodle and represent "easy wins" that can be achieved without potentially making things worse.

1.summary: Fix behat AFTER we finish changing the navigation.
description: Many behat steps rely on the old navigation structure, when we have finished moving things around completely we will need to adjust the broken behat tests.
2.summary: Verify that no strange context jumps occur
description: After all prerequisite issues are resolved, test user-context navigation for inconsistencies. Ideally, there should be no unexpected jumps out to site or course contexts when navigating a users profile, blogs, grades, etc. Prerequisites: - the user menu - the improvements to my home - the context header system - the preferences page - the improvements to my profile This will require verifying the breadcrumbs matching the prototype site:
3.summary: Create user context header.
description: The creation of a new context-dependent header system to handle each of the following contexts: - Site - Category - Course - User Each header should contain at a bare minimum, a title and breadcrumbs, with a design that provides "attachment points"...? (wording to be determined) for additional functionality later (e.g. a "message this user" link when viewing another users user-context page). Layout should be consistent throughout the different contexts to reinforce user familiarity. Specification for this task See the invision web app for mockup of these pages. Steps for completing this issue: Defining a context header renderable that will contain Image Title Subtitle Actions (action menu renderable or so) Defining a header and subheader renderable containing: A context header renderable. A breadcrumb for the "header" renderable. Defining a breadcrumb renderer and renderable if they do not currently exist. Using the above to create a user header and subheader.
4.summary: Implement user header in the user context pages
description: Using the header developed in in all of the user context pages, implement the user header.
5.summary: Implement user subheader.
description: In the pages that are not user context pages implement user subheader pages when relevant. e.g. Page using course context but showing something that belongs to the user, like the course profile.
6.summary: Trimming down the user-context Navigation block
description: After all improvements have been made, and inconsistency testing has been completed, it should now be safe to trim down the user-context navigation block, removing items that are now much easier to access from other locations.
7.summary: Update the default entries in the User menu to match the navigation prototype
description: See:
8.summary: Update the breadcrumbs based on changes in the prototype
description: My Home changes to Dashboard When my Home == your home, start bread crumbs from Dashboard No category is show in the breadcrumb if there is only one category. Messages is now Home > Dashboard > Messages > contact for a user. Make sure to check the mockup for other areas that may not be mentioned here.
9.summary: Change context of messaging other users in a course.
description: We want to change the context of messages between students that are in the same course. It should be a User context. This means: That the breadcrumb needs to change to remove the course. The course link needs to be included on the message page. Ill add some screen shots to demonstrate what I mean.
10.summary: Make "My profile" pluggable
description: Add an API so that plugins can insert nodes in the "My profile" page. This page should be represented as a flat tree structure (similar to navtree) so that plugins can say "Insert this text node in the Miscellaneous category". The entire page should be built like this - nothing hard coded (means adding the calls for all the things that are currently on this page).
11.summary: Improvements to My Profile
description: Changing the layout of, as well as adding new items to the my profile screen such as blog entries, forum interactions, notes, messaging. Refer to the spec| for more information. Mockup that should be referred to: Add the following: Badges Activity reports Administration other miscellaneous links. Change the format of the page. Ensure that the page is responsive (resizing).
12.summary: Rename "My Home" -> "Dashboard"
description: Just that.
13.summary: For students: a single page with all their course grades on it
description: Create a page wherein a student will be able to see the grades for the courses currently visible to them. This should be a user-context page, not under Reports, in order to avoid sudden breadcrumb/navigation jumping. Once complete, a link to this page should be added to the user menu.
14.summary: User preferences page
description: Create a user-context preferences page that enables fast access to user settings. Refer to the spec| for more information. Once complete, this page should be added to the user menu. One thing that came up from the forum discussion Is that there should be some way that plugins can add links to this page. We should consider using Sams patch ( or generate the preference page from the my profile settings node in the administration block. Reorganising the settings into sensible categories should be done in this issue.
15.summary: Add more blocks to the default my home page
description: Adding more content to my home. Refer to the spec| for more information.
16.summary: Developing a User Menu
description: Adding a User Menu, in the bootstrapbase themes; refer to the specification to know what it should contain, and how to implement it. The general approach here is to refactor the existing navbars capabilities, allowing it to support multiple dropdowns without adversely affecting existing DOM structure (which would necessitate every theme re-targeting its styles). Update 10/06/2014: The user menu is being rendered fine, but the current solution doesnt quite encapsulate everything thatll need to happen with the navbar; in particular, page_heading_menu() stuff isnt handled by this solution as it doesnt really make sense for that stuff to live in a dropdown. Update 24/06/2014: Okay, this turned out to be huge. - The new user_menu renderable is an extension of the custom_menu renderable, constructed with references to a user, a course, a page and an array of flags (at present, the only thing that makes sense to set _a priori_ is guest, a boolean flag). -- Basing the new renderable on the custom_menu allows for it to be easily displayed in Base-based themes as well. -- A minor bug in custom_menus YUI3 dropdown code was fixed: in brief, the logic was looking for a dropdown attribute on the node that was clicked (e.target) instead of the node that the event was actually wired to (e.currentTarget). - custom_menu renderables have been extended by way of and have also gained the ability to assign CSS suffix flags to custom_menu_items - which is necessary for us to avoid having to hardcode icons into the renderer PHP. - In order to support multiple collapsible menus, it was necessary to create an entire bootstrap_navbar renderable which renders the body > header element and renders out a collection of menus. Bootstrap javascript has been patched to allow for multiple navbar items. - Responsive styles have been provided.
17.summary: Repository settings should move to user preferences page
description: Repository settings are currently nestled in the Navigation block, under My profile. This isnt a good place for them, especially with a unified user preferences page being created; these settings should be more visible to the user. Once the user preferences page has been implemented, repository settings should be moved from their current location to that page.
18.summary: Add ability to create dividers in custom_menu
description: As is being developed based on custom_menu code, I think itd be useful to have the ability to create dividers in regular custom_menus too. It is envisioned that youd be able to specify dividers like this: noformat Moodle community| -Moodle free support| - -Moodle development| --Moodle Tracker| --Moodle Docs| -Moodle News| Moodle company -Moodle commercial hosting| -Moodle commercial support| noformat ...where a menu item with text of and no URL will be given the class divider at render time. Id use the - character, but thatd conflict with our existing use of that to denote nesting level
19.summary: Create renderable for, and port the Bootstrap header into core
description: As per topic; this will largely be Bootstrap header work that was done as a part of , and Styling the resultant markup for Base.
20.summary: Create an ajax widget for sending a user a message.
description: Instead of taking you to a different page in a different context, we should be able to send and receive messages without leaving the current page.
21.summary: Dont show the category in the breadcrumb if there is only one category
description: Its useless if every course is in the Miscellaneous category.
22.summary: Make the sub heading in the context header customisable.
description: Currently the sub heading in the context header is hard coded to the users city and country. We propose that this sub heading should be customisable with use fields including custom profile fields.
23.summary: Improve language of links in my-home and the headers of the pages they link to
description: Examples "Posts" should change to "My forum posts" or "Freds forum posts" on the profile page, and then on those pages in the breadcrumb / page heading it should be: Dashboard -> My forum posts "My forum posts" Users -> Fred -> Forum posts "Forum posts" All pages with a User context header need to be checked to make sure they have a sensible (Because the user information is now in the ).
24.summary: Change default for "defaulthomepage" config setting to be "My Home"
description: We want students to use My Home to get to their stuff.
25.summary: Remove "Preferences" section from edit profile and put them in sensible places
description: Because they are well hidden.
26.summary: Review icons for My profile and My Preferences pages
description: Now that these pages are built - both pages support icons, but we need to decide which icons should be used where, and which new icons we need to add. I will add screen shots here...
27.summary: Move calendar site pages to the user context.
description: It seems more like they are viewing their own calendar than a single site calendar and this would avoid some context jumps.
28.summary: Implement the user context header for the badges page.
description: The page for displaying a badge should be updated to show the user context header if the user has the appropriate permissions. The current code uses a class that is a renderer to retrieve the badge details and obviously the context needs to be set before the renderer. We will need some other code to retrieve the details nicely.
29.summary: Improve consistency of the use of the word "My" in navigation
description: In the user menu we have inconsistency Dashboard (previously My Home, the My was removed) My Profile My Grades Messages My Preferences (which takes you to a page called Preferences) On the profile page we have a inconsistency My blog entries My notes My forum posts (it was called Forum posts in 2.8) My forum discussions Browser sessions All logs On the preferences page we have none with "My" Permissions Badge preferences Blog preferences etc .. The My seems redundant as these links appear under the user profile, or the user menu or the user preferences page. So its clear its about you.
30.summary: Tough to find information on My profile page
description: I was reviewing and found it tough to find link on My profile page. It seems to be so much information in a monotonous way. It will be nice to have some kinda css modification to get that information sorted. It might be easier if section has some border/background etc. A quick difference can be seen from attached files.

Below is an instruction that describes a task, paired with an input that provides an epic with this format: 
"project": "Name of the project" 
"summary": "Summary of the epic user story" 
"description": "Description of the epic user story". Write a response that appropriately completes the request.### Instruction:
Break this epic user story into smaller tasks to help the developers understand the epic better, you can divide this epic into as much as you want depending on the complexity of the epic.
### Input:
project: Moodle
summary: Navigation overhaul: User context
description: This issue will hold all the tasks related to the _user context_ from the specification describes what we plan to tackle in 2.9. Mockup of this spec is here It is envisaged that the general flow of development will be: User menu My grades My home Context header User preferences (and excising existing Administration block entries) My profile Checking for context inconsistencies Trimming user-context Navigation block. While the ultimate goal of this epic is to trim down the user-context Navigation block (and thereby improve navigation within Moodle), it should be noted that due to the interconnected nature of this major improvement, this goal cannot be reached without implementing all of the tasks and addressing all of the issues described. If circumstances limit our ability to address this entire list, we suggest that effort be primarily expended upon those items that we have bolded in the list above, as those items are only lightly coupled to other sections of Moodle and represent "easy wins" that can be achieved without potentially making things worse.

### Response:
1.summary: Fix behat AFTER we finish changing the navigation.
description: Many behat steps rely on the old navigation structure, when we have finished moving things around completely we will need to adjust the broken behat tests.
2.summary: Verify that no strange context jumps occur
description: After all prerequisite issues are resolved, test user-context navigation for inconsistencies. Ideally, there should be no unexpected jumps out to site or course contexts when navigating a users profile, blogs, grades, etc. Prerequisites: - the user menu - the improvements to my home - the context header system - the preferences page - the improvements to my profile This will require verifying the breadcrumbs matching the prototype site:
3.summary: Create user context header.
description: The creation of a new context-dependent header system to handle each of the following contexts: - Site - Category - Course - User Each header should contain at a bare minimum, a title and breadcrumbs, with a design that provides "attachment points"...? (wording to be determined) for additional functionality later (e.g. a "message this user" link when viewing another users user-context page). Layout should be consistent throughout the different contexts to reinforce user familiarity. Specification for this task See the invision web app for mockup of these pages. Steps for completing this issue: Defining a context header renderable that will contain Image Title Subtitle Actions (action menu renderable or so) Defining a header and subheader renderable containing: A context header renderable. A breadcrumb for the "header" renderable. Defining a breadcrumb renderer and renderable if they do not currently exist. Using the above to create a user header and subheader.
4.summary: Implement user header in the user context pages
description: Using the header developed in in all of the user context pages, implement the user header.
5.summary: Implement user subheader.
description: In the pages that are not user context pages implement user subheader pages when relevant. e.g. Page using course context but showing something that belongs to the user, like the course profile.
6.summary: Trimming down the user-context Navigation block
description: After all improvements have been made, and inconsistency testing has been completed, it should now be safe to trim down the user-context navigation block, removing items that are now much easier to access from other locations.
7.summary: Update the default entries in the User menu to match the navigation prototype
description: See:
8.summary: Update the breadcrumbs based on changes in the prototype
description: My Home changes to Dashboard When my Home == your home, start bread crumbs from Dashboard No category is show in the breadcrumb if there is only one category. Messages is now Home > Dashboard > Messages > contact for a user. Make sure to check the mockup for other areas that may not be mentioned here.
9.summary: Change context of messaging other users in a course.
description: We want to change the context of messages between students that are in the same course. It should be a User context. This means: That the breadcrumb needs to change to remove the course. The course link needs to be included on the message page. Ill add some screen shots to demonstrate what I mean.
10.summary: Make "My profile" pluggable
description: Add an API so that plugins can insert nodes in the "My profile" page. This page should be represented as a flat tree structure (similar to navtree) so that plugins can say "Insert this text node in the Miscellaneous category". The entire page should be built like this - nothing hard coded (means adding the calls for all the things that are currently on this page).
11.summary: Improvements to My Profile
description: Changing the layout of, as well as adding new items to the my profile screen such as blog entries, forum interactions, notes, messaging. Refer to the spec| for more information. Mockup that should be referred to: Add the following: Badges Activity reports Administration other miscellaneous links. Change the format of the page. Ensure that the page is responsive (resizing).
12.summary: Rename "My Home" -> "Dashboard"
description: Just that.
13.summary: For students: a single page with all their course grades on it
description: Create a page wherein a student will be able to see the grades for the courses currently visible to them. This should be a user-context page, not under Reports, in order to avoid sudden breadcrumb/navigation jumping. Once complete, a link to this page should be added to the user menu.
14.summary: User preferences page
description: Create a user-context preferences page that enables fast access to user settings. Refer to the spec| for more information. Once complete, this page should be added to the user menu. One thing that came up from the forum discussion Is that there should be some way that plugins can add links to this page. We should consider using Sams patch ( or generate the preference page from the my profile settings node in the administration block. Reorganising the settings into sensible categories should be done in this issue.
15.summary: Add more blocks to the default my home page
description: Adding more content to my home. Refer to the spec| for more information.
16.summary: Developing a User Menu
description: Adding a User Menu, in the bootstrapbase themes; refer to the specification to know what it should contain, and how to implement it. The general approach here is to refactor the existing navbars capabilities, allowing it to support multiple dropdowns without adversely affecting existing DOM structure (which would necessitate every theme re-targeting its styles). Update 10/06/2014: The user menu is being rendered fine, but the current solution doesnt quite encapsulate everything thatll need to happen with the navbar; in particular, page_heading_menu() stuff isnt handled by this solution as it doesnt really make sense for that stuff to live in a dropdown. Update 24/06/2014: Okay, this turned out to be huge. - The new user_menu renderable is an extension of the custom_menu renderable, constructed with references to a user, a course, a page and an array of flags (at present, the only thing that makes sense to set _a priori_ is guest, a boolean flag). -- Basing the new renderable on the custom_menu allows for it to be easily displayed in Base-based themes as well. -- A minor bug in custom_menus YUI3 dropdown code was fixed: in brief, the logic was looking for a dropdown attribute on the node that was clicked (e.target) instead of the node that the event was actually wired to (e.currentTarget). - custom_menu renderables have been extended by way of and have also gained the ability to assign CSS suffix flags to custom_menu_items - which is necessary for us to avoid having to hardcode icons into the renderer PHP. - In order to support multiple collapsible menus, it was necessary to create an entire bootstrap_navbar renderable which renders the body > header element and renders out a collection of menus. Bootstrap javascript has been patched to allow for multiple navbar items. - Responsive styles have been provided.
17.summary: Repository settings should move to user preferences page
description: Repository settings are currently nestled in the Navigation block, under My profile. This isnt a good place for them, especially with a unified user preferences page being created; these settings should be more visible to the user. Once the user preferences page has been implemented, repository settings should be moved from their current location to that page.
18.summary: Add ability to create dividers in custom_menu
description: As is being developed based on custom_menu code, I think itd be useful to have the ability to create dividers in regular custom_menus too. It is envisioned that youd be able to specify dividers like this: noformat Moodle community| -Moodle free support| - -Moodle development| --Moodle Tracker| --Moodle Docs| -Moodle News| Moodle company -Moodle commercial hosting| -Moodle commercial support| noformat ...where a menu item with text of and no URL will be given the class divider at render time. Id use the - character, but thatd conflict with our existing use of that to denote nesting level
19.summary: Create renderable for, and port the Bootstrap header into core
description: As per topic; this will largely be Bootstrap header work that was done as a part of , and Styling the resultant markup for Base.
20.summary: Create an ajax widget for sending a user a message.
description: Instead of taking you to a different page in a different context, we should be able to send and receive messages without leaving the current page.
21.summary: Dont show the category in the breadcrumb if there is only one category
description: Its useless if every course is in the Miscellaneous category.
22.summary: Make the sub heading in the context header customisable.
description: Currently the sub heading in the context header is hard coded to the users city and country. We propose that this sub heading should be customisable with use fields including custom profile fields.
23.summary: Improve language of links in my-home and the headers of the pages they link to
description: Examples "Posts" should change to "My forum posts" or "Freds forum posts" on the profile page, and then on those pages in the breadcrumb / page heading it should be: Dashboard -> My forum posts "My forum posts" Users -> Fred -> Forum posts "Forum posts" All pages with a User context header need to be checked to make sure they have a sensible (Because the user information is now in the ).
24.summary: Change default for "defaulthomepage" config setting to be "My Home"
description: We want students to use My Home to get to their stuff.
25.summary: Remove "Preferences" section from edit profile and put them in sensible places
description: Because they are well hidden.
26.summary: Review icons for My profile and My Preferences pages
description: Now that these pages are built - both pages support icons, but we need to decide which icons should be used where, and which new icons we need to add. I will add screen shots here...
27.summary: Move calendar site pages to the user context.
description: It seems more like they are viewing their own calendar than a single site calendar and this would avoid some context jumps.
28.summary: Implement the user context header for the badges page.
description: The page for displaying a badge should be updated to show the user context header if the user has the appropriate permissions. The current code uses a class that is a renderer to retrieve the badge details and obviously the context needs to be set before the renderer. We will need some other code to retrieve the details nicely.
29.summary: Improve consistency of the use of the word "My" in navigation
description: In the user menu we have inconsistency Dashboard (previously My Home, the My was removed) My Profile My Grades Messages My Preferences (which takes you to a page called Preferences) On the profile page we have a inconsistency My blog entries My notes My forum posts (it was called Forum posts in 2.8) My forum discussions Browser sessions All logs On the preferences page we have none with "My" Permissions Badge preferences Blog preferences etc .. The My seems redundant as these links appear under the user profile, or the user menu or the user preferences page. So its clear its about you.
30.summary: Tough to find information on My profile page
description: I was reviewing and found it tough to find link on My profile page. It seems to be so much information in a monotonous way. It will be nice to have some kinda css modification to get that information sorted. It might be easier if section has some border/background etc. A quick difference can be seen from attached files.
