浏览代码

考试资格判断

lizhen_gitee 8 月之前
父节点
当前提交
1bbd225e52
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      addons/exam/controller/Paper.php

+ 5 - 0
addons/exam/controller/Paper.php

@@ -115,6 +115,11 @@ class Paper extends Base
             $this->error('该试卷已结束,不能参与考试');
         }
 
+        //考试资格
+        if(!in_array($user_id,$paper['user_ids'])){
+            $this->error('您不能参加该考试');
+        }
+
         //次数限制
         if ($paper['limit_count'] > 0){