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

Various issues with the CLI script import-bootswatch.php

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: 3.2.4, 3.3.1
    • Component/s: Themes
    • Labels:
    • Testing Instructions:
      Hide
      1. Run the utility without any arguments and make sure the help is printed. Additionally, if the variables and/or bootswatch files are not found in their default locations, the info about the file not found should be displayed, too.
      2. Run the utility with paths explicitly declared and make sure the output file is created. For example:

        php import-bootswatch.php --variables=/tmp/_variables.scss --preset=/tmp/out.scss --bootswatch=/tmp/_bootswatch.scss
        

      Show
      Run the utility without any arguments and make sure the help is printed. Additionally, if the variables and/or bootswatch files are not found in their default locations, the info about the file not found should be displayed, too. Run the utility with paths explicitly declared and make sure the output file is created. For example: php import-bootswatch.php --variables=/tmp/_variables.scss --preset=/tmp/out.scss --bootswatch=/tmp/_bootswatch.scss
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-57313-master-clibootswatch

      Description

      • Attempting to play with the import-bootswatch.php utility, I realised the supported command line arguments are not correctly declared there. The long options are not declared in cli_get_params() so they are not supported.
      • Running the script without arguments should display help and exit like most Moodle CLI scripts to.
      • Help is badly formatted.
      • MIT License and Thomas Park copyright added to all generated files. This looks unusual. Even if Thomas Park was the original author of this script, the license does not automatically apply to generated files. What was the reasoning behind this?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mudrd8mz David Mudrák (@mudrd8mz)
              Reporter:
              mudrd8mz David Mudrák (@mudrd8mz)
              Peer reviewer:
              Ryan Wyllie
              Integrator:
              Jun Pataleta
              Tester:
              Simey Lameze
              Participants:
              Component watchers:
              Bas Brands
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/Jul/17