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

\* handled incorrectly in shortanswer question correct answer/response handling

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.5, 2.2.1, 2.3
    • Fix Version/s: 2.1.6, 2.2.3
    • Component/s: Questions
    • Labels:
    • Testing Instructions:
      Hide

      Create a shortanswer question with an escaped asterisk

      \*

      as a first 100% grade answer. It should be just asterisk in the correct reponse.

      Go to preview and press "Fill in correct responses". You shoudn't see \ before the * there. Create a test with correct answer displayed and add a question to it. In the "Correct answer is:" section you shoudn't see \ before * too.

      Show
      Create a shortanswer question with an escaped asterisk \* as a first 100% grade answer. It should be just asterisk in the correct reponse. Go to preview and press "Fill in correct responses". You shoudn't see \ before the * there. Create a test with correct answer displayed and add a question to it. In the "Correct answer is:" section you shoudn't see \ before * too.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      Shortanswer question class doesn't seems to overload standard get_correct_response method. So it display backslash before asterisk while it should have been stripped since asterisk is a wildcard.

      The logic in qtype_shortanswer_renderer::correct_response also seems wrong. It try to display ANSWER instead of RESPONSE for some reason - e.g. text with special character like asterisk (which could be shown) and escaped asterisk (which is wrong).

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/May/12