修改考试

This commit is contained in:
win7 committed 2019-12-12 15:19:15 +08:00
1 parent cfbc0dce12
commit 2a38267e2b
19 files changed
+210 -99

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@

# 免费学生成绩统计系统
# 尚码免费小学成绩管理系统
  坦率地讲,在不久的将来,这也许会是辽东半岛上第二好用的成绩统计系统。如果你觉得还可以,还不赶紧 Watch 、 Start 一下。如果觉得不好,何不给个改进意见再离开,反正已经来了,是吧?
+32 -11
View File
@@ -29,17 +29,17 @@ function getCategory($id = '0')
}
// 获取类别名称
function getCategoryTitle($id)
{
$category = new \app\system\model\Category;
// 根据id查询类别名
$value = $category
->where('id',$id)
->vlaue('title');
// 返回类别名
return $value;
}
// // 获取类别名称
// function getCategoryTitle($id)
// {
// $category = new \app\system\model\Category;
// // 根据id查询类别名
// $value = $category
// ->where('id',$id)
// ->vlaue('title');
// // 返回类别名
// return $value;
// }
function nianjiList($riqi=0)
@@ -322,3 +322,24 @@ function enddate($kaoshiid)
return $data;
}
/**
* 获取参加考试的学科
* 返回 $data
* */
function subjectList()
{
$sbj = new \app\teach\model\Subject;
$data = $sbj::where('status',1)
->where('kaoshi',1)
->field('id,title,jiancheng,lieming')
->select();
return $data;
}
+16 -16
View File
@@ -17,13 +17,13 @@ class Index extends BaseController
// 设置要给模板赋值的信息
$list['webtitle'] = '考试列表';
$list['dataurl'] = 'category/data';
$list['dataurl'] = 'index/data';
// 模板赋值
$this->assign('list',$list);
$this->view->assign('list',$list);
// 渲染模板
return $this->fetch();
return $this->view->fetch();
}
@@ -76,14 +76,14 @@ class Index extends BaseController
'webtitle'=>'新建考试',
'butname'=>'创建',
'formpost'=>'POST',
'url'=>'/kaoshi',
'url'=>'save',
);
// 模板赋值
$this->assign('list',$list);
$this->view->assign('list',$list);
// 渲染
return $this->fetch('create');
return $this->view->fetch('create');
}
@@ -146,14 +146,14 @@ class Index extends BaseController
'webtitle'=>'编辑考试',
'butname'=>'修改',
'formpost'=>'PUT',
'url'=>'/kaoshi/'.$id,
'url'=>'/kaoshi/index/update/'.$id,
);
// 模板赋值
$this->assign('list',$list);
$this->view->assign('list',$list);
// 渲染
return $this->fetch('create');
return $this->view->fetch('create');
}
@@ -197,7 +197,7 @@ class Index extends BaseController
// 设置考试信息
public function kaoshiset($id)
public function kaoshiSet($id)
{
// 获取考试信息
@@ -242,15 +242,15 @@ class Index extends BaseController
'webtitle'=>'设置考试',
'butname'=>'设置',
'formpost'=>'PUT',
'url'=>'/kaoshiset/'.$id,
'url'=>'/kaoshi/index/updateset/'.$id,
'kaoshi'=>$id,
);
// 模板赋值
$this->assign('list',$list);
$this->view->assign('list',$list);
// 渲染
return $this->fetch();
return $this->view->fetch();
}
@@ -259,7 +259,7 @@ class Index extends BaseController
// 更新考试信息
public function updateset($id)
public function updateSet($id)
{
$validate = new \app\kaoshi\validate\Kaoshiset;
@@ -378,8 +378,8 @@ class Index extends BaseController
$list['kaoshiid'] = $kaoshi['id'];
// 模板赋值
$this->assign('list',$list);
$this->view->assign('list',$list);
// 渲染
return $this->fetch();
return $this->view->fetch();
}
}
Loaded 3 of 19 files, more files were not shown because too many files have changed in this diff. Show more