Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-63219

Add support for Moodle filters to Primary/Custom Menus

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_36_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE, MOODLE_404_STABLE, MOODLE_405_STABLE
    • MOODLE_500_STABLE
    • MDL-63219v3-M401
    • MDL-63219v3-M403
    • MDL-63219v3-M404
    • MDL-63219v3-M405
    • MDL-63219v3-main
    • Hide

      Part 1 - Test filtering of the Moodle LMS custom menu

      1. Log into Moodle LMS as a site Administrator using a web browser.
      2. Install and activate the FilterCodes plugin. Could be any other filter plugin but we will use this one for simplicity. https://moodle.org/plugins/filter_filtercodes. Regardless of which one you choose, it must be set to filter both Contents and Headings.
      3. Go to Site Administration > Appearance > Theme > Advanced theme settings,
      4. Ensure that the option to "Filter custom menu" is checked.
      5. Add the following 2 lines to the Custom menu items: 

        {getstring}coursecategories{/getstring}
        {categoriesmenu}

      Save your changes.

      Whether using a browser on a desktop or mobile device, notice the new item in the custom dropdown menu called Course Categories which contains a list of categories available on your site. What actually appears is not as important as the fact that {categoriesmenu} tag has been processed through Moodle filters.

      Part 2 - Test filtering of the mobile custom menu

      The following assumes that you are using the Android version of the Mobile App. If you are using the iPhoneversion of the app, the steps may be different.

      1. Log into Moodle LMS as a site Administrator using a web browser.
      2. Ensure that your instance of Moodle LMS is set up to work with the Mobile App. Test to make sure you can log in using the Mobile App before continuing.
      3. Navigate to Site Administration > Mobile App (section) > Mobile Features (link).
      4. In the Custom menu items field, add the following line and save:
      5. In the Moodle Mobile App, tap on the 3 dots in the lower right corner of the screen.
      6. Tap on App Settings near the bottom of the screen.
      7. Tap on Synchronization.
      8. Tap on the refresh symbol for the site you are connecting to.
      9. Tap the (back arrow) twice at the top left of the screen.
      10. Notice that the {filtercodes} tag has been replaced by the new menu option that looks something like 2.5.2 (2024050100) - it might be a little different depending on your version of FilterCodes.

      You have successfully completed testing.

      Show
      Part 1 - Test filtering of the Moodle LMS custom menu Log into Moodle LMS as a site Administrator using a web browser. Install and activate the FilterCodes plugin. Could be any other filter plugin but we will use this one for simplicity. https://moodle.org/plugins/filter_filtercodes . Regardless of which one you choose, it must be set to filter both Contents and Headings. Go to Site Administration > Appearance > Theme > Advanced theme settings, Ensure that the option to "Filter custom menu" is checked. Add the following 2 lines to the Custom menu items:  {getstring}coursecategories{/getstring} {categoriesmenu} Save your changes. Whether using a browser on a desktop or mobile device, notice the new item in the custom dropdown menu called Course Categories which contains a list of categories available on your site. What actually appears is not as important as the fact that {categoriesmenu} tag has been processed through Moodle filters. Part 2 - Test filtering of the mobile custom menu The following assumes that you are using the Android version of the Mobile App. If you are using the iPhoneversion of the app, the steps may be different. Log into Moodle LMS as a site Administrator using a web browser. Ensure that your instance of Moodle LMS is set up to work with the Mobile App. Test to make sure you can log in using the Mobile App before continuing. Navigate to Site Administration > Mobile App (section) > Mobile Features (link). In the Custom menu items field, add the following line and save: In the Moodle Mobile App, tap on the 3 dots in the lower right corner of the screen. Tap on App Settings near the bottom of the screen. Tap on  Synchronization . Tap on the refresh symbol for the site you are connecting to. Tap the ← (back arrow) twice at the top left of the screen. Notice that the {filtercodes} tag has been replaced by the new menu option that looks something like 2.5.2 (2024050100) - it might be a little different depending on your version of FilterCodes. You have successfully completed testing.
    • Hide

      Code verified against automated checks with warnings.

      Checked MDL-63219 using repository: https://github.com/michael-milette/moodle.git

      Should these errors be fixed?

      Built on: Mon 21 Oct 2024 04:50:44 AM UTC

      Show
      Code verified against automated checks with warnings. Checked MDL-63219 using repository: https://github.com/michael-milette/moodle.git MOODLE_401_STABLE (0 errors / 1 warnings) [branch: MDL-63219v3-M401 | CI Job ] overview (0/1) , phplint (0/0) , phpcs (0/0) , js (0/0) , css (0/0) , phpdoc (0/0) , commit (0/0) , savepoint (0/0) , thirdparty (0/0) , externalbackup (0/0) , grunt (0/0) , shifter (0/0) , mustache (0/0) , gherkin (0/0) , Warn: The MDL-63219 v3-M401 branch at https://github.com/michael-milette/moodle.git has not been rebased recently (>20 days ago). MOODLE_403_STABLE (0 errors / 1 warnings) [branch: MDL-63219v3-M403 | CI Job ] overview (0/1) , phplint (0/0) , phpcs (0/0) , js (0/0) , css (0/0) , phpdoc (0/0) , commit (0/0) , savepoint (0/0) , thirdparty (0/0) , externalbackup (0/0) , grunt (0/0) , shifter (0/0) , mustache (0/0) , gherkin (0/0) , Warn: The MDL-63219 v3-M403 branch at https://github.com/michael-milette/moodle.git has not been rebased recently (>20 days ago). MOODLE_404_STABLE (0 errors / 1 warnings) [branch: MDL-63219v3-M404 | CI Job ] overview (0/1) , phplint (0/0) , phpcs (0/0) , js (0/0) , css (0/0) , phpdoc (0/0) , commit (0/0) , savepoint (0/0) , thirdparty (0/0) , externalbackup (0/0) , grunt (0/0) , shifter (0/0) , mustache (0/0) , gherkin (0/0) , Warn: The MDL-63219 v3-M404 branch at https://github.com/michael-milette/moodle.git has not been rebased recently (>20 days ago). MOODLE_405_STABLE (0 errors / 0 warnings) [branch: MDL-63219v3-M405 | CI Job ] main (0 errors / 1 warnings) [branch: MDL-63219v3-main | CI Job ] overview (0/1) , phplint (0/0) , phpcs (0/0) , js (0/0) , css (0/0) , phpdoc (0/0) , commit (0/0) , savepoint (0/0) , thirdparty (0/0) , externalbackup (0/0) , grunt (0/0) , shifter (0/0) , mustache (0/0) , gherkin (0/0) , Warn: The MDL-63219 v3-main branch at https://github.com/michael-milette/moodle.git has not been rebased recently (>20 days ago). Should these errors be fixed? Built on: Mon 21 Oct 2024 04:50:44 AM UTC

      I would like to propose that Moodle filtering be applied to the Custom Menu. This would really raise the flexibility of the menu. For example, Moodle filters, like FilterCodes, Generico and Multi-Language Content (v2) could be used to create dynamic menus, even menus based on context or roles. Here are some examples.

            Votes:
            57 Vote for this issue
            Watchers:
            40 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 4 minutes
                3h 4m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.