Moodle
  1. Moodle
  2. MDL-3553

Cloze/Multianswer format doesn't allow backslash-escaping special characters

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: None
    • Component/s: Quiz
    • Labels:
      None
    • Environment:
      All
    • Affected Branches:
      MOODLE_15_STABLE
    • Rank:
      14421

      Description

      I have several complicated questions that require the cloze format, and use IPA characters which need to be input using numeric character entities as options in a multichoice question (i.e. ə as ă). Since the # causes it to think that feedback follows, the answer gets escaped & merely shows up as an &. Backslashes don't appear to be parsed anywhere whether importing from text or entering via the web form, unlike the multichoice code which has pre & post escape functions, and I couldn't really figure out where to add such functions into the cloze code. If anyone more familiar w/ that bit of code would like to tackle this, or else point me to the right place to be sticking those escape functions in (i.e. from what function in which file), I'd be very appreciative.

        Activity

        Hide
        Martin Dougiamas added a comment -

        From Gustav Delius (gwd2 at york.ac.uk) Monday, 20 June 2005, 04:14 AM:

        Julian, if I understand this bug report correctly there is a difference in how question backslashes are handled by the cloze question and how they are handled by the multichoice question. Do you know anything about this?

        From Julian Sedding (jps502 at york.ac.uk) Monday, 20 June 2005, 09:19 PM:

        This capability was never there in the cloze questiontype. I changed the processing of the cloze syntax now, so it is possible to include numbered entities when the # is escaped. E.g. ə or &#259. For convenience and because the HTML editor automatically converts & to & strings of the form &**; are converted to &**; before processing. This shouldn't be an issue unless someone wants to write such a string...

        From non non (nbhansen at midway.uchicago.edu) Monday, 24 April 2006, 08:15 AM:

        Just a note, these workarounds are no longer necessary in 1.6. It is possible to type Unicode directly in a cloze question now.

        Show
        Martin Dougiamas added a comment - From Gustav Delius (gwd2 at york.ac.uk) Monday, 20 June 2005, 04:14 AM: Julian, if I understand this bug report correctly there is a difference in how question backslashes are handled by the cloze question and how they are handled by the multichoice question. Do you know anything about this? From Julian Sedding (jps502 at york.ac.uk) Monday, 20 June 2005, 09:19 PM: This capability was never there in the cloze questiontype. I changed the processing of the cloze syntax now, so it is possible to include numbered entities when the # is escaped. E.g. ə or &#259. For convenience and because the HTML editor automatically converts & to & strings of the form &** ; are converted to & **; before processing. This shouldn't be an issue unless someone wants to write such a string... From non non (nbhansen at midway.uchicago.edu) Monday, 24 April 2006, 08:15 AM: Just a note, these workarounds are no longer necessary in 1.6. It is possible to type Unicode directly in a cloze question now.
        Hide
        Michael Blake added a comment -

        assign to a valid user

        Show
        Michael Blake added a comment - assign to a valid user

          People

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

            Dates

            • Created:
              Updated:
              Resolved: