Skip to content

Commit cbf3bdb

Browse files
committed
Fix issue with left-off reminders
BS5 upgrade caused left-off reminders to be shown on unrelated courses due to changed HTML
1 parent 48b8811 commit cbf3bdb

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

course/templates/course/course.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
$(function () {
2323
const lastVisitedObject = JSON.parse(localStorage.getItem("lastVisitedReminder"));
2424
if (lastVisitedObject) {
25-
const lastVisited = lastVisitedObject[$("li.menu-home > a").attr("href")];
25+
const lastVisited = lastVisitedObject[$("a.menu-home").attr("href")];
2626
if (lastVisited) {
2727
const alert = $('#left-off-reminder');
2828
alert.removeClass("d-none");

exercise/static/exercise/chapter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
const title = $("ol.breadcrumb > li").last().text();
9595

9696
// Get the instance url of this chapter
97-
const instanceUrl = $("li.menu-home > a").attr("href");
97+
const instanceUrl = $("a.menu-home").attr("href");
9898

9999
// Get the lastVisited object or an empty object
100100
const lastVisited = JSON.parse(localStorage.getItem("lastVisitedReminder")) || {};

0 commit comments

Comments
 (0)