|
|
|
|
@ -243,7 +243,7 @@ class CourseController extends CommonController
|
|
|
|
|
*/
|
|
|
|
|
public function myCourseContent()
|
|
|
|
|
{
|
|
|
|
|
$list = CourseContent::with('course.typeDetail', 'teacher','courseContentEvaluation')->whereHas('course', function ($query) {
|
|
|
|
|
$list = CourseContent::with('course.typeDetail', 'teacher', 'courseContentEvaluation')->whereHas('course', function ($query) {
|
|
|
|
|
$query->where('course_status', '!=', 40)->where('course_content_status', 1);
|
|
|
|
|
$query->whereHas('courseSigns', function ($query) {
|
|
|
|
|
$query->where('user_id', $this->getUserId())->where('status', 1)->where(function ($q) {
|
|
|
|
|
@ -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']??0,
|
|
|
|
|
'time_total' => $all['time_total'] ?? 0,
|
|
|
|
|
'data' => $all['data']
|
|
|
|
|
]);
|
|
|
|
|
return $this->success($model);
|
|
|
|
|
@ -814,7 +814,7 @@ class CourseController extends CommonController
|
|
|
|
|
if ($validator->fails()) {
|
|
|
|
|
return $this->fail([ResponseCode::ERROR_PARAMETER, implode(',', $validator->errors()->all())]);
|
|
|
|
|
}
|
|
|
|
|
$list = Calendar::with('courseContent')->where('date', 'like', $all['month'] . '%')->orderBy('date')->get();
|
|
|
|
|
$list = Calendar::with('course', 'courseContent')->where('date', 'like', $all['month'] . '%')->orderBy('date')->get();
|
|
|
|
|
return $this->success($list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|