MOBILE-2567 course: Don't show next/previous in all sections
parent
9838d2305d
commit
7126c44917
|
@ -250,6 +250,7 @@ export class CoreCourseFormatComponent implements OnInit, OnChanges, OnDestroy {
|
||||||
this.selectedSection = newSection;
|
this.selectedSection = newSection;
|
||||||
this.data.section = this.selectedSection;
|
this.data.section = this.selectedSection;
|
||||||
|
|
||||||
|
if (newSection.id != this.allSectionsId) {
|
||||||
// Select next and previous sections to show the arrows.
|
// Select next and previous sections to show the arrows.
|
||||||
const i = this.sections.findIndex((value, index) => {
|
const i = this.sections.findIndex((value, index) => {
|
||||||
return this.compareSections(value, this.selectedSection);
|
return this.compareSections(value, this.selectedSection);
|
||||||
|
@ -269,6 +270,10 @@ export class CoreCourseFormatComponent implements OnInit, OnChanges, OnDestroy {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.nextSection = j < this.sections.length ? this.sections[j] : null;
|
this.nextSection = j < this.sections.length ? this.sections[j] : null;
|
||||||
|
} else {
|
||||||
|
this.previousSection = null;
|
||||||
|
this.nextSection = null;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.moduleId && typeof previousValue == 'undefined') {
|
if (this.moduleId && typeof previousValue == 'undefined') {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
Loading…
Reference in New Issue