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

Review essay formatting issue

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Deferred
    • 2.0, 2.1
    • None
    • Lesson
    • None
    • MOODLE_20_STABLE, MOODLE_21_STABLE
    • Hide

      This patch solves the problem:
      in file mod/lesson/locallib.php, final public function record_attempt($context) { }
      towards line 2020 change

      if ($result->response) {
          if ($this->lesson->review && !$result->correctanswer && !$result->isessayquestion) {
          ...
          } else {...

      to

      if ($result->response) {
          if ($this->lesson->review && !$result->correctanswer && !$result->isessayquestion) {
          ...
          } else {
              if ($result->isessayquestion) {
      	    $result->studentanswer = '<div class="reviewessay">'.htmlspecialchars_decode ($result->studentanswer).'</div>';
              }
              ...

      tested on moodle 2.0 and 2.1

      Show
      This patch solves the problem: in file mod/lesson/locallib.php, final public function record_attempt($context) { } towards line 2020 change if ($result->response) { if ($this->lesson->review && !$result->correctanswer && !$result->isessayquestion) { ... } else {... to if ($result->response) { if ($this->lesson->review && !$result->correctanswer && !$result->isessayquestion) { ... } else { if ($result->isessayquestion) { $result->studentanswer = '<div class="reviewessay">'.htmlspecialchars_decode ($result->studentanswer).'</div>'; } ... tested on moodle 2.0 and 2.1
    • Hide

      Create a lesson with at least one essay question in it.
      Lesson Settings: Flow control: Display default feedback: Yes
      Log in as student.
      Go to lesson.
      Attempt Essay, making sure to use some formatting in your text (bold, italics, etc.).
      Click Submit button
      Check that the Essay text you entered is correctly formatted, and not displayed with HTML tags instead.

      Show
      Create a lesson with at least one essay question in it. Lesson Settings: Flow control: Display default feedback: Yes Log in as student. Go to lesson. Attempt Essay, making sure to use some formatting in your text (bold, italics, etc.). Click Submit button Check that the Essay text you entered is correctly formatted, and not displayed with HTML tags instead.

    Attachments

      Issue Links

        Activity

          People

            Unassigned Unassigned
            rezeau Joseph Rézeau
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: