Skip to content
This repository was archived by the owner on Jun 30, 2024. It is now read-only.

Commit 031a8dc

Browse files
committed
make sure it's the right chapter as well as subchapter
1 parent dc0820d commit 031a8dc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

controllers/books.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,12 @@ def dummy():
121121
is_logged_in = 'true'
122122
# Get the necessary information to update subchapter progress on the page
123123
page_divids = db((db.questions.subchapter == subchapter) &
124+
(db.questions.chapter == chapter) &
124125
(db.questions.from_source == True) &
125126
(db.questions.base_course == base_course)).select(db.questions.name)
126127
div_counts = {q.name:0 for q in page_divids}
127128
sid_counts = db((db.questions.subchapter == subchapter) &
129+
(db.questions.chapter == chapter) &
128130
(db.questions.base_course == base_course) &
129131
(db.questions.from_source == True) &
130132
(db.questions.name == db.useinfo.div_id) &

0 commit comments

Comments
 (0)