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

core/checkbox-toggleall-master-button does not allow its CSS class to be customised

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.8
    • Fix Version/s: 3.8
    • Component/s: HTML and CSS
    • Labels:
    • Testing Instructions:
      Hide

      Setup

      1. A course with at least one teacher and at least 2 students.

      Template library demo for customisation

      1. Go to Site administration / Development / Template library.
      2. Search for the checkbox-toggleall-master-button template.
      3. Confirm that the button is rendered as a large primary button.

      Regression tests

      Choice
      1. Create aa 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.
      2. Log in as a teacher.
      3. Go to the choice activity.
      4. Below the Responses table, confirm that the "Select all" button is styled as "btn-secondary". (You can inspect the button and check its "class" attribute)
      Database
      1. Create a database activity
      2. Define at least one field
      3. Save a default template
      4. Create at least 2 items
      5. View the items list
      6. Confirm that the "Select all" button is styled as "btn-secondary".
      7. Inspect the checkbox on any of the entries.
      8. Confirm that it has the "recordcheckbox" class
      Feedback
      1. Create a feedback activity
      2. Open the list of non respondents.
      3. Inspect one of the checkboxes in the non-respondent list.
      4. Confirm that they have the "mr-1" class.
      Course participation report
      1. On the course homepage, click the cog icon, then "More..."
      2. Go to "Reports / Course participation"
      3. Select the choice activity and press "Go"
      4. Confirm that the "Select all 'No'" button is styled as "btn-secondary".
      Label classes
      1. Go to Site administration / Development / Template library
      2. Search for the template "checkbox-toggleall-master".
      3. Confirm that the template renders.
      4. Confirm that its label is styled with the "badge badge-info" class.
      5. Search for the template "checkbox-toggleall-slave".
      6. Confirm that the template renders.
      7. Confirm that its label is styled with the "badge badge-info" class.
      Show
      Setup A course with at least one teacher and at least 2 students. Template library demo for customisation Go to Site administration / Development / Template library. Search for the checkbox-toggleall-master-button template. Confirm that the button is rendered as a large primary button . Regression tests Choice Create aa 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. Log in as a teacher. Go to the choice activity. Below the Responses table, confirm that the " Select all " button is styled as " btn-secondary ". (You can inspect the button and check its " class " attribute) Database Create a database activity Define at least one field Save a default template Create at least 2 items View the items list Confirm that the "Select all" button is styled as " btn-secondary ". Inspect the checkbox on any of the entries. Confirm that it has the " recordcheckbox " class Feedback Create a feedback activity Open the list of non respondents. Inspect one of the checkboxes in the non-respondent list. Confirm that they have the " mr-1 " class. Course participation report On the course homepage, click the cog icon, then " More... " Go to " Reports / Course participation " Select the choice activity and press " Go " Confirm that the "Select all 'No'" button is styled as " btn-secondary ". Label classes Go to Site administration / Development / Template library Search for the template " checkbox-toggleall-master ". Confirm that the template renders. Confirm that its label is styled with the "badge badge-info" class. Search for the template " checkbox-toggleall-slave ". Confirm that the template renders. Confirm that its label is styled with the "badge badge-info" class.
    • Affected Branches:
      MOODLE_38_STABLE
    • Fixed Branches:
      MOODLE_38_STABLE
    • Pull Master Branch:
      MDL-66874-master

      Description

      The button type master checkbox-toggleall element always have the "btn btn-secondary" classes. So it cannot be styled properly as btn-link or any other standard BS4 button.

      It might make sense to use the default "btn-secondary" class only if the "classes" attribute is not set.

        Attachments

          Activity

            People

            Assignee:
            jpataleta Jun Pataleta
            Reporter:
            jpataleta Jun Pataleta
            Peer reviewer:
            Carlos Escobedo
            Integrator:
            Eloy Lafuente (stronk7)
            Tester:
            Janelle Barcega
            Participants:
            Component watchers:
            Amy Groshek, David Scotson, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              18/Nov/19

                Time Tracking

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