|
|
|
|
@ -310,12 +310,12 @@ class CourseController extends CommonController
|
|
|
|
|
$messages = [
|
|
|
|
|
'course_content_evaluation_id.required' => '问卷id必填',
|
|
|
|
|
'data.required' => '表单数据必填',
|
|
|
|
|
'time_total.required' => '用时必填'
|
|
|
|
|
// 'time_total.required' => '用时必填'
|
|
|
|
|
];
|
|
|
|
|
$validator = Validator::make($all, [
|
|
|
|
|
'course_content_evaluation_id' => 'required',
|
|
|
|
|
'data' => 'required',
|
|
|
|
|
'time_total' => 'required'
|
|
|
|
|
// 'time_total' => 'required'
|
|
|
|
|
], $messages);
|
|
|
|
|
if ($validator->fails()) {
|
|
|
|
|
return $this->fail([ResponseCode::ERROR_PARAMETER, implode(',', $validator->errors()->all())]);
|
|
|
|
|
@ -339,7 +339,7 @@ class CourseController extends CommonController
|
|
|
|
|
$model = CourseContentEvaluationForm::create([
|
|
|
|
|
'course_content_evaluation_id' => $all['course_content_evaluation_id'],
|
|
|
|
|
'user_id' => $this->getUserId(),
|
|
|
|
|
'time_total' => $all['time_total'],
|
|
|
|
|
'time_total' => $all['time_total']??0,
|
|
|
|
|
'data' => $all['data']
|
|
|
|
|
]);
|
|
|
|
|
return $this->success($model);
|
|
|
|
|
|