增加考试是否结束验证,修复已知BUG

This commit is contained in:
win7 committed 2019-12-27 13:38:30 +08:00
1 parent 7df14a7086
commit fad86983d8
135 files changed
+68 -3203

No files matched your search

+4 -4
View File
@@ -305,18 +305,18 @@ function array_cover( $cover = array(), $covered = array() )
/**
* 根据考试ID值,判断考试是否已经结束
* 根据考试ID值,判断考试开始或者结束时间是否已过
* $kaoshiid 考试ID
* $str 统计项目
* 返回 $data
* */
function kaoshiDate($kaoshiid,$str)
function kaoshiDate($kaoshiid,$str='enddate')
{
$ks = new app\kaoshi\model\Kaoshi;
$enddate = $ks->where('id',$kaoshiid)->value($str);
$enddate = $ks->where('id',$kaoshiid)->value('enddate');
$thistime = time();
if($enddate<time())
if( $thistime > $enddate )
{
$data = true;
}else{