|
|
|
@ -929,83 +929,10 @@ getQuestionTestSimpleInfo
|
|
|
|
|
AND t.general_question_setting_push_status = 1
|
|
|
|
|
AND t.general_question_setting_status = 1
|
|
|
|
|
AND t.general_question_setting_type = #generalQuestionSettingType#
|
|
|
|
|
AND t.general_id = #teacherOpenCourseId#
|
|
|
|
|
AND t.business_type = 'FROM_SYSTEM'
|
|
|
|
|
AND t.business_id in (select ba.course_info_id from course_info ba where ba.course_info_parent_id = #courseInfoParentId#)
|
|
|
|
|
@pageIgnoreTag() {
|
|
|
|
|
ORDER BY
|
|
|
|
|
t.general_question_setting_name ASC
|
|
|
|
|
@}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
questionTestResults
|
|
|
|
|
===
|
|
|
|
|
* 教师端-题目的练习详情
|
|
|
|
|
SELECT
|
|
|
|
|
@pageTag(){
|
|
|
|
|
z.*
|
|
|
|
|
@}
|
|
|
|
|
FROM
|
|
|
|
|
(SELECT
|
|
|
|
|
t.student_id,
|
|
|
|
|
t.student_sn,
|
|
|
|
|
t.student_name,
|
|
|
|
|
th.class_name,
|
|
|
|
|
@ // 完成用时
|
|
|
|
|
max(TIMEDIFF( te.general_question_log_update_time , te.general_question_log_add_time )) AS finish_time,
|
|
|
|
|
@ // 题目总数
|
|
|
|
|
count(td.general_resources_question_snapshot_id) AS question_total_count,
|
|
|
|
|
@ // 正确的题数
|
|
|
|
|
count(case when te.question_score > 0 then 1 else 0 end) AS correct_count,
|
|
|
|
|
@ // 错误的题数
|
|
|
|
|
count(case when te.question_score = 0 then 1 else 0 end) AS wrong_count,
|
|
|
|
|
@ // 正确率 100为最大值
|
|
|
|
|
count(case when te.question_score > 0 then 1 else 0 end)
|
|
|
|
|
/ IF(count(td.general_resources_question_snapshot_id) = 0,1, count(td.general_resources_question_snapshot_id)) * 100 AS correct_rate,
|
|
|
|
|
@ // 该学生的总得分
|
|
|
|
|
sum(IFNULL(te.question_score, 0)) AS total_score
|
|
|
|
|
FROM
|
|
|
|
|
student t
|
|
|
|
|
LEFT JOIN general_merge_student tc ON tc.student_id = t.student_id
|
|
|
|
|
LEFT JOIN teacher_open_course ta ON ta.business_id = tc.business_id
|
|
|
|
|
LEFT JOIN general_question_setting tb ON tb.business_id = ta.business_id
|
|
|
|
|
LEFT JOIN general_resources_question_snapshot td ON td.general_question_setting_id = tb.general_question_setting_id
|
|
|
|
|
LEFT JOIN general_question_log te ON te.general_question_setting_id = tb.general_question_setting_id
|
|
|
|
|
LEFT JOIN school_class th ON th.class_id = t.class_id
|
|
|
|
|
@if(!isEmpty(schoolClassIds)) {
|
|
|
|
|
LEFT JOIN school_class ti ON ti.business_id = ta.business_id
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(courseInfoId)) {
|
|
|
|
|
LEFT JOIN course_info tj ON tj.business_id = ta.business_id
|
|
|
|
|
@}
|
|
|
|
|
WHERE
|
|
|
|
|
1 = 1
|
|
|
|
|
AND ta.general_status = 1
|
|
|
|
|
AND tb.general_question_setting_status = 1
|
|
|
|
|
AND tc.general_school_class_merge_student_status = 1
|
|
|
|
|
AND td.question_status = 1
|
|
|
|
|
AND te.general_question_log_status = 1
|
|
|
|
|
AND th.class_status = 1
|
|
|
|
|
@if(!isEmpty(schoolClassIds)) {
|
|
|
|
|
AND ti.school_class_status = 1
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(courseInfoId)) {
|
|
|
|
|
AND tj.course_info_status = 1
|
|
|
|
|
@}
|
|
|
|
|
@ // 开课关联的班级ID
|
|
|
|
|
@if(!isEmpty(schoolClassIds)) {
|
|
|
|
|
AND FIND_IN_SET(ti.school_class_id, #schoolClassIds#)
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(studentSnOrStudentName)) {
|
|
|
|
|
AND CONCAT( t.student_sn, t.student_name ) LIKE #'%' + studentSnOrStudentName + '%'#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(courseInfoId)) {
|
|
|
|
|
AND tj.course_info_id = #courseInfoId#
|
|
|
|
|
@}
|
|
|
|
|
@if(!isEmpty(generalQuestionSettingId)) {
|
|
|
|
|
AND tb.general_question_setting_id = #generalQuestionSettingId#
|
|
|
|
|
@}
|
|
|
|
|
GROUP BY
|
|
|
|
|
t.student_id,
|
|
|
|
|
t.student_sn,
|
|
|
|
|
t.student_name,
|
|
|
|
|
th.class_name
|
|
|
|
|
) z
|