MOBILE-3833 workshop: Fix required 'profile' param not found
parent
0e74f73549
commit
9975cedf9e
|
@ -53,7 +53,7 @@ export class AddonModWorkshopAssessmentPage implements OnInit, OnDestroy, CanLea
|
||||||
|
|
||||||
assessment!: AddonModWorkshopSubmissionAssessmentWithFormData;
|
assessment!: AddonModWorkshopSubmissionAssessmentWithFormData;
|
||||||
submission!: AddonModWorkshopSubmissionData;
|
submission!: AddonModWorkshopSubmissionData;
|
||||||
profile!: CoreUserProfile;
|
profile?: CoreUserProfile;
|
||||||
courseId!: number;
|
courseId!: number;
|
||||||
access?: AddonModWorkshopGetWorkshopAccessInformationWSResponse;
|
access?: AddonModWorkshopGetWorkshopAccessInformationWSResponse;
|
||||||
assessmentId!: number;
|
assessmentId!: number;
|
||||||
|
@ -120,7 +120,7 @@ export class AddonModWorkshopAssessmentPage implements OnInit, OnDestroy, CanLea
|
||||||
try {
|
try {
|
||||||
this.assessment = CoreNavigator.getRequiredRouteParam<AddonModWorkshopSubmissionAssessmentWithFormData>('assessment');
|
this.assessment = CoreNavigator.getRequiredRouteParam<AddonModWorkshopSubmissionAssessmentWithFormData>('assessment');
|
||||||
this.submission = CoreNavigator.getRequiredRouteParam<AddonModWorkshopSubmissionData>('submission');
|
this.submission = CoreNavigator.getRequiredRouteParam<AddonModWorkshopSubmissionData>('submission');
|
||||||
this.profile = CoreNavigator.getRequiredRouteParam<CoreUserProfile>('profile');
|
this.profile = CoreNavigator.getRouteParam<CoreUserProfile>('profile');
|
||||||
this.courseId = CoreNavigator.getRequiredRouteNumberParam('courseId');
|
this.courseId = CoreNavigator.getRequiredRouteNumberParam('courseId');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
CoreDomUtils.showErrorModal(error);
|
CoreDomUtils.showErrorModal(error);
|
||||||
|
@ -195,7 +195,7 @@ export class AddonModWorkshopAssessmentPage implements OnInit, OnDestroy, CanLea
|
||||||
|
|
||||||
// Get all info of the assessment.
|
// Get all info of the assessment.
|
||||||
const assessment = await AddonModWorkshopHelper.getReviewerAssessmentById(this.workshopId, this.assessmentId, {
|
const assessment = await AddonModWorkshopHelper.getReviewerAssessmentById(this.workshopId, this.assessmentId, {
|
||||||
userId: this.profile && this.profile.id,
|
userId: this.profile?.id,
|
||||||
cmId: this.workshop.coursemodule,
|
cmId: this.workshop.coursemodule,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue