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

Multianswer question wrongly displays correctness div flush with Submit button

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9
    • Component/s: Accessibility, Quiz, Themes
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      This problem only occurs with MULTIANSWER (aka Cloze) questions. It only occurs in Moodle versions 1.9 and 2.0.

      In a Quiz set as Adaptive mode, when the Submit button to a Multianswer question is clicked, the correctness div is displayed Flush with the Submit button rather than on another 'line" as expected.

      I have found two ways to fix this bug.

      Solution #1 - hack the code in question/type/multianswer/questiontype.php (line numbering valid for 1.9)
      line 210 change to:
      // For this question type, we better print the image on top:
      if ($image = get_question_image($question))

      { echo('<img class="qimage" src="' . $image . '" alt="" /><br />'); }

      echo('<div class="ablock clearfix">'); // ADD THIS LINE HERE
      $qtextremaining = format_text($question->questiontext,
      $question->questiontextformat, $formatoptions, $cmoptions->course);
      and line 340 change to:
      // Print the final piece of question text:
      echo $qtextremaining;
      $this->print_question_submit_buttons($question, $state, $cmoptions, $options);
      echo('</div>'); // ADD THIS LINE HERE

      Solution #2: change CSS declaration in theme/standard/styles_layout.css
      line 2536 replace :
      .que .submit {
      position: relative;
      clear: both;
      float: left;
      }
      /* MSIE Hack */

      • html .que .submit {
        float: none;
        }

      with

      .que .submit {
      position: relative;
      clear: both;
      }
      i.e. the float declaration is NOT needed, and is causing the problem... Why was it put there in the first place?

      TESTED with MSIE 7 and FireFox 2.0

      Joseph

        Attachments

          Activity

            People

            Assignee:
            timhunt Tim Hunt
            Reporter:
            rezeau Joseph Rézeau
            Tester:
            Nobody
            Participants:
            Component watchers:
            Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Tim Hunt, Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Bas Brands
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              3/Mar/08