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

lesson: essay question shows html characters on review

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 2.2.1, 2.6
    • Lesson
    • RHEL/ virtual machine/ production server
      iMac/ PHP MYSQL development server
    • MySQL
    • MOODLE_22_STABLE, MOODLE_26_STABLE
    • Hide

      Changed line 2031 of /<mooodle dir>/mod/lesson/locallib.php
      from
      $result->feedback .= '<div class="correctanswer generalbox"><em>'.get_string("youranswer", "lesson").'</em> '. $result->studentanswer; // already in clean html

      to

      $result->feedback .= '<div class="correctanswer generalbox"><p><em>'.get_string("youranswer", "lesson").'</em></p>'. html_entity_decode($result->studentanswer) ;

      nb the 'your answer' string is wrapped in a paragraph tag to format correctly.

      Show
      Changed line 2031 of /<mooodle dir>/mod/lesson/locallib.php from $result->feedback .= '<div class="correctanswer generalbox"><em>'.get_string("youranswer", "lesson").'</em> '. $result->studentanswer; // already in clean html to $result->feedback .= '<div class="correctanswer generalbox"><p><em>'.get_string("youranswer", "lesson").'</em></p>'. html_entity_decode($result->studentanswer) ; nb the 'your answer' string is wrapped in a paragraph tag to format correctly.
    • Hide

      create a lesson with display default feedback option set to true.
      create a question page of type essay
      view the essay question as student, enter an answer.
      see the text under 'your answer'

      Show
      create a lesson with display default feedback option set to true. create a question page of type essay view the essay question as student, enter an answer. see the text under 'your answer'

      when a student uses the essay question in a lesson the summary page displays the html characters of their response eg,
      <p>Here is my essay</p>

            Unassigned Unassigned
            pgee Peter Gee
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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