Explorar o código

20250103 调整

贾小兵 hai 3 meses
pai
achega
790d51d11f

+ 14 - 0
application/admin/controller/student/Collection.php

@@ -64,6 +64,20 @@ class Collection extends Backend
      */
     public function index()
     {
+        $isset = $this->model->alias('z')
+        ->join('real_exam r','z.exam_collection_id=r.exam_collection_id','left')
+        ->where('z.exam_collection_type=3 and z.exam_collection_state=2 and r.user_id='.$this->auth->id)->find();
+       if(empty($isset)){
+            //提示页面,没有开始的考试
+            return $this->view->fetch('tishi');
+       }else{
+//             halt('22222');
+            $this->redirect('/ZQOtIMLKud.php/student/collection/examing/ids/'.$isset['exam_id'].'?ref=addtabs');
+//             echo "<script>location.href='/lAoJtOcmYN.php/hotelmanage/room/displayindex/ids/".$this->auth->street_id."';</script>";
+//             //$this->redirect('/hotelmanage/room/displayindex/ids/1');
+//             exit();
+       }
+        die();
         //设置过滤方法
         $this->request->filter(['strip_tags', 'trim']);
         if (false === $this->request->isAjax()) {

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

@@ -254,6 +254,6 @@ class Collection extends Backend
     老师开启考试
      */
     public function start($ids = null){
-        $this->success();
+        $this->success('开始成功');
     }
 }

+ 6 - 1
application/admin/model/teacher/Collection.php

@@ -61,7 +61,12 @@ class Collection extends Model
         }
         return $sim_type_text;
     }
-    
+
+    public  function allexam()
+    {
+        return $this->hasMany('Exams','exam_collection_id','exam_collection_id')->where('deletetime is null');
+    }
+
 
 
 

+ 77 - 0
application/admin/view/student/collection/tishi.html

@@ -0,0 +1,77 @@
+<style>
+    .profile-avatar-container {
+        position: relative;
+        width: 100px;
+        margin: 0 auto;
+    }
+
+    .profile-avatar-container .profile-user-img {
+        width: 100px;
+        height: 100px;
+    }
+
+    .profile-avatar-container .profile-avatar-text {
+        display: none;
+    }
+
+    .profile-avatar-container:hover .profile-avatar-text {
+        display: block;
+        position: absolute;
+        height: 100px;
+        width: 100px;
+        background: #444;
+        opacity: .6;
+        color: #fff;
+        top: 0;
+        left: 0;
+        line-height: 100px;
+        text-align: center;
+    }
+
+    .profile-avatar-container button {
+        position: absolute;
+        top: 0;
+        left: 0;
+        width: 100px;
+        height: 100px;
+        opacity: 0;
+    }
+    .panel-heading{font-size: 18px}
+</style>
+<div class="row animated fadeInRight">
+    <div class="col-md-12">
+        <div class="box box-primary">
+
+            <div class="panel-body">
+                <form id="update-form" role="form" data-toggle="validator" method="POST" action="">
+                    {:token()}
+                    <div class="panel-heading">
+                        {:__('个人信息')}
+                    </div>
+                    <div class="box-body box-profile">
+                        <div class="row">
+                            <div class="form-group col-sm-6">
+                                <label class="control-label">{:__('考试学员')}:</label>
+                                <input type="text" class="form-control" value="{$admin.nickname|htmlentities}" readonly/>
+                            </div>
+                            <div class="form-group col-sm-6">
+                                <label class="control-label">{:__('学员座号')}:</label>
+                                <input type="text" class="form-control"  value="01" readonly/>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="panel-heading">
+                        {:__('注意事项')}
+                    </div>
+                    <div class="box-body box-profile">
+                        <div style="color: rgb(192, 74, 84)">1.遵守考场纪律‌</div>
+                        <div style="color: rgb(192, 74, 84)">2.合理安排时间</div>
+                    </div>
+                    <div class="form-group" style="text-align: center">
+                        <button type="button" class="btn btn-warning">{:__('暂无开启的考试,请耐心等待...')}</button>
+                    </div>
+                </form>
+            </div>
+        </div>
+    </div>
+</div>

+ 1 - 1
public/assets/js/backend/teacher/collection.js

@@ -115,7 +115,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                     url: "teacher/collection/start/ids/"+ids,
                     type: "post",
                 }, function () {
-                    table.bootstrapTable('refresh', {});
+                    table.bootstrapTable('refresh');
                     Layer.close(index);
                 });
             });