From 0aa417a910312b9da69115645ff321dc6fbe8ffe Mon Sep 17 00:00:00 2001 From: anke1460 Date: Tue, 17 Mar 2020 21:31:23 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix=20=E8=A7=86=E9=A2=91=E6=80=BB=E8=A7=88?= =?UTF-8?q?=E4=BA=BA=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 03cb07833..18255fb2b 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -1503,11 +1503,10 @@ class CoursesController < ApplicationController @videos = CourseVideo.joins(" JOIN videos ON course_videos.course_id = #{@course.id} AND videos.id = course_videos.video_id LEFT JOIN ( - SELECT watch_course_videos.course_video_id, SUM(watch_course_videos.total_duration) AS time, COUNT(watch_video_histories.watch_course_video_id) AS num + SELECT watch_course_videos.course_video_id, SUM(watch_course_videos.total_duration) AS time, COUNT(watch_course_videos.course_video_id) AS num FROM watch_course_videos JOIN course_videos ON course_videos.id = watch_course_videos.course_video_id AND watch_course_videos.end_at IS NOT NULL JOIN course_members ON course_members.user_id = watch_course_videos.user_id AND course_members.course_id = #{@course.id} AND role = 4 - JOIN watch_video_histories ON watch_course_videos.id = watch_video_histories.watch_course_video_id AND watch_video_histories.end_at IS NOT NULL WHERE course_videos.course_id = #{@course.id} GROUP BY watch_course_videos.course_video_id ) AS hisotries ON hisotries.course_video_id = course_videos.id").select("course_videos.id") From a42d1d7cf3fc743ca110b117d53695a0ecc2e880 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 17 Mar 2020 21:32:37 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=B5=84=E6=BA=90=E7=9A=84=E4=BA=8C?= =?UTF-8?q?=E7=BA=A7=E7=9B=AE=E5=BD=95=E6=98=BE=E7=A4=BA=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/index.json.jbuilder | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/files/index.json.jbuilder b/app/views/files/index.json.jbuilder index 394c02b2e..67258daf5 100644 --- a/app/views/files/index.json.jbuilder +++ b/app/views/files/index.json.jbuilder @@ -19,6 +19,7 @@ json.data do json.category_id attachment.course_second_category_id if (@course_second_category_id.to_i == 0 && attachment.course_second_category.present?) || (@parent_category_id == 0 && attachment.course_second_category&.parent_id.to_i != 0) json.category_name attachment.course_second_category&.name + json.parent_category_name attachment.course_second_category&.parent&.name end end end From a672398d966a60f9663bfb9c61daf9c90d80b767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 17 Mar 2020 21:33:53 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/videostatistics/component/Studentstatistics.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/videostatistics/component/Studentstatistics.js b/public/react/src/modules/courses/videostatistics/component/Studentstatistics.js index 401c9ec5d..aea47a1cb 100644 --- a/public/react/src/modules/courses/videostatistics/component/Studentstatistics.js +++ b/public/react/src/modules/courses/videostatistics/component/Studentstatistics.js @@ -155,7 +155,7 @@ class Studentstatistics extends Component { user_name: response.data.data[i].user_name, is_finished: response.data.data[i].is_finished, total_duration:response.data.data[i].total_duration?formatSeconds(response.data.data[i].total_duration):0, - feq:response.data.data[i].feq, + feq:response.data.data[i].freq, start_at:response.data.data[i].start_at, end_at:response.data.data[i].end_at, }) @@ -263,7 +263,7 @@ class Studentstatistics extends Component { { ` .ysltableo .ant-table-thead > tr > th, .ant-table-tbody > tr > td { - padding: 10px 10px; + padding: 10px 5px; } ` }