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

Privacy index.html fails if module has a # in the name

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.5.5, 3.6, 3.7
    • Fix Version/s: 3.5.7, 3.6.5, 3.7.1
    • Component/s: Privacy
    • Labels:
    • Testing Instructions:
      Hide

      Prerequisites:

      1. A Moodle site with at least one course, and a student enrolled in the course.
      2. Note down the name of the student for later reference.
      3. Firefox or Safari browser available for testing.

      Testing

      1. Login with an admin account.
      2. Navigate to a course.
      3. Create a new Forum activity named "Strange #? Characters".
      4. Log out and log in as a student enrolled in the course.
      5. Navigate to the "Strange #? Characters" forum.
      6. Press Add a new discussion topic with the Subject "#Strange?" and create a new discussion.
      7. Log out, and log back in as admin.
      8. Navigate to Site Administration > Users > Privacy and policies > Data requests.
      9. Click 'New request'.
      10. Search for the student by name, and select them. Ensure the type 'Export all of my personal data' is selected.
      11. CONFIRM there is now a new export request with 'Awaiting approval' listed on the page.
      12. To the right of the new export row, click Actions > Approve request. In the modal popup, again click 'Approve request'.
      13. Run cron (eg by command line).
      14. Refresh the data requests page, and CONFIRM the status of the export is now 'Download ready'.
      15. Click Actions > Download and save the export file when prompted.
      16. Once the download is complete, locate the export.zip file you have downloaded, and extract it.
      17. Navigate to the extracted folder, and open the index.html file in either Firefox or Safari (Chrome seems to have some problems loading the exported JSON files, so may give a false negative).
      18. Under Navigation, browse to the category/course from step 2.
      19. Expand the Forum Strange #? Characters node.
      20. Click the data.json node, you should see exported data containing forum data.
      21. Expand the Discussions > #Strange? node.
      22. Click the data.json node, you should see exported data containing discussion data.
      23. Expand the Posts > [TIMESTAMP]-#Strange?-[ID] node.
      24. Click the data.json node, you should see exported data containing post data.

      See attached screenshot for example visualisation of exported data nodes.

      Show
      Prerequisites: A Moodle site with at least one course, and a student enrolled in the course. Note down the name of the student for later reference. Firefox or Safari browser available for testing. Testing Login with an admin account. Navigate to a course. Create a new Forum activity named " Strange #? Characters ". Log out and log in as a student enrolled in the course. Navigate to the " Strange #? Characters " forum. Press Add a new discussion topic with the Subject " #Strange? " and create a new discussion. Log out, and log back in as admin. Navigate to Site Administration > Users > Privacy and policies > Data requests. Click 'New request'. Search for the student by name, and select them. Ensure the type 'Export all of my personal data' is selected. CONFIRM there is now a new export request with 'Awaiting approval' listed on the page. To the right of the new export row, click Actions > Approve request. In the modal popup, again click 'Approve request'. Run cron (eg by command line). Refresh the data requests page, and CONFIRM the status of the export is now 'Download ready'. Click Actions > Download and save the export file when prompted. Once the download is complete, locate the export.zip file you have downloaded, and extract it. Navigate to the extracted folder, and open the index.html file in either Firefox or Safari (Chrome seems to have some problems loading the exported JSON files, so may give a false negative). Under Navigation , browse to the category/course from step 2. Expand the Forum Strange #? Characters node. Click the data.json node, you should see exported data containing forum data. Expand the Discussions > #Strange? node. Click the data.json node, you should see exported data containing discussion data. Expand the Posts > [TIMESTAMP]-#Strange?-[ID] node. Click the data.json node, you should see exported data containing post data. See attached screenshot for example visualisation of exported data nodes.
    • Affected Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
    • Pull 3.5 Branch:
    • Pull 3.6 Branch:
    • Pull 3.7 Branch:
    • Pull Master Branch:

      Description

      This is a real edge case. If an activity has a # in the name (I know - why would it? but we have users who do), then the activity data is not displayed when opening the index.html file.

      The JS cannot find the JSON file as the directory path it searches is cut off at the #.

      Example path: Category Miscellaneous | Course Peer Assessment Small Group | Peer Assessment #33 Outlier Peer Assessment do not use 0 | data.json

      And the associated GET: file:[...]/temp/privacy/[...]/System%20_.1/Category%20Miscellaneous%20_.3/Course%20Peer%20Assessment%20Small%20Group%20_.6603/Peer%20Assessment%20

        Attachments

        1. MDL-64511.jpg
          MDL-64511.jpg
          41 kB
        2. MDL-64511.png
          MDL-64511.png
          80 kB
        3. MDL-64511 (2).jpg
          MDL-64511 (2).jpg
          56 kB

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                8/Jul/19

                Time Tracking

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