From 070aa17b450a3ea4f79f6214da12e80742710fbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 7 Sep 2019 15:05:49 +0800 Subject: [PATCH 01/23] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shixunHomework/Listofworksstudentone.js | 97 +------------------ 1 file changed, 5 insertions(+), 92 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 2253cc1f3..272cdcd50 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -2553,9 +2553,9 @@ class Listofworksstudentone extends Component { let course_is_end = this.props.current_user&&this.props.current_user.course_is_end; // if(this.props.isAdmin() === false){ - // if(teacherdata.student_works!==undefined){ - // if(teacherdata.student_works.length>0){ - // + // if(teacherdata&&teacherdata.student_works){ + // if(teacherdata&&teacherdata.student_works.length>0){ + // console.log("这是双层页面。。。。"); // // } // } @@ -3243,42 +3243,9 @@ class Listofworksstudentone extends Component { :"") } } - {/* {teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"":*/} - {/*{computeTimetype===true?*/} - {/* (this.props.isNotMember()===false?
*/} - {/* 查看最新成绩*/} - {/*
:""):*/} - {/* teacherdata&&teacherdata.homework_status!==undefined&&teacherdata.homework_status[0]=== "未发布"? "":*/} - {/* (this.props.isNotMember()===false?
*/} - {/* 查看最新成绩*/} - {/*
:"")*/} - {/*}*/} - {/*
}*/} - - {/*因为计算按钮占了和这个位置,和设计沟通学生视角取消这个按钮*/} - {/*
*/} - {/**/} - {/*
*/} - - - +s -
+
- {data === undefined ? "" : } {JSON.stringify(datas) === "[]" ? @@ -2749,15 +2822,15 @@ class Studentshavecompletedthelist extends Component {
{Teacherliststudentlist === undefined ? "0" : Teacherliststudentlist.exercise_types.answer_users}已交{Teacherliststudentlist === undefined ? "0" : Teacherliststudentlist.exercise_types.answer_users}已交 {Teacherliststudentlist === undefined ? "0" : Teacherliststudentlist.exercise_types.unanswer_users}未交 + style={{color: "#666666"}}>{Teacherliststudentlist === undefined ? "0" : Teacherliststudentlist.exercise_types.unanswer_users}未交 {Teacherliststudentlist && Teacherliststudentlist.exercise_types.exercise_end_time === "--" ? "" : - 剩余提交时间:} + 剩余提交时间:} {Teacherliststudentlist && Teacherliststudentlist.exercise_types.exercise_end_time === "--" ? "" : {Teacherliststudentlist === undefined ? "0" : Teacherliststudentlist.exercise_types.exercise_end_time}} + style={{color: '#FF6800'}}> {Teacherliststudentlist === undefined ? "0" : Teacherliststudentlist.exercise_types.exercise_end_time}}
Date: Mon, 9 Sep 2019 14:45:35 +0800 Subject: [PATCH 09/23] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AF=95=E5=8D=B7?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exercise/Studentshavecompletedthelist.js | 62 +++++++++---------- .../courses/exercise/yslexercisetable.css | 18 +++++- 2 files changed, 47 insertions(+), 33 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js index 84ee5eb56..1e2c9702b 100644 --- a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js +++ b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js @@ -108,29 +108,29 @@ class Studentshavecompletedthelist extends Component { dataIndex: 'stduynumber', key: 'stduynumber', align: 'center', - className: "edu-txt-center font-14 maxnamewidth145", - width:'145px', + className: "edu-txt-center font-14 maxnamewidth175", + width:'175px', render: (text, record) => ( - {record.stduynumber === null ? -- : record.stduynumber === "" ? -- : - {record.stduynumber} } @@ -142,27 +142,27 @@ class Studentshavecompletedthelist extends Component { key: 'classroom', dataIndex: 'classroom', align: 'center', - className: "edu-txt-center font-14 maxnamewidth145", - width:'145px', + className: "edu-txt-center font-14 maxnamewidth255", + width:'255px', render: (text, record) => ( - + {record.classroom === null ? -- : record.classroom === "" ? -- : - {record.classroom} } @@ -366,30 +366,30 @@ class Studentshavecompletedthelist extends Component { dataIndex: 'stduynumber', key: 'stduynumber', align: 'center', - className: "edu-txt-center tabletd font-14 maxnamewidth145", - width:'145px', + className: "edu-txt-center tabletd font-14 maxnamewidth175", + width:'175px', render: (text, record) => ( - {record.stduynumber === null ? -- : record.stduynumber === "" ? -- : - {record.stduynumber} } @@ -401,27 +401,27 @@ class Studentshavecompletedthelist extends Component { key: 'classroom', dataIndex: 'classroom', align: 'center', - className: "edu-txt-center tabletd font-14 maxnamewidth145", - width:'145px', + className: "edu-txt-center tabletd font-14 maxnamewidth255", + width:'255px', render: (text, record) => ( - {record.classroom === null ? --: record.classroom === "" ? --: - {record.classroom} } diff --git a/public/react/src/modules/courses/exercise/yslexercisetable.css b/public/react/src/modules/courses/exercise/yslexercisetable.css index 42810b7de..2727ca2ff 100644 --- a/public/react/src/modules/courses/exercise/yslexercisetable.css +++ b/public/react/src/modules/courses/exercise/yslexercisetable.css @@ -26,8 +26,22 @@ white-space:nowrap; cursor: default; } -.maxnamewidth145{ - max-width: 145px; +.maxnamewidth215{ + max-width: 215px; + overflow:hidden; + text-overflow:ellipsis; + white-space:nowrap; + cursor: default; +} +.maxnamewidth255{ + max-width: 255px; + overflow:hidden; + text-overflow:ellipsis; + white-space:nowrap; + cursor: default; +} +.maxnamewidth175{ + max-width: 175px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; From bd46760cba016b0f9f4c7cda4387bc85ba08cbd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Mon, 9 Sep 2019 15:03:44 +0800 Subject: [PATCH 10/23] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AF=95=E5=8D=B7?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exercise/Studentshavecompletedthelist.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js index 1e2c9702b..60065f43e 100644 --- a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js +++ b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js @@ -97,7 +97,7 @@ class Studentshavecompletedthelist extends Component { {record.name === "--" ? {record.name} : - {record.name} + {record.name} } @@ -127,11 +127,11 @@ class Studentshavecompletedthelist extends Component { textAlign: "center", width:'175px', }}>-- : - {record.stduynumber} + }} title={record.stduynumber}>{record.stduynumber} } @@ -159,11 +159,11 @@ class Studentshavecompletedthelist extends Component { textAlign: "center", width:'255px', }}>-- : - {record.classroom} + }} title={record.classroom}>{record.classroom} } @@ -386,11 +386,11 @@ class Studentshavecompletedthelist extends Component { width:'175px', }}>-- : - {record.stduynumber} + }} title={record.stduynumber}>{record.stduynumber} } @@ -418,11 +418,11 @@ class Studentshavecompletedthelist extends Component { textAlign: "center", width:'255px', }}>--: - {record.classroom} + }} title={record.classroom}>{record.classroom} } From 7b28dc0cbc1a879b06ef07a48a82b258928dccf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 9 Sep 2019 21:59:32 +0800 Subject: [PATCH 11/23] =?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/coursesPublic/AppraiseModal.js | 2 +- .../shixunHomework/ShixunWorkReport.js | 71 +++++---- .../shixunHomework/ShowAppraiseList.js | 141 +++++++++--------- 3 files changed, 103 insertions(+), 111 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/AppraiseModal.js b/public/react/src/modules/courses/coursesPublic/AppraiseModal.js index a78e5be62..f1ee18bb7 100644 --- a/public/react/src/modules/courses/coursesPublic/AppraiseModal.js +++ b/public/react/src/modules/courses/coursesPublic/AppraiseModal.js @@ -74,7 +74,7 @@ class AppraiseModal extends Component{ if(response.data.status===0){ debugger this.props.showNotification(response.data.message) - this.props.showCancel(comment,hidden_comment,response.data.comment_id) + this.props.showCancel(comment,hidden_comment,challenge_id,response.data.comment_id) }else{ this.props.showNotification(response.data.message) } diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js index e1b6590b5..a8efd3060 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js @@ -157,7 +157,7 @@ class ShixunWorkReport extends Component { showAppraiseModal=(type,id,show,hidden)=>{ let{data}=this.state; - + debugger if(type==="child"){ data.stage_list.forEach((item,key)=>{ if(item.challenge_id===id){ @@ -188,17 +188,17 @@ class ShixunWorkReport extends Component { showAppraiseModaltype:false, }) } - showAppraiseModals=(show,hidden,id)=>{ + showAppraiseModals=(show,hidden,id,comment_id)=>{ let{data,showAppraisetype}=this.state; - + debugger if(showAppraisetype==="child"){ data.stage_list.forEach((item,key)=>{ if(item.challenge_id===id){ item.challenge_comment=show; item.challenge_comment_hidden=hidden; - item.challenge_id=id; + item.comment_id=comment_id } }) this.setState({ @@ -206,7 +206,7 @@ class ShixunWorkReport extends Component { data:data }) }else{ - data.comment_id=id + data.comment_id=comment_id; this.setState({ showAppraiseModaltype:false, work_comment:show, @@ -216,11 +216,11 @@ class ShixunWorkReport extends Component { } } - isdeleteModal=(comment_id,visible_comment)=>{ + isdeleteModal=(comment_id,visible_comment,type)=>{ this.setState({ modalsType: true, modalsTopval:"是否确认删除?", - modalSave: ()=>this.isdeleteModals(comment_id,visible_comment), + modalSave: ()=>this.isdeleteModals(comment_id,visible_comment,type), modalCancel:()=>this.hideisdeleteModals(), }) } @@ -235,20 +235,25 @@ class ShixunWorkReport extends Component { } - hideisdeleteModal=(comment_id,visible_comment)=>{ + hideisdeleteModal=(comment_id,visible_comment,type)=>{ - let{data,work_comment,work_comment_hidden,showAppraisetype}=this.state; - if(showAppraisetype==="child"){ - data.stage_list.forEach((item,key)=>{ - if(item.comment_id===comment_id){ - if(visible_comment===true){ - item.challenge_comment=null; - }else{ - item.challenge_comment_hidden=null; + let{data,work_comment,work_comment_hidden}=this.state; + + if(type==="child"){ + data.stage_list.map((item,key)=>{ + console.log(item) + if(item.comment_id!=null){ + if(item.comment_id===comment_id){ + if(visible_comment===true){ + item.challenge_comment=null; + }else{ + item.challenge_comment_hidden=null; + } } } }) + this.setState({ modalsType:false, modalsTopval:"是否确认删除?", @@ -256,40 +261,36 @@ class ShixunWorkReport extends Component { modalCancel:"", data:data }) + }else{ - if(visible_comment===true){ - this.setState({ - modalsType:false, - modalsTopval:"是否确认删除?", - modalSave: "", - modalCancel:"", - work_comment:visible_comment===true?null:work_comment, - }) - }else{ + this.setState({ modalsType:false, modalsTopval:"是否确认删除?", modalSave: "", modalCancel:"", - work_comment_hidden:visible_comment===false?null:work_comment_hidden + work_comment:null, + work_comment_hidden:null }) - } + } } - isdeleteModals=(comment_id,visible_comment)=>{ + isdeleteModals=(comment_id,visible_comment,type)=>{ + let newcomment_id=comment_id; + let newvisible_comment=visible_comment; + let newtype=type; + let url =`/student_works/${this.props.match.params.homeworkid}/destroy_work_comment.json` axios.delete(url, { data: { comment_id:comment_id, - visible_comment:visible_comment }}).then((response) => { // const { status } = response.data; if(response.data.status===0){ this.props.showNotification(response.data.message) - - this.hideisdeleteModal(comment_id,visible_comment) + this.hideisdeleteModal(newcomment_id,newvisible_comment,newtype) }else{ this.props.showNotification(response.data.message) } @@ -308,9 +309,7 @@ class ShixunWorkReport extends Component { // let showAppraiseModals=this.props&&this.props.isAdminOrTeacher()===true?work_comment===null||work_comment===undefined?false:true:work_comment===null||work_comment===undefined?false:true; let showAppraiseModals=work_comment===null||work_comment===undefined?false:true; - console.log(data) - console.log(work_comment_hidden) - console.log(work_comment) + return ( data===undefined?"": @@ -329,7 +328,7 @@ class ShixunWorkReport extends Component { {...this.state} visible={showAppraiseModaltype} Cancel={()=>this.hideAppraiseModal()} - showCancel={(show,hidden,id)=>this.showAppraiseModals(show,hidden,id)} + showCancel={(show,hidden,id,comment_id)=>this.showAppraiseModals(show,hidden,id,comment_id)} work_comment={this.state.work_comment} work_type={work_comment===null||work_comment===undefined?this.state.work_type:work_comment_hidden===true?1:0} />:""} @@ -551,7 +550,7 @@ class ShixunWorkReport extends Component { this.isdeleteModal(comment_id,visible_comment)} + isdeleteModal={(comment_id,visible_comment,type)=>this.isdeleteModal(comment_id,visible_comment,type)} showAppraiseModal={(type,id,show,hidden)=>this.showAppraiseModal(type,id,show,hidden)} /> diff --git a/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js b/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js index 66ac56a63..f53ad2cd9 100644 --- a/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js +++ b/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js @@ -11,16 +11,12 @@ class ShowAppraiseList extends Component{ } } - componentDidMount() { - - - } - render(){ - let {data,work_comment,work_comment_hidden}=this.props; - console.log(data) + let {data, work_comment,work_comment_hidden}=this.props; + let work_commenttype=work_comment===undefined||work_comment===null||work_comment===""; + let work_comment_hiddentype=work_comment===undefined||work_comment===null||work_comment===""; return(
- {data===undefined?"":work_comment===undefined||work_comment===null||work_comment===""?"": + {data===undefined?"":work_commenttype===true&&work_comment_hiddentype===true?"":
} - - - - {data===undefined?"":work_comment_hidden===undefined||work_comment_hidden===null||work_comment_hidden===""?"":this.props&&this.props.isAdminOrTeacher()===true? - }
-
:""} + } + + {data===undefined?"":data.stage_list.map((item,key)=>{ let challenge_comment_hidden=item.challenge_comment_hidden===undefined||item.challenge_comment_hidden===null||item.challenge_comment_hidden===""; let challenge_comment=item.challenge_comment===undefined||item.challenge_comment===null||item.challenge_comment===""; + return( -
- {challenge_comment===false?
+
+ {challenge_comment===false&&challenge_comment_hidden==false?
- 第{key+1}关评阅内容 + 第{key+1}关{item.name} {this.props&&this.props.isAdminOrTeacher()===true?this.props.isdeleteModal(item.comment_id,true)} + onClick={()=>this.props.isdeleteModal(item.comment_id,true,"child")} >删除:""} {this.props&&this.props.isAdminOrTeacher()===true?this.props.showAppraiseModal("child",item.challenge_id,item.challenge_comment,item.challenge_comment_hidden)} >编辑:""}
-
-
-
-
-
-
-
- -
-
:""} - - {challenge_comment_hidden===false&&this.props&&this.props.isAdminOrTeacher()===true?
-
-
- 第{key+1}关评阅内容(仅对课堂老师可见) - - {this.props&&this.props.isAdminOrTeacher()===true?this.props.isdeleteModal(item.comment_id,false)} - >删除:""} + {this.props&&this.props.isAdminOrTeacher()===true? +
+
+ 学生不可见(仅对课堂老师可见) +
+
+ {challenge_comment_hidden===true?"":
+
+
} +
+
+ 学生可见(学生可查看老师的评阅内容) +
+
+ {challenge_comment===true?"":
+
+
} +
- {this.props&&this.props.isAdminOrTeacher()===true?this.props.showAppraiseModal("child",item.challenge_id,item.challenge_comment,item.challenge_comment_hidden)} - >编辑:""} -
-
-
-
-
+
:
+
+
+
+
-
-
+
}
:""} From 06c750162b7c4bf0e376e0a3161598568a0bb485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 9 Sep 2019 22:02:58 +0800 Subject: [PATCH 12/23] =?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/ShixunWorkReport.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js index a8efd3060..ab801fe40 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js @@ -245,11 +245,8 @@ class ShixunWorkReport extends Component { console.log(item) if(item.comment_id!=null){ if(item.comment_id===comment_id){ - if(visible_comment===true){ - item.challenge_comment=null; - }else{ - item.challenge_comment_hidden=null; - } + item.challenge_comment=null; + item.challenge_comment_hidden=null; } } }) From bcfbca145175c9ac7d4f802e9d5befbd7d508c07 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 9 Sep 2019 22:03:15 +0800 Subject: [PATCH 13/23] absolute --- public/react/src/modules/page/VNCContainer.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/react/src/modules/page/VNCContainer.js b/public/react/src/modules/page/VNCContainer.js index d8e5a0b1f..85532dad1 100644 --- a/public/react/src/modules/page/VNCContainer.js +++ b/public/react/src/modules/page/VNCContainer.js @@ -144,6 +144,11 @@ class VNCContainer extends Component { .codeEvaluateDrawer .ant-drawer-body { padding: 0px; } + .codeEvaluateDrawer .ant-drawer-content-wrapper, .codeEvaluateDrawer .ant-drawer-mask { + position: absolute; + } + + .codeEvaluateFloatButton { bottom: 180px !important; left: unset; From 8722cbf36da24a7c7529332e41e94ed84a77331c Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 9 Sep 2019 22:09:19 +0800 Subject: [PATCH 14/23] closable={false} --- public/react/src/modules/page/VNCContainer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/page/VNCContainer.js b/public/react/src/modules/page/VNCContainer.js index 85532dad1..ecc2c8a41 100644 --- a/public/react/src/modules/page/VNCContainer.js +++ b/public/react/src/modules/page/VNCContainer.js @@ -216,7 +216,7 @@ class VNCContainer extends Component { mask={true} title="" width={firstDrawerWidth} - // closable={false} + closable={false} onClose={this.onBottomDrawerClose} visible={this.state.bottomDrawer} className={'codeEvaluateDrawer'} From ab146018c8633eb1d12822e96bc6d69dbe311dfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 9 Sep 2019 22:11:03 +0800 Subject: [PATCH 15/23] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/shixunHomework/ShixunWorkReport.js | 3 +-- .../modules/courses/shixunHomework/ShowAppraiseList.js | 9 +++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js index ab801fe40..0f1264865 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js @@ -157,7 +157,7 @@ class ShixunWorkReport extends Component { showAppraiseModal=(type,id,show,hidden)=>{ let{data}=this.state; - debugger + if(type==="child"){ data.stage_list.forEach((item,key)=>{ if(item.challenge_id===id){ @@ -192,7 +192,6 @@ class ShixunWorkReport extends Component { let{data,showAppraisetype}=this.state; - debugger if(showAppraisetype==="child"){ data.stage_list.forEach((item,key)=>{ if(item.challenge_id===id){ diff --git a/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js b/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js index f53ad2cd9..05fdacfed 100644 --- a/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js +++ b/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js @@ -42,6 +42,11 @@ class ShowAppraiseList extends Component{ color: #000; font-size:15px; } + + .borderbom{ + margin-bottom: 20px; + border-bottom: 2px solid #fafafa; + } ` } @@ -67,7 +72,7 @@ class ShowAppraiseList extends Component{
学生不可见(仅对课堂老师可见)
-
+
{work_comment_hidden===true?"":
@@ -124,7 +129,7 @@ class ShowAppraiseList extends Component{
学生不可见(仅对课堂老师可见)
-
+
{challenge_comment_hidden===true?"":
From d1e9c861244501da9440b68a034921aeeb13a941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 9 Sep 2019 22:13:13 +0800 Subject: [PATCH 16/23] b --- .../src/modules/courses/shixunHomework/ShowAppraiseList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js b/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js index 05fdacfed..b32d6a0e6 100644 --- a/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js +++ b/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js @@ -40,7 +40,7 @@ class ShowAppraiseList extends Component{ } .000w{ color: #000; - font-size:15px; + font-size:16px; } .borderbom{ From c583ef53471ee1b6c811f3a31fe94ea75b722e79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 9 Sep 2019 22:15:04 +0800 Subject: [PATCH 17/23] b --- .../courses/shixunHomework/ShowAppraiseList.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js b/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js index b32d6a0e6..34e978bef 100644 --- a/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js +++ b/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js @@ -34,11 +34,11 @@ class ShowAppraiseList extends Component{ text-align: center; line-height: 22px; } - .666w{ + .666{ color: #666; font-size:14px; } - .000w{ + .000{ color: #000; font-size:16px; } @@ -47,6 +47,9 @@ class ShowAppraiseList extends Component{ margin-bottom: 20px; border-bottom: 2px solid #fafafa; } + pd30bt{ + padding: 30px 30px 0px 30px; + } ` } @@ -70,7 +73,7 @@ class ShowAppraiseList extends Component{ {this.props&&this.props.isAdminOrTeacher()===true?
- 学生不可见(仅对课堂老师可见) + 学生不可见(仅对课堂老师可见)
{work_comment_hidden===true?"":
@@ -79,7 +82,7 @@ class ShowAppraiseList extends Component{
}
- 学生可见(学生可查看老师的评阅内容) + 学生可见(学生可查看老师的评阅内容)
{work_comment===true?"":
@@ -127,7 +130,7 @@ class ShowAppraiseList extends Component{ {this.props&&this.props.isAdminOrTeacher()===true?
- 学生不可见(仅对课堂老师可见) + 学生不可见(仅对课堂老师可见)
{challenge_comment_hidden===true?"":
@@ -136,7 +139,7 @@ class ShowAppraiseList extends Component{
}
- 学生可见(学生可查看老师的评阅内容) + 学生可见(学生可查看老师的评阅内容)
{challenge_comment===true?"":
From 51a534823756c31e1c26b08d034a18bd793beeb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 9 Sep 2019 22:27:44 +0800 Subject: [PATCH 18/23] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shixunHomework/ShowAppraiseList.js | 87 +++++++++---------- .../modules/courses/shixunHomework/style.css | 13 +++ 2 files changed, 55 insertions(+), 45 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js b/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js index 34e978bef..1a5b4a136 100644 --- a/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js +++ b/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js @@ -2,6 +2,7 @@ import React,{ Component } from "react"; import { Modal,Checkbox,Upload,Button,Icon,message,Input,Radio} from "antd"; import { WordNumberTextarea,markdownToHTML } from 'educoder'; import axios from 'axios'; +import './style.css'; class ShowAppraiseList extends Component{ constructor(props){ @@ -15,8 +16,8 @@ class ShowAppraiseList extends Component{ render(){ let {data, work_comment,work_comment_hidden}=this.props; - let work_commenttype=work_comment===undefined||work_comment===null||work_comment===""; - let work_comment_hiddentype=work_comment===undefined||work_comment===null||work_comment===""; + let work_commenttype=this.props&&this.props.isAdmin()===true?false:work_comment===undefined||work_comment===null||work_comment===""; + let work_comment_hiddentype=this.props&&this.props.isAdmin()===true?false:work_comment===undefined||work_comment===null||work_comment===""; return(
@@ -60,39 +54,41 @@ class ShowAppraiseList extends Component{
总体评阅评阅内容 - {this.props&&this.props.isAdminOrTeacher()===true?this.props.isdeleteModal(data.comment_id,true,"main")} >删除:""} - {this.props&&this.props.isAdminOrTeacher()===true?this.props.showAppraiseModal("main",undefined,work_comment,work_comment_hidden)} >编辑:""}
- {this.props&&this.props.isAdminOrTeacher()===true? -
+ {this.props&&this.props.isAdmin()===true? +
+
+ 学生可见(学生可查看老师的评阅内容) +
+
+ {work_comment===true?"":
+
+
} +
+
- 学生不可见(仅对课堂老师可见) + 学生不可见(仅对课堂老师可见)
-
+
{work_comment_hidden===true?"":
}
-
- 学生可见(学生可查看老师的评阅内容) -
-
- {work_comment===true?"":
-
-
} -
+
:
-
+
@@ -108,8 +104,8 @@ class ShowAppraiseList extends Component{ {data===undefined?"":data.stage_list.map((item,key)=>{ - let challenge_comment_hidden=item.challenge_comment_hidden===undefined||item.challenge_comment_hidden===null||item.challenge_comment_hidden===""; - let challenge_comment=item.challenge_comment===undefined||item.challenge_comment===null||item.challenge_comment===""; + let challenge_comment_hidden=this.props&&this.props.isAdmin()===true?false:item.challenge_comment_hidden===undefined||item.challenge_comment_hidden===null||item.challenge_comment_hidden===""; + let challenge_comment=this.props&&this.props.isAdmin()===true?false:item.challenge_comment===undefined||item.challenge_comment===null||item.challenge_comment===""; return(
@@ -118,38 +114,39 @@ class ShowAppraiseList extends Component{
第{key+1}关{item.name} - {this.props&&this.props.isAdminOrTeacher()===true?this.props.isdeleteModal(item.comment_id,true,"child")} >删除:""} - {this.props&&this.props.isAdminOrTeacher()===true?this.props.showAppraiseModal("child",item.challenge_id,item.challenge_comment,item.challenge_comment_hidden)} >编辑:""}
- {this.props&&this.props.isAdminOrTeacher()===true? -
+ {this.props&&this.props.isAdmin()===true? +
- 学生不可见(仅对课堂老师可见) + 学生可见(学生可查看老师的评阅内容)
-
- {challenge_comment_hidden===true?"":
+
+ {challenge_comment===true?"":
+ dangerouslySetInnerHTML={{__html: markdownToHTML(item.challenge_comment).replace(/▁/g, "▁▁▁")}}>
}
+
- 学生可见(学生可查看老师的评阅内容) + 学生不可见(仅对课堂老师可见)
-
- {challenge_comment===true?"":
+
+ {challenge_comment_hidden===true?"":
+ dangerouslySetInnerHTML={{__html: markdownToHTML(item.challenge_comment_hidden).replace(/▁/g, "▁▁▁")}}>
}
:
-
+
diff --git a/public/react/src/modules/courses/shixunHomework/style.css b/public/react/src/modules/courses/shixunHomework/style.css index c2affa32c..c3976515b 100644 --- a/public/react/src/modules/courses/shixunHomework/style.css +++ b/public/react/src/modules/courses/shixunHomework/style.css @@ -53,4 +53,17 @@ } .ysyslxh{ background: #fafafa; +} + +.z666{ + color: #666; + font-size:14px; +} +.z000{ + color: #000; + font-size:16px; +} + +.pd30bt{ + padding: 10px 30px 0px 30px; } \ No newline at end of file From ccb64e8b3f8739d09ca2034124a30dac81905cc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 9 Sep 2019 22:39:01 +0800 Subject: [PATCH 19/23] b --- .../courses/coursesPublic/AppraiseModal.js | 3 +- .../shixunHomework/ShixunWorkReport.js | 37 +++++++++++-------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/AppraiseModal.js b/public/react/src/modules/courses/coursesPublic/AppraiseModal.js index f1ee18bb7..120e57b2b 100644 --- a/public/react/src/modules/courses/coursesPublic/AppraiseModal.js +++ b/public/react/src/modules/courses/coursesPublic/AppraiseModal.js @@ -72,9 +72,8 @@ class AppraiseModal extends Component{ challenge_id:challenge_id }).then((response) => { if(response.data.status===0){ - debugger - this.props.showNotification(response.data.message) this.props.showCancel(comment,hidden_comment,challenge_id,response.data.comment_id) + this.props.showNotification(response.data.message) }else{ this.props.showNotification(response.data.message) } diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js index 0f1264865..bb8ccae4a 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js @@ -216,10 +216,13 @@ class ShixunWorkReport extends Component { } isdeleteModal=(comment_id,visible_comment,type)=>{ + let newcomment_id=comment_id; + let newvisible_comment=visible_comment; + let newtype=type; this.setState({ modalsType: true, modalsTopval:"是否确认删除?", - modalSave: ()=>this.isdeleteModals(comment_id,visible_comment,type), + modalSave: ()=>this.isdeleteModals(newcomment_id,newvisible_comment,newtype), modalCancel:()=>this.hideisdeleteModals(), }) } @@ -278,22 +281,24 @@ class ShixunWorkReport extends Component { let newcomment_id=comment_id; let newvisible_comment=visible_comment; let newtype=type; + if(comment_id!=null){ + let url =`/student_works/${this.props.match.params.homeworkid}/destroy_work_comment.json` + axios.delete(url, { data: { + comment_id:comment_id, + }}).then((response) => { + // const { status } = response.data; + if(response.data.status===0){ + this.props.showNotification(response.data.message) + this.hideisdeleteModal(newcomment_id,newvisible_comment,newtype) + }else{ + this.props.showNotification(response.data.message) + } + }) + .catch(function (error) { + console.log(error); + }); + } - let url =`/student_works/${this.props.match.params.homeworkid}/destroy_work_comment.json` - axios.delete(url, { data: { - comment_id:comment_id, - }}).then((response) => { - // const { status } = response.data; - if(response.data.status===0){ - this.props.showNotification(response.data.message) - this.hideisdeleteModal(newcomment_id,newvisible_comment,newtype) - }else{ - this.props.showNotification(response.data.message) - } - }) - .catch(function (error) { - console.log(error); - }); } render() { let{data,showAppraiseModaltype,work_comment_hidden,work_comment} =this.state; From e6caa48ff7b91dd0ff00943a9e6df947cac7cbb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 9 Sep 2019 22:44:00 +0800 Subject: [PATCH 20/23] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/shixunHomework/ShowAppraiseList.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js b/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js index 1a5b4a136..660c8e796 100644 --- a/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js +++ b/public/react/src/modules/courses/shixunHomework/ShowAppraiseList.js @@ -16,8 +16,8 @@ class ShowAppraiseList extends Component{ render(){ let {data, work_comment,work_comment_hidden}=this.props; - let work_commenttype=this.props&&this.props.isAdmin()===true?false:work_comment===undefined||work_comment===null||work_comment===""; - let work_comment_hiddentype=this.props&&this.props.isAdmin()===true?false:work_comment===undefined||work_comment===null||work_comment===""; + let work_commenttype=work_comment===undefined||work_comment===null||work_comment===""; + let work_comment_hiddentype=work_comment===undefined||work_comment===null||work_comment===""; return(