Merge pull request #2290 from dpalou/MOBILE-3323

MOBILE-3323 quiz: Fix nativeElement error when submit quiz
main
Juan Leyva 2020-02-25 09:09:37 +01:00 committed by GitHub
commit 8351526585
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -154,7 +154,9 @@ export class AddonModQuizPlayerPage implements OnInit, OnDestroy {
await this.domUtils.showConfirm(this.translate.instant('addon.mod_quiz.confirmleavequizonerror')); await this.domUtils.showConfirm(this.translate.instant('addon.mod_quiz.confirmleavequizonerror'));
if (this.formElement) {
this.domUtils.triggerFormCancelledEvent(this.formElement.nativeElement, this.sitesProvider.getCurrentSiteId()); this.domUtils.triggerFormCancelledEvent(this.formElement.nativeElement, this.sitesProvider.getCurrentSiteId());
}
} finally { } finally {
modal.dismiss(); modal.dismiss();
} }
@ -589,8 +591,10 @@ export class AddonModQuizPlayerPage implements OnInit, OnDestroy {
this.autoSave.cancelAutoSave(); this.autoSave.cancelAutoSave();
this.autoSave.hideAutoSaveError(); this.autoSave.hideAutoSaveError();
if (this.formElement) {
this.domUtils.triggerFormSubmittedEvent(this.formElement.nativeElement, !this.offline, this.domUtils.triggerFormSubmittedEvent(this.formElement.nativeElement, !this.offline,
this.sitesProvider.getCurrentSiteId()); this.sitesProvider.getCurrentSiteId());
}
}); });
} }