MDL-57757 mod_lesson: Handle empty answers
This is and edge case created by a bug in the numeric question type.
This commit is contained in:
@@ -1860,8 +1860,10 @@ class mod_lesson_external extends external_api {
|
||||
'response' => new external_value(PARAM_RAW, 'The response text.'),
|
||||
'responseformat' => new external_format_value('response.'),
|
||||
'answers' => new external_multiple_structure(
|
||||
new external_multiple_structure(new external_value(PARAM_RAW, 'Possible answers and info.'))
|
||||
)
|
||||
new external_multiple_structure(new external_value(PARAM_RAW, 'Possible answers and info.')),
|
||||
'User answers',
|
||||
VALUE_OPTIONAL
|
||||
),
|
||||
), 'Answer data (empty in content pages created in Moodle 1.x).', VALUE_OPTIONAL
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user