hjm 6 years ago
commit 5950b789f9

@ -1,7 +1,7 @@
import React,{Component} from "React";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag} from "antd";
import {Link} from 'react-router-dom';
import { WordsBtn } from 'educoder';
import { WordsBtn,markdownToHTML } from 'educoder';
import axios from 'axios';
import moment from 'moment';
import Modals from '../../../modals/Modals';
@ -205,7 +205,7 @@ class GraduationTasksappraise extends Component{
</div>
<div className={"ml20"}>
{datalist&&datalist.description}
<div dangerouslySetInnerHTML={{__html: markdownToHTML(datalist&&datalist.description===null?"--":datalist&&datalist.description).replace(/▁/g,"▁▁▁")}}></div>
</div>
{/*<div className={"color-grey-6 h20 ml20"}>*/}

@ -111,11 +111,11 @@ class GraduationTaskssettingapp extends Component{
max_nums: result.data.max_num,
task_type: result.data.task_type,
baseonproject: result.data.base_on_project,
publish_time:moment(moment(handleDateString(result.data.publish_time))).format("YYYY-MM-DD HH:mm"),
end_time:moment(moment(handleDateString(result.data.end_time))).format("YYYY-MM-DD HH:mm"),
publish_time:result.data.publish_time===null?"":moment(moment(handleDateString(result.data.publish_time))).format("YYYY-MM-DD HH:mm"),
end_time:result.data.end_time===null?"":moment(moment(handleDateString(result.data.end_time))).format("YYYY-MM-DD HH:mm"),
allowlate: result.data.allow_late,
latepenalty: result.data.late_penalty,
latetime:moment(moment(handleDateString(result.data.late_time))).format("YYYY-MM-DD HH:mm"),
latetime:result.data.late_time===null?"":moment(moment(handleDateString(result.data.late_time))).format("YYYY-MM-DD HH:mm"),
crosscomment: result.data.cross_comment,
taskid: result.data.id,
taskname: result.data.task_name,
@ -128,7 +128,7 @@ class GraduationTaskssettingapp extends Component{
hasproject: result.data.has_project,
hascommit: result.data.has_commit,
assigngroups: assigngroups,
commenttime:moment(moment(handleDateString(result.data.comment_time))).format("YYYY-MM-DD HH:mm"),
commenttime:result.data.comment_time===null?"":moment(moment(handleDateString(result.data.comment_time))).format("YYYY-MM-DD HH:mm"),
task_status: result.data.task_status
})
}

@ -726,17 +726,19 @@ class GraduationTaskssettinglist extends Component{
{this.props.isAdmin()?operation.map((tag,key) => {
return(
<div key={key}>
{tag.status===0?"--":<Tooltip placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>
<Tooltip placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>
其它历史评分将全部失效</pre>:""}>
{tag.name==="评阅"?<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >{tag.name}</a>
{tag.name==="评阅"?tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
{tag.name}
</a>
:
<a style={{color:tag.name==="调分"?"#000":'#4CACFF'}}
<a style={{color:tag.name==="调分"?"#000":'#4CACFF'}}
onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}
>{tag.name}</a>
>{tag.status===0?"":tag.name}</a>
}
</Tooltip>}
</Tooltip>
</div>
)
}):""}
@ -745,9 +747,7 @@ class GraduationTaskssettinglist extends Component{
operation.map((tag,key) => {
return(
<div key={key}>
{tag.status===0?"--":
<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >查看</a>
}
<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >{tag.status===0?"":"查看"}</a>
</div>
)}
):""
@ -858,19 +858,21 @@ class GraduationTaskssettinglist extends Component{
{this.props.isAdmin()?operation.map((tag,key) => {
return(
<div key={key}>
{tag.status===0?"--":
<Tooltip placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>
其它历史评分将全部失效</pre>:""}>
{tag.name==="评阅"?<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >{tag.name}</a>
{tag.name==="评阅"?tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
{tag.name}
</a>
:
<a style={{color:tag.name==="调分"?"#000":'#4CACFF'}}
onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}
>{tag.name}</a>
>{tag.status===0?"":tag.name}</a>
}
</Tooltip>
}
</div>
)
}):""}
@ -879,9 +881,10 @@ class GraduationTaskssettinglist extends Component{
operation.map((tag,key) => {
return(
<div key={key}>
{tag.status===0?"--":
<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >查看</a>
}
<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
{tag.status===0?"":"查看"}
</a>
</div>
)}
):""
@ -1006,14 +1009,15 @@ class GraduationTaskssettinglist extends Component{
{this.props.isAdmin()?operation.map((tag,key) => {
return(
<div key={key}>
{tag.status===0?"--":
<Tooltip placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>
其它历史评分将全部失效</pre>:""}>
{tag.name==="评阅"?<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >{tag.name}</a>
{tag.name==="评阅"?tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
{tag.name}</a>
:
<a style={{color:tag.name==="调分"?"#000":'#4CACFF'}}
onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}
>{tag.name}</a>
>{tag.status===0?"":tag.name}</a>
}
</Tooltip>
}
@ -1026,9 +1030,9 @@ class GraduationTaskssettinglist extends Component{
operation.map((tag,key) => {
return(
<div key={key}>
{tag.status===0?"--":
<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >查看</a>
}
<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
{tag.status===0?"":"查看"}
</a>
</div>
)}
):""
@ -1138,14 +1142,16 @@ class GraduationTaskssettinglist extends Component{
{this.props.isAdmin()?operation.map((tag,key) => {
return(
<div key={key}>
{tag.status===0?"--":
<Tooltip placement="bottom" title={tag.name==="分配"?"指定该作品的交叉评阅人":tag.name==="调分"?<pre>调整学生最终成绩<br/>
其它历史评分将全部失效</pre>:""}>
{tag.name==="评阅"?<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >{tag.name}</a>
{tag.name==="评阅"?tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
{tag.name}
</a>
:
<a style={{color:tag.name==="调分"?"#000":'#4CACFF'}}
onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}
>{tag.name}</a>
>{tag.status===0?"":tag.name}</a>
}
</Tooltip>
}
@ -1158,9 +1164,8 @@ class GraduationTaskssettinglist extends Component{
operation.map((tag,key) => {
return(
<div key={key}>
{tag.status===0?"--":
<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >查看</a>
}
<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
{tag.status===0?"":"查看"}</a>
</div>
)}
):""

@ -8,7 +8,7 @@ import PropTypes from 'prop-types';
import classNames from 'classnames';
import { getImageUrl } from 'educoder'
import { getImageUrl ,markdownToHTML} from 'educoder'
import { CircularProgress } from 'material-ui/Progress';
@ -250,9 +250,7 @@ class Challenges extends Component {
id="challenge_editorMd_description">
<p id="ReactMarkdown" style={{overflow:'hidden'}}>
{ChallengesDataList === undefined ? "" :ChallengesDataList.description===null?"":
<textarea>
{ChallengesDataList.description}
</textarea>
<div dangerouslySetInnerHTML={{__html: markdownToHTML(ChallengesDataList.description).replace(/▁/g,"▁▁▁")}}></div>
}
</p>

Loading…
Cancel
Save