diff --git a/app/tools/controller/KsCanyu.php b/app/tools/controller/KsCanyu.php index c1302d2b..fc1fbd00 100644 --- a/app/tools/controller/KsCanyu.php +++ b/app/tools/controller/KsCanyu.php @@ -55,8 +55,21 @@ class KsCanYu extends BaseController ,'kaoshi_id' => '' ,'limit' => 100 ], 'POST'); - $khSrc = new \app\kaohao\model\SearchCanyu; + $myself = config('shangma.lurufanwei'); + $category = session('onlineCategory'); + if($category == 'teacher' && $myself == true) + { + $teacher_id = session('teacher.userid'); + $s = \think\facade\Session::all(); + $btj = new \app\chengji\model\TongjiBj; + $src['banji_id'] = $btj->where('teacher_id', $teacher_id) + ->where('kaoshi_id', $src['kaoshi_id']) + ->column('banji_id'); + $bj = new \app\teach\model\Banji; + $bjid = $bj->where('banzhuren', $teacher_id)->value('id'); + array_push($src['banji_id'], $bjid); + } $bj = $khSrc->class($src); $bj = reSetArray($bj, $src); diff --git a/config/shangma.php b/config/shangma.php index 1f7d76ab..3bac6c8e 100644 --- a/config/shangma.php +++ b/config/shangma.php @@ -12,4 +12,5 @@ return [ 'weihu' => false, # 是否开启维护跳转 'shijian' => '2020-9-2 12:47', # 开始时间 'shichang' => '1', # 时长:单位分钟 + 'lurufanwei' => true # 是否开启教师只能录入自己任课班级的成绩 ];