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

Grade essay student response formatting not correct.

XMLWordPrintable

    • MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • MOODLE_27_STABLE, MOODLE_28_STABLE
    • Hide

      To test this you need a teacher account and a student account. The student account must have a valid mail address so that you can check mails received by the student.

      • Add a lesson to a course with Use default feedback set to yes in the "Appearance" section of the settings.
      • Add an essay question to the lesson, score = 1, jump to next page. Put some HTML formatting in the "Page content" and embed an image, create a link, ...
      • Verify that when you preview the lesson as a teacher HTML formatting is correct
      • logout
      • Connect as a student and attempt the lesson. Put some HTML formatting in your answer to the essay question and also a link to an image (there is no filepicker for the student answer) SECURITY CHECK try also to enter some script to verify that there is no XSS vulnerability introduced by that change.
      • When you click on submit you should see a page with question text, "- Your answer :" , the student's answer and "Your essay will be graded by your teacher." with a "Continue" button. Verify that all HTML formatting is correct on this page both in the question text and in the student's answer. If you don't see this page, most probably you forgot to set "Use default feedback" to yes in the lesson settings. Verify that the student answer is correctly cleaned.
      • Click on continue.
      • once you reach the end of the lesson and see the congratulations message, logout
      • Connect ad a teacher again, click on the lesson
      • Click on "Grade essays" (either in the tabs or in the administration menu, I don't know why lesson still has tabs !)
      • You should see the student attempt, click on it.
      • A page with "Question" and the question text and "student name's response" and the student answer should be displayed. All HTML formatting should be correct in both. Verify that the student answer is correctly cleaned.
      • Enter some comments in the "Your comments" field. There is another issue in the tracker to add an editor here. For now just enter some text. Also give a score equal to 1 to the student
      • Save changes
      • On the Grade essays page, click on the "Email graded essays"
      • Verify by going to the student mailbox (sorry there is no other way to do that test currently in the lesson activity ) that the mail content is correct HTML. You should see "Essay prompt:" and the question's text with all HTML formatting, "Your answer:" and the student answer with all HTML formatting, "Grader's comments:" ad the teacher comment in italics, "You have received 1 out of 1 for this essay question. Your grade for the lesson has been changed to 100%."
      Show
      To test this you need a teacher account and a student account. The student account must have a valid mail address so that you can check mails received by the student. Add a lesson to a course with Use default feedback set to yes in the "Appearance" section of the settings. Add an essay question to the lesson, score = 1, jump to next page. Put some HTML formatting in the "Page content" and embed an image, create a link, ... Verify that when you preview the lesson as a teacher HTML formatting is correct logout Connect as a student and attempt the lesson. Put some HTML formatting in your answer to the essay question and also a link to an image (there is no filepicker for the student answer) SECURITY CHECK try also to enter some script to verify that there is no XSS vulnerability introduced by that change. When you click on submit you should see a page with question text, "- Your answer :" , the student's answer and "Your essay will be graded by your teacher." with a "Continue" button. Verify that all HTML formatting is correct on this page both in the question text and in the student's answer. If you don't see this page, most probably you forgot to set "Use default feedback" to yes in the lesson settings. Verify that the student answer is correctly cleaned. Click on continue. once you reach the end of the lesson and see the congratulations message, logout Connect ad a teacher again, click on the lesson Click on "Grade essays" (either in the tabs or in the administration menu, I don't know why lesson still has tabs !) You should see the student attempt, click on it. A page with "Question" and the question text and "student name's response" and the student answer should be displayed. All HTML formatting should be correct in both. Verify that the student answer is correctly cleaned. Enter some comments in the "Your comments" field. There is another issue in the tracker to add an editor here. For now just enter some text. Also give a score equal to 1 to the student Save changes On the Grade essays page, click on the "Email graded essays" Verify by going to the student mailbox (sorry there is no other way to do that test currently in the lesson activity ) that the mail content is correct HTML. You should see "Essay prompt:" and the question's text with all HTML formatting, "Your answer:" and the student answer with all HTML formatting, "Grader's comments:" ad the teacher comment in italics, "You have received 1 out of 1 for this essay question. Your grade for the lesson has been changed to 100%."

      On the Lesson "Grade essays" page, the student's response is displayed as plain text, i.e. any HTML tags are ignored.
      Very easy fix (for Moodle 2.5)_
      file mod/lesson/essay.php
      line 398
      replace

      $data->studentanswer = format_string($essayinfo->answer, $essayinfo->answerformat);
      

      with

      $data->studentanswer = format_text($essayinfo->answer, $essayinfo->answerformat);
      

            jmvedrine Jean-Michel Vedrine
            rezeau Joseph Rézeau
            Adrian Greeve Adrian Greeve
            Andrew Lyons Andrew Lyons
            Mark Nelson Mark Nelson
            Votes:
            3 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

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