Details

    • Testing Instructions:
      Hide

      Create a new course with a number of resources, and a number of topics. This should include labels (as these are quirky and different).
      These tests all assume that editing is turned on

      Generic Tests

      These tests apply to:

      • Course Pages; and
      • The Moodle 'Site Home'.

      The 'Move Right' button

      • use the 'Move Right' button to indent an activity
      • confirm that a 'Move Left' button has now been added
      • click the 'Move Right' button twice more
        • confirm that the activity is now indented three spaces
      • click the 'Move Left' button
        • confirm that the activity is now indented two spaced
      • refresh the page
        • confirm that the activity is now indented two spaced

      The 'Move Left' button

      Using an activity that already displays the 'Move Left' button:

      • click the 'Move Left' button until the activity is far-left
        • confirm that the 'Move Left' button has disappeared
      • refresh the page
        • confirm that the activity is no longer indented

      The 'Delete' button

      • attempt to delete a label
        • confirm that the popup asks to confirm deletion without specifying the label text - e.g. 'Are you sure you want to delete this Label?'
        • choose OK to remove the label
        • confirm that the label is no longer present
      • attempt to delete another resource/activity
        • confirm that the popup asks to confirm deletion, specifying the label text - e.g. 'Are you sure you want to delete the Glossary "Course Glossary"?'
        • choose OK to remove the resource/activity
        • confirm that the resource/activity is no longer present
        • refresh the page
        • confirm that the both the label and other resource/activity are still gone

      The Show/Hide button

      Note The 'dimming' may not happen correctly in IE in certain circumstances - see MDL-31217 for further details

      • Toggle the Show/Hide button once on one activity
        • confirm that it is now dimmed
        • confirm that the 'Show' button is now visible
      • Toggle it twice on another
        • confirm that it dims, then undims
        • confirm that the 'Hide' button is now visible again
      • Toggle it three times on a third activity
        • confirm that it dims, undims, and then dims again
        • confirm that you got a sequence of 'Show', then 'Hide', and then back to 'Show'
      • refresh the page
        • confirm that the first element is dimmed
        • confirm that the 'Show' button is now visible on this element
        • confirm that the second element is visible
        • confirm that the 'Hide' button is shown for this element
        • confirm that the third element is dimmed
        • confirm that the 'Show' button is shown for this element
      • Toggle the first element back to being visible
        • confirm that the element is no longer dimmed
        • confirm that the 'Hide' button is now shown
      • refresh the page
        • confirm that the first element is now visible again

      Course Tests

      These tests apply to:

      • Course Pages.

      The Section Visibility buttons

      These tests should be carried out in both topics, and weeks formats. Start each of these tests with all sections visible.
      You will need at least three sections, each with two activities – one should be shown, and the other hidden.

      Please note that these test instructions include the fix for MDL-25990

      • Toggle the first section's visibility once
        • it should now be dimmed and the icon changed
        • both activities should also be dimmed
        • the show/hide button for the activities should be disabled
      • Toggle the second section's visibility twice
        • it should dim, but become visible again
        • one activity should be shown, the other hidden
        • both activity's show/hide buttons should be clickable
      • Toggle the third section's visibility thrice
        • it should end up dimmed with the icon changed
        • both activities should also be dimmed
        • the show/hide button for the activities should be disabled
      • refresh the page and confirm:
        • the first section is not visible
        • activities in the first section are dimmed and not clickable
        • the second section is visible
        • the third section is not visible
        • activities in the third section are dimmed and not clickable
      • Toggle the first section's visibility once
        • it should now be visible and the icon changed to eye open
        • all activities in the section should now be visible and their visibility icons clickable
      • Toggle the second section's visibility twice
        • it should now be hidden and the icon changed to eye closed
        • all activities in the section should now be hidden and their visibility icons not clickable
      • Toggle the third section's visibility thrice
        • it should now be visible and the icon changed to eye open
        • all activities in the section should now be visible and their visibility icons clickable
      • refresh the page and confirm:
        • the first section is now visible
        • all activities in the section should now be visible and their visibility icons clickable
        • the second section is no longer visible
        • all activities in the section should now be hidden and their visibility icons not clickable
        • the third section is now visible
        • all activities in the section should now be visible and their visibility icons clickable

      The Section Highlighting marker

      These tests should be carried out only on topics format (weeks don't have manual highlighting). Start with no sections marked:

      • Toggle the first section
        • confirm it's highlighted. The icon should change (though it's hard to tell on the default theme)
      • refresh the page
        • the first section should still be highlighted with the changed icon
      • Toggle the first section again
        • confirm it's no longer highlighted. Again, the icon should change
      • refresh the page
        • the first section should no longer be highlighted
      • Toggle the first section
      • it should highlight
      • Toggle it again
      • it should return to normal
      • refresh
        • confirm that all are normal
      • Toggle the first section
      • Toggle the second section
        • the second section should highlight
        • the first section should lose the highlighting
      • refresh
        • confirm that the second section is still highlighted
      • Toggle the second section
        • Confirm that the section is no longer highlighted
      • Toggle the first section
        • Confirm that it is highlighted
      • Toggle the third section
        • Confirm it steals the highlighting
      • refresh
        • Confirm only the third section is highlighted

      The Group Mode button

      Note MDL-31040 will affect the initial text for the Group Mode button. When this is integrated this should cease to be an issue

      Forced Mode

      In Forced Group mode, the javascript should not take effect. This set of tests confirms this

      • Navigate to Settings -> Course Administration -> Edit Settings
      • Under Groups set:
        • 'Group mode' to 'Visible groups'
        • 'Forced group mode' to 'Yes'
      • Confirm that:
        • Any 'Group Mode' icons are set to the 'Visible groups' icon with the mouseover text 'Visible groups (forced mode)'
        • Clicking on these icons performs no actions

      Normal Mode

      Back to normal now:

      • Navigate to Settings -> Course Administration -> Edit Settings
      • Under Groups set:
        • 'Group mode' to 'No Groups'
        • 'Forced group mode' to 'No'

      With Editing turned on, choose a willing candidate and:

      • Confirm that:
        • The 'Group Mode' icon is set correctly with an appropriate mouseover text
        • Note The initial text may show 'No Groups' rather than 'No Groups (Click to change)' - this will be fixed by MDL-31040
      • Toggle the Group Mode once - confirm that:
        • The 'Group Mode' icon is now set to 'Separate Groups' with a mouseover text of 'Separate Groups (Click to change)'
        • Refresh the page and reconfirm
      • Toggle the Group Mode once more - confirm that:
        • The 'Group Mode' icon is now set to 'Visible Groups' with a mouseover text of 'Visible Groups (Click to change)'
        • Refresh the page and reconfirm
      • Now Toggle the Group Mode twice - confirm that:
        • The icon changes twice
        • The 'Group Mode' icon is now set to 'Separate Groups' with a mouseover text of 'Separate Groups (Click to change)'
        • Refresh the page and reconfirm
      Show
      Create a new course with a number of resources, and a number of topics. This should include labels (as these are quirky and different). These tests all assume that editing is turned on Generic Tests These tests apply to: Course Pages; and The Moodle 'Site Home'. The 'Move Right' button use the 'Move Right' button to indent an activity confirm that a 'Move Left' button has now been added click the 'Move Right' button twice more confirm that the activity is now indented three spaces click the 'Move Left' button confirm that the activity is now indented two spaced refresh the page confirm that the activity is now indented two spaced The 'Move Left' button Using an activity that already displays the 'Move Left' button: click the 'Move Left' button until the activity is far-left confirm that the 'Move Left' button has disappeared refresh the page confirm that the activity is no longer indented The 'Delete' button attempt to delete a label confirm that the popup asks to confirm deletion without specifying the label text - e.g. 'Are you sure you want to delete this Label?' choose OK to remove the label confirm that the label is no longer present attempt to delete another resource/activity confirm that the popup asks to confirm deletion, specifying the label text - e.g. 'Are you sure you want to delete the Glossary "Course Glossary"?' choose OK to remove the resource/activity confirm that the resource/activity is no longer present refresh the page confirm that the both the label and other resource/activity are still gone The Show/Hide button Note The 'dimming' may not happen correctly in IE in certain circumstances - see MDL-31217 for further details Toggle the Show/Hide button once on one activity confirm that it is now dimmed confirm that the 'Show' button is now visible Toggle it twice on another confirm that it dims, then undims confirm that the 'Hide' button is now visible again Toggle it three times on a third activity confirm that it dims, undims, and then dims again confirm that you got a sequence of 'Show', then 'Hide', and then back to 'Show' refresh the page confirm that the first element is dimmed confirm that the 'Show' button is now visible on this element confirm that the second element is visible confirm that the 'Hide' button is shown for this element confirm that the third element is dimmed confirm that the 'Show' button is shown for this element Toggle the first element back to being visible confirm that the element is no longer dimmed confirm that the 'Hide' button is now shown refresh the page confirm that the first element is now visible again Course Tests These tests apply to: Course Pages. The Section Visibility buttons These tests should be carried out in both topics, and weeks formats. Start each of these tests with all sections visible. You will need at least three sections, each with two activities – one should be shown, and the other hidden. Please note that these test instructions include the fix for MDL-25990 Toggle the first section's visibility once it should now be dimmed and the icon changed both activities should also be dimmed the show/hide button for the activities should be disabled Toggle the second section's visibility twice it should dim, but become visible again one activity should be shown, the other hidden both activity's show/hide buttons should be clickable Toggle the third section's visibility thrice it should end up dimmed with the icon changed both activities should also be dimmed the show/hide button for the activities should be disabled refresh the page and confirm: the first section is not visible activities in the first section are dimmed and not clickable the second section is visible the third section is not visible activities in the third section are dimmed and not clickable Toggle the first section's visibility once it should now be visible and the icon changed to eye open all activities in the section should now be visible and their visibility icons clickable Toggle the second section's visibility twice it should now be hidden and the icon changed to eye closed all activities in the section should now be hidden and their visibility icons not clickable Toggle the third section's visibility thrice it should now be visible and the icon changed to eye open all activities in the section should now be visible and their visibility icons clickable refresh the page and confirm: the first section is now visible all activities in the section should now be visible and their visibility icons clickable the second section is no longer visible all activities in the section should now be hidden and their visibility icons not clickable the third section is now visible all activities in the section should now be visible and their visibility icons clickable The Section Highlighting marker These tests should be carried out only on topics format (weeks don't have manual highlighting). Start with no sections marked: Toggle the first section confirm it's highlighted. The icon should change (though it's hard to tell on the default theme) refresh the page the first section should still be highlighted with the changed icon Toggle the first section again confirm it's no longer highlighted. Again, the icon should change refresh the page the first section should no longer be highlighted Toggle the first section it should highlight Toggle it again it should return to normal refresh confirm that all are normal Toggle the first section Toggle the second section the second section should highlight the first section should lose the highlighting refresh confirm that the second section is still highlighted Toggle the second section Confirm that the section is no longer highlighted Toggle the first section Confirm that it is highlighted Toggle the third section Confirm it steals the highlighting refresh Confirm only the third section is highlighted The Group Mode button Note MDL-31040 will affect the initial text for the Group Mode button. When this is integrated this should cease to be an issue Forced Mode In Forced Group mode, the javascript should not take effect. This set of tests confirms this Navigate to Settings -> Course Administration -> Edit Settings Under Groups set: 'Group mode' to 'Visible groups' 'Forced group mode' to 'Yes' Confirm that: Any 'Group Mode' icons are set to the 'Visible groups' icon with the mouseover text 'Visible groups (forced mode)' Clicking on these icons performs no actions Normal Mode Back to normal now: Navigate to Settings -> Course Administration -> Edit Settings Under Groups set: 'Group mode' to 'No Groups' 'Forced group mode' to 'No' With Editing turned on, choose a willing candidate and: Confirm that: The 'Group Mode' icon is set correctly with an appropriate mouseover text Note The initial text may show 'No Groups' rather than 'No Groups (Click to change)' - this will be fixed by MDL-31040 Toggle the Group Mode once - confirm that: The 'Group Mode' icon is now set to 'Separate Groups' with a mouseover text of 'Separate Groups (Click to change)' Refresh the page and reconfirm Toggle the Group Mode once more - confirm that: The 'Group Mode' icon is now set to 'Visible Groups' with a mouseover text of 'Visible Groups (Click to change)' Refresh the page and reconfirm Now Toggle the Group Mode twice - confirm that: The icon changes twice The 'Group Mode' icon is now set to 'Separate Groups' with a mouseover text of 'Separate Groups (Click to change)' Refresh the page and reconfirm
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Rank:
      37522

      Description

      Convert the resource section of lib/ajax/section_classes.js to a new YUI3 module

        Issue Links

          Activity

          Hide
          Andrew Nicols added a comment -

          This is a complete rewrite of the span.commands section for courses. I've also taken the opportunity to apply this to /index.php which previously didn't support these AJAX features.

          For the moment I've removed the previous drag/drop functionality and all of the resource-related code in lib/ajax/section_classes.js. Ruslan is working on adding these back (he's written it already and is just putting the icing on the cake) - see MDL-31216 for further details.

          Show
          Andrew Nicols added a comment - This is a complete rewrite of the span.commands section for courses. I've also taken the opportunity to apply this to /index.php which previously didn't support these AJAX features. For the moment I've removed the previous drag/drop functionality and all of the resource-related code in lib/ajax/section_classes.js. Ruslan is working on adding these back (he's written it already and is just putting the icing on the cake) - see MDL-31216 for further details.
          Hide
          Andrew Nicols added a comment -

          swears at IE

          Show
          Andrew Nicols added a comment - swears at IE
          Hide
          Andrew Nicols added a comment -

          Added a note about MDL-31217 and how this may affect the testing plan for this feature

          Show
          Andrew Nicols added a comment - Added a note about MDL-31217 and how this may affect the testing plan for this feature
          Hide
          Andrew Nicols added a comment -

          Whilst implementing MDL-31097 I found that it makes much more sense to have one generic set of toolboxes so I've renamed the library. This should be the only change - apologies for the noise!

          Show
          Andrew Nicols added a comment - Whilst implementing MDL-31097 I found that it makes much more sense to have one generic set of toolboxes so I've renamed the library. This should be the only change - apologies for the noise!
          Hide
          Andrew Nicols added a comment -

          Pulling this from Peer Review for the moment as I'm going to merge the changes for MDL-31097 into this

          Show
          Andrew Nicols added a comment - Pulling this from Peer Review for the moment as I'm going to merge the changes for MDL-31097 into this
          Hide
          Andrew Nicols added a comment -

          The patch that we're supplying for this will also add AJAX goodness to the site homepage

          Show
          Andrew Nicols added a comment - The patch that we're supplying for this will also add AJAX goodness to the site homepage
          Hide
          Dan Poltawski added a comment -

          This issue is 'virtually' integrated by its parent issue.

          Show
          Dan Poltawski added a comment - This issue is 'virtually' integrated by its parent issue.
          Hide
          Rajesh Taneja added a comment -

          Thanks for awesome improvement Andrew

          Few things I noticed:

          1. If you have activity description shown on course page (Display description on course page is checked), then hiding or showing the activity/section doesn't grey-out description.
          2. Page action breaks at:
            • Move activity to right and keep clicking it, till it moves to next line. Now refresh page, activity goes back to previous line and now try clicking left arrow, keep clicking and sometimes it doesn't show as if clicks were taken. Refresh and activity is moved left.
          Show
          Rajesh Taneja added a comment - Thanks for awesome improvement Andrew Few things I noticed: If you have activity description shown on course page (Display description on course page is checked), then hiding or showing the activity/section doesn't grey-out description. Page action breaks at: Move activity to right and keep clicking it, till it moves to next line. Now refresh page, activity goes back to previous line and now try clicking left arrow, keep clicking and sometimes it doesn't show as if clicks were taken. Refresh and activity is moved left.
          Show
          Andrew Nicols added a comment - Here's a fix for that: https://git.luns.net.uk/?p=moodle.git;a=commitdiff;h=eac3ed52c7f8cb8b554984430d096657c3e3f09d
          Hide
          Andrew Nicols added a comment -

          Sorry, the fix above was for point 1

          Point 2 is not a regression so there's no change in functionality. Looking at it, it appears that the 'mod-indent-huge' class is added in course/lib.php (not by JS) when the mod-indent > 15. Will look at adding this.

          Show
          Andrew Nicols added a comment - Sorry, the fix above was for point 1 Point 2 is not a regression so there's no change in functionality. Looking at it, it appears that the 'mod-indent-huge' class is added in course/lib.php (not by JS) when the mod-indent > 15. Will look at adding this.
          Hide
          Andrew Nicols added a comment -

          Fix for issue 2: https://git.luns.net.uk/?p=moodle.git;a=commitdiff;h=95ef704d7d96a7f3f47d060d07cfee06a72f9106
          This now adds mod-indent-huge when the indent exceeds 15 points and removes it when it comes back down again.

          Show
          Andrew Nicols added a comment - Fix for issue 2: https://git.luns.net.uk/?p=moodle.git;a=commitdiff;h=95ef704d7d96a7f3f47d060d07cfee06a72f9106 This now adds mod-indent-huge when the indent exceeds 15 points and removes it when it comes back down again.
          Hide
          Dan Poltawski added a comment -

          I've pushed these fixes.

          Raj - could you please retest?

          many thanks

          Show
          Dan Poltawski added a comment - I've pushed these fixes. Raj - could you please retest? many thanks
          Hide
          Rajesh Taneja added a comment -

          Thanks for the quick fix Andrew
          All good now.

          Show
          Rajesh Taneja added a comment - Thanks for the quick fix Andrew All good now.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          This has been near becoming rejected, because it's not the best code you are able to produce.

          But, luckily, at the end, it has landed and has been spread to all repos out there.

          Many thanks and, don't forget it, keep improving your skills, you can!

          Closing, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - This has been near becoming rejected, because it's not the best code you are able to produce. But, luckily, at the end, it has landed and has been spread to all repos out there. Many thanks and, don't forget it, keep improving your skills, you can! Closing, ciao
          Hide
          Tim Barker added a comment -

          QA tests added!

          Show
          Tim Barker added a comment - QA tests added!

            People

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

              Dates

              • Created:
                Updated:
                Resolved: