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

Images in Lesson numerical question response do not display

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.4
    • Fix Version/s: 3.0.6, 3.1.2
    • Component/s: Lesson
    • Labels:
    • Testing Instructions:
      Hide
      1. Create a lesson.
      2. Add a numerical question.
      3. Add a picture in the response field (below 'Answer') make sure that it's copied to the server and not just a link to a picture.
      4. Save and log in as a student.
      5. Take the lesson and after answering the numerical question check that the images shows properly and doesn't display as a broken link.
      Show
      Create a lesson. Add a numerical question. Add a picture in the response field (below 'Answer') make sure that it's copied to the server and not just a link to a picture. Save and log in as a student. Take the lesson and after answering the numerical question check that the images shows properly and doesn't display as a broken link.
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-55154-master

      Description

      An image is placed in the response field for a numerical question within a lesson activity. When previewing the lesson as an instructors or taking the lesson as a student, the image in the response field is not displayed. Any text in the response field is still displayed, only the image is missing. It does not matter how the image is added to the response field. Using image tools within the HTML editor or drag-n-drop directly into the Response field produces the same outcome. Only numerical questions are impacted. Images in responses work correctly for matching, multichoice, short answer, and true/false questions.

      [STEPS TO REPLICATE]
      1. Create a new lesson.
      2. Add a question page to the lesson.
      3. Select any of the following question types: matching, multichoice, short answer, true/false.
      4. Add an image to any Response fields in the question. It does not matter if images are added via drag-n-drop or using the Image button in the HTML editor.
      5. Add another question page to the lesson.
      6. Select the numerical question type.
      7. Add an image to any Response fields in the question. It does not matter if images are added via drag-n-drop or using the Image button in the HTML editor.
      8. Login in as a student and take the lesson.
      9. Answer question #1 and observe the image from the response field is successfully displayed.
      10. Answer question #2, the numerical question.

      OBSERVED BEHAVIOR:
      The image from the response field is not displayed. If the response field also contained text, the text is still displayed.

      EXPECTED BEHAVIOR:
      All text and images entered in the response field are displayed after the numerical question is answered.

      [REPLICATION LOCATIONS]
      Replicated in 3.0.4.

      [ADDITIONAL INVESTIGATION NOTES]
      Using the browser's developer tools to examine a working image, the image source is: http://core2next-sandbox.mrooms.net/pluginfile.php/2368/mod_lesson/page_responses/56/myimage1.jpg

      By comparison, the image source for the non-working image in the numerical question is:
      @@PLUGINFILE@@/myimage2.jpg

      [USER IMPACT]
      Instructors are unable to use images within response feedback on numerical questions within lesson activities.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/Sep/16