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

Display problem with < > characters in shortanswer question text

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6.2, 1.7
    • 1.6.4, 1.7, 1.8
    • Questions
    • None
    • MOODLE_16_STABLE, MOODLE_17_STABLE
    • MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE

    Description

      1- Create a question of the shortanswer type.
      a) question text: If a=2 and b=5, then write the inequality equation between a and b.
      b) correct answer: a<b

      2- Test question and enter expected correct answer: "a<b"
      a) you get the message that your answer is correct
      b) the text of the correct answer is displayed as: "Correct answer: a" rather than the expected " Correct answer: a<b".

      Diagnostic: the smaller than character < is interpreted as an HTML opening tag character.
      Severity: This is not too bad since the student's answer IS marked as correct, but the truncated feedback message is of course misleading.
      I expect this occurence might be fairly rare (Maths or science teachers using < > characters in their shortanswer questions).
      Remedy: Maybe there ought to exist in a Moodle library a function which would scan text for occurrences of < > characters and decide whether they are genuine HTML tag markers OR just greater than and lesser than characters ?

      Joseph

      Attachments

        Activity

          People

            timhunt Tim Hunt
            rezeau Joseph Rézeau
            Nicolas Martignoni Nicolas Martignoni
            Safat Shahin, Tim Hunt, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              7/Nov/06