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

moodle_content_writer assumes context names will be unique to build context path

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.3.6, 3.4.3
    • 3.5
    • Privacy
    • MOODLE_35_STABLE
    • MOODLE_33_STABLE, MOODLE_34_STABLE
    • MDL-62285-master
    • Hide
      1. Log in as admin
      2. Set the theme to the Clean theme
      3. View the dashboard
      4. Hide (collapse) the “private files” block
      5. Go to the profile page
        • user menu > profile
      6. Add the “private files” block to this page
      7. Dock the private files block
      8. Download the attached testfinal.php script and run it from your moodle root directory to generate an export of the admin user data
        • Note: you may need to edit the script and set the user id to match the admin user id on your system
      9. View the admin user context folder in the export (it should be System > User <admin user’s name>)
      10. CONFIRM that there are two separate folders for “Block Private files” each with a different number at the end of the folder name
      Show
      Log in as admin Set the theme to the Clean theme View the dashboard Hide (collapse) the “private files” block Go to the profile page user menu > profile Add the “private files” block to this page Dock the private files block Download the attached testfinal.php script and run it from your moodle root directory to generate an export of the admin user data Note: you may need to edit the script and set the user id to match the admin user id on your system View the admin user context folder in the export (it should be System > User <admin user’s name>) CONFIRM that there are two separate folders for “Block Private files” each with a different number at the end of the folder name

      The moodle_content_writer::get_context_path() function uses the context name to build the path for the context however context names are not guaranteed to be unique, for example with blocks.

      You can add two separate instances of the same block in the same context (for example one on the dashboard and one on the user profile page) which will result in the same path being generated for two separate block instances.

        1. Step10_MDL-62285.PNG
          Step10_MDL-62285.PNG
          9 kB
        2. Step9_MDL-62285.PNG
          Step9_MDL-62285.PNG
          12 kB
        3. testfinal.php
          1 kB

            ryanwyllie Ryan Wyllie
            ryanwyllie Ryan Wyllie
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Andrew Lyons Andrew Lyons
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m

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