|
|
|
@ -53,7 +53,7 @@ class CourseContentEvaluationsController extends BaseController
|
|
|
|
public function index()
|
|
|
|
public function index()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$all = request()->all();
|
|
|
|
$all = request()->all();
|
|
|
|
$list = $this->model->with('course')
|
|
|
|
$list = $this->model->with('course','courseContent')
|
|
|
|
->withCount('courseContentEvaluationAsks','courseContentEvaluationForms')
|
|
|
|
->withCount('courseContentEvaluationAsks','courseContentEvaluationForms')
|
|
|
|
->where(function ($query) use ($all) {
|
|
|
|
->where(function ($query) use ($all) {
|
|
|
|
if (isset($all['filter']) && !empty($all['filter'])) {
|
|
|
|
if (isset($all['filter']) && !empty($all['filter'])) {
|
|
|
|
@ -148,7 +148,7 @@ class CourseContentEvaluationsController extends BaseController
|
|
|
|
if ($validator->fails()) {
|
|
|
|
if ($validator->fails()) {
|
|
|
|
return $this->fail([ResponseCode::ERROR_PARAMETER, implode(',', $validator->errors()->all())]);
|
|
|
|
return $this->fail([ResponseCode::ERROR_PARAMETER, implode(',', $validator->errors()->all())]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$detail = $this->model->with('course')->find($all['id']);
|
|
|
|
$detail = $this->model->with('course','courseContent')->find($all['id']);
|
|
|
|
return $this->success($detail);
|
|
|
|
return $this->success($detail);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -160,7 +160,7 @@ class CourseContentEvaluationsController extends BaseController
|
|
|
|
* description="",
|
|
|
|
* description="",
|
|
|
|
* @OA\Parameter(name="id", in="query", @OA\Schema(type="integer", format="int64"), required=true, description="课程内容评价字段ID(存在则更新,不存在则新增)"),
|
|
|
|
* @OA\Parameter(name="id", in="query", @OA\Schema(type="integer", format="int64"), required=true, description="课程内容评价字段ID(存在则更新,不存在则新增)"),
|
|
|
|
* @OA\Parameter(name="course_id", in="query", @OA\Schema(type="integer"), required=false, description="课程ID"),
|
|
|
|
* @OA\Parameter(name="course_id", in="query", @OA\Schema(type="integer"), required=false, description="课程ID"),
|
|
|
|
* @OA\Parameter(name="course_content_id", in="query", @OA\Schema(type="integer"), required=false, description="课程内容ID,多个英文逗号分割"),
|
|
|
|
* @OA\Parameter(name="course_content_id", in="query", @OA\Schema(type="integer"), required=false, description="课程内容ID"),
|
|
|
|
* @OA\Parameter(name="title", in="query", @OA\Schema(type="string", maxLength=255), required=false, description="问卷标题"),
|
|
|
|
* @OA\Parameter(name="title", in="query", @OA\Schema(type="string", maxLength=255), required=false, description="问卷标题"),
|
|
|
|
* @OA\Parameter(name="desc", in="query", @OA\Schema(type="string", maxLength=255), required=false, description="问卷描述"),
|
|
|
|
* @OA\Parameter(name="desc", in="query", @OA\Schema(type="string", maxLength=255), required=false, description="问卷描述"),
|
|
|
|
* @OA\Parameter(name="type_id", in="query", @OA\Schema(type="string", maxLength=255), required=false, description="问卷类型ID"),
|
|
|
|
* @OA\Parameter(name="type_id", in="query", @OA\Schema(type="string", maxLength=255), required=false, description="问卷类型ID"),
|
|
|
|
|