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

Invalid HTML in multi-answer (Cloze) questions: blank <option> content is not allowed

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_311_STABLE
    • MOODLE_310_STABLE, MOODLE_311_STABLE
    • MDL-72669-master
    • Hide
      1. Log in as admin
      2. Go to Site home
      3. From the cog icon at the top right of the page, go to 'More...' and then go to 'Question bank' > 'Questions'
      4. Create a new 'Embedded answers (Cloze) question' with the following question text

        Balance this chemical equation:
         
        {1:MULTICHOICE:1~2~3~=4~5} Fe + {1:MULTICHOICE:=1~2~=3~4~5} O₂ --> {1:MULTICHOICE:=1~=2~3~4~5} Fe₂O₃
         
        This reaction is an example of {1:MULTICHOICE:Combustion~=Corrosion~Ionisation}

      5. Preview the question you just created
      6. View page source in the preview window (usually Ctrl+u)
      7. Copy the source
      8. Visit https://validator.w3.org/nu/
      9. Set the check by field to 'text input' and replace the content of the text editor with what you copied on step 3
      10. Press the 'check' button
      11. Press the 'message filtering' button
      12. Verify that you don't see any errors

       

      Show
      Log in as admin Go to Site home From the cog icon at the top right of the page, go to 'More...' and then go to 'Question bank' > 'Questions' Create a new 'Embedded answers (Cloze) question' with the following question text Balance this chemical equation:   {1:MULTICHOICE:1~2~3~=4~5} Fe + {1:MULTICHOICE:=1~2~=3~4~5} O₂ --> {1:MULTICHOICE:=1~=2~3~4~5} Fe₂O₃   This reaction is an example of {1:MULTICHOICE:Combustion~=Corrosion~Ionisation} Preview the question you just created View page source in the preview window (usually Ctrl+u) Copy the source Visit  https://validator.w3.org/nu/ Set the check by field to 'text input' and replace the content of the text editor with what you copied on step 3 Press the 'check' button Press the 'message filtering' button Verify  that you don't see any errors  
    • 2
    • HQ Team International Sprin 10, HQ Team International CI H2-21

      Error found using W3C Nu Validation Service and filtered to indicate WCAG errors only.

      This seems to point to the select element's option with a blank answer in a Cloze question.

      From NuHTML validator:

      Error: Element option without attribute label must not be empty.

      The HTML sample in question:

      <p>The first Moodle Research conference was held in
        <span class="subquestion"><label class="subq accesshide" for="q18:12_sub1_answer">Answer</label><select id="q18:12_sub1_answer" disabled="disabled" class="select custom-select incorrect" name="q18:12_sub1_answer">
            <option value=""></option>
            <option selected="selected" value="0">Sousse, Tunisia</option>
            <option value="1">California, USA</option>
            <option value="2">Crete, Greece</option>
            <option value="3">Greece</option>
          </select><i class="icon fa fa-remove text-danger fa-fw " title="Incorrect" aria-label="Incorrect"></i><span class="feedbackspan accesshide">Incorrect<br />That was the second<br />The correct answer is: Crete, Greece<br />Mark 0.00 out of 1.00</span></span></p>
      

            rezaie9 Shamim Rezaie
            jpataleta Jun Pataleta
            Tim Hunt Tim Hunt
            Jun Pataleta Jun Pataleta
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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