|
51 | 51 | </ion-card> |
52 | 52 |
|
53 | 53 | <core-loading [hideUntil]="!showSpinner"> |
54 | | - <ion-list *ngIf="lesson && (!preventMessages || !preventMessages.length)"> |
| 54 | + |
| 55 | + <ion-list *ngIf="(lesson && (!preventMessages || !preventMessages.length)) || retakeToReview"> |
55 | 56 | <ion-item text-wrap *ngIf="retakeToReview"> |
56 | 57 | <!-- A retake was finished in a synchronization, allow reviewing it. --> |
57 | | - <p>{{ 'addon.mod_lesson.retakefinishedinsync' | translate }}</p> |
| 58 | + <p padding-bottom>{{ 'addon.mod_lesson.retakefinishedinsync' | translate }}</p> |
58 | 59 | <a ion-button block (click)="review()">{{ 'addon.mod_lesson.review' | translate }}</a> |
59 | 60 | </ion-item> |
60 | 61 |
|
61 | | - <ion-item text-wrap *ngIf="leftDuringTimed && !lesson.timelimit && !finishedOffline"> |
62 | | - <!-- User left during the session and there is no time limit, ask to continue. --> |
63 | | - <p [innerHTML]="'addon.mod_lesson.youhaveseen' | translate"></p> |
64 | | - <ion-grid> |
65 | | - <ion-row> |
66 | | - <ion-col> |
67 | | - <a ion-button block color="light" (click)="start(false)">{{ 'core.no' | translate }}</a> |
68 | | - </ion-col> |
69 | | - <ion-col> |
70 | | - <a ion-button block (click)="start(true)">{{ 'core.yes' | translate }}</a> |
71 | | - </ion-col> |
72 | | - </ion-row> |
73 | | - </ion-grid> |
74 | | - </ion-item> |
| 62 | + <ng-container *ngIf="lesson && (!preventMessages || !preventMessages.length)"> |
| 63 | + <ion-item text-wrap *ngIf="leftDuringTimed && !lesson.timelimit && !finishedOffline"> |
| 64 | + <!-- User left during the session and there is no time limit, ask to continue. --> |
| 65 | + <p [innerHTML]="'addon.mod_lesson.youhaveseen' | translate"></p> |
| 66 | + <ion-grid> |
| 67 | + <ion-row> |
| 68 | + <ion-col> |
| 69 | + <a ion-button block color="light" (click)="start(false)">{{ 'core.no' | translate }}</a> |
| 70 | + </ion-col> |
| 71 | + <ion-col> |
| 72 | + <a ion-button block (click)="start(true)">{{ 'core.yes' | translate }}</a> |
| 73 | + </ion-col> |
| 74 | + </ion-row> |
| 75 | + </ion-grid> |
| 76 | + </ion-item> |
75 | 77 |
|
76 | | - <ion-item text-wrap *ngIf="leftDuringTimed && lesson.timelimit && lesson.retake && !finishedOffline"> |
77 | | - <!-- User left during the session with time limit and retakes allowed, ask to continue. --> |
78 | | - <p [innerHTML]="'addon.mod_lesson.leftduringtimed' | translate"></p> |
79 | | - <a ion-button block icon-end (click)="start(false)"> |
80 | | - {{ 'addon.mod_lesson.continue' | translate }} |
81 | | - <ion-icon name="arrow-forward" md="ios-arrow-forward"></ion-icon> |
82 | | - </a> |
83 | | - </ion-item> |
| 78 | + <ion-item text-wrap *ngIf="leftDuringTimed && lesson.timelimit && lesson.retake && !finishedOffline"> |
| 79 | + <!-- User left during the session with time limit and retakes allowed, ask to continue. --> |
| 80 | + <p [innerHTML]="'addon.mod_lesson.leftduringtimed' | translate"></p> |
| 81 | + <a ion-button block icon-end (click)="start(false)"> |
| 82 | + {{ 'addon.mod_lesson.continue' | translate }} |
| 83 | + <ion-icon name="arrow-forward" md="ios-arrow-forward"></ion-icon> |
| 84 | + </a> |
| 85 | + </ion-item> |
84 | 86 |
|
85 | | - <ion-item text-wrap *ngIf="leftDuringTimed && lesson.timelimit && !lesson.retake"> |
86 | | - <!-- User left during the session with time limit and retakes not allowed. This should be handled by preventMessages --> |
87 | | - <p [innerHTML]="'addon.mod_lesson.leftduringtimednoretake' | translate"></p> |
88 | | - </ion-item> |
| 87 | + <ion-item text-wrap *ngIf="leftDuringTimed && lesson.timelimit && !lesson.retake"> |
| 88 | + <!-- User left during the session with time limit and retakes not allowed. This should be handled by preventMessages --> |
| 89 | + <p [innerHTML]="'addon.mod_lesson.leftduringtimednoretake' | translate"></p> |
| 90 | + </ion-item> |
89 | 91 |
|
90 | | - <ion-item text-wrap *ngIf="!leftDuringTimed && !finishedOffline"> |
91 | | - <!-- User hasn't left during the session, show a start button. --> |
92 | | - <a ion-button block *ngIf="!canManage" icon-end (click)="start(false)"> |
93 | | - {{ 'core.start' | translate }} |
94 | | - <ion-icon name="arrow-forward" md="ios-arrow-forward"></ion-icon> |
95 | | - </a> |
96 | | - <a ion-button block *ngIf="canManage" icon-end (click)="start(false)"> |
97 | | - {{ 'addon.mod_lesson.preview' | translate }} |
98 | | - <ion-icon name="search"></ion-icon> |
99 | | - </a> |
100 | | - </ion-item> |
| 92 | + <ion-item text-wrap *ngIf="!leftDuringTimed && !finishedOffline"> |
| 93 | + <!-- User hasn't left during the session, show a start button. --> |
| 94 | + <a ion-button block *ngIf="!canManage" icon-end (click)="start(false)"> |
| 95 | + {{ 'core.start' | translate }} |
| 96 | + <ion-icon name="arrow-forward" md="ios-arrow-forward"></ion-icon> |
| 97 | + </a> |
| 98 | + <a ion-button block *ngIf="canManage" icon-end (click)="start(false)"> |
| 99 | + {{ 'addon.mod_lesson.preview' | translate }} |
| 100 | + <ion-icon name="search"></ion-icon> |
| 101 | + </a> |
| 102 | + </ion-item> |
101 | 103 |
|
102 | | - <ion-item text-wrap *ngIf="finishedOffline"> |
103 | | - <!-- There's an attempt finished in offline. Let the user continue, showing the end of lesson. --> |
104 | | - <a ion-button block icon-end (click)="start(true)"> |
105 | | - {{ 'addon.mod_lesson.continue' | translate }} |
106 | | - <ion-icon name="arrow-forward" md="ios-arrow-forward"></ion-icon> |
107 | | - </a> |
108 | | - </ion-item> |
| 104 | + <ion-item text-wrap *ngIf="finishedOffline"> |
| 105 | + <!-- There's an attempt finished in offline. Let the user continue, showing the end of lesson. --> |
| 106 | + <a ion-button block icon-end (click)="start(true)"> |
| 107 | + {{ 'addon.mod_lesson.continue' | translate }} |
| 108 | + <ion-icon name="arrow-forward" md="ios-arrow-forward"></ion-icon> |
| 109 | + </a> |
| 110 | + </ion-item> |
| 111 | + </ng-container> |
109 | 112 | </ion-list> |
110 | 113 | </core-loading> |
111 | 114 | </ng-template> |
|
0 commit comments