Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-6815

Radio response buttons pushed left on individual response display

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: 3.2.3
    • Component/s: Module: Questionnaire
    • Labels:
      None

      Description

      _Originally raised on Github - https://github.com/remotelearner/moodle-mod_questionnaire/issues/83_

      When using Moodle's base 'clean' theme, or any other bootstrap-based theme, the radio buttons shown when viewing an individual response to a "rate" question are displayed with an offset to the left.

      The effect of this is that users viewing an individual response believe that the choice the respondent made was one choice further to the left.

      Note that my examples here used named ranks, but this appears to be a problem with standard 1..5 ranks as well.

      questionnaire_template_offset_00

      In this example, the user chose Strongly agree for the first entry in the table ("Test"), and Agree for the second ("Two").

      This does not match the view when answering the same question, where the buttons appear correctly:

      questionnaire_template_offset_01

      My brief analysis suggests that /templates/response_rate.mustache is adding the radio class of the div containing the table. https://github.com/remotelearner/moodle-mod_questionnaire/blob/MOODLE_32_STABLE/templates/response_rate.mustache#L60

      The .radio input[type="radio"], .checkbox input[type="checkbox"] rule in the bootstrap CSS appears to set float: left; margin-left: -20px;.

      If I remove the radio class from the div on L60 of response_rate.mustache, the radio buttons appear correctly in an individiual response.

      I would submit a PR, but I'm not sure if there are other implications to removing this class!

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mchurch Mike Churchward
                Reporter:
                mchurch Mike Churchward
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  8/May/17