MOBILE-3320 course: Fix section download status

main
Pau Ferrer Ocaña 2021-05-12 12:34:41 +02:00
parent ea2750073a
commit ef6342dfe5
4 changed files with 15 additions and 8 deletions

View File

@ -5,4 +5,6 @@
align-items: center;
justify-content: space-around;
align-content: center;
min-height: var(--a11y-min-target-size);
min-width: var(--a11y-min-target-size);
}

View File

@ -17,7 +17,7 @@
<core-dynamic-component [component]="sectionSelectorComponent" [data]="data">
<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">
<core-combobox [modalOptions]="sectionSelectorModalOptions" interface="modal" listboxId="core-course-section-button"
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>
</h2>
<!-- Section download. -->
<ng-container *ngTemplateOutlet="sectionDownloadTemplate; context: {section: section}"></ng-container>
<p *ngIf="section.visible === 0 || section.availabilityinfo">
<ion-badge color="info" *ngIf="section.visible === 0 && section.uservisible !== false" class="ion-text-wrap">
{{ 'core.course.hiddenfromstudents' | translate }}
@ -137,6 +135,8 @@
</ion-badge>
</p>
</ion-label>
<!-- Section download. -->
<ng-container *ngTemplateOutlet="sectionDownloadTemplate; context: {section: section}"></ng-container>
</ion-item-divider>
<ion-item class="ion-text-wrap" *ngIf="section.summary">
@ -155,7 +155,7 @@
<!-- Template to render a section download button/progress. -->
<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. -->
<ion-badge class="core-course-download-section-progress"
*ngIf="section.isDownloading && section.total > 0 && section.count < section.total">

View File

@ -45,6 +45,13 @@
}
}
.core-button-selector-row {
display: flex;
core-combobox {
flex-grow: 1;
}
}
// @todo
// .item-divider {
// .label {
@ -70,8 +77,6 @@
// @include padding(null, 0, null, null);
// }
// .core-button-selector-row {
// @include safe-area-padding-start($content-padding !important, $content-padding);
// }
//
}

View File

@ -724,7 +724,7 @@ export class CoreCourseModulePrefetchDelegateService extends CoreDelegate<CoreCo
await Promise.all(modules.map(async (module) => {
const handler = this.getPrefetchHandlerFor(module);
if (!handler || onlyToDisplay || handler.skipListStatus) {
if (!handler || (onlyToDisplay && handler.skipListStatus)) {
return;
}