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

moodle_content_writer assumes context names will be unique to build context path

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.5
    • 3.3.6, 3.4.3
    • 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

    Description

      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.

      Attachments

        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

        Issue Links

          Activity

            People

              ryanwyllie Ryan Wyllie
              ryanwyllie Ryan Wyllie
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              Andrew Lyons Andrew Lyons
              Anna Carissa Sadia Anna Carissa Sadia
              Andrew Lyons, Adrian Greeve, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                17/May/18

                Time Tracking

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