| 14 | |
| 15 | === Submit for those students === |
| 16 | {{{ |
| 17 | #!sql |
| 18 | INSERT INTO evaluation_submissions |
| 19 | SELECT NULL,EVENTID, group_events.id, user_id,1,NOW(),'A',1,NOW(),NULL,NOW() |
| 20 | FROM groups |
| 21 | LEFT JOIN groups_members ON groups.id = groups_members.group_id |
| 22 | LEFT JOIN group_events ON group_events.group_id = groups.id |
| 23 | WHERE course_id = COURSEID AND user_id IN |
| 24 | SELECT id FROM users |
| 25 | WHERE id IN |
| 26 | (SELECT distinct(evaluator) FROM evaluation_mixevals WHERE event_id = EVENTID AND evaluator NOT IN |
| 27 | (SELECT distinct(submitter_id) FROM evaluation_submissions WHERE event_id = EVENTID) |
| 28 | );; |
| 29 | }}} |