浏览代码

202508120 修复考试查看学员信息,按照登录时间排序。

贾小兵 2 周之前
父节点
当前提交
8212cfbc52

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

@@ -154,6 +154,7 @@ class Collection extends Backend
         $this->assignConfig('url_type', config('site.url_type'));
         $this->assignConfig('server_ip', $this->auth->server_ip);
         $this->assignConfig('is_fault', Env::get('app.is_fault'));
+        $this->assignConfig('user_id', $this->auth->id);
         return $this->view->fetch();
     }
 

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

@@ -137,6 +137,7 @@ class Practice extends Backend
         $this->assignConfig('url_type', config('site.url_type'));
         $this->assignConfig('is_fault', Env::get('app.is_fault'));
         $this->assignConfig('server_ip', $this->auth->server_ip);
+        $this->assignConfig('user_id', $this->auth->id);
         $this->view->assign('row', $row);
         return $this->view->fetch();
     }

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

@@ -436,7 +436,7 @@ class Practice extends Backend
         // $sim_type = Db::name('real_exam_collection')->where('exam_collection_id',$ids)->value('sim_type');
         $list = Db::name('seat')->select();
         foreach ($list as $key => $value) {
-            $exam = $this->exam_model->where('exam_collection_id',$ids)->order('starttime desc')->where('seat_id',$value['seat_num'])->find();
+            $exam = $this->exam_model->where('exam_collection_id',$ids)->order('login_time desc')->where('seat_id',$value['seat_num'])->find();
             $user_username = '';
             $user_nickname = '';
             $exam_status = '未登录';

+ 2 - 2
public/assets/js/backend/student/collection.js

@@ -110,7 +110,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                 $(this).addClass('btn-primary');
                 if(Config.is_fault){
                     $.ajax({
-                        url: Config.url_type+"/sim/real-exam/student/refresh-sim-state?ip="+Config.server_ip,
+                        url: Config.url_type+"/sim/real-exam/student/refresh-sim-state?userId="+Config.user_id+"&ip="+Config.server_ip,
                         type: 'get',
                         success: function (data) {
                             console.log(data);
@@ -134,7 +134,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                     content: '正在刷新检查模拟器,请稍后...', // 这里是加载的文字
                 });
                 $.ajax({
-                    url: Config.url_type+"/sim/real-exam/student/refresh-sim-state?ip="+Config.server_ip,
+                    url: Config.url_type+"/sim/real-exam/student/refresh-sim-state?userId="+Config.user_id+"&ip="+Config.server_ip,
                     type: 'get',
                     success: function (data) {
                         console.log(data);

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

@@ -126,7 +126,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                 $(this).addClass('btn-primary');
                 if(Config.is_fault){
                     $.ajax({
-                        url: Config.url_type+"/sim/real-exam/student/refresh-sim-state?ip="+Config.server_ip,
+                        url: Config.url_type+"/sim/real-exam/student/refresh-sim-state?userId="+Config.user_id+"&ip="+Config.server_ip,
                         type: 'get',
                         success: function (data) {
                             console.log(data);
@@ -151,7 +151,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                     content: '正在刷新检查模拟器,请稍后...', // 这里是加载的文字
                 });
                 $.ajax({
-                    url: Config.url_type+"/sim/real-exam/student/refresh-sim-state?ip="+Config.server_ip,
+                    url: Config.url_type+"/sim/real-exam/student/refresh-sim-state?userId="+Config.user_id+"&ip="+Config.server_ip,
                     type: 'get',
                     success: function (data) {
                         console.log(data);