mirror of
https://github.com/moodle/moodle.git
synced 2025-03-13 20:26:32 +01:00
Error message for when a questiontype is missing is prepended to question text.
This commit is contained in:
parent
f57c624262
commit
2b44d03f81
@ -517,6 +517,7 @@ function get_question_options(&$questions) {
|
||||
foreach ($keys as $i) {
|
||||
if (!array_key_exists($questions[$i]->qtype, $QTYPES)) {
|
||||
$questions[$i]->qtype = 'missingtype';
|
||||
$questions[$i]->questiontext = get_string('warningmissingtype').$questions[$i]->questiontext;
|
||||
}
|
||||
|
||||
// set name prefix
|
||||
@ -529,6 +530,7 @@ function get_question_options(&$questions) {
|
||||
} else { // deal with single question
|
||||
if (!array_key_exists($questions->qtype, $QTYPES)) {
|
||||
$questions->qtype = 'missingtype';
|
||||
$questions[$i]->questiontext = get_string('warningmissingtype').$questions[$i]->questiontext;
|
||||
}
|
||||
$questions->name_prefix = question_make_name_prefix($questions->id);
|
||||
return $QTYPES[$questions->qtype]->get_question_options($questions);
|
||||
|
Loading…
x
Reference in New Issue
Block a user