MOBILE-2559 course: Let teachers view stealth sections

main
Dani Palou 2018-08-23 10:41:53 +02:00
parent edaee776f0
commit 6379f4e9ac
2 changed files with 3 additions and 3 deletions

View File

@ -257,14 +257,14 @@ export class CoreCourseFormatComponent implements OnInit, OnChanges, OnDestroy {
let j;
for (j = i - 1; j >= 1; j--) {
if (!(this.sections[j].visible === 0 || this.sections[j].uservisible === false) && this.sections[j].hasContent) {
if (this.sections[j].uservisible !== false && this.sections[j].hasContent) {
break;
}
}
this.previousSection = j >= 1 ? this.sections[j] : null;
for (j = i + 1; j < this.sections.length; j++) {
if (!(this.sections[j].visible === 0 || this.sections[j].uservisible === false) && this.sections[j].hasContent) {
if (this.sections[j].uservisible !== false && this.sections[j].hasContent) {
break;
}
}

View File

@ -47,7 +47,7 @@ export class CoreCourseSectionSelectorPage {
* @param {any} section Selected section object.
*/
selectSection(section: any): void {
if (!(section.visible === 0 || section.uservisible === false)) {
if (section.uservisible !== false) {
this.viewCtrl.dismiss(section);
}
}