mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-55327 mod_lesson: better convert back to plain response_editor
This commit is contained in:
parent
dd193ba2ea
commit
0fba5b440d
@ -120,9 +120,10 @@ class lesson_page_type_matching extends lesson_page {
|
||||
|
||||
// Check for duplicate response format.
|
||||
$duplicateresponse = array();
|
||||
if (is_array($properties->response_editor[0])) {
|
||||
foreach ($properties->response_editor as $response) {
|
||||
$duplicateresponse[] = $response['text'];
|
||||
if (is_array($properties->response_editor) && // If there are response_editors to iterate.
|
||||
is_array(reset($properties->response_editor))) { // And they come split into text & format array.
|
||||
foreach ($properties->response_editor as $response) { // Iterate over all them.
|
||||
$duplicateresponse[] = $response['text']; // Picking the text only. This pagetype is that way.
|
||||
}
|
||||
$properties->response_editor = $duplicateresponse;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user