MOBILE-2955 quiz: Update page when download finishes

main
Dani Palou 2019-04-18 10:12:37 +02:00
parent 265f4a40f4
commit c712703ece
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();
}
}
/**