MOBILE-3320 course: Fix section download status
parent
ea2750073a
commit
ef6342dfe5
|
@ -5,4 +5,6 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
align-content: center;
|
align-content: center;
|
||||||
|
min-height: var(--a11y-min-target-size);
|
||||||
|
min-width: var(--a11y-min-target-size);
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<core-dynamic-component [component]="sectionSelectorComponent" [data]="data">
|
<core-dynamic-component [component]="sectionSelectorComponent" [data]="data">
|
||||||
|
|
||||||
<div *ngIf="displaySectionSelector && sections && hasSeveralSections"
|
<div *ngIf="displaySectionSelector && sections && hasSeveralSections"
|
||||||
class="ion-text-wrap clearfix ion-justify-content-between core-button-selector-row"
|
class="ion-text-wrap ion-justify-content-between ion-align-items-center core-button-selector-row"
|
||||||
[class.core-section-download]="downloadEnabled">
|
[class.core-section-download]="downloadEnabled">
|
||||||
<core-combobox [modalOptions]="sectionSelectorModalOptions" interface="modal" listboxId="core-course-section-button"
|
<core-combobox [modalOptions]="sectionSelectorModalOptions" interface="modal" listboxId="core-course-section-button"
|
||||||
icon="fas-folder" [label]="'core.course.section' | translate" (onChange)="sectionChanged($event)">
|
icon="fas-folder" [label]="'core.course.section' | translate" (onChange)="sectionChanged($event)">
|
||||||
|
@ -122,8 +122,6 @@
|
||||||
<core-format-text [text]="section.name" contextLevel="course" [contextInstanceId]="course?.id">
|
<core-format-text [text]="section.name" contextLevel="course" [contextInstanceId]="course?.id">
|
||||||
</core-format-text>
|
</core-format-text>
|
||||||
</h2>
|
</h2>
|
||||||
<!-- Section download. -->
|
|
||||||
<ng-container *ngTemplateOutlet="sectionDownloadTemplate; context: {section: section}"></ng-container>
|
|
||||||
<p *ngIf="section.visible === 0 || section.availabilityinfo">
|
<p *ngIf="section.visible === 0 || section.availabilityinfo">
|
||||||
<ion-badge color="info" *ngIf="section.visible === 0 && section.uservisible !== false" class="ion-text-wrap">
|
<ion-badge color="info" *ngIf="section.visible === 0 && section.uservisible !== false" class="ion-text-wrap">
|
||||||
{{ 'core.course.hiddenfromstudents' | translate }}
|
{{ 'core.course.hiddenfromstudents' | translate }}
|
||||||
|
@ -137,6 +135,8 @@
|
||||||
</ion-badge>
|
</ion-badge>
|
||||||
</p>
|
</p>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
|
<!-- Section download. -->
|
||||||
|
<ng-container *ngTemplateOutlet="sectionDownloadTemplate; context: {section: section}"></ng-container>
|
||||||
</ion-item-divider>
|
</ion-item-divider>
|
||||||
|
|
||||||
<ion-item class="ion-text-wrap" *ngIf="section.summary">
|
<ion-item class="ion-text-wrap" *ngIf="section.summary">
|
||||||
|
@ -155,7 +155,7 @@
|
||||||
|
|
||||||
<!-- Template to render a section download button/progress. -->
|
<!-- Template to render a section download button/progress. -->
|
||||||
<ng-template #sectionDownloadTemplate let-section="section">
|
<ng-template #sectionDownloadTemplate let-section="section">
|
||||||
<div *ngIf="section && downloadEnabled" class="core-button-spinner ion-float-end">
|
<div *ngIf="section && downloadEnabled" slot="end">
|
||||||
<!-- Download progress. -->
|
<!-- Download progress. -->
|
||||||
<ion-badge class="core-course-download-section-progress"
|
<ion-badge class="core-course-download-section-progress"
|
||||||
*ngIf="section.isDownloading && section.total > 0 && section.count < section.total">
|
*ngIf="section.isDownloading && section.total > 0 && section.count < section.total">
|
||||||
|
|
|
@ -45,6 +45,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.core-button-selector-row {
|
||||||
|
display: flex;
|
||||||
|
core-combobox {
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// @todo
|
// @todo
|
||||||
// .item-divider {
|
// .item-divider {
|
||||||
// .label {
|
// .label {
|
||||||
|
@ -70,8 +77,6 @@
|
||||||
// @include padding(null, 0, null, null);
|
// @include padding(null, 0, null, null);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// .core-button-selector-row {
|
//
|
||||||
// @include safe-area-padding-start($content-padding !important, $content-padding);
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -724,7 +724,7 @@ export class CoreCourseModulePrefetchDelegateService extends CoreDelegate<CoreCo
|
||||||
|
|
||||||
await Promise.all(modules.map(async (module) => {
|
await Promise.all(modules.map(async (module) => {
|
||||||
const handler = this.getPrefetchHandlerFor(module);
|
const handler = this.getPrefetchHandlerFor(module);
|
||||||
if (!handler || onlyToDisplay || handler.skipListStatus) {
|
if (!handler || (onlyToDisplay && handler.skipListStatus)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue