mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-36243 question->questiontext and question->generalfeedback should always be strings
This commit is contained in:
parent
4bd6f71bad
commit
7980a381cc
7 changed files with 32 additions and 91 deletions
|
@ -366,14 +366,6 @@ class qformat_default {
|
|||
$newpage->contents = $question->questiontext;
|
||||
$newpage->contentsformat = isset($question->questionformat) ? $question->questionformat : FORMAT_HTML;
|
||||
|
||||
// Sometimes, questiontext is not a simple text, but one array
|
||||
// containing both text and format, so we need to support here
|
||||
// that case with the following dirty patch. MDL-35147
|
||||
if (is_array($question->questiontext)) {
|
||||
$newpage->contents = isset($question->questiontext['text']) ? $question->questiontext['text'] : '';
|
||||
$newpage->contentsformat = isset($question->questiontext['format']) ? $question->questiontext['format'] : FORMAT_HTML;
|
||||
}
|
||||
|
||||
// set up page links
|
||||
if ($pageid) {
|
||||
// the new page follows on from this page
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue