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

Admin bookmarks block is too aggressive at cleaning bookmarked section

    XMLWordPrintable

Details

    • MOODLE_311_STABLE
    • MOODLE_311_STABLE
    • MDL-73402-311
    • Hide
      1. Login as admin
      2. Ensure Admin bookmarks block is present and shown on all admin pages (it is by default)
      3. Navigate to Plugins > Activity modules > Quiz > Safe Exam Browser templates in site administration
      4. In the Admin bookmarks block, press Bookmark this page
      5. Confirm page is now listed in admin bookmarks
      6. In the Admin bookmarks block, press Unbookmark this page
      7. Confirm page is no longer listed in admin bookmarks
      Show
      Login as admin Ensure Admin bookmarks block is present and shown on all admin pages (it is by default) Navigate to Plugins > Activity modules > Quiz > Safe Exam Browser templates in site administration In the Admin bookmarks block, press Bookmark this page Confirm page is now listed in admin bookmarks In the Admin bookmarks block, press Unbookmark this page Confirm page is no longer listed in admin bookmarks

    Description

      This was reported by a Workplace partner (WP-3073 for reference), in that it's not possible to bookmark certain pages because of overly zealous cleaning of the section name in the bookmarks block:

      https://github.com/moodle/moodle/blob/58a729f08871d0bdd4a27fe54327999c9b81dd0e/blocks/admin_bookmarks/create.php#L33

      This is a problem when sections contain slashes, such as here:

      https://github.com/moodle/moodle/blob/58a729f08871d0bdd4a27fe54327999c9b81dd0e/mod/quiz/accessrule/seb/classes/template_controller.php#L120-L125

      There doesn't appear to be any actual restriction/definition on what the content of a page $name is or should be:

      https://github.com/moodle/moodle/blob/58a729f08871d0bdd4a27fe54327999c9b81dd0e/lib/adminlib.php#L1216-L1219

      In Workplace, this affects the certificate plugins

      Attachments

        Activity

          People

            pholden Paul Holden
            pholden Paul Holden
            Marina Glancy Marina Glancy
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Angelia Dela Cruz Angelia Dela Cruz
            Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              17/Jan/22

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 10 minutes
                1h 10m