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

Commit e19d1a7

Browse files
committed
show all questions in an assignment eve if ungraded
1 parent 3acc0c1 commit e19d1a7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

controllers/dashboard.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,10 @@ def questiongrades():
343343

344344
query = ("""select questions.name, score, points
345345
from questions join assignment_questions on (questions.id = assignment_questions.question_id)
346-
join question_grades on (questions.name = question_grades.div_id)
347-
where assignment_id = %s and sid = %s and question_grades.course_name = %s;""")
348-
rows = db.executesql(query, [assignment['id'], sid, course.course_name])
346+
left outer join question_grades on (questions.name = question_grades.div_id
347+
and sid = %s and question_grades.course_name = %s)
348+
where assignment_id = %s ;""")
349+
rows = db.executesql(query, [sid, course.course_name, assignment['id']])
349350
if not student or not rows:
350351
session.flash = "Student {} not found for course {}".format(sid, course.course_name)
351352
return redirect(URL('dashboard','grades'))

0 commit comments

Comments
 (0)