MOBILE-2559 course: Let teachers view stealth sections
parent
edaee776f0
commit
6379f4e9ac
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue