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

Commit 861c197

Browse files
committed
dont count optional Qs
1 parent b1a3ce9 commit 861c197

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
@@ -177,6 +177,7 @@ def dummy():
177177
(db.questions.subchapter == subchapter)
178178
& (db.questions.chapter == chapter)
179179
& (db.questions.from_source == True) # noqa: E712
180+
& (db.questions.optional == False)
180181
& (db.questions.base_course == base_course)
181182
).select(db.questions.name)
182183
div_counts = {q.name: 0 for q in page_divids}
@@ -185,6 +186,7 @@ def dummy():
185186
& (db.questions.chapter == chapter)
186187
& (db.questions.base_course == base_course)
187188
& (db.questions.from_source == True) # noqa: E712
189+
& (db.questions.optional == False)
188190
& (db.questions.name == db.useinfo.div_id)
189191
& (db.useinfo.course_id == auth.user.course_name)
190192
& (db.useinfo.sid == auth.user.username)

0 commit comments

Comments
 (0)