Commit 379c247d authored by xiabin's avatar xiabin

添加预览页连接

parent 0f145fad
...@@ -177,7 +177,7 @@ class HomeController extends \yii\web\Controller ...@@ -177,7 +177,7 @@ class HomeController extends \yii\web\Controller
$coursewareInfo = Courseware::findOne(['course_id' => $courseId, 'status' => Courseware::STATUS_OK]); $coursewareInfo = Courseware::findOne(['course_id' => $courseId, 'status' => Courseware::STATUS_OK]);
$course = Course::findOne(['id' => $courseId]); $course = Course::findOne(['id' => $courseId]);
if ($course === NULL or Yii::$app->user->id !== $coursewareInfo['user_id']) { if ($course === NULL or Yii::$app->user->id != $coursewareInfo->user_id) {
throw new HttpException(404, '页面不存在'); throw new HttpException(404, '页面不存在');
} }
$teachers = $course->teachers; $teachers = $course->teachers;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment