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

Assignment grading: Changing annotation colour erroneously changes selected annotation tool

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Prerequisites:
      You need a course, with an assignment and one student enrolled.

      Testing instructions:

      Confirmation of the correct prototype tree via the console:

      1. Throw a 'window.console.log(arguments)' call into the first line of the 'initializer' function in 'lib/yui/src/notification/js/dialogue.js' and run grunt shifter.
      2. Go to the assignment grading interface.
      3. Check the console output and expand the first object
      4. Confirm that:
        • 'context' is an EDITOR
        • the _proto_ for that context is NOT an EDITOR. It should be 'Base'.

      Regression testing of config vars #1 - 'additionalBaseClass':

      1. Create a new assignment
      2. Edit the assignment and expand the 'Restrict access' section
      3. Click the 'Add restriction' button
      4. Now, using dev tools, inspect the resulting dialogue
      5. Confirm that the root div of the dialogue has the class 'moodle-dialogue-base availability-dialogue'. This confirms that the additionalBaseClass 'availability-dialogue' has been added successfully.

      Regression testing of config vars #2 - 'closeButton':

      1. On the course home page, click 'Add a new activity or resource'
      2. Confirm that you can close the resulting dialogue using the 'x' in the top right.
      3. Now, edit an activity and open the restrictions dialogue (click 'Add restriction' under the 'Restrict access' heading).
      4. Confirm that you don't see a close button ('x' in the top right).

      Regression test for issue reported in MDL-43234:

      1. Go to the first step of course backup
      2. Click 'Cancel'
      3. When the dialogue pops up, click 'Stay'
      4. Click 'Cancel' again.
      5. Confirm that you see the dialogue again and that you can again click 'Stay' to close it.

      Testing tool selection on the grading interface (shape/line/highlighter tools):

      1. Go to the grading interface
      2. Select the Line tool
      3. Draw a line using the tool
      4. Change the tool colour only, and then draw another line.
      5. Confirm that you now have 2 different coloured lines and that the line tool is still selected.
      6. Now, select the rectangle tool
      7. Change the tool colour
      8. Confirm that the rectangle tool is still selected

      Other general dialogue testing

      1. Try a range of Moodle dialogues, such as:
        • File picker
        • Enrol dialogue
      2. Open each, then close it, and open it a few more times.
      3. Confirm that it appears the same each time
      Show
      Prerequisites: You need a course, with an assignment and one student enrolled. Testing instructions: Confirmation of the correct prototype tree via the console : Throw a 'window.console.log(arguments)' call into the first line of the 'initializer' function in 'lib/yui/src/notification/js/dialogue.js' and run grunt shifter. Go to the assignment grading interface. Check the console output and expand the first object Confirm that : 'context' is an EDITOR the _ proto _ for that context is NOT an EDITOR. It should be 'Base'. Regression testing of config vars #1 - 'additionalBaseClass': Create a new assignment Edit the assignment and expand the 'Restrict access' section Click the 'Add restriction' button Now, using dev tools, inspect the resulting dialogue Confirm that the root div of the dialogue has the class 'moodle-dialogue-base availability-dialogue'. This confirms that the additionalBaseClass 'availability-dialogue' has been added successfully. Regression testing of config vars #2 - 'closeButton': On the course home page, click 'Add a new activity or resource' Confirm that you can close the resulting dialogue using the 'x' in the top right. Now, edit an activity and open the restrictions dialogue (click 'Add restriction' under the 'Restrict access' heading). Confirm that you don't see a close button ('x' in the top right). Regression test for issue reported in MDL-43234 : Go to the first step of course backup Click 'Cancel' When the dialogue pops up, click 'Stay' Click 'Cancel' again. Confirm that you see the dialogue again and that you can again click 'Stay' to close it. Testing tool selection on the grading interface (shape/line/highlighter tools): Go to the grading interface Select the Line tool Draw a line using the tool Change the tool colour only, and then draw another line. Confirm that you now have 2 different coloured lines and that the line tool is still selected. Now, select the rectangle tool Change the tool colour Confirm that the rectangle tool is still selected Other general dialogue testing Try a range of Moodle dialogues, such as: File picker Enrol dialogue Open each, then close it, and open it a few more times. Confirm that it appears the same each time
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Pull from Repository:
    • Pull 3.1 Branch:
    • Pull Master Branch:
      MDL-56364-master
    • Sprint:
      3.3 sprint 4

      Description

      Observed behaviour:

      1. Click a tool (e.g. Line), draw a line, change the tool colour and draw another line. You should have 2 different coloured lines.
      2. Now, pick another tool (E.g. Square, Oval) and change colour.
      3. Observe that the tool has changed back to the line. This shouldn't happen.

      Expected behaviour:

      1. The selected tool doesn't change after any colour picker changes.

      Notes
      This appears to be due to improper use of the this keyword within some of the picker callbacks, resulting in a bad object tree.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/Mar/17