Skip to content

Commit 06c63eb

Browse files
committed
MOBILE-3557 course: Show Not available message on section title visible
1 parent d332c7e commit 06c63eb

File tree

5 files changed

+7
-2
lines changed

5 files changed

+7
-2
lines changed

scripts/langindex.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1906,6 +1906,7 @@
19061906
"core.noresults": "moodle",
19071907
"core.noselection": "form",
19081908
"core.notapplicable": "local_moodlemobileapp",
1909+
"core.notavailable": "moodle",
19091910
"core.notenrolledprofile": "moodle",
19101911
"core.notice": "moodle",
19111912
"core.notingroup": "moodle",

src/assets/lang/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1906,6 +1906,7 @@
19061906
"core.noresults": "No results",
19071907
"core.noselection": "No selection",
19081908
"core.notapplicable": "n/a",
1909+
"core.notavailable": "Not available",
19091910
"core.notenrolledprofile": "This profile is not available because this user is not enrolled in this course.",
19101911
"core.notice": "Notice",
19111912
"core.notingroup": "Sorry, but you need to be part of a group to see this page.",

src/core/course/components/format/core-course-format.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,13 @@
7373
<ng-template #sectionTemplate let-section="section">
7474
<section ion-list *ngIf="!section.hiddenbynumsections && section.id != allSectionsId && section.id != stealthModulesSectionId">
7575
<!-- Title is only displayed when viewing all sections. -->
76-
<ion-item-divider text-wrap color="light" *ngIf="selectedSection.id == allSectionsId && section.name" [class.core-section-download]="downloadEnabled">
76+
<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">
7777
<core-format-text [text]="section.name" contextLevel="course" [contextInstanceId]="course.id"></core-format-text>
7878
<!-- Section download. -->
7979
<ng-container *ngTemplateOutlet="sectionDownloadTemplate; context: {section: section}"></ng-container>
80-
<p *ngIf="(section.visible === 0 && section.uservisible !== false) || section.availabilityinfo">
80+
<p *ngIf="section.visible === 0 || section.availabilityinfo">
8181
<ion-badge color="secondary" *ngIf="section.visible === 0 && section.uservisible !== false" text-wrap>{{ 'core.course.hiddenfromstudents' | translate }}</ion-badge>
82+
<ion-badge color="secondary" *ngIf="section.visible === 0 && section.uservisible === false" text-wrap>{{ 'core.notavailable' | translate }}</ion-badge>
8283
<ion-badge color="secondary" *ngIf="section.availabilityinfo" text-wrap><core-format-text [text]=" section.availabilityinfo" contextLevel="course" [contextInstanceId]="courseId"></core-format-text></ion-badge>
8384
</p>
8485
</ion-item-divider>

src/core/course/pages/section-selector/section-selector.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<h2><core-format-text [text]="section.formattedName || section.name" contextLevel="course" [contextInstanceId]="courseId"></core-format-text></h2>
1717
<core-progress-bar *ngIf="section.progress >= 0" [progress]="section.progress"></core-progress-bar>
1818
<ion-badge color="secondary" *ngIf="section.visible === 0 && section.uservisible !== false" text-wrap>{{ 'core.course.hiddenfromstudents' | translate }}</ion-badge>
19+
<ion-badge color="secondary" *ngIf="section.visible === 0 && section.uservisible === false" text-wrap>{{ 'core.notavailable' | translate }}</ion-badge>
1920
<ion-badge color="secondary" *ngIf="section.availabilityinfo" text-wrap><core-format-text [text]=" section.availabilityinfo" contextLevel="course" [contextInstanceId]="courseId"></core-format-text></ion-badge>
2021
</a>
2122
</ng-container>

src/lang/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@
189189
"noresults": "No results",
190190
"noselection": "No selection",
191191
"notapplicable": "n/a",
192+
"notavailable": "Not available",
192193
"notenrolledprofile": "This profile is not available because this user is not enrolled in this course.",
193194
"notice": "Notice",
194195
"nooptionavailable": "No option available",

0 commit comments

Comments
 (0)