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

Commit ac980d5

Browse files
authored
Merge pull request #1305 from presnick/query_fix
make sure it's the right chapter as well as subchapter
2 parents 11ff03d + 031a8dc commit ac980d5

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
@@ -124,10 +124,12 @@ def dummy():
124124
is_logged_in = 'true'
125125
# Get the necessary information to update subchapter progress on the page
126126
page_divids = db((db.questions.subchapter == subchapter) &
127+
(db.questions.chapter == chapter) &
127128
(db.questions.from_source == True) &
128129
(db.questions.base_course == base_course)).select(db.questions.name)
129130
div_counts = {q.name:0 for q in page_divids}
130131
sid_counts = db((db.questions.subchapter == subchapter) &
132+
(db.questions.chapter == chapter) &
131133
(db.questions.base_course == base_course) &
132134
(db.questions.from_source == True) &
133135
(db.questions.name == db.useinfo.div_id) &

0 commit comments

Comments
 (0)