diff --git a/public/react/src/modules/courses/coursesPublic/AppraiseModal.js b/public/react/src/modules/courses/coursesPublic/AppraiseModal.js
index 4c1453c2a..1a8c6cc75 100644
--- a/public/react/src/modules/courses/coursesPublic/AppraiseModal.js
+++ b/public/react/src/modules/courses/coursesPublic/AppraiseModal.js
@@ -9,10 +9,11 @@ class AppraiseModal extends Component{
this.state={
group_ids:[],
fileList:[],
- textareaval:undefined,
Inputsval:undefined,
valuetype:0,
- textareavaltype:false
+ textareavaltype:false,
+ comment:undefined,
+ hidden_comment:undefined
}
}
@@ -25,32 +26,40 @@ class AppraiseModal extends Component{
}
- onChanges=(e)=>{
- this.setState({
- valuetype:e.target.value
+ comment=(e)=>{
+ this.setState({
+ comment:e.target.value
})
}
- settextarea=(e)=>{
+ hidden_comment=(e)=>{
this.setState({
- textareaval:e.target.value
+ hidden_comment:e.target.value
})
}
-
Saves=()=>{
- let{textareaval,valuetype}=this.state;
+ let{textareaval,valuetype,comment,hidden_comment}=this.state;
+ let commenttype=comment===undefined||comment===null||comment==="";
+ let hidden_commenttype=hidden_comment===undefined||hidden_comment===null||hidden_comment==="";
- if(textareaval===undefined||textareaval===null||textareaval===""){
+
+ if(commenttype===true&&hidden_commenttype===true){
this.setState({
textareavaltype:true
})
return
}
+
+ //comment 是 text 可见的评阅内容
+ // hidden_comment 是 text 不可见的评阅内容
+ // challenge_id 否 int 关卡id(关卡评阅才需传关卡id)
+
+
let url=`/student_works/${this.props.match.params.homeworkid}/shixun_work_comment.json`
axios.post(url, {
comment:textareaval,
- is_hidden:valuetype
+ hidden_comment:valuetype
}).then((response) => {
if(response.data.status===0){
this.props.showNotification(response.data.message)
@@ -64,15 +73,41 @@ class AppraiseModal extends Component{
}
render(){
- let {textareaval,Inputsval,textareavaltype,Inputsvaltype}=this.state;
- const radioStyle = {
- display: 'block',
- height: '30px',
- lineHeight: '30px',
- };
-
+ let {textareavaltype,comment,hidden_comment}=this.state;
return(
+
+
-
+
可见:(学生可查看老师的评阅内容)
{/*
*/}
@@ -119,22 +151,22 @@ class AppraiseModal extends Component{
{/**/}
this.settextarea(e)}
- value={textareaval}
+ onInput={(e)=>this.comment(e)}
+ value={comment}
maxlength={500}
/>
-
+
不可见:(仅对课堂老师可见)
this.settextarea(e)}
- value={textareaval}
+ onInput={(e)=>this.hidden_comment(e)}
+ value={hidden_comment}
maxlength={500}
/>
- 评阅内容不能为空
+ 评阅内容至少有一个不为空
diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js
index 46259acc0..31e749867 100644
--- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js
+++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js
@@ -155,19 +155,20 @@ class ShixunWorkReport extends Component {
})
}
- showAppraiseModal=(sum)=>{
- // if(sum===undefined){
- // this.setState({
- // showAppraiseModaltype:true,
- // })
- // }else{
- // this.setState({
- // showAppraiseModaltype:true,
- // work_comment:undefined,
- // work_type:0,
- // })
- //
- // }
+ showAppraiseModal=(type,id)=>{
+ if(type==="child"){
+ this.setState({
+ showAppraisetype:type,
+ challenge_id:id
+ })
+ }else{
+ this.setState({
+ showAppraisetype:type,
+ challenge_id:undefined
+ })
+ }
+
+
let{work_comment,work_comment_hidden}=this.state;
this.setState({
showAppraiseModaltype:true,
@@ -253,6 +254,9 @@ class ShixunWorkReport extends Component {
modalSave={this.state.modalSave}
modalCancel={this.state.modalCancel}
>
+
+
+
{showAppraiseModaltype===true?
评阅 : ""}*/}
{this.props.isAdmin() ?this.showAppraiseModal(1)}
+ onClick={()=>this.showAppraiseModal("main")}
>评阅:""}
{/*{work_comment===null||work_comment===undefined?"评阅":"编辑评阅"}*/}
@@ -421,7 +425,7 @@ class ShixunWorkReport extends Component {
jumptopic={this.jumptopic}
getdatalist={()=>this.getdatalist()}
setupdalist={(challenge_score,overall_appraisal,work_score)=>this.setupdalist(challenge_score,overall_appraisal,work_score)}
- showAppraiseModal={(sum)=>this.showAppraiseModal(sum)}
+ showAppraiseModal={(type,id)=>this.showAppraiseModal(type,id)}
/>
@@ -484,7 +488,7 @@ class ShixunWorkReport extends Component {
>删除:""}
{this.props&&this.props.isAdminOrTeacher()===true?this.showAppraiseModal()}
+ onClick={()=>this.showAppraiseModal("main")}
>编辑:""}
diff --git a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
index 5e12bda06..fe88ef87d 100644
--- a/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
+++ b/public/react/src/modules/courses/shixunHomework/shixunreport/OfficialAcademicTranscript.js
@@ -29,7 +29,9 @@ class OfficialAcademicTranscript extends Component {
elapsedtime:item.time_consuming,
empvalue:{myself:item.myself_experience,experience:item.experience},
game_scores:{game_score:item.game_score,game_score_full:item.game_score_full},
- challenge_id:{id:item.challenge_id}
+ challenge_id:{id:item.challenge_id},
+ challenge_comment: item.challenge_comment,
+ challenge_comment_hidden: item.challenge_comment_hidden,
// adjustmentminute:asdasd
})
})
@@ -205,9 +207,10 @@ class OfficialAcademicTranscript extends Component {
render: (text, record) => (
+ {console.log(record)}
this.props.showAppraiseModal(1)}
+ onClick={()=>this.props.showAppraiseModal("child",record.challenge_id.id,record.challenge_comment,record.challenge_comment_hidden)}
>评阅
),
diff --git a/public/react/src/modules/modals/WordNumberTextarea.css b/public/react/src/modules/modals/WordNumberTextarea.css
index 7be8c13b3..7599f46ea 100644
--- a/public/react/src/modules/modals/WordNumberTextarea.css
+++ b/public/react/src/modules/modals/WordNumberTextarea.css
@@ -10,7 +10,7 @@
resize:none; /*禁止拉伸*/
border: none; /*去掉默认边框*/
width: 100%;
- height:150px;
+ height:130px;
border:none;
display: block;
}
@@ -26,7 +26,7 @@
border: 1px solid rgba(234,234,234,1);
border-radius: 0.125rem;
margin: 10px 10px 0px 10px;
- padding: 10px 10px 5px 10px
+ padding: 10px 10px 5px 10px;
backgroud:rgba(234,234,234,1);
}
.WordNumberTextarea-count {