Merge pull request #2550 from crazyserver/MOBILE-3557

Mobile 3557
main
Juan Leyva 2020-09-28 12:48:21 +02:00 committed by GitHub
commit 0eccc7a1ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 20 additions and 8 deletions

View File

@ -1910,6 +1910,7 @@
"core.noresults": "moodle",
"core.noselection": "form",
"core.notapplicable": "local_moodlemobileapp",
"core.notavailable": "moodle",
"core.notenrolledprofile": "moodle",
"core.notice": "moodle",
"core.notingroup": "moodle",

View File

@ -1911,6 +1911,7 @@
"core.noresults": "No results",
"core.noselection": "No selection",
"core.notapplicable": "n/a",
"core.notavailable": "Not available",
"core.notenrolledprofile": "This profile is not available because this user is not enrolled in this course.",
"core.notice": "Notice",
"core.notingroup": "Sorry, but you need to be part of a group to see this page.",

View File

@ -24,13 +24,20 @@
<!-- Course summary. By default we only display the course progress. -->
<core-dynamic-component [component]="courseSummaryComponent" [data]="data">
<ion-list no-lines *ngIf="course.imageThumb || (selectedSection && selectedSection.id == allSectionsId && course.progress != null && course.progress >= 0)" class="core-format-progress-list">
<ion-list no-lines *ngIf="course.imageThumb || (selectedSection && (selectedSection.id == allSectionsId && course.progress != null && course.progress >= 0) || (selectedSection.id != allSectionsId && (selectedSection.availabilityinfo || selectedSection.visible === 0)))" class="core-format-progress-list">
<div *ngIf="course.imageThumb" class="core-course-thumb">
<img [src]="course.imageThumb" core-external-content alt=""/>
</div>
<ion-item class="core-course-progress" *ngIf="selectedSection && selectedSection.id == allSectionsId && course.progress != null && course.progress >= 0 && course.completionusertracked !== false">
<core-progress-bar [progress]="course.progress"></core-progress-bar>
</ion-item>
<ng-container *ngIf="selectedSection">
<ion-item class="core-course-progress" *ngIf="selectedSection.id == allSectionsId && course.progress != null && course.progress >= 0 && course.completionusertracked !== false">
<core-progress-bar [progress]="course.progress"></core-progress-bar>
</ion-item>
<ion-item *ngIf="selectedSection.id != allSectionsId && (selectedSection.availabilityinfo || selectedSection.visible === 0)" >
<ion-badge color="secondary" *ngIf="selectedSection.visible === 0 && selectedSection.uservisible !== false" text-wrap>{{ 'core.course.hiddenfromstudents' | translate }}</ion-badge>
<ion-badge color="secondary" *ngIf="selectedSection.visible === 0 && selectedSection.uservisible === false" text-wrap>{{ 'core.notavailable' | translate }}</ion-badge>
<ion-badge color="secondary" *ngIf="selectedSection.availabilityinfo" text-wrap><core-format-text [text]=" selectedSection.availabilityinfo" contextLevel="course" [contextInstanceId]="courseId"></core-format-text></ion-badge>
</ion-item>
</ng-container>
</ion-list>
</core-dynamic-component>
@ -73,12 +80,13 @@
<ng-template #sectionTemplate let-section="section">
<section ion-list *ngIf="!section.hiddenbynumsections && section.id != allSectionsId && section.id != stealthModulesSectionId">
<!-- Title is only displayed when viewing all sections. -->
<ion-item-divider text-wrap color="light" *ngIf="selectedSection.id == allSectionsId && section.name" [class.core-section-download]="downloadEnabled">
<ion-item-divider text-wrap color="light" *ngIf="selectedSection.id == allSectionsId && section.name" [class.core-section-download]="downloadEnabled" [class.item-dimmed]="section.visible === 0 || section.uservisible === false">
<core-format-text [text]="section.name" contextLevel="course" [contextInstanceId]="course.id"></core-format-text>
<!-- Section download. -->
<ng-container *ngTemplateOutlet="sectionDownloadTemplate; context: {section: section}"></ng-container>
<p *ngIf="(section.visible === 0 && section.uservisible !== false) || section.availabilityinfo">
<p *ngIf="section.visible === 0 || section.availabilityinfo">
<ion-badge color="secondary" *ngIf="section.visible === 0 && section.uservisible !== false" text-wrap>{{ 'core.course.hiddenfromstudents' | translate }}</ion-badge>
<ion-badge color="secondary" *ngIf="section.visible === 0 && section.uservisible === false" text-wrap>{{ 'core.notavailable' | translate }}</ion-badge>
<ion-badge color="secondary" *ngIf="section.availabilityinfo" text-wrap><core-format-text [text]=" section.availabilityinfo" contextLevel="course" [contextInstanceId]="courseId"></core-format-text></ion-badge>
</p>
</ion-item-divider>

View File

@ -16,6 +16,7 @@
<h2><core-format-text [text]="section.formattedName || section.name" contextLevel="course" [contextInstanceId]="courseId"></core-format-text></h2>
<core-progress-bar *ngIf="section.progress >= 0" [progress]="section.progress"></core-progress-bar>
<ion-badge color="secondary" *ngIf="section.visible === 0 && section.uservisible !== false" text-wrap>{{ 'core.course.hiddenfromstudents' | translate }}</ion-badge>
<ion-badge color="secondary" *ngIf="section.visible === 0 && section.uservisible === false" text-wrap>{{ 'core.notavailable' | translate }}</ion-badge>
<ion-badge color="secondary" *ngIf="section.availabilityinfo" text-wrap><core-format-text [text]=" section.availabilityinfo" contextLevel="course" [contextInstanceId]="courseId"></core-format-text></ion-badge>
</a>
</ng-container>

View File

@ -24,7 +24,7 @@ import * as moment from 'moment';
import { Subject, Observable } from 'rxjs';
/**
* Emulates the Cordova Globalization plugin in desktop apps and in browser.
* Emulates the Local Notifications plugin in desktop apps and in browser.
*/
@Injectable()
export class LocalNotificationsMock extends LocalNotifications {

View File

@ -17,7 +17,7 @@ import { Network } from '@ionic-native/network';
import { Observable, Subject } from 'rxjs';
/**
* Emulates the Cordova Globalization plugin in desktop apps and in browser.
* Emulates the Ionic Network plugin in desktop apps and in browser.
*/
@Injectable()
export class NetworkMock extends Network {

View File

@ -193,6 +193,7 @@
"noresults": "No results",
"noselection": "No selection",
"notapplicable": "n/a",
"notavailable": "Not available",
"notenrolledprofile": "This profile is not available because this user is not enrolled in this course.",
"notice": "Notice",
"nooptionavailable": "No option available",