diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js
index 1111b6509..3c12ff424 100644
--- a/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js
+++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js
@@ -35,6 +35,10 @@ class Videostatisticscom extends Component {
}}>
+
this.props.statisticsy(false)} >
+ this.props.statisticsy(false)}>
+
this.props.statisticsy(false)}>返回
+
视频统计总览
播放数据从{this.props.watch_staticsdata&&this.props.watch_staticsdata.begin_at?this.props.watch_staticsdata.begin_at:0}开始统计
diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js
index b64cd06ac..8c4025143 100644
--- a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js
+++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js
@@ -203,7 +203,7 @@ class Videostatisticscomtwo extends Component {
number: (parseInt(this.state.page) - 1) * parseInt(this.state.limit) + (i + 1),
user_name: response.data.data[i].user_name,
is_finished: response.data.data[i].is_finished,
- total_duration: response.data.data[i].total_duration,
+ total_duration: response.data.data[i].total_duration?formatSeconds(response.data.data[i].total_duration):0,
feq: response.data.data[i].feq,
start_at: response.data.data[i].start_at,
end_at: response.data.data[i].end_at,
@@ -291,10 +291,24 @@ class Videostatisticscomtwo extends Component {
}
} else {
- data = {
- id: CourseId,
- page: this.state.page
+ try {
+ if(id!==null&&id===0){
+ data = {
+ id: CourseId,
+ page: this.state.page,
+ group_id: id
+ }
+ }else{
+ data = {
+ id: CourseId,
+ page: this.state.page
+ }
+ }
+
+ }catch (e) {
+
}
+
}
this.getdatas(data);
}
diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js
index fa24c9c32..a30d872de 100644
--- a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js
+++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js
@@ -152,7 +152,7 @@ class Videostatisticslist extends Component {
number: (parseInt(this.state.page) - 1) * parseInt(this.state.limit) + (i + 1),
title: response.data.videos[i].title,
people_num: response.data.videos[i].people_num,
- total_time: response.data.videos[i].total_time,
+ total_time: response.data.videos[i].total_time?formatSeconds(response.data.videos[i].total_time):0,
user_name: response.data.videos[i].user_name,
id: response.data.videos[i].id,
})
From fcdd2da413c95169994f53e30a21e66adee702e7 Mon Sep 17 00:00:00 2001
From: cxt <853663049@qq.com>
Date: Tue, 17 Mar 2020 11:36:07 +0800
Subject: [PATCH 05/38] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/admins/courses/index.xlsx.axlsx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/views/admins/courses/index.xlsx.axlsx b/app/views/admins/courses/index.xlsx.axlsx
index cb8ab0610..f21141de0 100644
--- a/app/views/admins/courses/index.xlsx.axlsx
+++ b/app/views/admins/courses/index.xlsx.axlsx
@@ -14,9 +14,9 @@ wb.styles do |s|
get_attachment_count(course, 0),
course.informs.size,
course.course_videos.size,
- course.course_homework_count(1),
- course.course_homework_count(3),
- course.course_homework_count(4),
+ course.course_homework_count("normal"),
+ course.course_homework_count("group"),
+ course.course_homework_count("practice"),
course.student_works_count,
course.exercises_count,
course.evaluate_count,
From f987bcd5e2e882ac186bd501b6c8d354b0250721 Mon Sep 17 00:00:00 2001
From: cxt <853663049@qq.com>
Date: Tue, 17 Mar 2020 11:41:30 +0800
Subject: [PATCH 06/38] =?UTF-8?q?=E8=AF=BE=E5=A0=82=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=A2=9E=E5=8A=A0=E7=BB=9F=E8=AE=A1=E6=95=B0?=
=?UTF-8?q?=E6=8D=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/models/course.rb | 5 +++++
app/views/admins/courses/index.xlsx.axlsx | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/app/models/course.rb b/app/models/course.rb
index cb8e3560d..d4d5387d5 100644
--- a/app/models/course.rb
+++ b/app/models/course.rb
@@ -406,6 +406,11 @@ class Course < ApplicationRecord
homework_commons.select{|homework| homework.homework_type == type}.size
end
+ # 课堂作业数
+ def published_course_homework_count type
+ homework_commons.select{|homework| homework.homework_type == type && homework.publish_time.present? && homework.publish_time <= Time.now}.size
+ end
+
def student_works_count
StudentWork.joins(:homework_common).where(homework_commons: {course_id: id}).where("work_status > 0").size
end
diff --git a/app/views/admins/courses/index.xlsx.axlsx b/app/views/admins/courses/index.xlsx.axlsx
index 9690eaa05..bc6581972 100644
--- a/app/views/admins/courses/index.xlsx.axlsx
+++ b/app/views/admins/courses/index.xlsx.axlsx
@@ -3,7 +3,7 @@ wb = xlsx_package.workbook
wb.styles do |s|
blue_cell = s.add_style :bg_color => "FAEBDC", :sz => 10,:height => 25,:b => true, :border => { :style => :thin, :color =>"000000" },:alignment => {wrap_text: true,:horizontal => :center,:vertical => :center}
wb.add_worksheet(name: "课堂列表") do |sheet|
- sheet.add_row %w(ID 课堂名称 老师 学生 资源 公告 视频 普通作业 分组作业 实训作业 作品数 试卷 评测次数 私有 状态 单位 部门 创建者 创建时间 动态时间), :height => 25,:style => blue_cell
+ sheet.add_row %w(ID 课堂名称 老师 学生 资源 公告 视频 普通作业 分组作业 实训作业 实训作业已发布数 作品数 试卷 评测次数 私有 状态 单位 部门 创建者 创建时间 动态时间), :height => 25,:style => blue_cell
@courses.each do |course|
data = [
@@ -17,6 +17,7 @@ wb.styles do |s|
course.course_homework_count("normal"),
course.course_homework_count("group"),
course.course_homework_count("practice"),
+ course.published_course_homework_count("practice"),
course.student_works_count,
course.exercises_count,
course.evaluate_count,
From 25e6feccec7855f60ee17d6bf44b9b753a144056 Mon Sep 17 00:00:00 2001
From: anke1460
Date: Tue, 17 Mar 2020 11:43:14 +0800
Subject: [PATCH 07/38] =?UTF-8?q?fix=20=E8=A7=86=E9=A2=91=E7=9C=8B?=
=?UTF-8?q?=E5=AE=8C=E6=B2=A1=E6=A0=87=E8=AE=B0=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/services/create_watch_video_service.rb | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/app/services/create_watch_video_service.rb b/app/services/create_watch_video_service.rb
index 0f1b32814..5a3813571 100644
--- a/app/services/create_watch_video_service.rb
+++ b/app/services/create_watch_video_service.rb
@@ -33,12 +33,10 @@ class CreateWatchVideoService < ApplicationService
if watch_course_video.present?
watch_course_video.total_duration = watch_course_video.watch_video_histories.sum(:total_duration)
watch_course_video.end_at = current_time
- if !watch_course_video.is_finished && watch_course_video.watch_duration < params[:watch_duration]
+ if !watch_course_video.is_finished
# 更新课程视频的时长及是否看完状态
- watch_course_video.watch_duration = params[:watch_duration]
- if params[:ed].present?
- watch_course_video.is_finished = watch_course_video.total_duration >= watch_course_video.duration
- end
+ watch_course_video.watch_duration = params[:watch_duration] if watch_course_video.watch_duration < params[:watch_duration]
+ watch_course_video.is_finished = watch_course_video.total_duration >= watch_course_video.duration if params[:ed].present?
end
watch_course_video.save!
end
From b4703c01eb7b3efa33365834c8dccce33be9f57c 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 11:46:09 +0800
Subject: [PATCH 08/38] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/modules/courses/signin/css/signincdi.css | 13 ++++++++++++-
.../component/Videostatisticscom.js | 2 +-
.../component/Videostatisticscomtwo.js | 16 ++++++++--------
3 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/public/react/src/modules/courses/signin/css/signincdi.css b/public/react/src/modules/courses/signin/css/signincdi.css
index 9416de345..cdd41eede 100644
--- a/public/react/src/modules/courses/signin/css/signincdi.css
+++ b/public/react/src/modules/courses/signin/css/signincdi.css
@@ -100,7 +100,10 @@
width: 80%;
}
.ws50s{
- width: 50%;
+ width: 50%;
+ }
+.ws40s{
+ width: 40%;
}
.hs30s{
height: 30%;
@@ -425,6 +428,14 @@
white-space:nowrap;
cursor: default;
}
+.maxnamewidth90s{
+ width: 90px;
+ max-width: 90px;
+ overflow:hidden;
+ text-overflow:ellipsis;
+ white-space:nowrap;
+ cursor: default;
+}
.maxnamewidth100s{
width: 100px;
max-width: 100px;
diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js
index 3c12ff424..dff57d642 100644
--- a/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js
+++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js
@@ -39,7 +39,7 @@ class Videostatisticscom extends Component {
this.props.statisticsy(false)}>
this.props.statisticsy(false)}>返回
- 视频统计总览
+ 视频统计总览
播放数据从{this.props.watch_staticsdata&&this.props.watch_staticsdata.begin_at?this.props.watch_staticsdata.begin_at:0}开始统计