diff --git a/mod/lesson/pagetypes/essay.php b/mod/lesson/pagetypes/essay.php index 546a7db568a..9592180f68f 100644 --- a/mod/lesson/pagetypes/essay.php +++ b/mod/lesson/pagetypes/essay.php @@ -318,6 +318,9 @@ class lesson_display_answer_form_essay extends moodleform { } } + // Disable shortforms. + $mform->setDisableShortforms(); + $mform->addElement('header', 'pageheader'); $mform->addElement('html', $OUTPUT->container($contents, 'contents')); diff --git a/mod/lesson/pagetypes/matching.php b/mod/lesson/pagetypes/matching.php index 29775df2127..59bfd1e51ca 100644 --- a/mod/lesson/pagetypes/matching.php +++ b/mod/lesson/pagetypes/matching.php @@ -533,6 +533,9 @@ class lesson_display_answer_form_matching extends moodleform { $lessonid = $this->_customdata['lessonid']; $contents = $this->_customdata['contents']; + // Disable shortforms. + $mform->setDisableShortforms(); + $mform->addElement('header', 'pageheader'); $mform->addElement('html', $OUTPUT->container($contents, 'contents')); diff --git a/mod/lesson/pagetypes/multichoice.php b/mod/lesson/pagetypes/multichoice.php index 41ca4103d12..501b17b4dc9 100644 --- a/mod/lesson/pagetypes/multichoice.php +++ b/mod/lesson/pagetypes/multichoice.php @@ -488,6 +488,9 @@ class lesson_display_answer_form_multichoice_singleanswer extends moodleform { $attempt->answerid = null; } + // Disable shortforms. + $mform->setDisableShortforms(); + $mform->addElement('header', 'pageheader'); $mform->addElement('html', $OUTPUT->container($contents, 'contents')); @@ -541,6 +544,9 @@ class lesson_display_answer_form_multichoice_multianswer extends moodleform { $lessonid = $this->_customdata['lessonid']; $contents = $this->_customdata['contents']; + // Disable shortforms. + $mform->setDisableShortforms(); + $mform->addElement('header', 'pageheader'); $mform->addElement('html', $OUTPUT->container($contents, 'contents')); diff --git a/mod/lesson/pagetypes/numerical.php b/mod/lesson/pagetypes/numerical.php index 9e5414a0e0f..f8f98e07ce9 100644 --- a/mod/lesson/pagetypes/numerical.php +++ b/mod/lesson/pagetypes/numerical.php @@ -276,6 +276,9 @@ class lesson_display_answer_form_numerical extends moodleform { $mform = $this->_form; $contents = $this->_customdata['contents']; + // Disable shortforms. + $mform->setDisableShortforms(); + $mform->addElement('header', 'pageheader'); $mform->addElement('html', $OUTPUT->container($contents, 'contents')); diff --git a/mod/lesson/pagetypes/shortanswer.php b/mod/lesson/pagetypes/shortanswer.php index 798b1800441..1bcc96f58c9 100644 --- a/mod/lesson/pagetypes/shortanswer.php +++ b/mod/lesson/pagetypes/shortanswer.php @@ -369,6 +369,9 @@ class lesson_display_answer_form_shortanswer extends moodleform { $attrs['size'] = round(strlen($placeholder) * 1.1); } + // Disable shortforms. + $mform->setDisableShortforms(); + $mform->addElement('header', 'pageheader'); $mform->addElement('hidden', 'id'); $mform->setType('id', PARAM_INT); diff --git a/mod/lesson/pagetypes/truefalse.php b/mod/lesson/pagetypes/truefalse.php index 8c8056a48b3..ae8fbafebc8 100644 --- a/mod/lesson/pagetypes/truefalse.php +++ b/mod/lesson/pagetypes/truefalse.php @@ -382,6 +382,9 @@ class lesson_display_answer_form_truefalse extends moodleform { $attempt->answerid = null; } + // Disable shortforms. + $mform->setDisableShortforms(); + $mform->addElement('header', 'pageheader'); $mform->addElement('html', $OUTPUT->container($contents, 'contents'));