+ {this.state.Chongzuomodeltype===true?
this.hideChongzuomodeltype()}
+ Isupdatass={()=>this.Isupdatass()}
+ />:""}
+
{visible === true ? this.cancelModulationModel()}
diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js
index 454b11c6f..6534eea5e 100644
--- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js
+++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js
@@ -22,6 +22,7 @@ import "../common/formCommon.css";
import '../css/Courses.css';
import './style.css';
import 'moment/locale/zh-cn';
+import Chongzuomodel from "./Chongzuomodel";
class ShixunWorkReport extends Component {
@@ -39,7 +40,12 @@ class ShixunWorkReport extends Component {
work_comment:undefined,
has_commit: false,
shixun_detail:[],
- view_tpi:false
+ view_tpi:false,
+ myshixun_id:undefined,
+ myshixun_identifier:undefined,
+ homework_end:undefined,
+ chongzuoId:undefined,
+ Chongzuomodeltype:false
}
}
@@ -117,7 +123,10 @@ class ShixunWorkReport extends Component {
spinning: false,
has_commit: result.data.has_commit,
shixun_detail:result.data.shixun_detail,
- view_tpi:result.data.view_tpi
+ view_tpi:result.data.view_tpi,
+ myshixun_id:result.data.myshixun_id,
+ myshixun_identifier:result.data.myshixun_identifier,
+ homework_end:result.data.homework_end,
})
}
@@ -308,8 +317,22 @@ class ShixunWorkReport extends Component {
}
}
+
+ Backtoredo=(id)=>{
+ this.setState({
+ chongzuoId:id,
+ Chongzuomodeltype:true
+ })
+ }
+
+ hideChongzuomodeltype=()=>{
+ this.setState({
+ chongzuoId:undefined,
+ Chongzuomodeltype:false
+ })
+ }
render() {
- let {data, showAppraiseModaltype, work_comment_hidden, work_comment, has_commit,shixun_detail,view_tpi} = this.state;
+ let {data, showAppraiseModaltype, work_comment_hidden, work_comment, has_commit,shixun_detail,view_tpi,myshixun_id,myshixun_identifier,homework_end} = this.state;
let category_id=data===undefined?"":data.category===null?"":data.category.category_id;
let homework_common_id=data===undefined?"":data.homework_common_id;
@@ -320,10 +343,17 @@ class ShixunWorkReport extends Component {
// let showAppraiseModals=work_comment===null||work_comment===undefined?false:true;
// console.log(this.props.isAdmin())
document.title=data&&data.course_name;
-
+
return (
data===undefined?"":
+ {this.state.Chongzuomodeltype===true?this.hideChongzuomodeltype()}
+ Isupdatass={()=>this.getdatalist()}
+ />:""}
+
this.showAppraiseModal(1)}*/}
{/*>评阅 : ""}*/}
+
+ {this.props.isAdmin()?homework_end===false&&myshixun_id!=0?this.Backtoredo(myshixun_identifier)}
+ >打回重做:"":""}
+
{this.props.isAdmin() ?this.showAppraiseModal("main",undefined,work_comment,work_comment_hidden)}
From 9c52a0a1355912a9f6cb761f4a9343b0ebace4b3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Wed, 18 Mar 2020 20:20:04 +0800
Subject: [PATCH 4/6] =?UTF-8?q?=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/modules/courses/shixunHomework/ShixunWorkReport.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js
index 6534eea5e..893159730 100644
--- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js
+++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js
@@ -343,7 +343,7 @@ class ShixunWorkReport extends Component {
// let showAppraiseModals=work_comment===null||work_comment===undefined?false:true;
// console.log(this.props.isAdmin())
document.title=data&&data.course_name;
-
+
return (
data===undefined?"":
From c0f38b84c2a455f95eb4f3605f233e0f883b264a Mon Sep 17 00:00:00 2001
From: cxt <853663049@qq.com>
Date: Wed, 18 Mar 2020 20:25:53 +0800
Subject: [PATCH 5/6] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=B8=8B=E4=B8=80?=
=?UTF-8?q?=E4=B8=AA=E5=BE=85=E8=AF=84=E9=98=85=E7=9A=84=E5=AD=A6=E7=94=9F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/application_controller.rb | 2 +-
app/controllers/homework_commons_controller.rb | 11 ++++++++++-
.../homework_commons/get_next_work.json.jbuilder | 2 ++
config/routes.rb | 1 +
4 files changed, 14 insertions(+), 2 deletions(-)
create mode 100644 app/views/homework_commons/get_next_work.json.jbuilder
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 15e795bdb..ccf52049c 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -330,7 +330,7 @@ class ApplicationController < ActionController::Base
end
if !User.current.logged? && Rails.env.development?
- User.current = User.find 1
+ User.current = User.find 8825
end
diff --git a/app/controllers/homework_commons_controller.rb b/app/controllers/homework_commons_controller.rb
index f64688deb..98be8c699 100644
--- a/app/controllers/homework_commons_controller.rb
+++ b/app/controllers/homework_commons_controller.rb
@@ -11,7 +11,7 @@ class HomeworkCommonsController < ApplicationController
before_action :find_homework, only: [:edit, :show, :update, :group_list, :homework_code_repeat, :code_review_results,
:code_review_detail, :show_comment, :settings, :works_list, :update_settings,
:reference_answer, :publish_groups, :end_groups, :alter_name, :update_explanation,
- :update_score, :update_student_score, :batch_comment]
+ :update_score, :update_student_score, :batch_comment, :get_next_work]
before_action :user_course_identity
before_action :homework_publish, only: [:show, :works_list, :code_review_results, :show_comment, :settings, :reference_answer,
:update_student_score]
@@ -287,6 +287,15 @@ class HomeworkCommonsController < ApplicationController
end
end
+ def get_next_work
+ member = @course.course_member(current_user.id)
+ student_works = @homework.teacher_works(member).where.not(id: @homework.student_works_scores.where(reviewer_role: [1, 2]))
+ if params[:work_id]
+ student_works = student_works.where.not(id: params[:work_id])
+ end
+ @work = student_works.where("work_status > 0").take
+ end
+
def update_score
tip_exception("作业还未发布,暂不能计算成绩") if @homework.publish_time.nil? || @homework.publish_time > Time.now
@homework.update_homework_work_score
diff --git a/app/views/homework_commons/get_next_work.json.jbuilder b/app/views/homework_commons/get_next_work.json.jbuilder
new file mode 100644
index 000000000..e03b18970
--- /dev/null
+++ b/app/views/homework_commons/get_next_work.json.jbuilder
@@ -0,0 +1,2 @@
+json.work_id @work&.id
+json.user_name @work&.user&.real_name
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index 047141ea8..da07c8d89 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -597,6 +597,7 @@ Rails.application.routes.draw do
get :update_score
get :update_student_score
post :batch_comment
+ get :get_next_work
end
collection do
From 48b9fa519726163f6ca93252a64a18c354506e55 Mon Sep 17 00:00:00 2001
From: harry
Date: Wed, 18 Mar 2020 20:28:34 +0800
Subject: [PATCH 6/6] video-player add point
---
.../react/src/modules/courses/Video/video-play/index.jsx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/public/react/src/modules/courses/Video/video-play/index.jsx b/public/react/src/modules/courses/Video/video-play/index.jsx
index e33439dcf..b3d20fd8e 100644
--- a/public/react/src/modules/courses/Video/video-play/index.jsx
+++ b/public/react/src/modules/courses/Video/video-play/index.jsx
@@ -44,7 +44,9 @@ export default ({ src, videoId, logWatchHistory, courseId = null }) => {
let pos = []//播放时间点集
const log = useCallback((callback, isEnd = false) => {
- let params = {}
+ let params = {
+ point: el.currentTime.currentTime
+ }
if (logId) {
params['log_id'] = logId
params['watch_duration'] = getTotalEffectTime(pos) //当前观看视频时长,拖放进度条,重复的视频片段观看时,不会把重复的时长累积进来,最大时长是视频的总时长
@@ -137,7 +139,7 @@ export default ({ src, videoId, logWatchHistory, courseId = null }) => {
log()
}
}
- }else {
+ } else {
lastUpdatedTime = newTime
}
}
@@ -177,7 +179,7 @@ export default ({ src, videoId, logWatchHistory, courseId = null }) => {
el.current.removeEventListener('seeking', onSeeking)
el.current.removeEventListener('seeked', onSeeked)
el.current.removeEventListener('timeupdate', onTimeupdate)
- if(el.current.playing) {
+ if (el.current.playing) {
log()
}
}