exam_id@p>
]]>
exam_id@p>
]]>
exam_id@p>
]]>
exam@p>
<@p p="and %s">exam_id@p>
]]>
exam_id_@p>
<@p p=" , %s">exam@p>
where <@p>exam_id@p>
]]>
temporary_id@p> as exam_id,'3' as limitation
from et_exam_usertest
where <@p>exam_id@p>
group by user_id
having sum(user_score) < <@p p=" ? ">passpoints@p>
union all
select md5(uuid()) as id,b.username as user,b.usercode as user_id,'临时试卷' as exam,<@p p=" ? ">temporary_id@p> as exam_id,'3' as limitation
from et_train_baseuser b
where b.usercode not in (select user_id from et_exam_usertest where <@p>exam_id@p> group by user_id)
]]>
temporary_id@p> as exam_id,'3' as limitation
from et_exam_usertest
where <@p>exam_id@p>
group by user_id
having sum(user_score) < <@p p=" ? ">passpoints@p>
union all
select md5(uuid()) as id,user,user_id,'临时试卷' as exam,<@p p=" ? ">temporary_id@p> as exam_id,'3' as limitation
from (
select e.id as exam_id,b.username as user,b.usercode as user_id from et_exam_exampaper_and_editexampaper e,et_train_baseuser b
where e.limitation = '1'
) c
inner join et_exam_exampaper_and_editexampaper e
on c.exam_id = e.id
where (select count(1) as num from et_exam_usertest u where u.exam_id = c.exam_id and u.user_id = c.user_id) = 0
and e.state = '已关闭' and e.pg = '1' and <@p p=" e.id = ? ">exam_id@p>
]]>
temporary_id@p> as exam_id,'3' as limitation
from et_exam_usertest
where <@p>exam_id@p>
group by user_id
having sum(user_score) < <@p p=" ? ">passpoints@p>
union all
select md5(uuid()) as id,user,user_id,'临时试卷' as exam,<@p p=" ? ">temporary_id@p> as exam_id,'3' as limitation
from (
select l.exam_id as exam_id,b.username as user,b.usercode as user_id from et_exam_limitation l,et_train_baseuser b
where l.limitation = '2' and l.user_id = b.orgcode and <@p>exam_id@p>
) c
inner join et_exam_exampaper_and_editexampaper e
on c.exam_id = e.id
where c.user_id not in (select user_id from et_exam_usertest where <@p>exam_id@p> group by user_id)
and e.state = '已关闭' and e.pg = '1' and <@p p=" e.id = ? ">exam_id@p>
]]>
temporary_id@p> as exam_id,'3' as limitation
from et_exam_usertest
where <@p>exam_id@p>
group by user_id
having sum(user_score) < <@p p=" ? ">passpoints@p>
union all
select md5(uuid()) as id,user,user_id,'临时试卷' as exam,<@p p=" ? ">temporary_id@p> as exam_id,'3' as limitation
from et_exam_limitation c
inner join et_exam_exampaper_and_editexampaper e
on c.exam_id = e.id
where c.user_id not in (select user_id from et_exam_usertest where <@p>exam_id@p> group by user_id)
and e.state = '已关闭' and e.pg = '1' and <@p p=" e.id = ? ">exam_id@p>
]]>
temporary_id@p> as exam_id,'3' as limitation
from et_exam_usertest
where <@p>exam_id@p>
group by user_id
having sum(user_score) < <@p p=" ? ">passpoints@p>
union all
select md5(uuid()) as id,username as user,usercode as user_id,'临时试卷' as exam,<@p p=" ? ">temporary_id@p> as exam_id,'3' as limitation
from v_class_user v
where v.usercode not in (select user_id from et_exam_usertest where <@p>exam_id@p> group by user_id)
and classid in (select user_id from et_exam_limitation where <@p>exam_id@p>)
]]>
temporary_id@p> as exam_id,'3' as limitation
from et_exam_usertest
where <@p>exam_id@p>
group by user_id
having sum(user_score) < <@p p=" ? ">passpoints@p>
union all
select md5(uuid()) as id,username as user,usercode as user_id,'临时试卷' as exam,<@p p=" ? ">temporary_id@p> as exam_id,'3' as limitation
from v_class_user v
where v.usercode not in (select user_id from et_exam_usertest where <@p>exam_id@p> group by user_id)
and courseid in (select user_id from et_exam_limitation where <@p>exam_id@p>)
]]>
edit_id@p> and <@p p=" a.id = ? ">id@p>
]]>
temporary_id@p> as exam_id,'3' as limitation
from et_exam_usertest
where <@p>exam_id@p>
group by user_id
having sum(user_score) < <@p p=" ? ">passpoints@p>
union all
select md5(uuid()) as id,class_person,class_person_id,'临时试卷' as exam,<@p p=" ? ">temporary_id@p> as exam_id,'3' as limitation
from et_exam_limitation_class c
inner join et_exam_exampaper_and_editexampaper a
on c.exam_id = a.id
where c.class_person_id not in (select user_id from et_exam_usertest where <@p>exam_id@p> group by user_id)
and a.state = '已关闭' and a.pg = '1' and <@p p=" a.id = ? ">exam_id@p>
]]>
temporary_id@p> as exam_id,'3' as limitation
from et_exam_usertest
where <@p>exam_id@p>
group by user_id
having sum(user_score) < <@p p=" ? ">passpoints@p>
union all
select md5(uuid()) as id,course_person,course_person_id,'临时试卷' as exam,<@p p=" ? ">temporary_id@p> as exam_id,'3' as limitation
from et_exam_limitation_course c
inner join et_exam_exampaper_and_editexampaper a
on c.exam_id = a.id
where c.course_person_id not in (select user_id from et_exam_usertest where <@p>exam_id@p> group by user_id)
and a.state = '已关闭' and a.pg = '1' and <@p p=" a.id = ? ">exam_id@p>
]]>