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

tool_uploadcourse: fullname/shortname fields don't get length checked while uploading

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      NOTE to tester: It's enough to test this in just one branch, as far as this is also covered via unit tests and the patches are 100% the same.

      1. Log in as admin
      2. Navigate to Courses > Upload courses in site administration
      3. Upload MDL-66024-fullname.csv to the File file manager
      4. Press Preview
      5. Confirm the Upload courses preview result column contains a cross and the Status is "The fullname field is limited to 254 characters"
      6. Press Upload courses
      7. Confirm you see the following in the summary:
        1. Courses total: 1
        2. Courses errors: 1
      8. Press Continue
      9. Upload MDL-66024-shortname.csv to the File file manager
      10. Press Preview
      11. Confirm the Upload courses preview result column contains a cross and the Status is "The shortname field is limited to 255 characters"
      12. Press Upload courses
      13. Confirm you see the following in the summary:
        1. Courses total: 1
        2. Courses errors: 1

      P.S. No, I don't know why the shortname field is longer than the fullname field

      Show
      NOTE to tester: It's enough to test this in just one branch, as far as this is also covered via unit tests and the patches are 100% the same. Log in as admin Navigate to Courses > Upload courses in site administration Upload MDL-66024-fullname.csv to the File file manager Press Preview Confirm the Upload courses preview result column contains a cross and the Status is "The fullname field is limited to 254 characters" Press Upload courses Confirm you see the following in the summary: Courses total: 1 Courses errors: 1 Press Continue Upload MDL-66024-shortname.csv to the File file manager Press Preview Confirm the Upload courses preview result column contains a cross and the Status is "The shortname field is limited to 255 characters" Press Upload courses Confirm you see the following in the summary: Courses total: 1 Courses errors: 1 P.S. No, I don't know why the shortname field is longer than the fullname field
    • Affected Branches:
      MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE
    • Pull 3.8 Branch:
    • Pull Master Branch:

      Description

      1) use this .csv with delimeter ";":

      shortname;fullname;category_path;startdate;enddate
      test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading;test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading test with long enough field value that will not be checked while uploading;1;09.09.2019;18.07.2020

      2) Preview shows everything is fine

      3) Uploading and getting SQL error:

       

        Attachments

          Activity

            People

            Assignee:
            pholden Paul Holden
            Reporter:
            rabudo Roman Sevostyanov
            Peer reviewer:
            Jun Pataleta
            Integrator:
            Eloy Lafuente (stronk7)
            Tester:
            Janelle Barcega
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              9/Mar/20

                Time Tracking

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