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

Create a toggle-all checkbox output component

XMLWordPrintable

    • MOODLE_38_STABLE
    • MOODLE_38_STABLE
    • MDL-65928-master-2
    • Hide

      Note: Test on Boost and Classic

      Prerequisites
      1. A course with at least one teacher and at least 2 students.
      2. A Choice activity in a course with the following settings:
        • Has at least 2 options.
        • Publish results: Always show results to students.
        • Privacy of results: Publish full results, showing names and their choices.
        • Show column for unanswered: yes.
      Test
      1. Login as a teacher.
      2. Go to the choice activity.
      3. Below the Responses table, confirm that there is a Select all button.
      4. Click on it.
      5. Confirm that the checkboxes beside each participant in the responses table are checked.
      6. Confirm that its text becomes "Deselect all"
      7. Click on "Deselect all"
      8. Confirm that the checkboxes beside each participant in the responses table become unchecked.
      9. Check/uncheck the checkboxes right under each column header
      10. Confirm that when the column header checkbox gets checked, the checkboxes under the same column get checked.
      11. Confirm that when the column header checkbox gets unchecked, the checkboxes under the same column also get checked.
      12. Tick all of the items under a column.
      13. Confirm that the checkbox under the column header gets checked as well.
      14. Untick one or more items under a column.
      15. Confirm that the checkbox under the column header gets unchecked as well.
      16. Click the "Select all" button again
      17. Untick one of the items
      18. Confirm that the {Deselect all" button's label becomes "Select all"
      19. Check the state of the "With selected" select box.
      20. Confirm that when there are no items selected, the select box is disabled.
      21. Confirm that when there is at least one item selected, the select box becomes enabled.
      Show
      Note: Test on Boost and Classic Prerequisites A course with at least one teacher and at least 2 students. A Choice activity in a course with the following settings: Has at least 2 options. Publish results: Always show results to students. Privacy of results: Publish full results, showing names and their choices. Show column for unanswered: yes. Test Login as a teacher. Go to the choice activity. Below the Responses table, confirm that there is a Select all button. Click on it. Confirm that the checkboxes beside each participant in the responses table are checked. Confirm that its text becomes " Deselect all " Click on "Deselect all" Confirm that the checkboxes beside each participant in the responses table become unchecked. Check/uncheck the checkboxes right under each column header Confirm that when the column header checkbox gets checked, the checkboxes under the same column get checked. Confirm that when the column header checkbox gets unchecked, the checkboxes under the same column also get checked. Tick all of the items under a column. Confirm that the checkbox under the column header gets checked as well. Untick one or more items under a column. Confirm that the checkbox under the column header gets unchecked as well. Click the " Select all " button again Untick one of the items Confirm that the { Deselect all " button's label becomes "Select all" Check the state of the " With selected " select box. Confirm that when there are no items selected, the select box is disabled. Confirm that when there is at least one item selected, the select box becomes enabled.
    • 2
    • Sprint 2 - Experimental

      Who is this project for?
      • For Moodle devs!; and
      • Ultimately for Moodle users!
      What is the problem that you're trying to solve?
      • dobedobedoh created the awesome core/checkbox-toggleall AMD module. However, to be able to use it, you will have to do various stuff first (e.g. import the AMD module, manually edit the HTML/attributes of the elements to add the required data attributes, etc).
      • It currently doesn't have support for toggling the state of action elements (e.g. buttons that perform actions on the selected items.
      • It currently doesn't support toggling of nested checkbox elements (e.g. master checkbox toggles all checkboxes, while another master checkbox that toggles a subset of those checkboxes)
      Why does it need solving?
      • It would help developers to easily use the checkbox_toggleall element!
      • We'll be able to provide a more consistent method of selecting/deselecting items on a list.
      How does your project tackle the problem?
      • The patch for this issue provides an easier way for developers to output a toggle-all checkbox that can control a group of checkboxes on a list. Developers will simply have to implement the following:
        1. Define master checkbox(es) - responsible for toggling the checkboxes in the list.
        2. Define slave checkboxes
        3. (Optional) Assign appropriate data attributes to action elements. Action elements are those who perform actions on the selected items.
      • The improvements on the core/checkbox-toggleall will also
        • enable support for toggling the state (enabled/disabled) of action elements. This will help us clean up the custom JS code for enabling/disabling the action elements scattered all throughout moodle.
        • allow master checkboxes to belong to multiple toggle groups. In other words, this means that master checkboxes can control one or more groups of checkboxes. This is particularly helpful for selecting multiple items belonging to different groups.

        1. choice-after.png
          102 kB
          Jun Pataleta
        2. choice-before.png
          50 kB
          Jun Pataleta
        3. MDL-65928_Boost.jpg
          41 kB
          Anna Carissa Sadia
        4. MDL-65928_Boost (2).jpg
          42 kB
          Anna Carissa Sadia
        5. MDL-65928_Classic.jpg
          46 kB
          Anna Carissa Sadia
        6. MDL-65928_Classic (2).jpg
          39 kB
          Anna Carissa Sadia

            jpataleta Jun Pataleta
            jpataleta Jun Pataleta
            Neill Magill Neill Magill
            Andrew Lyons Andrew Lyons
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 13 minutes
                1d 13m

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