Ver código fonte

20250303 调整

贾小兵 1 mês atrás
pai
commit
e065df28fe

+ 2 - 2
application/admin/controller/teacher/Collection.php

@@ -426,14 +426,14 @@ class Collection extends Backend
         $count = 0;
         Db::startTrans();
         try {
-            //删除考试集合  mx_real_exam_collection
+            //删除考试集合  real_exam_collection
             foreach ($list as $item) {
                 if($item['yikao_count']>0){
                     $this->error('已有学生参加考试,无法删除');
                 }
                 $count += $item->delete();
             }
-            //删除学员考试 mx_real_exam
+            //删除学员考试 real_exam
             $exam_list = $this->exam_model->where('exam_collection_id',$ids)->select();
             if(!empty($exam_list)){
                 foreach ($exam_list as $k=>$it)

+ 1 - 1
application/admin/controller/teacher/Practice.php

@@ -260,7 +260,7 @@ class Practice extends Backend
         $count = 0;
         Db::startTrans();
         try {
-            //删除考试集合  mx_real_exam_collection
+            //删除考试集合  real_exam_collection
             foreach ($list as $item) {
                 if($item['yikao_count']>0){
                     $this->error('已有学生参加考试,无法删除');

+ 6 - 1
application/admin/library/Auth.php

@@ -67,7 +67,12 @@ class Auth extends \fast\Auth
         if(!empty($admin->depart_id)){
             // 获取服务器自己的IP地址
             // $server_ip = gethostbyname('localhost');
-            $server_ip = '192.168.1.101';//$_SERVER['REMOTE_ADDR'];//gethostbyname('localhost');
+            $server_ip = $_SERVER['REMOTE_ADDR'];//gethostbyname('localhost');
+            if($admin->username=='xueyuan001'){
+               $server_ip  = '192.168.1.111'; 
+            }else if($admin->username=='xueyuan002'){
+               $server_ip  = '192.168.1.112'; 
+            }
             $admin->server_ip = $server_ip;
             $seat_id = Db::name('seat')->where('seat_bind_ip',$server_ip)->value('seat_id');
             if(!empty($seat_id)){