Skip to content

Commit

Permalink
Fix 'doctype error' - #23.
Browse files Browse the repository at this point in the history
  • Loading branch information
gjb2048 committed Jun 1, 2022
1 parent 72e18a6 commit 16df81d
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Version 4.0.1.1 - TBR
9. Fix 'Failing core PHPUnit test' - #19.
10. Apply MDL-74602.
11. Fix 'Collapsable in question preview won't work' - #22.
12. Fix 'doctype error' - #23.

Version 4.0.1.0 - 17/04/22
--------------------------
Expand Down
3 changes: 3 additions & 0 deletions layout/layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@

defined('MOODLE_INTERNAL') || die;

// Echo the document type here with the $OUTPUT global to prevent core complaining that it hasn't been output!
echo $OUTPUT->doctype();

// Get the renderer for this plugin.
$toolbox = \theme_foundation\toolbox::get_instance();
$output = $toolbox->get_core_renderer();
Expand Down
3 changes: 3 additions & 0 deletions layout/maintenance.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@

defined('MOODLE_INTERNAL') || die;

// Echo the document type here with the $OUTPUT global to prevent core complaining that it hasn't been output!
echo $OUTPUT->doctype();

$data = new \stdClass();
$data->output = $OUTPUT;

Expand Down
3 changes: 3 additions & 0 deletions layout/plainlayout.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@

defined('MOODLE_INTERNAL') || die;

// Echo the document type here with the $OUTPUT global to prevent core complaining that it hasn't been output!
echo $OUTPUT->doctype();

// Get the renderer for this plugin.
$toolbox = \theme_foundation\toolbox::get_instance();
$output = $toolbox->get_core_renderer();
Expand Down
1 change: 0 additions & 1 deletion templates/columns1.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
{
"sitename": "Moodle",
"output": {
"doctype": "<!DOCTYPE html>",
"htmlattributes": "lang='en'",
"page_title": "Test page",
"favicon": "favicon.ico",
Expand Down
1 change: 0 additions & 1 deletion templates/columns2.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
{
"sitename": "Moodle",
"output": {
"doctype": "<!DOCTYPE html>",
"htmlattributes": "lang='en'",
"page_title": "Test page",
"favicon": "favicon.ico",
Expand Down
1 change: 0 additions & 1 deletion templates/columns3.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
{
"sitename": "Moodle",
"output": {
"doctype": "<!DOCTYPE html>",
"htmlattributes": "lang='en'",
"page_title": "Test page",
"favicon": "favicon.ico",
Expand Down
2 changes: 0 additions & 2 deletions templates/embedded.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,13 @@
Example context (json):
{
"output": {
"doctype": "<!DOCTYPE html>",
"htmlattributes": "lang='en'",
"page_title": "Test page",
"favicon": "favicon.ico",
"main_content": "<h1>Headings make html validators happier</h1>"
}
}
}}
{{{ output.doctype }}}
<html {{{ output.htmlattributes }}}>
<head>
<title>{{{ output.page_title }}}</title>
Expand Down
2 changes: 0 additions & 2 deletions templates/maintenance.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,13 @@
Example context (json):
{
"output": {
"doctype": "<!DOCTYPE html>",
"htmlattributes": "lang='en'",
"page_title": "Maintenance page",
"favicon": "favicon.ico",
"main_content": "<h1>Headings make HTML validators happier</h1>"
}
}
}}
{{{ output.doctype }}}
<html {{{ output.htmlattributes }}}>
<head>
<title>{{{ output.page_title }}}</title>
Expand Down
2 changes: 0 additions & 2 deletions templates/partials/head.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@
Example context (json):
{
"output": {
"doctype": "<!DOCTYPE html>",
"htmlattributes": "lang='en'",
"page_title": "Test page",
"favicon": "favicon.ico"
}
}
}}
{{{ output.doctype }}}
<html {{{ output.htmlattributes }}}>
<head>
<title>{{{ output.page_title }}}</title>
Expand Down

0 comments on commit 16df81d

Please sign in to comment.