Sfoglia il codice sorgente

考试资格判断

lizhen_gitee 8 mesi fa
parent
commit
1bbd225e52
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  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){