MOBILE-3407 quiz: Fix drops in ddimageortext in Moodle 3.6
parent
2d9e24652b
commit
1b1ff7347d
|
@ -275,10 +275,11 @@ export class CoreQuestionHelperProvider {
|
||||||
question.initObjects = this.textUtils.parseJSON(initMatch, null);
|
question.initObjects = this.textUtils.parseJSON(initMatch, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
const amdRegExp = new RegExp('require\\(\\[["\']qtype_' + question.type + '/question["\']\\], ?' +
|
const amdRegExp = new RegExp('require\\(\\[["\']qtype_' + question.type + '/question["\']\\],[^f]*' +
|
||||||
'function\\(amd\\) ?\\{ ?amd\\.init\\((["\'](q|question-' + usageId + '-)' + question.slot +
|
'function\\(amd\\)[^\\{]*\\{[^a]*amd\\.init\\((["\'](q|question-' + usageId + '-)' + question.slot +
|
||||||
'["\'].*?)\\);', 'm');
|
'["\'].*)\\);', 'm');
|
||||||
const amdMatch = match.match(amdRegExp);
|
const amdMatch = match.match(amdRegExp);
|
||||||
|
|
||||||
if (amdMatch) {
|
if (amdMatch) {
|
||||||
// Try to convert the arguments to an array and add them to the question.
|
// Try to convert the arguments to an array and add them to the question.
|
||||||
question.amdArgs = this.textUtils.parseJSON('[' + amdMatch[1] + ']', null);
|
question.amdArgs = this.textUtils.parseJSON('[' + amdMatch[1] + ']', null);
|
||||||
|
|
Loading…
Reference in New Issue