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

Export fails if some of the paths has more than 255 characters

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.5, 3.4.2, 3.5
    • Fix Version/s: 3.3.6, 3.4.3
    • Component/s: Privacy
    • Labels:
    • Testing Instructions:
      Hide

      Setup

      1. Login as admin.
      2. Create a category with a name with 255 characters (you can use, for instance: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vel mollis ante. Morbi accumsan a nisl vitae ullamcorper. Ut vel diam id nibh pharetra consectetur sed eget ligula. In eu nibh eget dui finibus condimentum ac id leo. Ut imperdiet orci aliquam.").
      3. Create a course with a fullname with 255 characters (you can use the same for the category).
      4. Enrol at least one student (s1).
      5. Add an assignment to the course.
      6. Grade the student assignment.

      Testing scenario

      1. Use the "Test of exporting user data" located at https://docs.moodle.org/dev/Privacy_API/Utilities for the admin user.
        • CHECK there are no errors and the large category name is exported correctly. 
      Show
      Setup Login as admin. Create a category with a name with 255 characters (you can use, for instance: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vel mollis ante. Morbi accumsan a nisl vitae ullamcorper. Ut vel diam id nibh pharetra consectetur sed eget ligula. In eu nibh eget dui finibus condimentum ac id leo. Ut imperdiet orci aliquam."). Create a course with a fullname with 255 characters (you can use the same for the category). Enrol at least one student (s1). Add an assignment to the course. Grade the student assignment. Testing scenario Use the "Test of exporting user data" located at https://docs.moodle.org/dev/Privacy_API/Utilities  for the admin user. CHECK there are no errors and the large category name is exported correctly. 
    • Affected Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-62240-master

      Description

      When some of the contexts, such as a Course name or a Category name, have 255 characters (the maximum allowed), the export privacy data process fails:

       

      PHP Warning: mkdir(): File name too long in xxxx/moodle/lib/setuplib.php on line 1481
      

       

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  17/May/18

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 46 minutes
                  46m