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

tool_customlang CLI export does not use a valid filename

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 3.11.11, 4.0.5
    • 3.11.10, 4.0.4
    • Language
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • Hide
      1. Log in as admin
      2. Navigate to Language > Language customisation in site administration
      3. Choose English (en)
      4. Press Open language pack for editing
      5. Under Show strings of these components select access.php and press Show strings
      6. Set Local customisation for the core_access/accesshelp string
      7. Press Save changes to the language pack
      8. From CLI run the following command:

        $ php admin/tool/customlang/cli/export.php --lang=en
        

      9. Confirm you see the following message (note: <TEMPDIR> is whatever value you have for CFG->tempdir):

        Starting to export lang files.
        == Exporting language en ==
        Zip created: <TEMPDIR>/customlang/customlang-export-en.zip
        

      10. Confirm the zip file is created at that path
      11. From CLI run the following command:

        $ php admin/tool/customlang/cli/export.php --lang=en --target=/tmp/local
        

      12. Confirm you see the following message:

        Starting to export lang files.
        == Exporting language en ==
        Zip created: /tmp/local/customlang-export-en.zip
        

      13. Confirm the zip file is created at that path
      14. From CLI run the following command:

        $ php admin/tool/customlang/cli/export.php --lang=en --target=/tmp/local/
        

      15. Confirm you see the following message:

        Starting to export lang files.
        File for en already exists, skipping. If you want to overwrite add the --override=true option.
        

      Show
      Log in as admin Navigate to Language > Language customisation in site administration Choose English (en) Press Open language pack for editing Under Show strings of these components select access.php and press Show strings Set Local customisation for the core_access/accesshelp string Press Save changes to the language pack From CLI run the following command: $ php admin/tool/customlang/cli/export.php --lang=en Confirm you see the following message (note: <TEMPDIR> is whatever value you have for CFG->tempdir ): Starting to export lang files. == Exporting language en == Zip created: <TEMPDIR>/customlang/customlang-export-en.zip Confirm the zip file is created at that path From CLI run the following command: $ php admin/tool/customlang/cli/export.php --lang=en --target=/tmp/local Confirm you see the following message: Starting to export lang files. == Exporting language en == Zip created: /tmp/local/customlang-export-en.zip Confirm the zip file is created at that path From CLI run the following command: $ php admin/tool/customlang/cli/export.php --lang=en --target=/tmp/local/ Confirm you see the following message: Starting to export lang files. File for en already exists, skipping. If you want to overwrite add the --override=true option.

    Description

      Steps to reproduce:

      • In your Moodle instance, customize some language strings of the english language pack within the language customization GUI.
      • Open your terminal and run this command:

        php admin/tool/customlang/cli/export.php --lang=en --target=/tmp/en_local
        

      Expected result:

      • In your terminal, you should see this output:

        Starting to export lang files.
        == Exporting language en ==
        Zip created: /tmp/en_local.zip
        

      • There should be a zip file at /tmp/en_local.zip

      Actual result:

      • In your terminal, you see this output:

        Starting to export lang files.
        == Exporting language en ==
        Zip created: /tmp/en_local[[exportzipfilename]]
        

      • There is a zip file at /tmp/en_local[[exportzipfilename]]

      Analysis:

      Attachments

        1. MDL-75970_master_1.png
          MDL-75970_master_1.png
          56 kB
        2. MDL-75970_master_2.png
          MDL-75970_master_2.png
          37 kB
        3. MDL-75970_master_3.png
          MDL-75970_master_3.png
          24 kB
        4. MDL-75970_v311_1.png
          MDL-75970_v311_1.png
          49 kB
        5. MDL-75970_v311_2.png
          MDL-75970_v311_2.png
          37 kB
        6. MDL-75970_v311_3.png
          MDL-75970_v311_3.png
          25 kB
        7. MDL-75970_v400_1.png
          MDL-75970_v400_1.png
          59 kB
        8. MDL-75970_v400_2.png
          MDL-75970_v400_2.png
          41 kB
        9. MDL-75970_v400_3.png
          MDL-75970_v400_3.png
          25 kB

        Issue Links

          Activity

            People

              pholden Paul Holden
              abias Alexander Bias
              Alexander Bias Alexander Bias
              Ilya Tregubov Ilya Tregubov
              Angelia Dela Cruz Angelia Dela Cruz
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

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

                  Clockify

                    Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.