Commit fe6dde6a by 冷斌

`试卷`

parent 740ace9d
......@@ -180,6 +180,7 @@ class AdminPaperAction extends AdministratorAction
$data['sort'] = intval($_POST['sort']);
$data['is_screen'] = intval($_POST['is_screen']);
$data['exams_limit'] = intval($_POST['exams_limit']);
$data['best'] = isset($_POST['best']) ? intval($_POST['best']) : 0;
$data['is_rand'] = isset($_POST['is_rand']) ? intval($_POST['is_rand']) : 0;
$data['assembly_type'] = isset($_POST['assembly_type']) ? intval($_POST['assembly_type']) : 0;
$data['show_user_group'] = isset($_POST['show_user_group']) ? ',' . implode(',', $_POST['show_user_group']) . ',' :'0';
......@@ -195,7 +196,7 @@ class AdminPaperAction extends AdministratorAction
}
exit;
}
$this->pageKeyList = ['exams_subject_id', 'exams_module_id', 'level', 'exams_paper_title', 'reply_time', 'exams_limit', 'is_rand', 'start_time', 'end_time', 'assembly_type', 'is_screen','price', 'show_user_group', 'sort', 'description'];
$this->pageKeyList = ['exams_subject_id', 'exams_module_id', 'level', 'exams_paper_title', 'reply_time', 'exams_limit','best', 'is_rand', 'start_time', 'end_time', 'assembly_type', 'is_screen','price', 'show_user_group', 'sort', 'description'];
$this->notEmpty = ['exams_paper_id', 'exams_subject_id', 'exams_module_id', 'level', 'exams_paper_title', 'reply_time'];
ob_start();
echo W('CategoryLevel', array('table' => 'exams_subject', 'id' => 'exams_subject_id'));
......@@ -217,6 +218,7 @@ class AdminPaperAction extends AdministratorAction
$exams_difficult = M('exams_difficult')->where(['mhm_id'=>$this->mhmId])->findAll();
$this->opt['exams_module_id'] = array_column($exams_module, 'title', 'exams_module_id');
$this->opt['level'] = array_column($exams_difficult ,'title','id');
$this->opt['best'] = [0 => '否', 1 => '是'];
$this->opt['is_rand'] = [0 => '否', 1 => '是'];
$this->opt['assembly_type'] = [0 => '否', 1 => '是'];
$this->opt['is_screen'] = [0 => '否', 1 => '是'];
......@@ -302,6 +304,7 @@ class AdminPaperAction extends AdministratorAction
$data['show_user_group'] = isset($_POST['show_user_group']) ? ',' . implode(',', $_POST['show_user_group']) . ',':0;
$this->checkPaper($data, 'edit');
$data['update_time'] = time();
$data['best'] = isset($_POST['best']) ? intval($_POST['best']) : 0;
$data['is_rand'] = isset($_POST['is_rand']) ? intval($_POST['is_rand']) : 0;
$data['assembly_type'] = isset($_POST['assembly_type']) ? intval($_POST['assembly_type']) : 0;
$data['price'] = t($_POST['price']);
......@@ -320,7 +323,7 @@ class AdminPaperAction extends AdministratorAction
$this->error("未找到编辑的试卷");
}
$this->pageTab[] = array('title' => '编辑', 'tabHash' => 'edit', 'url' => U('exams/AdminPaper/edit', ['paper_id' => $paper_id]));
$this->pageKeyList = ['exams_paper_id', 'exams_subject_id', 'exams_module_id', 'level', 'exams_paper_title', 'reply_time', 'exams_limit', 'is_rand', 'start_time', 'end_time', 'assembly_type', 'is_screen','price', 'show_user_group', 'sort', 'description', 'best'];
$this->pageKeyList = ['exams_paper_id', 'exams_subject_id', 'exams_module_id', 'level', 'exams_paper_title', 'reply_time', 'exams_limit', 'best', 'is_rand', 'start_time', 'end_time', 'assembly_type', 'is_screen','price', 'show_user_group', 'sort', 'description'];
$this->notEmpty = ['exams_paper_id', 'exams_subject_id', 'exams_module_id', 'level', 'exams_paper_title', 'reply_time'];
ob_start();
echo W('CategoryLevel', array('table' => 'exams_subject', 'id' => 'exams_subject_id', 'default' => $paper['paper_subject_fullpath']));
......@@ -340,6 +343,7 @@ class AdminPaperAction extends AdministratorAction
$paper['exams_subject_id'] = $subject;
$this->opt['exams_module_id'] = array_column($exams_module, 'title', 'exams_module_id');
$this->opt['level'] = array_column($exams_difficult ,'title','id');
$this->opt['best'] = [0 => '否', 1 => '是'];
$this->opt['is_rand'] = [0 => '否', 1 => '是'];
$this->opt['assembly_type'] = [0 => '否', 1 => '是'];
$this->opt['is_screen'] = [0 => '否', 1 => '是'];
......
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