diff --git a/app/common.php b/app/common.php index 7122d863..7bf953a4 100755 --- a/app/common.php +++ b/app/common.php @@ -22,15 +22,6 @@ // } - function nianJiNameList($value = 'str', $riqi = 0) - { - // 实例化年级控制器 - $bj = new \app\teach\model\Banji; - $njList= $bj->gradeName($value, $riqi); - return $njList; - } - - // 班级列表 function banJiNamelist() { @@ -159,15 +150,6 @@ } - // 学科列表 - function subjectKaoshiList() - { - $sbj = new \app\teach\model\Subject; - $subject = $sbj->kaoshi(); - return $subject; - } - - // 已知密码进行验证 function loginCheck($inputPassword, $serverPassword) { diff --git a/app/index/controller/Index.php b/app/index/controller/Index.php index a3504a0f..33ae47ba 100755 --- a/app/index/controller/Index.php +++ b/app/index/controller/Index.php @@ -80,7 +80,7 @@ class Index extends AdminBase $list['kaoshi'] = $con->count(); // 学生数 $con = new \app\teach\model\Banji; - $tempsrc['ruxuenian'] = array_keys(nianJiNameList()); + $tempsrc['ruxuenian'] = array_keys(\app\facade\Tools::nianJiNameList()); $bjids = $con->search($tempsrc)->column('id'); $con = new \app\student\model\Student; $list['student'] = $con->where('banji_id', 'in', $bjids) diff --git a/app/kaoshi/controller/KaoshiSet.php b/app/kaoshi/controller/KaoshiSet.php index 4926db47..859cd61e 100755 --- a/app/kaoshi/controller/KaoshiSet.php +++ b/app/kaoshi/controller/KaoshiSet.php @@ -83,11 +83,11 @@ class KaoshiSet extends AdminBase ,'kaoshi_id' => $kaoshi_id ); - // 获取考试时间 + // 获取考试时间 $ks = new \app\kaoshi\model\Kaoshi; $enddate = $ks->kaoshiInfo($kaoshi_id); - $enddate = $enddate->getData('enddate'); - $list['set']['nianji'] = nianJiNameList('str', $enddate); + $list['enddate'] = $enddate->getData('enddate'); + // $list['set']['nianji'] = nianJiNameList('str', $enddate); // 模板赋值 $this->view->assign('list', $list); @@ -287,4 +287,5 @@ class KaoshiSet extends AdminBase // 返回信息 return json($data); } + } diff --git a/app/kaoshi/controller/KsCanyu.php b/app/kaoshi/controller/KsCanyu.php index 25533f81..68295def 100644 --- a/app/kaoshi/controller/KsCanyu.php +++ b/app/kaoshi/controller/KsCanyu.php @@ -105,7 +105,7 @@ class KsCanYu extends AdminBase } - // 根据考试ID和年级获取参加考试学科 + // 根据考试ID和年级获取已经参加本次考试学科 public function subject() { // 获取参数 @@ -125,4 +125,5 @@ class KsCanYu extends AdminBase $sbj = reSetArray($sbj, $src); return json($sbj); } + } diff --git a/app/kaoshi/model/KaoshiSet.php b/app/kaoshi/model/KaoshiSet.php index 460ca693..7c7e2e0b 100755 --- a/app/kaoshi/model/KaoshiSet.php +++ b/app/kaoshi/model/KaoshiSet.php @@ -153,5 +153,4 @@ class KaoshiSet extends BaseModel return $bj; } - } diff --git a/app/kaoshi/view/index/index.html b/app/kaoshi/view/index/index.html index 886a5a24..3a3c36af 100755 --- a/app/kaoshi/view/index/index.html +++ b/app/kaoshi/view/index/index.html @@ -17,14 +17,14 @@
- +
- +
diff --git a/app/kaoshi/view/kaoshi_set/create.html b/app/kaoshi/view/kaoshi_set/create.html index aa7ae299..815deae7 100755 --- a/app/kaoshi/view/kaoshi_set/create.html +++ b/app/kaoshi/view/kaoshi_set/create.html @@ -5,22 +5,20 @@
- -
{php} - $subject = subjectKaoshiList(); + $sbj = new \app\teach\model\Subject; + $src = [ + 'status' => 1, + 'kaoshi' => 1 + ]; + $subject = $sbj->search($src); {/php} @@ -66,9 +64,15 @@ {block name="myjs"}