From 21913c43e1c5dc93bbec41e15b60cc7b19ebf9e2 Mon Sep 17 00:00:00 2001 From: Albert Gasset Date: Fri, 6 Jul 2018 15:13:51 +0200 Subject: [PATCH] MOBILE-2468 lesson: Fix error when submitting essay questions --- src/addon/mod/lesson/providers/helper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/addon/mod/lesson/providers/helper.ts b/src/addon/mod/lesson/providers/helper.ts index d22bbb157..2bd49988e 100644 --- a/src/addon/mod/lesson/providers/helper.ts +++ b/src/addon/mod/lesson/providers/helper.ts @@ -457,7 +457,7 @@ export class AddonModLessonHelperProvider { prepareQuestionData(question: any, data: any): any { if (question.template == 'essay' && question.textarea) { // Add some HTML to the answer if needed. - data[question.textarea.property] = this.textUtils.formatHtmlLines(data[question.textarea.property]); + data[question.textarea.name] = this.textUtils.formatHtmlLines(data[question.textarea.name]); } else if (question.template == 'multichoice' && question.multi) { // Only send the options with value set to true. for (const name in data) {