Skip to content

Commit 2986d54

Browse files
Merge pull request #132 from Code-Institute-Org/fix_position_alert_for_duplicate_modules
Attempting to fix bug where students has activity from multiple dupli…
2 parents 4a5f209 + 4d94490 commit 2986d54

File tree

1 file changed

+4
-0
lines changed
  • common/lib/xmodule/xmodule/js/src/sequence

1 file changed

+4
-0
lines changed

common/lib/xmodule/xmodule/js/src/sequence/display.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,10 @@
302302
newPosition = $(event.currentTarget).data('element');
303303
}
304304

305+
// attempting to fix error where a student has activity from multiple duplicate courses (same xblockid)
306+
if (newPosition < 1) { newPosition = 1; }
307+
if (newPosition > this.num_contents) { newPosition = this.num_contents; }
308+
305309
if ((newPosition >= 1) && (newPosition <= this.num_contents)) {
306310
isBottomNav = $(event.target).closest('nav[class="sequence-bottom"]').length > 0;
307311

0 commit comments

Comments
 (0)