-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
2.3, 2.3.2
-
MOODLE_23_STABLE
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?
- is duplicated by
-
MDL-45432 Exported online text submissions should contain a character encoding declaration
-
- Closed
-