问题说明:后台考试答题纪录排序不正确问题
修改文件:application\admin\model\questions\TestPaperQuestions
修改方法:setRecordWhere()
public static function setRecordWhere($test_id,$record_id,$question_type)
{
$model =self::alias('tq')->where('tq.test_id',$test_id)->where('q.question_type',$question_type)
->join('ExaminationTestRecord e','e.questions_id=tq.questions_id and e.e_id='.$record_id,'LEFT')
->join('Questions q','q.id=tq.questions_id')
->join('TestPaper t','t.id=tq.test_id')->order('tq.sort desc')
->field('t.single_number,t.single_score,t.many_number,t.many_score,t.judge_number,t.judge_score,q.stem,q.image,q.is_img,q.option,q.answer,q.difficulty,q.question_type,e.user_answer,e.is_correct,e.score');
return $model;
}
修改文件:application\merchant\model\questions\TestPaperQuestions
修改方法:setRecordWhere()
public static function setRecordWhere($test_id,$record_id,$question_type)
{
$model =self::alias('tq')->where('tq.test_id',$test_id)->where('q.question_type',$question_type)
->join('ExaminationTestRecord e','e.questions_id=tq.questions_id and e.e_id='.$record_id,'LEFT')
->join('Questions q','q.id=tq.questions_id')
->join('TestPaper t','t.id=tq.test_id')->order('tq.sort desc')
->field('t.single_number,t.single_score,t.many_number,t.many_score,t.judge_number,t.judge_score,q.stem,q.image,q.is_img,q.option,q.answer,q.difficulty,q.question_type,e.user_answer,e.is_correct,e.score');
return $model;
}