MOBILE-4362 workshop: Fix undefined Workshop Grades type
parent
f97ea19e9e
commit
6d50a22dd3
|
@ -291,13 +291,13 @@ export class AddonModWorkshopIndexComponent extends CoreCourseModuleMainActivity
|
||||||
|
|
||||||
await Promise.all(grades.map(async (grade) => {
|
await Promise.all(grades.map(async (grade) => {
|
||||||
const submission: AddonModWorkshopSubmissionDataWithOfflineData = {
|
const submission: AddonModWorkshopSubmissionDataWithOfflineData = {
|
||||||
id: grade.submissionid,
|
id: grade.submissionid || 0,
|
||||||
workshopid: workshop.id,
|
workshopid: workshop.id,
|
||||||
example: false,
|
example: false,
|
||||||
authorid: grade.userid,
|
authorid: grade.userid,
|
||||||
timecreated: grade.submissionmodified,
|
timecreated: grade.submissionmodified || 0,
|
||||||
timemodified: grade.submissionmodified,
|
timemodified: grade.submissionmodified || 0,
|
||||||
title: grade.submissiontitle,
|
title: grade.submissiontitle || '',
|
||||||
content: '',
|
content: '',
|
||||||
contenttrust: 0,
|
contenttrust: 0,
|
||||||
attachment: 0,
|
attachment: 0,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<core-user-avatar [user]="profile" [courseId]="courseId" [userId]="profile?.id" slot="start">
|
<core-user-avatar [user]="profile" [courseId]="courseId" [userId]="profile?.id" slot="start">
|
||||||
</core-user-avatar>
|
</core-user-avatar>
|
||||||
<ion-label>
|
<ion-label>
|
||||||
<h2>
|
<h2 *ngIf="submission.title">
|
||||||
<core-format-text [text]="submission.title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
|
<core-format-text [text]="submission.title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</h2>
|
</h2>
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
<core-user-avatar [user]="profile" slot="start" [courseId]="courseId" [userId]="profile?.id">
|
<core-user-avatar [user]="profile" slot="start" [courseId]="courseId" [userId]="profile?.id">
|
||||||
</core-user-avatar>
|
</core-user-avatar>
|
||||||
<ion-label>
|
<ion-label>
|
||||||
<h2>
|
<h2 *ngIf="submission.title">
|
||||||
<core-format-text [text]="submission.title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
|
<core-format-text [text]="submission.title" contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
|
@ -1766,9 +1766,9 @@ export type AddonModWorkshoGradesReportData = {
|
||||||
|
|
||||||
export type AddonModWorkshopGradesData = {
|
export type AddonModWorkshopGradesData = {
|
||||||
userid: number; // The id of the user being displayed in the report.
|
userid: number; // The id of the user being displayed in the report.
|
||||||
submissionid: number; // Submission id.
|
submissionid?: number; // Submission id.
|
||||||
submissiontitle: string; // Submission title.
|
submissiontitle?: string; // Submission title.
|
||||||
submissionmodified: number; // Timestamp submission was updated.
|
submissionmodified?: number; // Timestamp submission was updated.
|
||||||
submissiongrade?: number; // Aggregated grade for the submission.
|
submissiongrade?: number; // Aggregated grade for the submission.
|
||||||
gradinggrade?: number; // Computed grade for the assessment.
|
gradinggrade?: number; // Computed grade for the assessment.
|
||||||
submissiongradeover?: number; // Grade for the assessment overrided by the teacher.
|
submissiongradeover?: number; // Grade for the assessment overrided by the teacher.
|
||||||
|
|
Loading…
Reference in New Issue