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

Html (head, meta and charset) tags required on button "download all submissions" for online text assignments

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.3, 2.3.2
    • Fix Version/s: None
    • Component/s: Assignment
    • Labels:
    • Affected Branches:
      MOODLE_23_STABLE

      Description

      Hello,

      The HTML generated on a submission .html file when you download it using "download all button submissions" on online text assignments don´t have any HTML HEAD meta charset tag, so when you open it on a browser there are a lot of character error on language like French because there is no charset defined.

      The bug is generated on: moodle/mod/assign/submission/onlinetext/locallib.php, line: 229, as you can see in this code there is no html head:

      $submissioncontent = "<html><body>". format_text($finaltext, $onlinetextsubmission->onlineformat, array('context'=>$this->assignment->get_context())). "</body></html>";      //fetched from database

      It can be solve using this line:

      $submissioncontent = "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'><html><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8'/></head>    <body>". format_text($finaltext, $onlinetextsubmission->onlineformat, array('context'=>$this->assignment->get_context())). "</body></html>";      //fetched from database

      I think there is another way to solve this issue, but it works for online-text assignments.

      what do you think?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              dacapri David Cabrera Primo
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: