Skip to content
Snippets Groups Projects

Student grading

Merged Martin Mareš requested to merge student-grading into master
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
+ 2
2
@@ -1472,10 +1472,10 @@ def send_notify_post(post):
@@ -1472,10 +1472,10 @@ def send_notify_post(post):
FROM owl_enroll e
FROM owl_enroll e
JOIN owl_users u ON u.uid = e.uid
JOIN owl_users u ON u.uid = e.uid
WHERE e.cid = %s
WHERE e.cid = %s
AND (%s < 0 OR e.uid = %s OR e.is_teacher = true)
AND (%s < 0 OR e.uid = %s OR e.is_teacher = true OR e.uid IN (SELECT uid FROM owl_student_graders WHERE tid=%s))
AND u.notify = true
AND u.notify = true
AND u.email IS NOT NULL
AND u.email IS NOT NULL
""", (topic.cid, post.target_uid, post.target_uid))
""", (topic.cid, post.target_uid, post.target_uid, topic.tid))
dests = db.fetchall()
dests = db.fetchall()
for dest in dests:
for dest in dests:
Loading