杨树林 6 years ago
commit e152119cb5

@ -315,8 +315,8 @@ class Fileslists extends Component{
this.setState({
Modalstype:true,
Modalstopval:"公开后非课堂成员也可以访问查看",
ModalsBottomval:"是否确认公开?",
Modalstopval:"设为公开后非课堂成员也可以访问查看",
ModalsBottomval:"是否确认设为公开?",
ModalCancel:this.cancelmodel,
ModalSave:this.saveonOpen,
})

@ -122,8 +122,9 @@ class CoursesBanner extends Component {
this.showActionPoll(i,s)
}
if (i === 3) {
s = "您确定要设置为公开?";
this.showActionPoll(i,s)
s = "设为公开后,非课堂成员也可以访问查看";
ss = "是否确认设为公开?";
this.showActionPoll(i,s,ss)
}
if(i===4){

@ -40,7 +40,8 @@ class coursesHomeCard extends Component{
className="mt80 mb25"/>
<p className="font-14 color-white">非成员不能访问</p>
</div>
<a href={item.first_category_url} className="square-img" target="_blank">
<a href={item.first_category_url} className="square-img" >
{/*target="_blank"*/}
{
item.is_public===1&&item.id===1309?
<div>

@ -235,14 +235,16 @@ class GraduationTasks extends Component{
this.setState({
Modalstype:true,
Modalstopval:"公开后非课堂成员也可以访问查看",
ModalsBottomval:"是否确认公开?",
Modalstopval:"设为公开后非课堂成员也可以访问查看",
ModalsBottomval:"是否确认设为公开?",
ModalCancel:this.cancelmodel,
ModalSave:this.saveonOpen,
})
}
// onSticky = (message) => {
// const cid = this.props.match.params.coursesId
// const url = `/messages/${message.id}/sticky_top.json`

@ -90,7 +90,7 @@ class Homeworddescription extends Component {
{/*<TextArea placeholder="作业说明..." value={this.state.description} onInput={this.settextarea} style={{"height": "120px"}}/>*/}
{/*<TextArea style={{"height": "120px"}}*/}
{/* autoComplete="off" ></TextArea>*/}
<TPMMDEditor ref={this.mdRef} placeholder={'请在此输入帖子详情最大限制为5000个字符'}
<TPMMDEditor ref={this.mdRef} placeholder={'作业说明'}
mdID={'courseMessageMD'} initValue={this.state.description} className="courseMessageMD" onChange={this.settextarea} style={{"height": "120px"}}></TPMMDEditor>
</Form.Item>
<div className="clearfix">

@ -334,7 +334,7 @@ class ShixunhomeWorkItem extends Component{
{discussMessage.commit_count===undefined?"":<span className="mr15 color-grey9">{discussMessage.commit_count} 已交</span>}
{discussMessage.uncommit_count===undefined?"":<span className="mr15 color-grey9">{discussMessage.uncommit_count} 未交</span>}
{/*<span className="mr15 color-grey9">{discussMessage.replies_count} 3 未评</span>*/}
<Tooltip title={discussMessage.time_status>0?"剩余时间":""} placement="bottom">
<Tooltip title={discussMessage.time_status===1?"提交剩余时间":"补交剩余时间"} placement="bottom">
<span className="mr15 color-grey9">{discussMessage.status_time}</span>
</Tooltip>
@ -349,7 +349,7 @@ class ShixunhomeWorkItem extends Component{
{this.props.isAdmin?<div className="homepagePostSetting" style={{"right":"4px","top":"44px","display":"block","width":"192px"}}>
<a className="btn colorblue font-16" href={"/shixuns/"+discussMessage.shixun_identifier+"/challenges"} target={"_blank"}>实训详情</a>
<a onClick={()=>this.editname(discussMessage.name,discussMessage.homework_id)} className={"btn colorblue ml20 font-16"}>重命名</a>
{this.props.isClassManagement()?<a onClick={()=>this.editname(discussMessage.name,discussMessage.homework_id)} className={"btn colorblue ml20 font-16"}>重命名</a>:""}
<WordsBtn className="btn colorblue ml20 font-16" to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/settings`} > 设置</WordsBtn>
</div>:""}

@ -429,6 +429,15 @@ class Workquestionandanswer extends Component {
{jobsettingsdata === undefined|| jobsettingsdata.data.description===null? "无" : <div className=" clearfix edu-back-white poll_list mt20 mr20 ">
<span>
<style>
{
`
hr{
display:none;
}
`
}
</style>
<div className={"font-16 color-dark fl pl20 "}>
<div dangerouslySetInnerHTML={{__html: markdownToHTML(jobsettingsdata.data.description).replace(/▁/g,"▁▁▁")}}></div>
{/* /!*{}}></div>

@ -827,8 +827,8 @@ class ShixunHomework extends Component{
this.setState({
Modalstype:true,
Modalstopval:"公开后非课堂成员也可以访问查看",
ModalsBottomval:"是否确认公开?",
Modalstopval:"设为公开后非课堂成员也可以访问查看",
ModalsBottomval:"是否确认设为公开?",
ModalCancel:this.cancelmodel,
ModalSave:this.saveonOpen,
})
@ -1190,6 +1190,7 @@ class ShixunHomework extends Component{
isAdmin={this.props.isAdmin()}
isStudent={this.props.isStudent()}
isNotMember={this.props.isNotMember()}
isClassManagement={this.props.isClassManagement()}
checkBox={this.props.isAdmin()?<Checkbox value={item.homework_id}></Checkbox>:""}
match={this.props.match}
coursedata={this.props.coursedata}

@ -36,12 +36,14 @@ class ShixunPathCard extends Component{
className="mt80 mb25"/>
<p className="font-14 color-white">非试用内容需要授权</p>
</div>
<Link to={"/paths/"+item.id} className="square-img" target="_blank">
<Link to={"/paths/"+item.id} className="square-img" >
{/*target="_blank"*/}
<img alt="13?1543211263" src={item.image_url} style={{"display":"block"}}/>
</Link>
<div className="square-main">
<p className="task-hide">
<Link to={"/paths/"+item.id} className="justify color-grey-name" target="_blank">{item.name}</Link>
<Link to={"/paths/"+item.id} className="justify color-grey-name" >{item.name}</Link>
{/*target="_blank"*/}
</p>
<p className="clearfix mt8 font-12 color-grey-B4">

@ -183,7 +183,12 @@ export function TPMIndexHOC(WrappedComponent) {
// return false
return this.state.coursedata&&this.state.coursedata.course_identity === 0
}
// 管理员等
// 课堂管理等
isClassManagement = () => {
// return this.state.coursedata&&this.state.coursedata.course_identity >= 0 &&
return this.state.coursedata&&this.state.coursedata.course_identity < 2
}
//老师等
isAdminOrCreator = () => {
// return this.state.coursedata&&this.state.coursedata.course_identity >= 0 &&
return this.state.coursedata&&this.state.coursedata.course_identity < 3
@ -279,7 +284,7 @@ export function TPMIndexHOC(WrappedComponent) {
const common = {
isSuperAdmin:this.isSuperAdmin,
isAdminOrCreator:this.isAdminOrCreator,
isClassManagement:this.isClassManagement,
isAdmin: this.isAdmin,
isAdminOrTeacher: this.isAdminOrTeacher,
isStudent: this.isStudent,

@ -324,7 +324,7 @@ export default class TPMsettings extends Component {
opening_time:response.data.shixun.opening_time,
newuse_scope:response.data.shixun.use_scope,
scope_partments: response.data.shixun.scope_partment.length,
shixunmemoMDvalue:response.data.shixun.evaluate_script
shixunmemoMDvalue:response.data.shixun.evaluate_script,
})
// if(response.data.status===403){
@ -598,7 +598,7 @@ export default class TPMsettings extends Component {
evaluate_script, exec_time, webssh, use_scope, trainee, can_copy, task_pass, test_set_permission, hide_code, code_hidden, forbid_copy, vnc,multi_webssh,
opening_time, pod_exist_time,shixunmemoMDvalue
} = this.state;
let operateauthority=this.props.identity<4&&this.props.status==0||this.props.identity===1&&this.props.status==2||this.props.identity===1&&this.props.status==1;
let operateauthority=this.props.identity<4&&this.state.status==0||this.props.identity===1&&this.state.status==2||this.props.identity===1&&this.state.status==1;
const description_editormd = this.description_editormd.getValue();
@ -1084,7 +1084,7 @@ export default class TPMsettings extends Component {
}
const dateFormat = 'YYYY-MM-DD HH:mm:ss';
let operateauthority=this.props.identity===1?true:this.props.identity<4&&this.props.status==0;
let operateauthority=this.props.identity===1?true:this.props.identity<4&&this.state.status==0?true:false;
return (
<div className="educontent mt30 mb50" id="shixun_settings_show" onClick={this.bigopens} onMouseEnter={this.bigopens}>
@ -1092,21 +1092,21 @@ export default class TPMsettings extends Component {
<div className="padding30 bor-bottom-greyE clearfix">
<span className="fl font-16">配置</span>
{
this.props.identity===1&&this.props.status==2?
this.props.identity===1&&this.state.status==2?
<a className="edu-default-btn edu-blueline-btn ml20 fr"
onClick={()=>this.operateshixuns(2)}>
永久关闭
</a>:""
}
{
this.props.identity < 4 && this.props.status==0?
this.props.identity < 4 && this.state.status==0?
<a className="edu-default-btn edu-blueline-btn ml20 fr"
onClick={()=>this.operateshixuns(1)}>
删除实训
</a>:""
}
{
this.props.identity == 1 && this.props.status == 2 ?
this.props.identity == 1 && this.state.status == 2 ?
<a className="edu-default-btn edu-blueline-btn ml20 fr"
onClick={()=>this.operateshixuns(1)}>
删除实训
@ -1510,7 +1510,7 @@ export default class TPMsettings extends Component {
</RadioGroup>
</div>
<div className="edu-back-white mb10 padding40-20" style={{display:this.props.identity===1?"block":this.props.status===2&&newuse_scope===0||this.props.status===1&&newuse_scope===0?"none":"block"}}>
<div className="edu-back-white mb10 padding40-20" style={{display:this.props.identity===1?"block":this.state.status===2&&newuse_scope===0||this.state.status===1&&newuse_scope===0?"none":"block"}}>
<p className="color-grey-6 font-16 mb30">公开程度</p>
<RadioGroup onChange={this.SelectOpenpublic} value={use_scope}>
<Radio className="radioStyle" value={0}><span>对所有公开</span> <span className="color-grey-9">()</span></Radio>
@ -1556,7 +1556,7 @@ export default class TPMsettings extends Component {
onClick={(key)=>this.deleteScopeInput(key)}
// style={{display:this.props.status===2&&this.props.identity>1||this.props.status===1&&this.props.identity>1===true?"none":"block"}}
>
{this.props.identity===1?"x":this.props.status===2&&scope_partment===scope_partments||this.props.status===1&&scope_partment===scope_partments?"":"×"}
{this.props.identity===1?"x":this.state.status===2&&scope_partment===scope_partments||this.state.status===1&&scope_partment===scope_partments?"":"×"}
</a>
</li>
)

@ -103,18 +103,21 @@ class ShixunCard extends Component {
<p className="font-14 color-white">非试用内容需要授权</p>
</div>
<a href={"/shixuns/"+item.identifier+"/challenges"} target="_blank" className="square-img">
<a href={"/shixuns/"+item.identifier+"/challenges"} className="square-img">
{/*<img src={getImageUrl("images/"+item.pic+"?1540534846")}/>*/}
<img src={setImagesUrl(`${item.pic}`)}/>
</a>
{/*target="_blank"*/}
<div className="square-main">
<p className="task-hide">
<a href={"/shixuns/"+item.identifier+"/challenges"} target="_blank" className="justify color-grey-name" title={item.name}>
<a href={"/shixuns/"+item.identifier+"/challenges"} className="justify color-grey-name" title={item.name}>
{item.name}
</a>
</p>
{/*target="_blank"*/}
<p className="clearfix mt8 ml-3">
<span className="rateYoStar fl" style={{padding: '0px',height: '20px',lineHeight: '19px',cursor: 'default'}} title="">
<Rating key={key} value={item.score_info===null?5:item.score_info} disabled allowHalf />

Loading…
Cancel
Save