Changes between Version 3 and Version 4 of AdminTips


Ignore:
Timestamp:
2012-01-06T21:28:30Z (13 years ago)
Author:
Pan Luo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AdminTips

    v3 v4  
    66{{{
    77#!sql
     8SET @EVENTID=EVENT_ID;
    89SELECT * FROM users
    910WHERE id IN
    10     (SELECT distinct(evaluator) FROM evaluation_mixevals WHERE event_id = EVENTID AND evaluator NOT IN
    11         (SELECT distinct(submitter_id) FROM evaluation_submissions WHERE event_id = EVENTID)
     11    (SELECT distinct(evaluator) FROM evaluation_mixevals WHERE event_id = @EVENTID AND evaluator NOT IN
     12        (SELECT distinct(submitter_id) FROM evaluation_submissions WHERE event_id = @EVENTID)
    1213    );
    1314}}}
    1415
    15 Replace EVENTID to event id.
     16Replace EVENT_ID to event id.
    1617
    1718=== Submit for those students ===
    1819{{{
    1920#!sql
     21SET @EVENTID=EVENT_ID, @COURSEID=COURSE_ID;
    2022INSERT INTO evaluation_submissions
    21     SELECT NULL,EVENTID, group_events.id, user_id,1,NOW(),'A',1,NOW(),NULL,NOW()
     23    SELECT NULL,@EVENTID, group_events.id, user_id,1,NOW(),'A',1,NOW(),NULL,NOW()
    2224    FROM groups
    2325    LEFT JOIN groups_members ON groups.id = groups_members.group_id
     
    2628          SELECT id FROM users
    2729          WHERE id IN
    28           (SELECT distinct(evaluator) FROM evaluation_mixevals WHERE event_id = EVENTID AND evaluator NOT IN
    29               (SELECT distinct(submitter_id) FROM evaluation_submissions WHERE event_id = EVENTID)
     30          (SELECT distinct(evaluator) FROM evaluation_mixevals WHERE event_id = @EVENTID AND evaluator NOT IN
     31              (SELECT distinct(submitter_id) FROM evaluation_submissions WHERE event_id = @EVENTID)
    3032          );;
    3133}}}
    3234
    33 Replace EVENTID to event id and COURSEID to course id.
     35Replace EVENT_ID to event id and COURSE_ID to course id.