Merge pull request #142 from sagidayan/API_Dev

fix mail to master of course
This commit is contained in:
Sagi Dayan 2015-08-02 17:58:21 +03:00
commit ffd6b6a32d

View file

@ -878,11 +878,12 @@ def sendTaskReminder():
course = Course.get_by_id(int(t.courseId)) course = Course.get_by_id(int(t.courseId))
if t.isPersonal: if t.isPersonal:
for uId in course.membersId: for uId in course.membersId:
tc = TaskComponent.all().filter("taskId = ", t.key().id()).filter("userId = ", int(uId)) if int(uId) != course.master_id:
if tc.count() == 0: tc = TaskComponent.all().filter("taskId = ", t.key().id()).filter("userId = ", int(uId))
user = User.get_by_id(int(uId)) if tc.count() == 0:
send_task_reminder(user.email, user.name, t.title, course.courseName) user = User.get_by_id(int(uId))
print "" send_task_reminder(user.email, user.name, t.title, course.courseName)
print ""
else: else:
projects = Project.all().filter("courseId = ", course.key().id()) projects = Project.all().filter("courseId = ", course.key().id())