Переглянути джерело

20250105 学员端 调整

贾小兵 3 місяців тому
батько
коміт
483eb5018d

+ 15 - 0
application/admin/controller/student/Practice.php

@@ -44,6 +44,21 @@ class Practice 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=1 and z.exam_collection_state=2 and r.endtime=0 and r.user_id='.$this->auth->id)->find();
+        
+        if(empty($isset)){
+            //提示页面,没有开始的考试
+            return $this->view->fetch('tishi');
+        }else{
+//             $this->redirect('/ZQOtIMLKud.php/student/collection/examing/ids/'.$isset['exam_id'].'?ref=addtabs');
+            echo "<script>location.href='/ZQOtIMLKud.php/student/practice/examing/ids/".$isset['exam_id']."';</script>";
+            //$this->redirect('/hotelmanage/room/displayindex/ids/1');
+            exit();
+        }
+        die();
+
         //设置过滤方法
         $this->request->filter(['strip_tags', 'trim']);
         if (false === $this->request->isAjax()) {

+ 77 - 0
application/admin/view/student/practice/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>

+ 2 - 2
public/assets/js/backend/teacher/practice.js

@@ -74,7 +74,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                                     name: 'dispatch',
                                     text: '',
                                     icon: 'fa fa-hand-pointer-o',
-                                    title: '进入考试',
+                                    title: '进入练习',
                                     visible: function (rr) {
                                         if(rr.exam_collection_state == 2){
                                             return true;
@@ -82,7 +82,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                                         return false;
                                     },
                                     classname: 'btn btn-info btn-xs btn-magic btn-addtabs',
-                                    url: 'tteacher/practice/persent',
+                                    url: 'teacher/practice/persent',
                                 },
                                 // {
                                 //     name: 'dispatch',