Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-37071 Improve Linting of core JS in Moodle
  3. MDL-37366

Fix JSHint issues with moodle-core-formautosubmit

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.5
    • 2.4
    • JavaScript
    • MOODLE_24_STABLE
    • MOODLE_25_STABLE
    • MDL-37366-master
    • Hide

      These instructions assume that you have already installed jshint from node.js (npm -g install jshint)
      They also assume that you've downloaded https://github.com/yui/shifter/blob/master/.jshintrc and stick it in your home directory (or moodle checkout).

      In all supported browsers (IE, Chrome, Safari, Firefox):

      • Run jshint over lib/yui/formautosubmit/formautosubmit.js
        • Confirm that no errors were shown
      • Open a course page
      • Open your JS console
        • If possible, turn on recording so that messages aren't lost between page reloads
      • Turn editing on
      • Ensure that the activity chooser is off
      • On a random (not first, or last) 'Add a resource...' dropdown:
        • select an option
        • Confirm that the page starts to navigate away
        • Cancel the page reload (if possible)
        • Confirm that no errors or warnings were shown in the JS console
      • On a different dropdown, repeat the above (to make sure that it's not just working on one dropdown on the page
      • Repeat the above tests on the 'Add a block' dropdown (it's a different beast)
      • Open the /course/search.php page and find some results
      • Try using the 'Move selected courses to...' dropdown
        • Confirm that no errors were shown
        • Confirm that the page reloads and reflects the changes you made (or didn't make)
      Show
      These instructions assume that you have already installed jshint from node.js (npm -g install jshint) They also assume that you've downloaded https://github.com/yui/shifter/blob/master/.jshintrc and stick it in your home directory (or moodle checkout). In all supported browsers (IE, Chrome, Safari, Firefox): Run jshint over lib/yui/formautosubmit/formautosubmit.js Confirm that no errors were shown Open a course page Open your JS console If possible, turn on recording so that messages aren't lost between page reloads Turn editing on Ensure that the activity chooser is off On a random (not first, or last) 'Add a resource...' dropdown: select an option Confirm that the page starts to navigate away Cancel the page reload (if possible) Confirm that no errors or warnings were shown in the JS console On a different dropdown, repeat the above (to make sure that it's not just working on one dropdown on the page Repeat the above tests on the 'Add a block' dropdown (it's a different beast) Open the /course/search.php page and find some results Try using the 'Move selected courses to...' dropdown Confirm that no errors were shown Confirm that the page reloads and reflects the changes you made (or didn't make)

      As it says on the tin

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Damyon Wiese Damyon Wiese
            Dan Poltawski Dan Poltawski
            Michael de Raadt Michael de Raadt
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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