diff --git a/src/addons/mod/quiz/components/index/index.ts b/src/addons/mod/quiz/components/index/index.ts
index d31293695..623de1c11 100644
--- a/src/addons/mod/quiz/components/index/index.ts
+++ b/src/addons/mod/quiz/components/index/index.ts
@@ -647,7 +647,9 @@ export class AddonModQuizIndexComponent extends CoreCourseModuleMainActivityComp
if (data) {
this.gradebookData = {
- grade: 'graderaw' in data ? data.graderaw : Number(data.grade),
+ grade: 'graderaw' in data && data.graderaw !== undefined && data.graderaw !== null ?
+ data.graderaw :
+ (data.grade !== undefined && data.grade !== null ? Number(data.grade) : undefined),
feedback: data.feedback,
};
}
diff --git a/src/addons/qtype/ddimageortext/component/addon-qtype-ddimageortext.html b/src/addons/qtype/ddimageortext/component/addon-qtype-ddimageortext.html
index ff3cb646f..ff872fb90 100644
--- a/src/addons/qtype/ddimageortext/component/addon-qtype-ddimageortext.html
+++ b/src/addons/qtype/ddimageortext/component/addon-qtype-ddimageortext.html
@@ -17,11 +17,9 @@
-