...
|
...
|
@@ -122,8 +122,8 @@ class Evaluation extends Backend |
|
|
$User = Db::name('user')->where('classroom_id', $params['classroom_id'])->select();
|
|
|
if (empty($User)) $this->error('该班级下没有学生');
|
|
|
$result = $this->model->allowField(true)->save($params);
|
|
|
// 如果是添加当天的任务,将题卷的题目同步进行添加
|
|
|
if($params['time'] == date('Y-m-d')) {
|
|
|
// 将题卷的题目同步进行添加
|
|
|
// if($params['time'] == date('Y-m-d')) {
|
|
|
$subject_list = QuePaperSubject::where('que_paper_id',$params['que_paper_id'])->order('createtime','asc')->select();
|
|
|
$list = [];
|
|
|
foreach ($subject_list as $value) {
|
...
|
...
|
@@ -141,7 +141,7 @@ class Evaluation extends Backend |
|
|
if(count($list) > 0) {
|
|
|
(new \app\admin\model\EvaluationSubject())->saveAll($list);
|
|
|
}
|
|
|
}
|
|
|
// }
|
|
|
Db::commit();
|
|
|
} catch (ValidateException $e) {
|
|
|
Db::rollback();
|
...
|
...
|
|