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

Assignment submission file name missing when downloading submissions with folders using Japanese language

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.6
    • Fix Version/s: None
    • Component/s: Assignment

      Description

      DESCRIPTION
      When downloading submissions from an assignment while using the Japanese language pack, submission files with file names in Japanese are either missing from the package or lack a file name.

      The key variables to replicate this issue:

      • Submitted file must have a file name in Japanese.
      • Submissions must be downloaded while using Japanese language pack (ja) rather than English.
      • Download submissions in folders option must be selected.

      STEPS TO REPLICATE

      1. Go to Site administration > Language > Language Packs. If not already installed, install the Japanese language pack (ja).
      2. Go to Site administration > Language > Language settings. If Languages on language menu is not blank, add ja to the list.
      3. Create a course and create an assignment.
      4. Enroll a user as a student in the course.
      5. Login as the student and upload two files, one in English and one in Japanese こんにちは.docx
      6. As admin/teacher, access assignment "View all submissions" page.
      7. Ensure 'Download submissions in folders' option is selected.
      8. Change your 'Preferred language' to Japanese (ja) (dropdown in bottom right of footer if using Snap or via Preferences if using a core theme).
      9. Selection submission checkbox on left hand side of submission.
      10. Click on With selected>Download selected submission (In Japanese this is the third option in the list '選択した提出をダウンロードする') and click "Go"
      11. Click "OK" on popup (Submission should now be downloaded),
      12. Extract contents of zip and open the folder to find submission.

      OBSERVED BEHAVIOR:
      Windows 7/10 - For the Japanese file, the submission's file name is blank and only the extension type displays. The English file is fine.
      Mac OSX - There is no submission file present in the folder (only tested with Japanese file).

      EXPECTED BEHAVIOR:
      Windows 7/10 - Submission file name is present
      Mac OSX - Submission file is present

       FIX:

      The fix was to set a locale because basename is locale aware (https://www.php.net/manual/en/function.basename.php), this fixes the problem with Japanese language and should not affect any other language. 

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              juanibarral Juan Ibarra
              Participants:
              Component watchers:
              Damyon Wiese, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            • Votes:
              6 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

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