diff --git a/application/kaoshi/common.php b/application/kaoshi/common.php
new file mode 100644
index 00000000..b3d9bbc7
--- /dev/null
+++ b/application/kaoshi/common.php
@@ -0,0 +1 @@
+ ['规则1','规则2'...]
+ *
+ * @var array
+ */
+ protected $rule = [
+ 'id|考试号' => 'require|number',
+ 'banjiids|参考班级' => 'require|array',
+ 'subject|参考学科' => 'require|array',
+ ];
+
+ /**
+ * 定义错误信息
+ * 格式:'字段名.规则名' => '错误信息'
+ *
+ * @var array
+ */
+ protected $message = [];
+}
diff --git a/application/kaoshi/validate/Kaohao.php b/application/kaoshi/validate/Kaohao.php
new file mode 100644
index 00000000..608056d9
--- /dev/null
+++ b/application/kaoshi/validate/Kaohao.php
@@ -0,0 +1,27 @@
+ ['规则1','规则2'...]
+ *
+ * @var array
+ */
+ protected $rule = [
+ 'kaoshi|考试号' => 'require|number',
+ 'banjiids|参考班级' => 'require|array',
+ ];
+
+ /**
+ * 定义错误信息
+ * 格式:'字段名.规则名' => '错误信息'
+ *
+ * @var array
+ */
+ protected $message = [];
+}
diff --git a/application/kaoshi/validate/Kaoshi.php b/application/kaoshi/validate/Kaoshi.php
new file mode 100644
index 00000000..66d69c44
--- /dev/null
+++ b/application/kaoshi/validate/Kaoshi.php
@@ -0,0 +1,34 @@
+ ['规则1','规则2'...]
+ *
+ * @var array
+ */
+ protected $rule = [
+ 'title|标题' => 'require|length:1,25',
+ 'zuzhi|组织单位' => 'require|number',
+ 'xueqi|学期' => 'require|number',
+ 'category|分类' => 'require|number',
+ 'bfdate|考试时间' => 'require|date',
+ 'enddate|考试时间' => 'require|date',
+ 'nianji|参考年级' => 'require|array',
+ 'subject|参考学科' => 'require|array',
+ 'manfen|满分' => 'require|array',
+ ];
+
+ /**
+ * 定义错误信息
+ * 格式:'字段名.规则名' => '错误信息'
+ *
+ * @var array
+ */
+ protected $message = [];
+}
diff --git a/application/teach/view/kaoshi/caiji.html b/application/kaoshi/view/index/caiji.html
similarity index 100%
rename from application/teach/view/kaoshi/caiji.html
rename to application/kaoshi/view/index/caiji.html
diff --git a/application/teach/view/kaoshi/create.html b/application/kaoshi/view/index/create.html
similarity index 100%
rename from application/teach/view/kaoshi/create.html
rename to application/kaoshi/view/index/create.html
diff --git a/application/teach/view/kaoshi/edit.html b/application/kaoshi/view/index/edit.html
similarity index 100%
rename from application/teach/view/kaoshi/edit.html
rename to application/kaoshi/view/index/edit.html
diff --git a/application/teach/view/kaoshi/index.html b/application/kaoshi/view/index/index.html
similarity index 79%
rename from application/teach/view/kaoshi/index.html
rename to application/kaoshi/view/index/index.html
index 87dcdc71..1c79a1b5 100644
--- a/application/teach/view/kaoshi/index.html
+++ b/application/kaoshi/view/index/index.html
@@ -96,30 +96,18 @@
startbut = '';
// 编辑按钮
editbut = '';
- // 生成考号
- kaohaobut = '';
// 删除按钮
delbut = '';
- // 生成码录表按钮
- malubut = '';
- // 生成表格录入表
- biaolubut = '';
+ // 生成考号
+ morebut = '';
if(row.status == '已停用')
{
- buts = startbut + editbut;
+ buts = startbut;
}else{
- buts = stopbut + editbut;
+ buts = stopbut;
}
- if( row.kaishi == 0 )
- {
- buts = buts + kaohaobut;
- }
- if( row.jieshu == 0 )
- {
- buts = buts + malubut + biaolubut;
- }
- buts = buts + delbut;
+ buts = buts + editbut + delbut + morebut;
return buts;
}
diff --git a/application/teach/view/kaoshi/kaohao.html b/application/kaoshi/view/index/kaohao.html
similarity index 100%
rename from application/teach/view/kaoshi/kaohao.html
rename to application/kaoshi/view/index/kaohao.html
diff --git a/application/teach/controller/qrcode.png b/application/teach/controller/qrcode.png
deleted file mode 100644
index 6fb4cd96..00000000
Binary files a/application/teach/controller/qrcode.png and /dev/null differ
diff --git a/config/kaoshi/app.php b/config/kaoshi/app.php
new file mode 100644
index 00000000..3779064a
--- /dev/null
+++ b/config/kaoshi/app.php
@@ -0,0 +1,5 @@
+201,'title'=>'班级成绩','name'=>'tongji/Index/banji','paixu'=>1,'ismenu' =>true,'pid' =>2,'url'=>'/tongji',],
// 考试管理
- ['id'=>301,'title'=>'考试列表','name'=>'teach/Kaoshi/index','paixu'=>1,'ismenu' =>true,'pid' =>3,'url'=>'/kaoshi',],
+ ['id'=>301,'title'=>'考试列表','name'=>'kaoshi/Index/index','paixu'=>1,'ismenu' =>true,'pid' =>3,'url'=>'/kaoshi',],
// 师生名单
['id'=>401,'title'=>'学生列表','name'=>'renshi/Student/index','paixu'=>1,'ismenu' =>true,'pid' =>4,'url'=>'/student',],
diff --git a/route/kaoshi.php b/route/kaoshi.php
new file mode 100644
index 00000000..0d4cae0e
--- /dev/null
+++ b/route/kaoshi.php
@@ -0,0 +1,21 @@
+
+// +----------------------------------------------------------------------
+
+//系统设置路由
+Route::resource('kaoshi','kaoshi/Index');
+Route::get('kaoshi/:id/kaohao','kaoshi/Index/kaohao');
+Route::post('kaoshi/kaohao','kaoshi/Index/kaohaosave');
+Route::get('kaoshi/:id/biaoqian','kaoshi/Index/biaoqian');
+Route::get('kaoshi/:id/caiji','kaoshi/Index/caiji');
+Route::post('kaoshi/caiji','kaoshi/Index/cankaomingdan');
+
+
+