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

Display problem with < > characters in shortanswer question text

XMLWordPrintable

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

      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

            timhunt Tim Hunt
            rezeau Joseph Rézeau
            Nicolas Martignoni Nicolas Martignoni
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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