Skip to content

Commit

Permalink
Merge pull request #302 from matematikk-mooc/KURSP-873-next-button
Browse files Browse the repository at this point in the history
KURSP-873: previous button showing in first page of module
  • Loading branch information
manilpit authored Sep 19, 2023
2 parents 3f94eb9 + 41fffee commit 803063f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/js/modules/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,7 @@ export default (function() {
if(moduleItemSequence && moduleItemSequence.items.length && moduleItemSequence.items[0].prev) {
var prevItem = moduleItemSequence.items[0].prev;
if(prevItem.indent) {
id = prevItem.id;
api.getModuleItemSequence(courseId, id, handlePrevModuleItem);
api.getModuleItemSequence(courseId, prevItem.id, handlePrevModuleItem);
} else {
var prevButton = $(".module-sequence-footer-button--previous");
var prevButtonLink = $(".module-sequence-footer-button--previous a");
Expand All @@ -297,8 +296,7 @@ export default (function() {
if(moduleItemSequence && moduleItemSequence.items.length && moduleItemSequence.items[0].next) {
var nextItem = moduleItemSequence.items[0].next;
if(nextItem.indent) {
var id = nextItem.id;
api.getModuleItemSequence(courseId, id, handleNextModuleItem);
api.getModuleItemSequence(courseId, nextItem.id, handleNextModuleItem);
} else {
var nextButton = $(".module-sequence-footer-button--next");
var nextButtonLink = $(".module-sequence-footer-button--next a");
Expand Down

0 comments on commit 803063f

Please sign in to comment.