|
@@ -131,8 +131,14 @@ class Paper extends Base
|
|
|
|
|
|
//记录为已开始,计划任务倒计时之后 自动结束
|
|
|
$data = [
|
|
|
+ 'cate_id' => $paper['cate_id'],
|
|
|
'user_id' => $this->auth->id,
|
|
|
'paper_id' => $paper_id,
|
|
|
+ 'mode' => $paper['mode'],
|
|
|
+
|
|
|
+ 'total_score' => $paper['total_score'],
|
|
|
+ 'total_count' => $paper['quantity'],
|
|
|
+
|
|
|
'start_time' => time(),
|
|
|
'createtime' => time(),
|
|
|
'status' => 1,
|
|
@@ -182,7 +188,7 @@ class Paper extends Base
|
|
|
|
|
|
$check = Db::name('exam_grade')->where('status',1)->where('user_id',$user_id)->where('paper_id',$paper_id)->find();
|
|
|
if(!$check){
|
|
|
- $this->error('提交数据有误');
|
|
|
+ $this->error('交卷有误,或者您已交卷');
|
|
|
}
|
|
|
$grade_id = $check['id'];
|
|
|
$start_time = $check['start_time'];
|