|
|
|
@ -628,16 +628,39 @@ getQuestionTestSimpleInfo
|
|
|
|
|
LIMIT 1
|
|
|
|
|
) AS is_finished,
|
|
|
|
|
(
|
|
|
|
|
SELECT max(TIMEDIFF( t.teacher_open_course_question_log_update_time , t.teacher_open_course_question_log_add_time )) as finish_time
|
|
|
|
|
FROM teacher_open_course_question_log t
|
|
|
|
|
WHERE t.teacher_open_course_question_log_status = 1
|
|
|
|
|
SELECT max(TIMEDIFF( td.teacher_open_course_question_log_update_time , td.teacher_open_course_question_log_add_time )) as finish_time
|
|
|
|
|
FROM teacher_open_course_question_log td
|
|
|
|
|
WHERE td.teacher_open_course_question_log_status = 1
|
|
|
|
|
@if(!isEmpty(studentId)) {
|
|
|
|
|
and t.student_id = #studentId#
|
|
|
|
|
and td.student_id = #studentId#
|
|
|
|
|
@}
|
|
|
|
|
and t.question_log_add_type = 'FINALLY_SUBMIT'
|
|
|
|
|
and t.teacher_open_course_question_setting_id = t.teacher_open_course_question_setting_id
|
|
|
|
|
AND t.teacher_open_course_question_log_update_time IS NOT NULL
|
|
|
|
|
) as finish_time
|
|
|
|
|
and td.question_log_add_type = 'FINALLY_SUBMIT'
|
|
|
|
|
and td.teacher_open_course_question_setting_id = t.teacher_open_course_question_setting_id
|
|
|
|
|
AND td.teacher_open_course_question_log_update_time IS NOT NULL
|
|
|
|
|
) as finish_time,
|
|
|
|
|
(
|
|
|
|
|
SELECT max(TIMESTAMPDIFF(SECOND, te.teacher_open_course_question_log_update_time , te.teacher_open_course_question_log_add_time )) as finish_second_time
|
|
|
|
|
FROM teacher_open_course_question_log te
|
|
|
|
|
WHERE te.teacher_open_course_question_log_status = 1
|
|
|
|
|
@if(!isEmpty(studentId)) {
|
|
|
|
|
and te.student_id = #studentId#
|
|
|
|
|
@}
|
|
|
|
|
and te.question_log_add_type = 'FINALLY_SUBMIT'
|
|
|
|
|
and te.teacher_open_course_question_setting_id = t.teacher_open_course_question_setting_id
|
|
|
|
|
AND te.teacher_open_course_question_log_update_time IS NOT NULL
|
|
|
|
|
) as finish_second_time,
|
|
|
|
|
(
|
|
|
|
|
SELECT round(sum(case when tf.question_score = tf.student_score then 1 else 0 end)
|
|
|
|
|
/ ifnull(count(distinct(tf.resources_question_snapshot_id)), 0) * 100, 2) as finish_second_time
|
|
|
|
|
FROM teacher_open_course_question_log tf
|
|
|
|
|
WHERE tf.teacher_open_course_question_log_status = 1
|
|
|
|
|
@if(!isEmpty(studentId)) {
|
|
|
|
|
and tf.student_id = #studentId#
|
|
|
|
|
@}
|
|
|
|
|
and tf.question_log_add_type = 'FINALLY_SUBMIT'
|
|
|
|
|
and tf.teacher_open_course_question_setting_id = t.teacher_open_course_question_setting_id
|
|
|
|
|
AND tf.teacher_open_course_question_log_update_time IS NOT NULL
|
|
|
|
|
) as correct_rate
|
|
|
|
|
@}
|
|
|
|
|
FROM
|
|
|
|
|
teacher_open_course_question_setting t
|
|
|
|
|