MOBILE-4362 workshop: Fix undefined Workshop Grades type

main
Pau Ferrer Ocaña 2023-10-11 15:46:41 +02:00
parent f97ea19e9e
commit 6d50a22dd3
3 changed files with 9 additions and 9 deletions

View File

@ -291,13 +291,13 @@ export class AddonModWorkshopIndexComponent extends CoreCourseModuleMainActivity
await Promise.all(grades.map(async (grade) => {
const submission: AddonModWorkshopSubmissionDataWithOfflineData = {
id: grade.submissionid,
id: grade.submissionid || 0,
workshopid: workshop.id,
example: false,
authorid: grade.userid,
timecreated: grade.submissionmodified,
timemodified: grade.submissionmodified,
title: grade.submissiontitle,
timecreated: grade.submissionmodified || 0,
timemodified: grade.submissionmodified || 0,
title: grade.submissiontitle || '',
content: '',
contenttrust: 0,
attachment: 0,

View File

@ -4,7 +4,7 @@
<core-user-avatar [user]="profile" [courseId]="courseId" [userId]="profile?.id" slot="start">
</core-user-avatar>
<ion-label>
<h2>
<h2 *ngIf="submission.title">
<core-format-text [text]="submission.title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
</core-format-text>
</h2>
@ -68,7 +68,7 @@
<core-user-avatar [user]="profile" slot="start" [courseId]="courseId" [userId]="profile?.id">
</core-user-avatar>
<ion-label>
<h2>
<h2 *ngIf="submission.title">
<core-format-text [text]="submission.title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
</core-format-text>
</h2>

View File

@ -1766,9 +1766,9 @@ export type AddonModWorkshoGradesReportData = {
export type AddonModWorkshopGradesData = {
userid: number; // The id of the user being displayed in the report.
submissionid: number; // Submission id.
submissiontitle: string; // Submission title.
submissionmodified: number; // Timestamp submission was updated.
submissionid?: number; // Submission id.
submissiontitle?: string; // Submission title.
submissionmodified?: number; // Timestamp submission was updated.
submissiongrade?: number; // Aggregated grade for the submission.
gradinggrade?: number; // Computed grade for the assessment.
submissiongradeover?: number; // Grade for the assessment overrided by the teacher.