+
+
+ {coursedata.teacher_users.length===0?'':
+ 协作老师:
+ {coursedata.teacher_users.map((iem,idx)=>{
+ return(
+ {idx<3?iem:''} {coursedata.teacher_users.length>3&&idx===2?'...':''}
+ )
+ })
+ }
+
+ }
+
From 1f0b9429cd8e03046a48fbae712b56de8e1deae0 Mon Sep 17 00:00:00 2001
From: cxt <853663049@qq.com>
Date: Tue, 24 Mar 2020 13:05:47 +0800
Subject: [PATCH 03/40] =?UTF-8?q?=E9=A2=98=E5=BA=93=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/models/exercise_choice.rb | 2 +-
app/models/exercise_question.rb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/models/exercise_choice.rb b/app/models/exercise_choice.rb
index 3cfd7a17c..617f5b453 100644
--- a/app/models/exercise_choice.rb
+++ b/app/models/exercise_choice.rb
@@ -7,6 +7,6 @@ class ExerciseChoice < ApplicationRecord
scope :find_choice_custom, lambda {|k,v| where("#{k} = ?",v)} #根据传入的参数查找问题
scope :left_choice_choose, lambda {|k,v| where("#{k} > ?",v)} #根据传入的参数查找问题
- validates :choice_text, length: { maximum: 500, too_long: "不能超过500个字符" }
+ # validates :choice_text, length: { maximum: 500, too_long: "不能超过500个字符" }
end
\ No newline at end of file
diff --git a/app/models/exercise_question.rb b/app/models/exercise_question.rb
index 2b8d88c57..e34c316aa 100644
--- a/app/models/exercise_question.rb
+++ b/app/models/exercise_question.rb
@@ -16,7 +16,7 @@ class ExerciseQuestion < ApplicationRecord
scope :left_question_choose, lambda {|k,v| where("#{k} > ?",v)} #根据传入的参数查找问题
scope :find_objective_questions, -> {where("question_type != ?",4)} #查找全部客观题
- validates :question_title, length: { maximum: 1000, too_long: "不能超过1000个字符" }
+ # validates :question_title, length: { maximum: 1000, too_long: "不能超过1000个字符" }
def question_type_name
From 448151f51a406cd3c95c613c4b201b70b2abc166 Mon Sep 17 00:00:00 2001
From: cxt <853663049@qq.com>
Date: Tue, 24 Mar 2020 13:23:17 +0800
Subject: [PATCH 04/40] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E8=AF=95=E5=8D=B7?=
=?UTF-8?q?=E9=A2=98=E5=BA=93=E7=9A=84=E5=AD=97=E6=95=B0=E9=99=90=E5=88=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/models/exercise_bank_choice.rb | 2 +-
app/models/exercise_bank_question.rb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/models/exercise_bank_choice.rb b/app/models/exercise_bank_choice.rb
index 4a4c46251..70465a72e 100644
--- a/app/models/exercise_bank_choice.rb
+++ b/app/models/exercise_bank_choice.rb
@@ -5,6 +5,6 @@ class ExerciseBankChoice < ApplicationRecord
scope :find_choice_custom, lambda {|k,v| where("#{k} = ?",v)} #根据传入的参数查找问题
scope :left_choice_choose, lambda {|k,v| where("#{k} > ?",v)} #根据传入的参数查找问题
- validates :choice_text, length: { maximum: 500, too_long: "不能超过500个字符" }
+ # validates :choice_text, length: { maximum: 500, too_long: "不能超过500个字符" }
end
\ No newline at end of file
diff --git a/app/models/exercise_bank_question.rb b/app/models/exercise_bank_question.rb
index 75d6bfedf..311c81491 100644
--- a/app/models/exercise_bank_question.rb
+++ b/app/models/exercise_bank_question.rb
@@ -11,7 +11,7 @@ class ExerciseBankQuestion < ApplicationRecord
scope :left_question_choose, lambda {|k,v| where("#{k} > ?",v)} #根据传入的参数查找问题
scope :find_objective_questions, -> {where("question_type != ?",4)} #查找全部客观题
- validates :question_title, length: { maximum: 1000, too_long: "不能超过1000个字符" }
+ # validates :question_title, length: { maximum: 1000, too_long: "不能超过1000个字符" }
def question_type_name
case self.question_type
From a62e539a834cf9ca5e5587247cc6ba7c1b5ec1ef 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, 24 Mar 2020 15:13:46 +0800
Subject: [PATCH 05/40] =?UTF-8?q?=E8=A7=86=E9=A2=91=E6=B7=BB=E5=8A=A0zoom?=
=?UTF-8?q?=20=E5=B9=B3=E5=8F=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../react/src/modules/courses/Video/Live.js | 56 ++++++++++++++----
.../src/modules/courses/Video/LiveNew.js | 6 +-
.../src/modules/courses/Video/VideoIndex.js | 8 ++-
.../src/modules/courses/Video/images/zoom.png | Bin 0 -> 3403 bytes
.../question/questioncss/questioncom.css | 2 +-
5 files changed, 54 insertions(+), 18 deletions(-)
create mode 100755 public/react/src/modules/courses/Video/images/zoom.png
diff --git a/public/react/src/modules/courses/Video/Live.js b/public/react/src/modules/courses/Video/Live.js
index d869922fb..a7b7f6890 100644
--- a/public/react/src/modules/courses/Video/Live.js
+++ b/public/react/src/modules/courses/Video/Live.js
@@ -9,6 +9,7 @@ import bilibili from './images/bilibili.png';
import tencent from './images/tencent.png';
import WeiBaiTong from './images/WeiBaiTong.png';
import douyu from './images/douyu.jpg';
+import zoom from './images/zoom.png';
class Live extends Component{
render(){
@@ -16,32 +17,65 @@ class Live extends Component{
return(
+
EduCoder支持所有第三方直播平台,特别推荐:
-
- -
+
+ -
- (简明手册)
+ (简明手册)
- -
+
-
- (简明手册)
+ (简明手册)
- -
+
-
- (简明手册)
+ (简明手册)
- -
-

+
-
+
+
- (简明手册)
+ (简明手册)
+
-
+
+
+
+ (简明手册)
+
{
lives && lives.length > 0 ?
@@ -79,4 +113,4 @@ class Live extends Component{
)
}
}
-export default Live;
\ No newline at end of file
+export default Live;
diff --git a/public/react/src/modules/courses/Video/LiveNew.js b/public/react/src/modules/courses/Video/LiveNew.js
index e95400ed0..2c10bfe32 100644
--- a/public/react/src/modules/courses/Video/LiveNew.js
+++ b/public/react/src/modules/courses/Video/LiveNew.js
@@ -9,7 +9,7 @@ import axios from 'axios';
const { TextArea } = Input;
const { Option } = Select;
-const array=['腾讯课堂','斗鱼直播','Bilibili','威佰通'];
+const array=['腾讯课堂','斗鱼直播','Bilibili','威佰通','zoom'];
function range(start, end) {
const result = [];
@@ -290,7 +290,7 @@ class LiveNew extends Component{
)}
-
+
取消
@@ -303,4 +303,4 @@ class LiveNew extends Component{
}
}
const WrappedLiveNew = Form.create({name: 'LiveNew'})(LiveNew);
-export default WrappedLiveNew;
\ No newline at end of file
+export default WrappedLiveNew;
diff --git a/public/react/src/modules/courses/Video/VideoIndex.js b/public/react/src/modules/courses/Video/VideoIndex.js
index 0815bc8aa..c6d736824 100644
--- a/public/react/src/modules/courses/Video/VideoIndex.js
+++ b/public/react/src/modules/courses/Video/VideoIndex.js
@@ -299,8 +299,7 @@ class VideoIndex extends Component {
const flag = parseInt(course_identity) < 5;
const newOperation = flag;
const new_upload = flag && (is_teacher && this.props.checkIfProfessionalCertification());
-
-
+ let isAdmin = this.props&&this.props.isAdmin();
return (
@@ -404,7 +403,10 @@ class VideoIndex extends Component {
:
-
添加直播
+ isAdmin===true?
+
添加直播
+ :
+ ""
}
diff --git a/public/react/src/modules/courses/Video/images/zoom.png b/public/react/src/modules/courses/Video/images/zoom.png
new file mode 100755
index 0000000000000000000000000000000000000000..67880716191443a1ae96c009d925b30f0ff9ec91
GIT binary patch
literal 3403
zcmV-R4Ycx!P)
(k*{000dVNklU=YJN2LN#Nle*<~fPl4V5M}L4StYRxVeM
zD~xan$`BwS&}`wTC_9YdO=;%6564i=tTXF-JkYc1jXg+zql{ONt5GHyVHirDK-$6y
zh20wQpBCOpG;-*pGHLB>uXK$LwH^x)uEMg_2wNgcO(a|`@Ta~|B2c8D2uIcOj*WQ5
zMEq`diqn*db@xjbG1`mxsu8}bFjk;Yp;?70BHopNSDTd`2j)==(t)y!tJK#a-pu>r
z$ah)M8a4Aq+OqKX_sRS2%g7ZvBrBWifo}^;Ldi!60O_>S9maujN-h5-hF@kGw*GFO
z)bwv*2B
z7ictw5>fgo_}$KsQl(lvw$)Vec&*3&;luc*T4n>|1@h>MqmA!oIA$aM<@9bgAOD%`
zXtyb2*Xj+PVKp%P{|LU@w!!!;-#J$*N-DGj!`()hfl$y5m~(F>L@3pfWwS|BxqGRc
z>^{*&TA0fM&*z5<=l3ya6pfwm@2M1J2bS_aB06@RUSO0p0yoC{2yR~6U%d^#UVRNr?1nC{!5g0=xUg
z6zmJ?$yftFk#%R(`Tbj<@4*Nm2)-
z3%J7w3j_vq;3K3^YBIL#1OgQXi_j0q@03nem474TuH8S84>I6a2;9^K>ozAe0VmZ`
ztwP`lgH_@^6V9G^AQo&UiNweY^=dh;a0($ugds*4U@e|QR0M3AEm4Xkd+%j;yk=Tb
z{X_W-2z+t_?ecWb@_&nEw7a~4>2!UT&A@X}nsuHqlYk$`X~qph6t%Kjg%^zQnhHk}
zmbCTB4wd1gxkiL*y(~s*)ZzFB8?yXV6OWuIlZFe|X-+}NO?a#UoWl@5zRY23c}YB8
zGM4=&q$NsV5Qaq&SDTP;dD%>GK^220G=(A0`g#0an4+Iix`OY3w|pA4@U)l179vhY
z2G6uo99eGkvbfH8P-@;8eD%!
z@XVQ2Cf$Z#Whg1UfE7VLf2lUEH>hw@l{=$=*MpFiDBtbK!_Zh4ad(Tdxq6Azci2m+
z8Mc={$Q#3&U;y8i2+y6<0T_84s6D~rV<-4$Hi@e(AyLjP2%BTAk&F33XY6y
zOIyC%C-6rkH9L{V*NovF5w7g?+}$&-R(R61ur6IdXwt0k;0Nt{=;Jjw8>wg&=jNt;@3lN&rvSN2VtH&1dLjy^H!S2SY9BV$t^58>$w(n(0^_HWD
z-L8`hNAQrB#}%56@lp$0BV~aP3q`o4J<%I@X7&Ic!7?cR-d5QE{ByydmelMc{kYyJi-E65S4MFdVS^^v
zynC*k9J5}hcp;lanAo-lHd2yW&qMplq^>uB;%^f*uVglBy?~q5k^_VmUdT=Hw@q2B
zG;njA>Vzn=Jlk5uoCE87W<~A$jksB}{bJ@M3P@^5VdiZ6vD_(!8Nm13=SJ{It)=|4
zPPL}n(j>pWA53(H*tglFEGFD~CRu2TO>;HkKPwuRS;2yWcFNM89|;4>3S*6J)VJRCw)S>9NSTvnnTLNfQPCwICMYL=(RfDhi5#GOH|{!d)!1^)g$;B
zj()2s^O4MRX|w9+;0}f5rk;Q8Xk1jK^g(8-@&u3@rv}SjYnZ)fzWh($K!R~=)zy=y
zM7Xf+ZtO(k)Ub%QBJUFIQ9^#QYq9)8pY0}fgw5v#&*Rbz`*A5^9WcU0zC%O|dbo<^
zHFZ?7Novn!d*pf@k{$6P@JGf#6wz2$OL@ZZ(19{(IoFzt*XnpRJT1a_*RF~1nF-_m
z@$V+_Z18{6}9wDyh^N
z1~$@0XI)Ks*IMTJ9!nLj$=IomLXvxy$fJF=J8rd3z~>)DD2*c)s*SK(E#q9|cYuG8
zt8@eb%f&D&rblOn2;W{9z
z(sG>1c`uWVzbld}|Ro;qP
znHwaW1G%-&k^g0bKWU=|jde^l9`~v;wKMQa-05u&Bi8R*#QrWEz57i!YEazB_k5*N
zh`URNQ)9ZB=UP5v`Jtc6C+BqBH1&(8GTG#_%ug^)T@T@?66`mYAMIKsFO@u~Q$=}H
zG{dBXNL$(7e2lvf9_9_6>nfVH?=xt&4l5eX;-HXQ5el7M6&h4nW+HxxP!4?W{{?)f
zmDqg#LOjY*F6{=+QLC&UVEAcmZQLC6IC9QMw;v%Y&SIdSV1r03R=Fs1nol}i%j*)b
z(fa&GvZzg*M4P~Pg$$MkzAirB4+@w#=mpbCdjwu+@urDxT%EemkU!rQGL
zZ)K+_)gaE%uA;{_#elUOQP^daPo3oIQiz4&rmYALbfF%zBuFW2GnOU07RiUP$5my*
zYDTsOlpEn&F{5g0*WH5C&MwZba@uJ-7)FSbgoTS-N0mu~u7JO1m3#Iql$SeeI}Uu8
zj!spxEETfubVUzrXN3;Q$&SHqV>^8X|6FXRv{Ekvo>mywJ*-{96V3FRz0(Q@Lx|)4
z!sB5r51U*r7oYnLT+vMfa+VxjbsD*YuCv1(p3PR-;wj5^HSkfFt~jY?Y``$GC^Lpx
zLaZis9?oi8Z`@5HcUer89brV7$tV@3Hn5@T^D@*ST~WU8(Yyy!Ls<_mlyLml0323^3;
zm~pY`G?7CpJZs_6&boW|t;Rj915FFJTStY3k+?`dw_O($u}rPPuSxTOQ#0G`IZEyO
zv83!+lvPWWXSjLi0(q^c%g>yt-uqKn;yGEu(BE2`8|o3$_*qx
hVJV8zc=?4?{Vy-q8mn7@{V)Ik002ovPDHLkV1iYQq6`24
literal 0
HcmV?d00001
diff --git a/public/react/src/modules/question/questioncss/questioncom.css b/public/react/src/modules/question/questioncss/questioncom.css
index cfe92fdeb..1f4e75f9e 100644
--- a/public/react/src/modules/question/questioncss/questioncom.css
+++ b/public/react/src/modules/question/questioncss/questioncom.css
@@ -428,7 +428,7 @@
color: #4CACFF;
}
.xiaoshou{
- cursor:pointer !important;
+ cursor:√ !important;
}
.xiaoshout{
cursor:default !important;
From e7fb988db55e226ee0c0aac65d88d98f628e75d2 Mon Sep 17 00:00:00 2001
From: cxt <853663049@qq.com>
Date: Tue, 24 Mar 2020 15:41:03 +0800
Subject: [PATCH 06/40] =?UTF-8?q?=E8=AF=95=E5=8D=B7=E7=AD=94=E9=A2=98?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=E5=A2=9E=E5=8A=A0=E5=BE=85=E6=89=B9=E9=98=85?=
=?UTF-8?q?=E7=8A=B6=E6=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/helpers/exercises_helper.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/helpers/exercises_helper.rb b/app/helpers/exercises_helper.rb
index 1887aee5a..26a9aa9ec 100644
--- a/app/helpers/exercises_helper.rb
+++ b/app/helpers/exercises_helper.rb
@@ -714,9 +714,9 @@ module ExercisesHelper
end
teacher_review = ex_user.subjective_score < 0.0 ? false : true
if (user_status == 0 && commit_status == 1) || (user_status == 1 && ex_user_exercise_status == 3 && commit_status == 1) #老师都可以看,学生,需在试卷已提交,且已截止的情况下看
- ex_object_score = ex_user.objective_score < 0.0 ? 0.0 : ex_user.objective_score.round(1).to_s
+ ex_object_score = ex_user.objective_score <= 0.0 ? 0 : ex_user.objective_score.round(1).to_s
ex_subject_score = ex_user.subjective_score < 0.0 ? nil : ex_user.subjective_score.round(1).to_s
- score = ex_user.score.present? ? ex_user.score.round(1).to_s : 0.0.to_s
+ score = ex_user.score.present? && ex_user.score > 0.0 ? ex_user.score.round(1).to_s : 0.to_s
else
ex_object_score = nil
ex_subject_score = nil
From ad43667c941b882298111f6a02da97c45f02412e Mon Sep 17 00:00:00 2001
From: cxt <853663049@qq.com>
Date: Tue, 24 Mar 2020 15:48:07 +0800
Subject: [PATCH 07/40] =?UTF-8?q?=E8=AF=95=E5=8D=B7=E7=AD=94=E9=A2=98?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=E5=A2=9E=E5=8A=A0=E5=BE=85=E6=89=B9=E9=98=85?=
=?UTF-8?q?=E7=8A=B6=E6=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/helpers/exercises_helper.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/helpers/exercises_helper.rb b/app/helpers/exercises_helper.rb
index 26a9aa9ec..b57c8525b 100644
--- a/app/helpers/exercises_helper.rb
+++ b/app/helpers/exercises_helper.rb
@@ -715,7 +715,7 @@ module ExercisesHelper
teacher_review = ex_user.subjective_score < 0.0 ? false : true
if (user_status == 0 && commit_status == 1) || (user_status == 1 && ex_user_exercise_status == 3 && commit_status == 1) #老师都可以看,学生,需在试卷已提交,且已截止的情况下看
ex_object_score = ex_user.objective_score <= 0.0 ? 0 : ex_user.objective_score.round(1).to_s
- ex_subject_score = ex_user.subjective_score < 0.0 ? nil : ex_user.subjective_score.round(1).to_s
+ ex_subject_score = ex_user.subjective_score < 0.0 ? nil : (ex_user.subjective_score > 0.0 ? ex_user.subjective_score.round(1).to_s : 0)
score = ex_user.score.present? && ex_user.score > 0.0 ? ex_user.score.round(1).to_s : 0.to_s
else
ex_object_score = nil
From c34da99969b1872eca7082061876cab01d3ffa99 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Tue, 24 Mar 2020 16:06:00 +0800
Subject: [PATCH 08/40] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../OfficialAcademicTranscript.js | 31 ++++++++++---------
.../shixunreport/Shixunbage.css | 15 +++++++++
public/react/src/modules/tpm/TPMBanner.js | 4 +--
3 files changed, 34 insertions(+), 16 deletions(-)
create mode 100644 public/react/src/modules/courses/shixunHomework/shixunreport/Shixunbage.css
diff --git a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
index a156d8d01..2d0f61a0e 100644
--- a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
+++ b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
@@ -1,9 +1,7 @@
import React, {Component} from "react";
-import {WordsBtn} from 'educoder';
-import {Table, InputNumber, Tooltip} from "antd";
-import {Link, Switch, Route, Redirect} from 'react-router-dom';
+import {Table, InputNumber, Tooltip,Badge} from "antd";
import axios from 'axios';
-
+import './Shixunbage.css';
class OfficialAcademicTranscript extends Component {
constructor(props) {
@@ -116,14 +114,15 @@ class OfficialAcademicTranscript extends Component {
className: "TaskForms",
render: (text, record) => (
- this.myjumptopic("id" + record.customs)}
- title={record.taskname.name.length > 15 ? record.taskname.name : ""}>
- {record.taskname.name}
-
- {record.taskname.complete_status === 2 ?
- 延时 : record.taskname.complete_status === 3 ?
- 延时 : ""}
+
+ this.myjumptopic("id" + record.customs)}
+ title={record.taskname.name.length > 15 ? record.taskname.name : ""}>
+ {record.taskname.name}
+
+ {record.taskname.complete_status === 2 ?
+ : record.taskname.complete_status === 3 ?
+ : ""}
+
),
@@ -305,10 +304,11 @@ class OfficialAcademicTranscript extends Component {
.tasknameName:link{color:#676767}
.tasknameName:hover{color:#4CACFF}
.tasknameName{
- overflow: hidden;
+ display: inline-block;
+ overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
- max-width: 225px;
+ max-width: 210px;
text-align: left !important;
}
.TaskForms{
@@ -331,6 +331,9 @@ class OfficialAcademicTranscript extends Component {
.mr22{
margin-right: 22px;
}
+ .pdt3{
+ padding-top:3px;
+ }
`}
{datas === undefined ? "" :
- 复制实训
+ 复制
From 65479bcf8bef278e2903fb1521475069558f545b Mon Sep 17 00:00:00 2001
From: anke1460
Date: Tue, 24 Mar 2020 16:31:46 +0800
Subject: [PATCH 09/40] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AD=A6=E6=A0=A1?=
=?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=95=B0=E6=8D=AE=E9=A1=B9=E7=9B=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../school_base_statistics_controller.rb | 17 +++
.../admins/school_base_statistic_service.rb | 138 ++++++++++++++++++
.../school_base_statistics/_list.html.erb | 48 ++++++
.../school_base_statistics/index.html.erb | 14 ++
.../school_base_statistics/index.js.erb | 1 +
app/views/admins/shared/_sidebar.html.erb | 3 +-
config/routes.rb | 2 +
7 files changed, 222 insertions(+), 1 deletion(-)
create mode 100644 app/controllers/admins/school_base_statistics_controller.rb
create mode 100644 app/services/admins/school_base_statistic_service.rb
create mode 100644 app/views/admins/school_base_statistics/_list.html.erb
create mode 100644 app/views/admins/school_base_statistics/index.html.erb
create mode 100644 app/views/admins/school_base_statistics/index.js.erb
diff --git a/app/controllers/admins/school_base_statistics_controller.rb b/app/controllers/admins/school_base_statistics_controller.rb
new file mode 100644
index 000000000..026fd9492
--- /dev/null
+++ b/app/controllers/admins/school_base_statistics_controller.rb
@@ -0,0 +1,17 @@
+class Admins::SchoolBaseStatisticsController < Admins::BaseController
+
+ def index
+ params[:sort_by] = params[:sort_by].presence || :teacher_count
+ params[:sort_direction] = params[:sort_direction].presence || :desc
+
+ total_count, statistics = Admins::SchoolBaseStatisticService.call(params)
+
+ @statistics = paginate statistics, total_count: total_count
+ @params_page = params[:page] || 1
+
+ respond_to do |format|
+ format.html
+ format.js
+ end
+ end
+end
diff --git a/app/services/admins/school_base_statistic_service.rb b/app/services/admins/school_base_statistic_service.rb
new file mode 100644
index 000000000..cbad5d45a
--- /dev/null
+++ b/app/services/admins/school_base_statistic_service.rb
@@ -0,0 +1,138 @@
+class Admins::SchoolBaseStatisticService < ApplicationService
+ include CustomSortable
+
+ attr_reader :params
+
+ sort_columns :student_count, :teacher_count, :course_count, :course_group_count,
+ :attachment_count, :video_count, :normal_work_count, :shixun_work_count, :evaluate_count,
+ :student_work_count, :exercise_count, default_direction: :desc
+
+ def initialize(params)
+ @params = params
+ end
+
+ def call
+ schools = School.group('schools.id')
+
+ keyword = params[:keyword].try(:to_s).try(:strip)
+ if keyword.present?
+ schools = schools.where("schools.name LIKE :keyword OR schools.id LIKE :keyword", keyword: "%#{keyword}%")
+ end
+
+ count = schools.count.count
+ # 根据排序字段进行查询
+ schools = query_by_sort_column(schools, params[:sort_by])
+ schools.reorder("#{ params[:sort_by] != 0} desc")
+
+ schools = custom_sort(schools, params[:sort_by], params[:sort_direction])
+ schools = schools.limit(page_size).offset(offset)
+ schools = package_other_data(schools)
+ [count, schools]
+ end
+
+ def package_other_data(schools)
+ ids = schools.map(&:id)
+
+ student_count = CourseMember.course_students.joins(course: :school).group(:school_id).where("role= 'STUDENT' AND courses.is_delete = false AND schools.id in (?)", ids).count("distinct user_id")
+ teachers = UserExtension.where(school_id: ids, identity: :teacher).group(:school_id)
+ teacher_count = teachers.count
+ courses = Course.where(is_delete: 0, school_id: ids).group(:school_id)
+ course_count= courses.count
+ course_group_count = courses.joins(:course_groups).count
+ attachment_count = courses.joins(:attachments).count
+ video_count = teachers.joins(user: :videos).where("videos.delete_state IS NOT NULL").count
+
+ homeworks = HomeworkCommon.joins(:course).where(courses: { school_id: ids }).where("courses.is_delete = false")
+ shixun_work_count = homeworks.where(homework_type: 4).group(:school_id).count
+ normal_work_count = homeworks.where(homework_type: 1).group(:school_id).count
+ student_work_count = homeworks.joins(:student_works).group(:school_id).count
+ evaluate_count = EvaluateRecord.unscoped.joins('JOIN homework_commons_shixuns hcs ON hcs.shixun_id = evaluate_records.shixun_id
+ JOIN homework_commons hc ON hcs.homework_common_id = hc.id AND hc.homework_type = 4
+ JOIN course_members ON course_members.user_id = evaluate_records.user_id
+ JOIN courses ON course_members.course_id = courses.id AND hc.course_id = courses.id')
+ .where(courses: { school_id: ids })
+ .group(:school_id).count
+ exercise_count = Exercise.joins(:course).where(courses: { school_id: ids }).group(:school_id).count
+
+ schools.map do |school|
+ {
+ id: school.id,
+ name: school.name,
+ teacher_count: teacher_count[school.id],
+ student_count: student_count[school.id],
+ course_count: course_count[school.id],
+ course_group_count: course_group_count[school.id],
+ attachment_count: attachment_count[school.id],
+ video_count: video_count[school.id],
+ normal_work_count: normal_work_count[school.id],
+ shixun_work_count: shixun_work_count[school.id],
+ student_work_count: student_work_count[school.id],
+ evaluate_count: evaluate_count[school.id],
+ exercise_count: exercise_count[school.id]
+ }
+ end
+ end
+
+ private
+ def query_by_sort_column(schools, sort_by_column)
+ base_query_column = 'schools.id, schools.name'
+
+ case sort_by_column.to_s
+ when 'teacher_count' then
+ schools.joins('LEFT JOIN user_extensions ue ON ue.school_id = schools.id AND ue.identity = 0')
+ .select("#{base_query_column}, COUNT(*) teacher_count")
+ when 'student_count' then
+ schools.joins("LEFT JOIN courses ue ON ue.school_id = schools.id AND ue.is_delete = FALSE
+ LEFT JOIN course_members ON course_members.course_id = ue.id AND course_members.role = 'STUDENT'")
+ .select("#{base_query_column}, COUNT(distinct user_id) student_count")
+ when 'course_count' then
+ schools.joins('LEFT JOIN courses ON courses.school_id = schools.id AND courses.is_delete = false')
+ .select("#{base_query_column}, COUNT(*) course_count")
+ when 'course_group_count' then
+ schools.joins("LEFT JOIN courses ON courses.school_id = schools.id AND courses.is_delete = false
+ LEFT JOIN course_groups ON course_groups.course_id = courses.id")
+ .select("#{base_query_column}, COUNT(*) course_group_count")
+ when 'attachment_count' then
+ schools.joins("LEFT JOIN courses cs ON cs.school_id = schools.id AND cs.is_delete = 0
+ LEFT JOIN attachments ON attachments.container_type ='Course' AND attachments.container_id = cs.id")
+ .select("#{base_query_column}, COUNT(*) attachment_count")
+ when 'video_count' then
+ schools.joins("LEFT JOIN user_extensions ue ON ue.school_id = schools.id AND ue.identity = 0
+ LEFT JOIN videos ON videos.user_id = ue.user_id AND videos.delete_state IS NOT NULL")
+ .select("#{base_query_column}, COUNT(*) video_count")
+ when 'normal_work_count' then
+ schools.joins("LEFT JOIN courses ON courses.school_id = schools.id
+ LEFT JOIN homework_commons ON homework_commons.course_id = courses.id AND homework_commons.homework_type = 0")
+ .select("#{base_query_column}, COUNT(*) normal_work_count")
+ when 'shixun_work_count' then
+ schools.joins("LEFT JOIN courses ON courses.school_id = schools.id
+ LEFT JOIN homework_commons ON homework_commons.course_id = courses.id AND homework_commons.homework_type = 4")
+ .select("#{base_query_column}, COUNT(*) shixun_work_count")
+ when 'student_work_count' then
+ schools.joins("LEFT JOIN courses ON courses.school_id = schools.id
+ LEFT JOIN homework_commons ON homework_commons.course_id = courses.id
+ LEFT JOIN student_works ON student_works.homework_common_id = homework_commons.id")
+ .select("#{base_query_column}, COUNT(*) student_work_count")
+ when 'evaluate_count' then
+ schools.joins('
+ LEFT JOIN courses ON courses.school_id = schools.id AND courses.is_delete = false
+ LEFT JOIN course_members ON course_members.course_id = courses.id
+ LEFT JOIN evaluate_records ON course_members.user_id = evaluate_records.user_id
+ LEFT JOIN homework_commons_shixuns hcs ON hcs.shixun_id = evaluate_records.shixun_id
+ LEFT JOIN homework_commons hc ON hcs.homework_common_id = hc.id AND hc.homework_type = 4')
+ .select("#{base_query_column}, COUNT(*) evaluate_count")
+ when 'exercise_count' then
+ schools.joins('LEFT JOIN courses cs ON cs.school_id = schools.id AND cs.is_delete = 0
+ LEFT JOIN exercises ON exercises.course_id = cs.id')
+ .select("#{base_query_column}, COUNT(*) exercise_count")
+ end
+ end
+
+ def page_size
+ params[:per_page] || 20
+ end
+
+ def offset
+ (params[:page].to_i.zero? ? 0 : params[:page].to_i - 1) * page_size
+ end
+end
\ No newline at end of file
diff --git a/app/views/admins/school_base_statistics/_list.html.erb b/app/views/admins/school_base_statistics/_list.html.erb
new file mode 100644
index 000000000..aab91f5c7
--- /dev/null
+++ b/app/views/admins/school_base_statistics/_list.html.erb
@@ -0,0 +1,48 @@
+
+
+
+ 序号 |
+ 单位名称 |
+ <%= sort_tag('注册教师', name: 'teacher_count', path: admins_school_base_statistics_path) %> |
+ <%= sort_tag('注册学生', name: 'student_count', path: admins_school_base_statistics_path) %> |
+ <%= sort_tag('教学课堂', name: 'course_count', path: admins_school_base_statistics_path) %> |
+ <%= sort_tag('管理分班', name: 'course_group_count', path: admins_school_base_statistics_path) %> |
+ <%= sort_tag('课件资源', name: 'attachment_count', path: admins_school_base_statistics_path) %> |
+ <%= sort_tag('教学视频', name: 'video_count', path: admins_school_base_statistics_path) %> |
+ <%= sort_tag('普通作业', name: 'normal_work_count', path: admins_school_base_statistics_path) %> |
+ <%= sort_tag('实训作业', name: 'shixun_work_count', path: admins_school_base_statistics_path) %> |
+ <%= sort_tag('作业文件', name: 'student_work_count', path: admins_school_base_statistics_path) %> |
+ <%= sort_tag('评测次数', name: 'evaluate_count', path: admins_school_base_statistics_path) %> |
+ <%= sort_tag('在线试卷', name: 'exercise_count', path: admins_school_base_statistics_path) %> |
+
+
+
+ <% if statistics.present? %>
+ <% statistics.each_with_index do |statistic, index| %>
+
+ <%= list_index_no(@params_page.to_i, index) %> |
+
+ <%= link_to statistic[:name], "/colleges/#{statistic[:id]}/statistics",
+ target: '_blank', data: { toggle: 'tooltip', title: '点击查看学校统计概况' } %>
+ |
+ <%= statistic[:teacher_count].to_i %> |
+ <%= statistic[:student_count].to_i %> |
+ <%= statistic[:course_count].to_i %> |
+ <%= statistic[:course_group_count].to_i %> |
+ <%= statistic[:attachment_count].to_i %> |
+ <%= statistic[:video_count].to_i %> |
+ <%= statistic[:normal_work_count].to_i %> |
+ <%= statistic[:shixun_work_count].to_i %> |
+ <%= statistic[:student_work_count].to_i %> |
+ <%= statistic[:evaluate_count].to_i %> |
+ <%= statistic[:exercise_count].to_i %> |
+
+
+ <% end %>
+ <% else %>
+ <%= render 'admins/shared/no_data_for_table' %>
+ <% end %>
+
+
+
+<%= render partial: 'admins/shared/paginate', locals: { objects: statistics } %>
\ No newline at end of file
diff --git a/app/views/admins/school_base_statistics/index.html.erb b/app/views/admins/school_base_statistics/index.html.erb
new file mode 100644
index 000000000..a519f245f
--- /dev/null
+++ b/app/views/admins/school_base_statistics/index.html.erb
@@ -0,0 +1,14 @@
+<% define_admin_breadcrumbs do %>
+ <% add_admin_breadcrumb('数据项列表', admins_school_base_statistics_path) %>
+<% end %>
+
+
+ <%= form_tag(admins_school_base_statistics_path, method: :get, class: 'form-inline search-form', remote: true) do %>
+ <%= text_field_tag(:keyword, params[:keyword], class: 'form-control col-sm-2 ml-3', placeholder: '学校名称搜索') %>
+ <%= submit_tag('搜索', class: 'btn btn-primary ml-3', 'data-disable-with': '搜索中...') %>
+ <% end %>
+
+
+
+ <%= render partial: 'admins/school_base_statistics/list', locals: { statistics: @statistics } %>
+
\ No newline at end of file
diff --git a/app/views/admins/school_base_statistics/index.js.erb b/app/views/admins/school_base_statistics/index.js.erb
new file mode 100644
index 000000000..64df1e490
--- /dev/null
+++ b/app/views/admins/school_base_statistics/index.js.erb
@@ -0,0 +1 @@
+$(".school-base-statistic-list-container").html("<%= j(render partial: 'admins/school_base_statistics/list', locals: { statistics: @statistics }) %>")
\ No newline at end of file
diff --git a/app/views/admins/shared/_sidebar.html.erb b/app/views/admins/shared/_sidebar.html.erb
index c7c487dcf..d77e4ed4e 100644
--- a/app/views/admins/shared/_sidebar.html.erb
+++ b/app/views/admins/shared/_sidebar.html.erb
@@ -17,7 +17,8 @@
-
<%= sidebar_item_group('#school-submenu', '学校统计', icon: 'area-chart') do %>
- <%= sidebar_item(admins_daily_school_statistics_path, '统计总表', icon: 'bar-chart', controller: 'admins-daily_school_statistics') %>
- - <%= sidebar_item(admins_school_statistics_path, '数据变化报表', icon: 'line-chart', controller: 'admins-schools') %>
+ - <%= sidebar_item(admins_school_statistics_path, '数据变化报表', icon: 'line-chart', controller: 'admins-school_statistics') %>
+ - <%= sidebar_item(admins_school_base_statistics_path, '数据项列表', icon: 'eyedropper', controller: 'admins-school_base_statistics') %>
<% end %>
diff --git a/config/routes.rb b/config/routes.rb
index f858056a7..9a471fb7f 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1173,6 +1173,8 @@ Rails.application.routes.draw do
get :contrast, on: :collection
end
+ resources :school_base_statistics, only: [:index]
+
resources :users, only: [:index, :edit, :update, :destroy] do
member do
post :reward_grade
From 9475c6c35ce49d890b67405354f5e890387bc7b2 Mon Sep 17 00:00:00 2001
From: cxt <853663049@qq.com>
Date: Tue, 24 Mar 2020 16:53:20 +0800
Subject: [PATCH 10/40] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/exercises_controller.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/controllers/exercises_controller.rb b/app/controllers/exercises_controller.rb
index e20a8bd28..7cda7f7cb 100644
--- a/app/controllers/exercises_controller.rb
+++ b/app/controllers/exercises_controller.rb
@@ -1201,7 +1201,7 @@ class ExercisesController < ApplicationController
# 分页
@page = params[:page] || 1
@limit = params[:limit] || 20
- @exercise_users_list = @exercise_users_list.page(@page).per(@limit)
+ @exercise_users_list = @exercise_users_list.preload(:exercise_user_scores, user: :user_extension).page(@page).per(@limit)
else
@exercise_users_list = []
From 42146c13d402015d5cceef718f907049160639df 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, 24 Mar 2020 17:30:39 +0800
Subject: [PATCH 11/40] =?UTF-8?q?=E8=AF=95=E5=8D=B7=E5=BE=85=E5=AE=A1?=
=?UTF-8?q?=E6=89=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../exercise/Studentshavecompletedthelist.js | 996 ++++++++++--------
1 file changed, 584 insertions(+), 412 deletions(-)
diff --git a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js
index b8880c6f2..5d3579238 100644
--- a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js
+++ b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js
@@ -23,12 +23,17 @@ import './yslexercisetable.css';
import {getImageUrl, toPath, sortDirections} from 'educoder';
import NoneData from '../../../modules/courses/coursesPublic/NoneData';
import ModulationModal_exercise from "../coursesPublic/ModulationModal_exercise";
+
const Search = Input.Search;
const RadioGroup = Radio.Group;
const CheckboxGroup = Checkbox.Group;
const {Option} = Select;
//学生老师页面
-let columnsystwo=[];
+let columnsystwo = [];
+let myssubjective = 0; //是否显示主观题
+let mysubjective_score = 0;//主观题得分
+let myobjective_score = 0;//客观题得分
+
class Studentshavecompletedthelist extends Component {
// http://localhost:3007/courses/1309/exercises/722/exercises/student_exercise_list?debug=s
constructor(props) {
@@ -47,7 +52,7 @@ class Studentshavecompletedthelist extends Component {
teacherlist: undefined,
searchtext: "",
Teacherliststudentlist: undefined,
- mylistansum:0,
+ mylistansum: 0,
review: null,
course_groupysls: undefined,
nocomment: false,
@@ -72,13 +77,13 @@ class Studentshavecompletedthelist extends Component {
key: 'number',
align: 'center',
className: "edu-txt-center font-14",
- width:'100px',
+ width: '100px',
render: (text, record) => (
{record.number === "--" ?
- {record.number}
+ {record.number}
:
- {record.number}
+ {record.number}
}
@@ -90,15 +95,16 @@ class Studentshavecompletedthelist extends Component {
key: 'name',
align: 'center',
className: "edu-txt-center font-14 maxnamewidth110",
- width:'100px',
+ width: '100px',
render: (text, record) => (
{record.name === "--" ?
- {record.name}
+ {record.name}
:
- {record.name}
+ {record.name}
}
@@ -110,30 +116,30 @@ class Studentshavecompletedthelist extends Component {
key: 'stduynumber',
align: 'center',
className: "edu-txt-center font-14 maxnamewidth175",
- width:'175px',
+ width: '175px',
sorter: true,
sortDirections: sortDirections,
render: (text, record) => (
{record.stduynumber === null ?
-- :
record.stduynumber ===
"" ?
-- :
{record.stduynumber}
}
@@ -146,26 +152,26 @@ class Studentshavecompletedthelist extends Component {
dataIndex: 'classroom',
align: 'center',
className: "edu-txt-center font-14 maxnamewidth255",
- width:'255px',
+ width: '255px',
render: (text, record) => (
-
+
{record.classroom === null ?
-- :
record.classroom ===
"" ?
-- :
{record.classroom}
}
@@ -178,19 +184,19 @@ class Studentshavecompletedthelist extends Component {
key: 'submitstate',
align: 'center',
className: "edu-txt-center font-14",
- width:'98px',
+ width: '98px',
render: (text, record) => (
{record.submitstate}
)
@@ -202,18 +208,18 @@ class Studentshavecompletedthelist extends Component {
key: 'updatetime',
align: 'center',
className: "edu-txt-center font-14",
- width:'175px',
+ width: '175px',
sorter: true,
defaultSortOrder: 'descend',
sortDirections: sortDirections,
render: (text, record) => (
{record.updatetime === "--" ?
- {record.updatetime}
+ {record.updatetime}
:
- {record.updatetime}
+ {record.updatetime}
}
),
@@ -224,14 +230,14 @@ class Studentshavecompletedthelist extends Component {
key: 'completion',
align: 'center',
className: "edu-txt-center font-14",
- width:'98px',
+ width: '98px',
render: (text, record) => (
{
record.completion === "--" ?
{record.completion}
@@ -239,20 +245,20 @@ class Studentshavecompletedthelist extends Component {
90 ? {
color: '#DD1717',
textAlign: "center",
- width:'98px',
- } : parseInt(record.completion) <= 90 ? {
+ width: '98px',
+ } : parseInt(record.completion) <= 90 &&parseInt(record.completion)>60? {
color: '#FF6800',
textAlign: "center",
- width:'98px',
+ width: '98px',
} : parseInt(record.completion) <= 60 ? {
color: '#747A7F',
textAlign: "center",
- width:'98px',
+ width: '98px',
} :
{
color: '#747A7F',
textAlign: "center",
- width:'98px',
+ width: '98px',
}}>{record.completion}
}
@@ -265,14 +271,14 @@ class Studentshavecompletedthelist extends Component {
key: 'levelscore',
align: 'center',
className: "edu-txt-center font-14",
- width:'99px',
+ width: '99px',
render: (text, record) => (
{record.levelscore === "--" ?
{record.levelscore}
@@ -280,22 +286,36 @@ class Studentshavecompletedthelist extends Component {
90 ? {
color: '#DD1717',
textAlign: "center",
- width:'99px',
- } : parseInt(record.levelscore) <= 90 ? {
+ width: '99px',
+ } : parseInt(record.levelscore) <= 90 &&parseInt(record.levelscore) >60? {
color: '#FF6800',
textAlign: "center",
- width:'99px',
+ width: '99px',
} : parseInt(record.levelscore) <= 60 ? {
color: '#747A7F',
textAlign: "center",
- width:'99px',
- } : {color: '#747A7F', textAlign: "center",width:'99px'}}>{record.levelscore}
+ width: '99px',
+ } : {color: '#747A7F', textAlign: "center", width: '99px'}}>{record.levelscore}
+ {
+ //主观题老师没有评分是
+ parseInt(record.levelscore) === 0 && myssubjective === 1 && mysubjective_score > 0 ?
+
+ (待批阅)
+ :
+ ""
+
+ }
+
}
)
},
{
- title:最终成绩
+ title: 最终成绩
鼠标停留具体分值上可查
看得分明细
}>
,
@@ -305,11 +325,11 @@ class Studentshavecompletedthelist extends Component {
className: "edu-txt-center font-14",
sorter: true,
sortDirections: sortDirections,
- width:'199px',
+ width: '199px',
render: (text, record) => (
-
+
{record.efficiencyscore === "--" ?
-
+
未评分
}>
:
- record.commit_method===5?
-
最终调整成绩:{record.efficiencyscore}分
}>
90 ? {
color: '#DD1717',
textAlign: "center"
- } : parseInt(record.efficiencyscore) <= 90 ? {
+ } : parseInt(record.efficiencyscore) <= 90 && parseInt(record.efficiencyscore) > 60 ? {
color: '#FF6800',
textAlign: "center"
} : parseInt(record.efficiencyscore) <= 60 ? {
@@ -342,24 +362,32 @@ class Studentshavecompletedthelist extends Component {
:
- {record.objective_score===undefined?"":record.objective_score === "--" ?
客观题得分:0分 :
+
{record.objective_score === undefined ? "" : record.objective_score === "--" ?
+ 客观题得分:0分 :
客观题得分:{record.objective_score}分}
-
{record.subjective_score===undefined?"":record.subjective_score === "--" ?
主观题得分:0分 :
+
{record.subjective_score === undefined ? "" : record.subjective_score === "--" ?
+ 主观题得分:0分 :
主观题得分:{record.subjective_score}分}
-
-
{record.efficiencyscore === "--" ? 最终成绩:0分 :
- 最终成绩:{record.efficiencyscore}分}
-
+ {
+ parseInt(record.efficiencyscore) === 0 && myssubjective === 0 && mysubjective_score > 0 && myobjective_score === 0 ?
+
+ 待批阅
+
+ :
+
{record.efficiencyscore === "--" ? 最终成绩:0分 :
+ 最终成绩:{record.efficiencyscore}分}
+
+ }
}>
90 ? {
color: '#DD1717',
textAlign: "center"
- } : parseInt(record.efficiencyscore) <= 90 ? {
+ } : parseInt(record.efficiencyscore) <= 90 && parseInt(record.efficiencyscore) > 60 ? {
color: '#FF6800',
textAlign: "center"
} : parseInt(record.efficiencyscore) <= 60 ? {
@@ -369,6 +397,17 @@ class Studentshavecompletedthelist extends Component {
color: '#747A7F',
textAlign: "center"
}}>{record.efficiencyscore}
+ {//只有一个主观题的时候
+ parseInt(record.efficiencyscore) === 0 && myssubjective === 0 && mysubjective_score > 0 && myobjective_score === 0 ?
+
+ (待批阅)
+ :
+ ""
+ }
}
@@ -380,9 +419,9 @@ class Studentshavecompletedthelist extends Component {
key: 'finalscore',
align: 'center',
className: "edu-txt-center font-14",
- width:'98px',
+ width: '98px',
render: (text, record) => (
-
+
--
)
@@ -395,11 +434,11 @@ class Studentshavecompletedthelist extends Component {
key: 'number',
align: 'center',
className: "edu-txt-center tabletd font-14",
- width:'100px',
+ width: '100px',
render: (text, record) => (
{
- 我
+ 我
}
)
@@ -410,14 +449,16 @@ class Studentshavecompletedthelist extends Component {
key: 'name',
align: 'center',
className: "edu-txt-center tabletd font-14 maxnamewidth110",
- width:'100px',
+ width: '100px',
render: (text, record) => (
{
record.name === "--" ?
- {record.name}
+ {record.name}
:
- {record.name}
+ {record.name}
}
@@ -429,29 +470,29 @@ class Studentshavecompletedthelist extends Component {
key: 'stduynumber',
align: 'center',
className: "edu-txt-center tabletd font-14 maxnamewidth175",
- width:'175px',
+ width: '175px',
render: (text, record) => (
{record.stduynumber === null ?
--
:
record.stduynumber === "" ?
--
:
{record.stduynumber}
}
@@ -464,26 +505,26 @@ class Studentshavecompletedthelist extends Component {
dataIndex: 'classroom',
align: 'center',
className: "edu-txt-center tabletd font-14 maxnamewidth255",
- width:'255px',
+ width: '255px',
render: (text, record) => (
{record.classroom === null ?
--: record.classroom === "" ?
+ width: '255px',
+ }}>-- : record.classroom === "" ?
--:
+ width: '255px',
+ }}>-- :
{record.classroom}
}
@@ -496,17 +537,17 @@ class Studentshavecompletedthelist extends Component {
key: 'submitstate',
align: 'center',
className: "edu-txt-center tabletd font-14",
- width:'98px',
+ width: '98px',
render: (text, record) => (
-
+
{record.submitstate}
)
@@ -518,15 +559,15 @@ class Studentshavecompletedthelist extends Component {
key: 'updatetime',
align: 'center',
className: "edu-txt-center tabletd font-14",
- width:'175px',
+ width: '175px',
render: (text, record) => (
- {record.updatetime === "--"?
- --
+ {record.updatetime === "--" ?
+ --
:
- {record.updatetime}
+ {record.updatetime}
}
),
@@ -537,14 +578,14 @@ class Studentshavecompletedthelist extends Component {
key: 'completion',
align: 'center',
className: "edu-txt-center tabletd font-14",
- width:'98px',
+ width: '98px',
render: (text, record) => (
{record.completion === "--" ?
--
@@ -553,19 +594,19 @@ class Studentshavecompletedthelist extends Component {
90 ? {
color: '#DD1717',
textAlign: "center",
- width:'98px',
- } : parseInt(record.completion) <= 90 ? {
+ width: '98px',
+ } : parseInt(record.completion) <= 90 && parseInt(record.completion)>60? {
color: '#FF6800',
textAlign: "center",
- width:'98px',
+ width: '98px',
} : parseInt(record.completion) <= 60 ? {
color: '#747A7F',
textAlign: "center",
- width:'98px',
+ width: '98px',
} : {
color: '#747A7F',
textAlign: "center",
- width:'98px',
+ width: '98px',
}}>{record.completion}
}
@@ -577,14 +618,14 @@ class Studentshavecompletedthelist extends Component {
key: 'levelscore',
align: 'center',
className: "edu-txt-center tabletd font-14",
- width:'99px',
+ width: '99px',
render: (text, record) => (
- {record.levelscore === "--"?
+ {record.levelscore === "--" ?
--
@@ -592,22 +633,36 @@ class Studentshavecompletedthelist extends Component {
90 ? {
color: '#DD1717',
textAlign: "center",
- width:'99px'
- } : parseInt(record.levelscore) <= 90 ? {
+ width: '99px'
+ } : parseInt(record.levelscore) <= 90 && parseInt(record.levelscore) >60? {
color: '#FF6800',
textAlign: "center",
- width:'99px'
+ width: '99px'
} : parseInt(record.levelscore) <= 60 ? {
color: '#747A7F',
textAlign: "center",
- width:'99px'
- } : {color: '#747A7F', textAlign: "center", width:'99px'}}>{record.levelscore}
+ width: '99px'
+ } : {color: '#747A7F', textAlign: "center", width: '99px'}}>{record.levelscore}
+ {
+ //主观题老师没有评分是
+ parseInt(record.levelscore) === 0 && myssubjective === 1 && mysubjective_score > 0 ?
+
+ (待批阅)
+ :
+ ""
+
+ }
+
}
)
},
{
- title:最终成绩
+ title: 最终成绩
鼠标停留具体分值上可查
看得分明细
}>
,
@@ -615,78 +670,97 @@ class Studentshavecompletedthelist extends Component {
key: 'efficiencyscore',
align: 'center',
className: "edu-txt-center tabletd font-14 columnstwoachievement",
- width:"199px",
+ width: "199px",
render: (text, record) => (
-
+
{
- record.efficiencyscore === "--"?
-
+ record.efficiencyscore === "--" ?
+
未评分
}>
--
:
- record.commit_method===5?
-
最终调整成绩:{record.efficiencyscore}分
}>
90 ? {
color: '#DD1717',
textAlign: "center",
- width:"199px"
- } : parseInt(record.efficiencyscore) <= 90 ? {
+ width: "199px"
+ } : parseInt(record.efficiencyscore) <= 90 && parseInt(record.efficiencyscore) > 60 ? {
color: '#FF6800',
textAlign: "center",
- width:"199px"
+ width: "199px"
} : parseInt(record.efficiencyscore) <= 60 ? {
color: '#747A7F',
textAlign: "center",
- width:"199px"
+ width: "199px"
} : {
color: '#747A7F',
textAlign: "center",
- width:"199px"
+ width: "199px"
}}>{record.efficiencyscore}
:
- {record.objective_score===undefined?"":record.objective_score === "--" ?
客观题得分:0分 :
+
{record.objective_score === undefined ? "" : record.objective_score === "--" ?
+ 客观题得分:0分 :
客观题得分:{record.objective_score}分}
-
{record.subjective_score===undefined?"":record.subjective_score === "--" ?
主观题得分:0分 :
+
{record.subjective_score === undefined ? "" : record.subjective_score === "--" ?
+ 主观题得分:0分 :
主观题得分:{record.subjective_score}分}
-
-
{record.efficiencyscore === "--" ? 最终成绩:0分 :
- 最终成绩:{record.efficiencyscore}分}
-
+ {
+ parseInt(record.efficiencyscore) === 0 && myssubjective === 0 && mysubjective_score > 0 && myobjective_score === 0 ?
+
+ 待批阅
+
+ :
+
{record.efficiencyscore === "--" ? 最终成绩:0分 :
+ 最终成绩:{record.efficiencyscore}分}
+
+ }
}>
90 ? {
color: '#DD1717',
textAlign: "center",
- width:"199px"
- } : parseInt(record.efficiencyscore) <= 90 ? {
+ width: "199px"
+ } : parseInt(record.efficiencyscore) <= 90 && parseInt(record.efficiencyscore) > 60 ? {
color: '#FF6800',
textAlign: "center",
- width:"199px"
+ width: "199px"
} : parseInt(record.efficiencyscore) <= 60 ? {
color: '#747A7F',
textAlign: "center",
- width:"199px"
+ width: "199px"
} : {
color: '#747A7F',
textAlign: "center",
- width:"199px"
+ width: "199px"
}}>{record.efficiencyscore}
+ {//只有一个主观题的时候
+ parseInt(record.efficiencyscore) === 0 && myssubjective === 0 && mysubjective_score > 0 && myobjective_score === 0 ?
+
+ (待批阅)
+ :
+ ""
+ }
}
@@ -699,21 +773,21 @@ class Studentshavecompletedthelist extends Component {
key: 'finalscore',
align: 'center',
className: "edu-txt-center tabletd font-14",
- width:"98px",
+ width: "98px",
render: (text, record) => (
-
+
{
- record.submitstate === "未提交"||record.commit_method===5?
- -aa-
- :record.submitstate === "已提交"?
- record.score_open===null||record.score_open===undefined?"":
- record.score_open===true?
- -aa-
+ : record.submitstate === "已提交" ?
+ record.score_open === null || record.score_open === undefined ? "" :
+ record.score_open === true ?
+ 查看
- :""
+ : ""
:
- --
+ --
}
)
@@ -729,7 +803,7 @@ class Studentshavecompletedthelist extends Component {
render: (text, record) => (
{
- record.number=== "--"?
+ record.number === "--" ?
--
:
{record.number}
@@ -789,14 +863,14 @@ class Studentshavecompletedthelist extends Component {
dataIndex: 'classroom',
align: 'center',
className: "edu-txt-center font-14 maxnamewidth260",
- width:"260px",
+ width: "260px",
render: (text, record) => (
{record.classroom === null ?
-- : record.classroom === "" ?
+ }} className="maxnamewidth260">-- : record.classroom === "" ?
(
{
- record.completion === "--"?
+ record.completion === "--" ?
90 ? {
color: '#DD1717',
textAlign: "center",
- } : parseInt(record.completion) <= 90 ? {
+ } : parseInt(record.completion) <= 90&& parseInt(record.completion) >60 ? {
color: '#FF6800',
textAlign: "center",
} : parseInt(record.completion) <= 60 ? {
@@ -898,20 +972,34 @@ class Studentshavecompletedthelist extends Component {
90 ? {
color: '#DD1717',
textAlign: "center",
- } : parseInt(record.levelscore) <= 90 ? {
+ } : parseInt(record.levelscore) <= 90 &&parseInt(record.levelscore)>60? {
color: '#FF6800',
textAlign: "center",
} : parseInt(record.levelscore) <= 60 ? {
color: '#747A7F',
textAlign: "center",
- } : {color: '#747A7F', textAlign: "center"}}>{record.levelscore}
+ } : {color: '#747A7F', textAlign: "center"}}>{record.levelscore}
+ {
+ //主观题老师没有评分是
+ parseInt(record.levelscore) === 0 && myssubjective === 1 && mysubjective_score > 0 ?
+
+ (待批阅)
+ :
+ ""
+
+ }
+
}
)
},
{
- title: 最终成绩
+ title: 最终成绩
鼠标停留具体分值上可查
看得分明细
}>
,
@@ -923,7 +1011,7 @@ class Studentshavecompletedthelist extends Component {
{
record.efficiencyscore === "--" ?
-
+
未评分
}>
--
:
- record.commit_method===5?
-
- 最终调整成绩:{record.efficiencyscore}分
- }>
+ 最终调整成绩:{record.efficiencyscore}分
+ }>
90 ? {
color: '#DD1717',
textAlign: "center",
- } : parseInt(record.efficiencyscore) <= 90 ? {
+ } : parseInt(record.efficiencyscore) <= 90 && parseInt(record.efficiencyscore) > 60 ? {
color: '#FF6800',
textAlign: "center",
} : parseInt(record.efficiencyscore) <= 60 ? {
@@ -954,24 +1042,32 @@ class Studentshavecompletedthelist extends Component {
:
- {record.objective_score===undefined?"":record.objective_score === "--" ?
客观题得分:0分 :
+
{record.objective_score === undefined ? "" : record.objective_score === "--" ?
+ 客观题得分:0分 :
客观题得分:{record.objective_score}分}
-
{record.subjective_score===undefined?"":record.subjective_score === "--" ?
主观题得分:0分 :
+
{record.subjective_score === undefined ? "" : record.subjective_score === "--" ?
+ 主观题得分:0分 :
主观题得分:{record.subjective_score}分}
-
-
{record.efficiencyscore === "--" ? 最终成绩:0分 :
- 最终成绩:{record.efficiencyscore}分}
-
+ {
+ parseInt(record.efficiencyscore) === 0 && myssubjective === 0 && mysubjective_score > 0 && myobjective_score === 0 ?
+
+ 待批阅
+
+ :
+
{record.efficiencyscore === "--" ? 最终成绩:0分 :
+ 最终成绩:{record.efficiencyscore}分}
+
+ }
}>
90 ? {
color: '#DD1717',
textAlign: "center",
- } : parseInt(record.efficiencyscore) <= 90 ? {
+ } : parseInt(record.efficiencyscore) <= 90 && parseInt(record.efficiencyscore) > 60 ? {
color: '#FF6800',
textAlign: "center",
} : parseInt(record.efficiencyscore) <= 60 ? {
@@ -981,6 +1077,17 @@ class Studentshavecompletedthelist extends Component {
color: '#747A7F',
textAlign: "center",
}}>{record.efficiencyscore}
+ {//只有一个主观题的时候
+ parseInt(record.efficiencyscore) === 0 && myssubjective === 0 && mysubjective_score > 0 && myobjective_score === 0 ?
+
+ (待批阅)
+ :
+ ""
+ }
}
@@ -994,10 +1101,10 @@ class Studentshavecompletedthelist extends Component {
className: "edu-txt-center font-14",
render: (text, record) => (
- {record.operating==="--"?
- {record.operating}
- :record.submitstate === "未提交"?
- --
+ {record.operating === "--" ?
+ {record.operating}
+ : record.submitstate === "未提交" ?
+ --
:
(
- {record.name==="--"?
+ {record.name === "--" ?
{record.name}
:
{record.name}
@@ -1072,13 +1179,15 @@ class Studentshavecompletedthelist extends Component {
dataIndex: 'classroom',
align: 'center',
className: "edu-txt-center font-14 maxnamewidth260",
- width:'260px',
+ width: '260px',
render: (text, record) => (
- {record.classroom==="--"?
- {record.classroom}
+ {record.classroom === "--" ?
+ {record.classroom}
:
- {record.classroom}
+ {record.classroom}
}
)
@@ -1114,7 +1223,7 @@ class Studentshavecompletedthelist extends Component {
sortDirections: sortDirections,
render: (text, record) => (
- {record.updatetime==="--"?
+ {record.updatetime === "--" ?
--
:
{record.updatetime}
@@ -1130,12 +1239,28 @@ class Studentshavecompletedthelist extends Component {
className: "edu-txt-center font-14",
render: (text, record) => (
- {record.completion=== "--"?
- --
+ {
+ record.completion === "--" ?
+ --
:
- {record.completion}
- }
-
+ 90 ? {
+ color: '#DD1717',
+ textAlign: "center",
+ } : parseInt(record.completion) <= 90 && parseInt(record.completion) > 60 ? {
+ color: '#FF6800',
+ textAlign: "center",
+ } : parseInt(record.completion) <= 60 ? {
+ color: '#747A7F',
+ textAlign: "center",
+ } : {
+ color: '#747A7F',
+ textAlign: "center",
+ }}>{record.completion}
+ }
+
)
},
{
@@ -1146,16 +1271,44 @@ class Studentshavecompletedthelist extends Component {
className: "edu-txt-center font-14",
render: (text, record) => (
- {record.levelscore==="--"?
- --
- :
- {record.levelscore}
- }
+ {
+ record.levelscore === "--" ?
+ -- :
+ 90 ? {
+ color: '#DD1717',
+ textAlign: "center",
+ } : parseInt(record.levelscore) <= 90 && parseInt(record.levelscore) > 60 ? {
+ color: '#FF6800',
+ textAlign: "center",
+ } : parseInt(record.levelscore) <= 60 ? {
+ color: '#747A7F',
+ textAlign: "center",
+ } : {color: '#747A7F', textAlign: "center"}}>{record.levelscore}
+ {
+ //主观题老师没有评分是
+ parseInt(record.levelscore) === 0 && myssubjective === 1 && mysubjective_score > 0 ?
+
+ (待批阅)
+ :
+ ""
+
+ }
+
+
+ }
+
)
},
{
- title: 最终成绩
+ title: 最终成绩
鼠标停留具体分值上可查
看得分明细
}>
,
@@ -1168,22 +1321,24 @@ class Studentshavecompletedthelist extends Component {
render: (text, record) => (
{record.efficiencyscore === "--" ?
-
+
未评分
}>
- --
+ --
:
- record.commit_method===5?
-
最终调整成绩:{record.efficiencyscore}分
}>
90 ? {
color: '#DD1717',
textAlign: "center",
- } : parseInt(record.efficiencyscore) <= 90 ? {
+ } : parseInt(record.efficiencyscore) <= 90 && parseInt(record.efficiencyscore) > 60 ? {
color: '#FF6800',
textAlign: "center",
} : parseInt(record.efficiencyscore) <= 60 ? {
@@ -1197,24 +1352,37 @@ class Studentshavecompletedthelist extends Component {
:
- {record.objective_score===undefined?"":record.objective_score === "--" ?
客观题得分:0分 :
+
{record.objective_score === undefined ? "" : record.objective_score === "--" ?
+ 客观题得分:0分 :
客观题得分:{record.objective_score}分}
-
{record.subjective_score===undefined?"":record.subjective_score === "--" ?
主观题得分:0分 :
+
{record.subjective_score === undefined ? "" : record.subjective_score === "--" ?
+ 主观题得分:0分 :
主观题得分:{record.subjective_score}分}
+ {
+ parseInt(record.efficiencyscore) === 0 && myssubjective === 0 && mysubjective_score > 0 && myobjective_score === 0 ?
+
+ 待批阅
+
+ :
+
+ {record.efficiencyscore === "--" ?
+ 最终成绩:0分
+ :
+ 最终成绩:{record.efficiencyscore}分
+ }
+
+ }
-
{record.efficiencyscore === "--" ? 最终成绩:0分 :
- 最终成绩:{record.efficiencyscore}分}
-
-
+
}>
90 ? {
color: '#DD1717',
textAlign: "center",
- } : parseInt(record.efficiencyscore) <= 90 ? {
+ } : parseInt(record.efficiencyscore) <= 90 && parseInt(record.efficiencyscore) > 60 ? {
color: '#FF6800',
textAlign: "center",
} : parseInt(record.efficiencyscore) <= 60 ? {
@@ -1223,7 +1391,19 @@ class Studentshavecompletedthelist extends Component {
} : {
color: '#747A7F',
textAlign: "center",
- }}>{record.efficiencyscore}
+ }}>{parseInt(record.efficiencyscore) === 0 ? 0 : record.efficiencyscore}
+ {//只有一个主观题的时候
+ parseInt(record.efficiencyscore) === 0 && myssubjective === 0 && mysubjective_score > 0 && myobjective_score === 0 ?
+
+ (待批阅)
+ :
+ ""
+ }
+
}
@@ -1238,37 +1418,40 @@ class Studentshavecompletedthelist extends Component {
render: (text, record) => (
{
- record.submitstate === "未提交"||record.commit_method===5?
+ record.submitstate === "未提交" || record.commit_method === 5 ?
(//是否助教
- this.props.isAssistant()&&this.props.isAssistant()===true?
+ this.props.isAssistant() && this.props.isAssistant() === true ?
(//助教是否有权限
- this.props.assistant_auth&&this.props.assistant_auth===true?
+ this.props.assistant_auth && this.props.assistant_auth === true ?
this.Adjustment(record.user_id)}>{record.has_comment===true?"已评阅":"评阅"}
+ target="_blank"
+ onClick={() => this.Adjustment(record.user_id)}>{record.has_comment === true ? "已评阅" : "评阅"}
:
(//是否截止
- this.props.Commonheadofthetestpaper && this.props.Commonheadofthetestpaper.exercise_status===3?
+ this.props.Commonheadofthetestpaper && this.props.Commonheadofthetestpaper.exercise_status === 3 ?
this.Adjustment(record.user_id)}>{record.has_comment===true?"已评阅":"评阅"}
+ target="_blank"
+ onClick={() => this.Adjustment(record.user_id)}>{record.has_comment === true ? "已评阅" : "评阅"}
:
--
)
)
:
this.Adjustment(record.user_id)}>{record.has_comment===true?"已评阅":"评阅"}
+ target="_blank"
+ onClick={() => this.Adjustment(record.user_id)}>{record.has_comment === true ? "已评阅" : "评阅"}
)
- :record.submitstate === "已提交"?
+ : record.submitstate === "已提交" ?
(//是否助教
- this.props.isAssistant()&&this.props.isAssistant()===true?
+ this.props.isAssistant() && this.props.isAssistant() === true ?
(//助教是否有权限
- this.props.assistant_auth&&this.props.assistant_auth===true?
+ this.props.assistant_auth && this.props.assistant_auth === true ?
{record.finalscore}
:
(//是否截止
- this.props.Commonheadofthetestpaper && this.props.Commonheadofthetestpaper.exercise_status===3?
+ this.props.Commonheadofthetestpaper && this.props.Commonheadofthetestpaper.exercise_status === 3 ?
{record.finalscore}
@@ -1288,8 +1471,8 @@ class Studentshavecompletedthelist extends Component {
)
},
],
- // 也会被columnsys当作参数接收
- exercise_status:0,
+ // 也会被columnsys当作参数接收
+ exercise_status: 0,
order_type: "desc",
exeuserid: 0,
subjective: 0,
@@ -1302,8 +1485,10 @@ class Studentshavecompletedthelist extends Component {
}
{/* onClick={() => this.Adjustment(record.user_id)}>评阅*/
}
- {/*--*/}
+ {/*--*/
+ }
// //console.log("Studentshavecompletedthelist");
// //console.log(props.current_status);
// columnsys 老师列表
@@ -1353,16 +1538,16 @@ class Studentshavecompletedthelist extends Component {
// console.log("componentDidMount");
// console.log(columnsystwo);
try {
- columnsystwo=this.state.columnsys;
- }catch (e) {
+ columnsystwo = this.state.columnsys;
+ } catch (e) {
}
- // console.log(columnsystwo);
+ // console.log(columnsystwo);
this.Teacherliststudentlist();
try {
this.props.triggerRef(this);
- }catch (e) {
+ } catch (e) {
}
@@ -1391,6 +1576,17 @@ class Studentshavecompletedthelist extends Component {
limit: null,
}
}).then((response) => {
+ if (response === undefined) {
+ return
+ }
+ try {
+ myssubjective = response.data.exercise_types.subjective?response.data.exercise_types.subjective:0;//记录是否有主观题 1是有
+ mysubjective_score = response.data.exercise_types.subjective_score?response.data.exercise_types.subjective_score:0;
+ myobjective_score = response.data.exercise_types.objective_score?response.data.exercise_types.objective_score:0;
+ } catch (e) {
+
+ }
+
//学生
if (response.data.exercise_types.user_permission === 1) {
this.setState({
@@ -1400,7 +1596,7 @@ class Studentshavecompletedthelist extends Component {
exercise_users: response.data.exercise_users,
current_answer_user: response.data.current_answer_user,
course_groups: response.data.course_groups,
- mylistansum:response.data.exercise_types.answer_users+response.data.exercise_types.unanswer_users
+ mylistansum: response.data.exercise_types.answer_users + response.data.exercise_types.unanswer_users
})
if (response.data.current_answer_user === undefined || response.data.current_answer_user === null) {
// 学生未截止
@@ -1410,19 +1606,15 @@ class Studentshavecompletedthelist extends Component {
if (this.state.noclassroom === undefined || this.state.noclassroom === "" || this.state.noclassroom === null) {
console.log("4");
- var arr =[];
- for(var i=0;i {
// //console.log(JSON.stringify(response));
+ if (response === undefined) {
+ return
+ }
this.setState({
Teacherliststudentlist: response.data,
review: response.data.review,
commit_status: response.data.commit_status,
exercise_users: response.data.exercise_users,
current_answer_user: response.data.current_answer_user,
- mylistansum:response.data.exercise_types.answer_users+response.data.exercise_types.unanswer_users,
+ mylistansum: response.data.exercise_types.answer_users + response.data.exercise_types.unanswer_users,
})
+ try {
+ myssubjective = response.data.exercise_types.subjective?response.data.exercise_types.subjective:0;//记录是否有主观题 1是有
+ mysubjective_score = response.data.exercise_types.subjective_score?response.data.exercise_types.subjective_score:0;
+ myobjective_score = response.data.exercise_types.objective_score?response.data.exercise_types.objective_score:0;
+ } catch (e) {
+
+ }
if (response.data.exercise_types.subjective === 0) {
- var arr =[];
- for(var i=0;i {
//console.log(error)
this.setState({
@@ -1819,11 +2000,11 @@ class Studentshavecompletedthelist extends Component {
levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
efficiencyscore: exercise_users[i].score === undefined ? "--" : exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score,
objective_score: exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
- subjective_score:exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
- finalscore:exercise_users[i].has_comment===true?"已评阅":"评阅",
+ subjective_score: exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
+ finalscore: exercise_users[i].has_comment === true ? "已评阅" : "评阅",
user_id: exercise_users[i].user_id,
- commit_method:exercise_users[i].commit_method,
- has_comment:exercise_users[i].has_comment
+ commit_method: exercise_users[i].commit_method,
+ has_comment: exercise_users[i].has_comment
})
} else {
datalist.push({
@@ -1839,11 +2020,11 @@ class Studentshavecompletedthelist extends Component {
levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
efficiencyscore: exercise_users[i].score === undefined ? "--" : exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score,
objective_score: exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
- subjective_score:exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
- finalscore:exercise_users[i].has_comment===true?"已评阅":"--",
+ subjective_score: exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
+ finalscore: exercise_users[i].has_comment === true ? "已评阅" : "--",
user_id: exercise_users[i].user_id,
- commit_method:exercise_users[i].commit_method,
- has_comment:exercise_users[i].has_comment
+ commit_method: exercise_users[i].commit_method,
+ has_comment: exercise_users[i].has_comment
})
indexi++;
}
@@ -1867,17 +2048,14 @@ class Studentshavecompletedthelist extends Component {
// this.state.columnsys.map((item,key)=>{
//
// })
- var arr =[];
- for(var i=0;i 0) {
- var arr =[];
- for(var i=0;i {
// //console.log("528");
// //console.log(JSON.stringify(response));
- if(response===undefined){
+ if (response === undefined) {
return
}
+
+
this.setState({
loadingstate: false,
})
+ try {
+ myssubjective = response.data.exercise_types.subjective?response.data.exercise_types.subjective:0;//记录是否有主观题 1是有
+ mysubjective_score = response.data.exercise_types.subjective_score?response.data.exercise_types.subjective_score:0;
+ myobjective_score = response.data.exercise_types.objective_score?response.data.exercise_types.objective_score:0;
+ } catch (e) {
+
+ }
// //console.log(response);
// //console.log(1997);
this.Generatenewdatasy(response.data.exercise_users, response);
@@ -2181,13 +2354,13 @@ class Studentshavecompletedthelist extends Component {
unlimited: 0,
course_groupyslsthree: undefined,
loadingstate: true,
- page:1
+ page: 1
})
} else {
this.setState({
unlimited: 0,
course_groupyslsthree: undefined,
- page:1,
+ page: 1,
})
}
this.Searchdatasys(this.state.order, this.state.course_groupyslstwo, null, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit, this.state.order_type);
@@ -2207,13 +2380,13 @@ class Studentshavecompletedthelist extends Component {
unlimiteds: 0,
course_groupyslstwo: undefined,
loadingstate: true,
- page:1,
+ page: 1,
})
} else {
this.setState({
unlimiteds: 0,
course_groupyslstwo: undefined,
- page:1,
+ page: 1,
})
}
@@ -2228,13 +2401,13 @@ class Studentshavecompletedthelist extends Component {
loadingstate: true,
course_groupyslstwo: undefined,
unlimiteds: 0,
- page:1
+ page: 1
})
} else {
this.setState({
course_groupyslstwo: undefined,
unlimiteds: 0,
- page:1,
+ page: 1,
})
}
@@ -2268,13 +2441,13 @@ class Studentshavecompletedthelist extends Component {
loadingstate: true,
course_groupyslstwo: checkedValues,
unlimiteds: 1,
- page:1,
+ page: 1,
})
} else {
this.setState({
course_groupyslstwo: checkedValues,
unlimiteds: 1,
- page:1,
+ page: 1,
})
}
@@ -2311,13 +2484,13 @@ class Studentshavecompletedthelist extends Component {
unlimited: 0,
course_groupyslsthree: undefined,
loadingstate: true,
- page:1
+ page: 1
})
} else {
this.setState({
unlimited: 0,
course_groupyslsthree: undefined,
- page:1
+ page: 1
})
}
@@ -2348,13 +2521,13 @@ class Studentshavecompletedthelist extends Component {
unlimited: 1,
loadingstate: true,
course_groupyslsthree: checkedValues,
- page:1
+ page: 1
})
} else {
this.setState({
unlimited: 1,
course_groupyslsthree: checkedValues,
- page:1
+ page: 1
})
}
@@ -2370,14 +2543,14 @@ class Studentshavecompletedthelist extends Component {
checkedValuesineinfo: undefined,
course_groupysls: undefined,
loadingstate: true,
- page:1,
+ page: 1,
})
} else {
this.setState({
unlimitedtwo: 0,
checkedValuesineinfo: undefined,
course_groupysls: undefined,
- page:1,
+ page: 1,
})
}
@@ -2393,13 +2566,13 @@ class Studentshavecompletedthelist extends Component {
course_groupysls: undefined,
unlimitedtwo: 0,
loadingstate: true,
- page:1,
+ page: 1,
})
} else {
this.setState({
course_groupysls: undefined,
unlimitedtwo: 0,
- page:1,
+ page: 1,
})
}
@@ -2431,14 +2604,14 @@ class Studentshavecompletedthelist extends Component {
course_groupysls: checkedValues,
unlimitedtwo: 1,
loadingstate: true,
- page:1
+ page: 1
})
} else {
this.setState({
checkedValuesineinfo: checkedValues,
course_groupysls: checkedValues,
unlimitedtwo: 1,
- page:1
+ page: 1
})
}
@@ -2460,7 +2633,7 @@ class Studentshavecompletedthelist extends Component {
if (this.state.loadingstate === false) {
this.setState({
loadingstate: true,
- page:1
+ page: 1
})
}
@@ -2477,7 +2650,7 @@ class Studentshavecompletedthelist extends Component {
if (this.state.loadingstate === false) {
this.setState({
loadingstate: true,
- page:1,
+ page: 1,
})
}
@@ -2487,14 +2660,15 @@ class Studentshavecompletedthelist extends Component {
};
+
_getRequestParams() {
- const { order, checkedValuesineinfo,course_groupyslstwo ,searchtext, page ,limit,course_groupyslsthree} = this.state
+ const {order, checkedValuesineinfo, course_groupyslstwo, searchtext, page, limit, course_groupyslsthree} = this.state
return {
page,
- review:course_groupyslsthree,
- commit_status:course_groupyslstwo,
- search:searchtext,
- exercise_group_id:checkedValuesineinfo,
+ review: course_groupyslsthree,
+ commit_status: course_groupyslstwo,
+ search: searchtext,
+ exercise_group_id: checkedValuesineinfo,
limit: limit,
order,
}
@@ -2694,14 +2868,13 @@ class Studentshavecompletedthelist extends Component {
Adjustment = (e) => {
// console.log("Adjustment");
// console.log(e);
- if(this.state.objective_score===0&&this.state.subjective_score===0){
+ if (this.state.objective_score === 0 && this.state.subjective_score === 0) {
this.props.showNotification('试卷题型分被限制为0分,不能调分,请点击编辑试卷修改题型分数');
return
}
-
this.setState({
testpapergradingboll: true,
exeuserid: e,
@@ -2743,7 +2916,6 @@ class Studentshavecompletedthelist extends Component {
}
-
render() {
const isAdmin = this.props.isAdmin();
@@ -2767,7 +2939,7 @@ class Studentshavecompletedthelist extends Component {
}}>
{/*老师*/}
{
- this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status===0 || this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status===1 ?
+ this.props.Commonheadofthetestpaper && this.props.Commonheadofthetestpaper.exercise_status === 0 || this.props.Commonheadofthetestpaper && this.props.Commonheadofthetestpaper.exercise_status === 1 ?
@@ -2787,7 +2959,7 @@ class Studentshavecompletedthelist extends Component {
Saves={(value, num) => this.Testpapergrading(value, num)}
/> : ""
}
-
+
{/*你的评阅:*/}
@@ -2988,7 +3160,7 @@ class Studentshavecompletedthelist extends Component {
{
- this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 0 || this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 1 ?
+ this.props.Commonheadofthetestpaper && this.props.Commonheadofthetestpaper.exercise_status === 0 || this.props.Commonheadofthetestpaper && this.props.Commonheadofthetestpaper.exercise_status === 1 ?
@@ -3075,7 +3247,7 @@ class Studentshavecompletedthelist extends Component {
minWidth: " 1200px"
}}>
{
- this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 0 || this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 1 ?
+ this.props.Commonheadofthetestpaper && this.props.Commonheadofthetestpaper.exercise_status === 0 || this.props.Commonheadofthetestpaper && this.props.Commonheadofthetestpaper.exercise_status === 1 ?
From 8f67f721e7e6ef9c1c8b116de7f7b9b4f73db1aa 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, 24 Mar 2020 17:38:33 +0800
Subject: [PATCH 12/40] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/modules/courses/Video/LiveItem.js | 12 ++++++------
.../courses/exercise/Studentshavecompletedthelist.js | 1 -
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/public/react/src/modules/courses/Video/LiveItem.js b/public/react/src/modules/courses/Video/LiveItem.js
index b54b0f03d..c0cef91c4 100644
--- a/public/react/src/modules/courses/Video/LiveItem.js
+++ b/public/react/src/modules/courses/Video/LiveItem.js
@@ -24,7 +24,7 @@ class LiveItem extends Component{
visible:false
}
}
-
+
deleteLive=(id)=>{
this.props.confirm({
content: '是否确认删除?',
@@ -136,7 +136,7 @@ class LiveItem extends Component{
item.url ?
{
- wei_flag ?
+ wei_flag ?
进入
:
进入
@@ -154,17 +154,17 @@ class LiveItem extends Component{
- { item.platform && 直播平台:{item.platform} }
- { item.live_time && 开播时间:{item.live_time}}
+ { item.platform && 直播平台:{item.platform} }
+ { item.live_time && 开播时间:{item.live_time}}
{ item.duration && 直播预计时长:{item.duration}分钟 }
-
+
{
item.op_auth ?
setLiveId(item.id)}>编辑:""
}
{
- item.delete_auth ?
+ item.delete_auth ?
this.deleteLive(item.id)}>删除
:""
}
diff --git a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js
index 5d3579238..b3f126e9f 100644
--- a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js
+++ b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js
@@ -35,7 +35,6 @@ let mysubjective_score = 0;//主观题得分
let myobjective_score = 0;//客观题得分
class Studentshavecompletedthelist extends Component {
- // http://localhost:3007/courses/1309/exercises/722/exercises/student_exercise_list?debug=s
constructor(props) {
super(props);
this.state = {
From 00fb3eb6e12f893b124a1209868ded78c2f119b9 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, 24 Mar 2020 18:08:54 +0800
Subject: [PATCH 13/40] =?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/shixunHomework/ShixunhomeWorkItem.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js
index 70e561c73..f43a37e90 100644
--- a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js
+++ b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js
@@ -305,7 +305,7 @@ class ShixunhomeWorkItem extends Component{