Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scripts/langindex.json
Original file line number Diff line number Diff line change
Expand Up @@ -1906,6 +1906,7 @@
"core.noresults": "moodle",
"core.noselection": "form",
"core.notapplicable": "local_moodlemobileapp",
"core.notavailable": "moodle",
"core.notenrolledprofile": "moodle",
"core.notice": "moodle",
"core.notingroup": "moodle",
Expand Down
1 change: 1 addition & 0 deletions src/assets/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1906,6 +1906,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.",
Expand Down
20 changes: 14 additions & 6 deletions src/core/course/components/format/core-course-format.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion src/core/emulator/providers/local-notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/core/emulator/providers/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions src/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,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",
Expand Down