From 7e258d6b1e64d97f92fd6aed15ffe648ed5a46d7 Mon Sep 17 00:00:00 2001
From: Benoit Rospars <benoit.rospars@inria.fr>
Date: Thu, 28 Nov 2024 09:31:13 +0100
Subject: [PATCH] Make feedback/explanation optional

---
 src/v1/question.ts | 6 +++---
 src/v2/question.ts | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/v1/question.ts b/src/v1/question.ts
index 919c9e4..d6e6a9a 100644
--- a/src/v1/question.ts
+++ b/src/v1/question.ts
@@ -3,7 +3,7 @@ import {html} from './types';
 export interface Question {
     type: string;
     score: number;
-    statement: string;
+    statement: html;
     label: string;
     responses: Array<Response>;
     correctResponse: string|Array<string>|Array<{label: string, values: string[]}>;
@@ -12,12 +12,12 @@ export interface Question {
      * The explanation of the correction of the question
      * @deprecated use feedback property
      */
-    explanation: html;
+    explanation?: html;
 
     /**
      * The global feedback of the question
      */
-    feedback: html;
+    feedback?: html;
 }
 
 export interface DragAndDropquestion extends Question{
diff --git a/src/v2/question.ts b/src/v2/question.ts
index 8363685..1057bae 100644
--- a/src/v2/question.ts
+++ b/src/v2/question.ts
@@ -18,7 +18,7 @@ export interface Question {
     /**
      * The statement of the question
      */
-    statement: string;
+    statement: html;
 
     /**
      * The label of the question
@@ -39,12 +39,12 @@ export interface Question {
      * The explanation of the correction of the question
      * @deprecated use feedback property
      */
-    explanation: html;
+    explanation?: html;
 
     /**
      * The global feedback of the question
      */
-    feedback: html;
+    feedback?: html;
 }
 
 /**
-- 
GitLab