Merge pull request #1864 from dpalou/MOBILE-2955

MOBILE-2955 quiz: Update page when download finishes
main
Juan Leyva 2019-04-30 20:38:00 +02:00 committed by GitHub
commit 02dfa87c7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -511,6 +511,12 @@ export class AddonModQuizIndexComponent extends CoreCourseModuleMainActivityComp
*/
protected showStatus(status: string, previousStatus?: string): void {
this.showStatusSpinner = status == CoreConstants.DOWNLOADING;
if (status == CoreConstants.DOWNLOADED && previousStatus == CoreConstants.DOWNLOADING) {
// Quiz downloaded now, maybe a new attempt was created. Load content again.
this.loaded = false;
this.loadContent();
}
}
/**