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

Literal asterisk (\*) in shortanswer question not handled correctly by get_correct_responses

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.7.4, 1.8.4, 1.9, 2.0
    • Component/s: Questions
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      Asterisk is a wildcard symbol in shortanswer question. The problem is with asterisk, that actually needs to apperar in answer. If I use simple asterisk, it accept any symbols; if I escape it (*) , moodle will expect literally this as an answer: *.

      I failed to find a way to include * without preceding backslash in an answer to the shortanswer question.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            timhunt Tim Hunt added a comment -

            There was a bug with this until very recently. I thought I had just fixed it. Are you sure you are testing the very latest 1.9 beta2+?

            Show
            timhunt Tim Hunt added a comment - There was a bug with this until very recently. I thought I had just fixed it. Are you sure you are testing the very latest 1.9 beta2+?
            Hide
            oa_sychev Oleg Sychev added a comment - - edited

            Sorry. I check out latest version 1.9 beta2+. Original bug is solved but it seems you forget two things:
            1. Correct answer display \ before *, thought it shoudn't
            2. So does 'fill with correct' button during preview, so if I press 'fill correct' and then 'submit' the answer will be treated as incorrect.

            Show
            oa_sychev Oleg Sychev added a comment - - edited Sorry. I check out latest version 1.9 beta2+. Original bug is solved but it seems you forget two things: 1. Correct answer display \ before *, thought it shoudn't 2. So does 'fill with correct' button during preview, so if I press 'fill correct' and then 'submit' the answer will be treated as incorrect.
            Hide
            timhunt Tim Hunt added a comment -

            Thanks for catching that case. I can't believe I missed it.

            Show
            timhunt Tim Hunt added a comment - Thanks for catching that case. I can't believe I missed it.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/Jan/08