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

Expected to return a value at the end of function. ( $('#url_select_test').on(CustomEvents.events.accessibleChange, function() {

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.1.6, 4.2.3
    • 4.1.5, 4.2.2
    • Other
    • MOODLE_401_STABLE, MOODLE_402_STABLE
    • MOODLE_401_STABLE, MOODLE_402_STABLE
    • MDL-79463-401
    • MDL-79463-402
    • Hide

      Mustache lint

      1. Install moodle-plugin-ci locally https://github.com/moodlehq/moodle-plugin-ci
      2. Run the following (where <MOODLEDIR> is the path to your Moodle install):

        $ ./bin/moodle-plugin-ci mustache --moodle=<MOODLEDIR> <MOODLEDIR>/mod/forum
        

      3. Confirm there are no instances of the following:

        WARNING: ESLint warning [consistent-return]
        

      Manual test

      1. Log in as admin
      2. Navigate to Badges > Add a new badge in site administration
      3. Fill in required fields and save
      4. Open the Criteria URL select item
      5. Select a different option, e.g. Message
      6. Confirm you are redirected to the Badge message page
      7. Confirm that selecting different options redirects you to the appropriate page
      Show
      Mustache lint Install moodle-plugin-ci locally https://github.com/moodlehq/moodle-plugin-ci Run the following (where <MOODLEDIR> is the path to your Moodle install): $ ./bin/moodle-plugin-ci mustache --moodle=<MOODLEDIR> <MOODLEDIR>/mod/forum Confirm there are no instances of the following: WARNING: ESLint warning [consistent-return] Manual test Log in as admin Navigate to Badges > Add a new badge in site administration Fill in required fields and save Open the Criteria URL select item Select a different option, e.g. Message Confirm you are redirected to the Badge message page Confirm that selecting different options redirects you to the appropriate page

      In the frame of the development of surveypro (https://github.com/kordan/moodle-mod_surveypro) I pushed a branch to github.
      In https://github.com/kordan/moodle-mod_surveypro/actions/runs/6244401346/job/16951247619 (using php 7.4)
      or https://github.com/kordan/moodle-mod_surveypro/actions/runs/6235196000/job/16923914715 (using php 8)
      I read:

      test (7.4, MOODLE_401_STABLE, mariadb, default, default)
      or
      test (8, MOODLE_401_STABLE, pgsql, classic, chrome)

      RUN  Mustache Lint on mod_surveypro
      /home/runner/work/moodle-mod_surveypro/moodle-mod_surveypro/moodle/mod/surveypro/templates/view_action_bar.mustache
      WARNING: ESLint warning [consistent-return]: Expected to return a value at the end of function. ( $('#url_select_test').on(CustomEvents.events.accessibleChange, function() {
                      if (!$(this).val())

      {                     return false;                 }

                      $('#url_select_form').submit();
                  });
              }); ), Line: 4 Column: 76
      /home/runner/work/moodle-mod_surveypro/moodle-mod_surveypro/moodle/mod/surveypro/templates/view_action_bar.mustache
      WARNING: ESLint error [no-trailing-spaces]: Trailing spaces not allowed. (  ), Line: 11 Column: 1
      Error: Process completed with exit code 1.

      The first warning is related to the core code in /lib/templates/url_select.mustache but forces non core tests (and maybe more) to fail.

            pholden Paul Holden
            daniss Daniele Cordella
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Ilya Tregubov Ilya Tregubov
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 13 minutes
                2h 13m

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