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

Inline images, etc. broken for the Embedded answers (Cloze) question type

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 2.0.1
    • Files API, Questions
    • None
    • Any
    • Any
    • MOODLE_20_STABLE
    • Moderate

      Images and other attachments are broken for the Cloze (Multianswer/Embedded answers)
      question type. Attachments added in the browser appear to work, but they may vanish
      from the server at any time. When creating questions in the browser,
      'file_prepare_draft_area' gets called for the appropriate fields in the Cloze
      subquestions, which stores the attachments temporarily and rewrites the links to use draftfile.php, but 'file_save_draft_area_files' is never called as it should be, so the files are never permanently stored and the links are never rewritten to use the @@PLUGINFILE@@ placeholder. As a result, the links appear to work during editing and quiz previews/attempts, but they are not handled as intended by the design of the Moodle
      file API, and the files may be deleted when the draft area is reclaimed. In addition,
      third-party code like ours must either follow the same incorrect pattern, and also
      risk attachment loss, or support publishing attachments using the same pattern used
      by other question types, which will not be lost but will also not be displayed on
      the server, because the code for this question type also never calls 'quiz_rewrite_question_urls'. The only other alternative is to fail to support attachments altogether for these questions. It occurred to us that perhaps there was an unwritten assumption that the Cloze subquestions did not support attachments, but they are not prevented in the user interface, and subquestion handling is mostly delegated to the individual plugin for the subquestion type, which does support attachments. Anyway, can this issue be clarified, or fixed to follow the same pattern used by the other question types with regard to attachments?

        1. cloze-with-image.xml
          0.5 kB
          UMass Amherst Instructional Media Lab

            timhunt Tim Hunt
            respondus Respondus, Inc. (Inactive)
            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.