ysl 6 years ago
commit d7bbdfba9e

@ -1,5 +1,5 @@
import { bytesToSize } from 'educoder'; import { bytesToSize } from 'educoder';
export function markdownToHTML(oldContent) { export function markdownToHTML(oldContent, selector) {
window.$('#md_div').html('') window.$('#md_div').html('')
// markdown to html // markdown to html
var markdwonParser = window.editormd.markdownToHTML("md_div", { var markdwonParser = window.editormd.markdownToHTML("md_div", {
@ -12,6 +12,9 @@ export function markdownToHTML(oldContent) {
sequenceDiagram: true // 默认不解析 sequenceDiagram: true // 默认不解析
}); });
const content = window.$('#md_div').html() const content = window.$('#md_div').html()
if (selector) {
window.$(selector).html(content)
}
return content return content
} }

@ -6,40 +6,23 @@ class MarkdownToHtml extends Component{
this.state={ this.state={
} }
} }
// componentDidUpdate = (prevProps) => { componentDidUpdate = (prevProps) => {
// if (this.props.content) { if (this.props.content) {
// if ( prevProps.content != this.props.content ) { if ( prevProps.content != this.props.content ) {
// if (!this.shixunDescr) { markdownToHTML(this.props.content, `.markdown_to_html_${this.props.selector || ''}`)
// this.shixunDescr = window.editormd.markdownToHTML("memo_content_editorMd", { }
// markdown: this.props.content, }
// htmlDecode: "style,script,iframe", // you can filter tags decode }
// taskList: true, componentDidMount () {
// tex: true, // 默认不解析 this.props.content && markdownToHTML(this.props.content, `.markdown_to_html_${this.props.selector || ''}`)
// flowChart: true, // 默认不解析
// sequenceDiagram: true // 默认不解析 }
// });
// } else {
// this.shixunDescr.html(this.props.content)
// }
// }
// }
// }
// componentDidMount () {
// if (!this.shixunDescr) {
// this.shixunDescr = window.editormd.markdownToHTML("memo_content_editorMd", {
// markdown: this.props.content,
// htmlDecode: "style,script,iframe", // you can filter tags decode
// taskList: true,
// tex: true, // 默认不解析
// flowChart: true, // 默认不解析
// sequenceDiagram: true // 默认不解析
// });
// }
// }
render(){ render(){
return( return(
<div id="memo_content_editorMd" className="new_li markdown-body" dangerouslySetInnerHTML={{__html: markdownToHTML(this.props.content)}}> <div id="memo_content_editorMd" className={`new_li markdown-body ${this.props.className} markdown_to_html_${this.props.selector || ''}`}
// dangerouslySetInnerHTML={{__html: markdownToHTML(this.props.content)}}
>
</div> </div>
) )
} }

@ -236,6 +236,7 @@
/* line-height: 14px; */ /* line-height: 14px; */
width: 100%; width: 100%;
word-wrap: break-word; word-wrap: break-word;
margin-bottom: 4px;
} }
.childComment .break_word_comments{ .childComment .break_word_comments{
line-height: 22px; line-height: 22px;

@ -168,7 +168,7 @@ class Comments extends Component {
} }
</div> </div>
<p className="fr mr10 orig_reply lineh-20"> <p className="fr orig_reply lineh-20">
<span id="hidden_discuss_btn_952"> <span id="hidden_discuss_btn_952">
</span> </span>
@ -225,7 +225,7 @@ class Comments extends Component {
<div className="comment_content clearfix" id={`reply_content_${item.id}`}> <div className="comment_content clearfix" id={`reply_content_${item.id}`}>
<div className="color-grey-3" id={`reply_content_${item.id}`}> <div className="color-grey-3" id={`reply_content_${item.id}`}>
<div className={"break_word_comments"} dangerouslySetInnerHTML={{__html: _content}}></div> <div className={"break_word_comments markdown-body"} dangerouslySetInnerHTML={{__html: _content}}></div>
<div className="cl"></div> <div className="cl"></div>
</div> </div>
</div> </div>
@ -326,7 +326,7 @@ class Comments extends Component {
{ item.hidden && ((this.props.onlySuperAdminCouldHide && !item.isSuperAdmin) { item.hidden && ((this.props.onlySuperAdminCouldHide && !item.isSuperAdmin)
|| !this.props.onlySuperAdminCouldHide && item.admin === false && (item.manager === false || item.manager == undefined)) || !this.props.onlySuperAdminCouldHide && item.admin === false && (item.manager === false || item.manager == undefined))
? <p className="color-orange font-16">违规评论已被屏蔽</p> ? <p className="color-orange font-16">违规评论已被屏蔽</p>
: <div className={"break_word_comments"} dangerouslySetInnerHTML={{__html: _content}}></div> : <div className={"break_word_comments markdown-body"} dangerouslySetInnerHTML={{__html: _content}}></div>
} }
<div className="cl"></div> <div className="cl"></div>
</div> </div>

@ -1,6 +1,7 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import {Tooltip} from 'antd' import {Tooltip} from 'antd'
import moment from 'moment' import moment from 'moment'
import { getUrl } from 'educoder'
class BoardsListItem extends Component{ class BoardsListItem extends Component{
constructor(props){ constructor(props){
super(props); super(props);
@ -37,11 +38,11 @@ class BoardsListItem extends Component{
} }
`}</style> `}</style>
{ checkBox } { checkBox }
<a href="/users/innov" alt="用户" style={{"width":"50px","height":"50px","display":"block", margin: "0 10px"}}> <a href={`/users/${discussMessage.author.login}`} alt="用户" style={{"width":"50px","height":"50px","display":"block", margin: "0 10px"}}>
{/* /images/avatars/User/1?1529221779 */} {/* /images/avatars/User/1?1529221779 */}
<img <img
alt="1?1529221779" className="panel-list-img mr15" height="50" alt="1?1529221779" className="panel-list-img mr15" height="50"
src={`/images/${discussMessage.author.image_url}`} width="50" src={`${getUrl()}/images/${discussMessage.author.image_url}`} width="50"
></img> ></img>
</a> </a>
<div className="clearfix ds pr pt5 contentSection" onClick={() => onItemClick(discussMessage)}> <div className="clearfix ds pr pt5 contentSection" onClick={() => onItemClick(discussMessage)}>
@ -62,7 +63,7 @@ class BoardsListItem extends Component{
<div className="cl"></div> <div className="cl"></div>
<p className="color-grey panel-lightgrey mt10 fl"> <p className="color-grey panel-lightgrey mt10 fl">
<span className="mr50"> <span className="mr50">
<a href="/users/innov" className="panel-name-small hide fl mr15 mr30 color-grey3">{discussMessage.author.name}</a> <a href={`/users/${discussMessage.author.login}`} className="panel-name-small hide fl mr15 mr30 color-grey3">{discussMessage.author.name}</a>
{ discussMessage.total_replies_count != 0 && <span className="mr15 color-grey9">{discussMessage.total_replies_count} 回复</span> } { discussMessage.total_replies_count != 0 && <span className="mr15 color-grey9">{discussMessage.total_replies_count} 回复</span> }
{ discussMessage.total_praises_count != 0 && <span className="mr15 color-grey9">{discussMessage.total_praises_count} 点赞</span> } { discussMessage.total_praises_count != 0 && <span className="mr15 color-grey9">{discussMessage.total_praises_count} 点赞</span> }

@ -24,7 +24,7 @@ import '../../forums/RightSection.css'
import './TopicDetail.css' import './TopicDetail.css'
import '../common/courseMessage.css' import '../common/courseMessage.css'
import { Pagination, Tooltip } from 'antd' import { Pagination, Tooltip } from 'antd'
import { bytesToSize, ConditionToolTip } from 'educoder' import { bytesToSize, ConditionToolTip, markdownToHTML, MarkdownToHtml } from 'educoder'
import SendToCourseModal from '../coursesPublic/modal/SendToCourseModal' import SendToCourseModal from '../coursesPublic/modal/SendToCourseModal'
import CBreadcrumb from '../common/CBreadcrumb' import CBreadcrumb from '../common/CBreadcrumb'
import { generateComments, generateChildComments, _findById, handleContentBeforeCreateNew, addNewComment import { generateComments, generateChildComments, _findById, handleContentBeforeCreateNew, addNewComment
@ -87,15 +87,6 @@ class TopicDetail extends Component {
replies_count: response.data.data.total_replies_count replies_count: response.data.data.total_replies_count
}, {...this.state.memo}) }, {...this.state.memo})
}, () => { }, () => {
setTimeout(()=>{
var shixunDescr = window.editormd.markdownToHTML("memo_content_editorMd", {
htmlDecode: "style,script,iframe", // you can filter tags decode
taskList: true,
tex: true, // 默认不解析
flowChart: true, // 默认不解析
sequenceDiagram: true // 默认不解析
});
}, 200)
}) })
// const { memo_replies, memo } = response.data; // const { memo_replies, memo } = response.data;
@ -181,13 +172,13 @@ class TopicDetail extends Component {
// md渲染content等xhr执行完即memoLoading变化memo.content更新后初始化md // md渲染content等xhr执行完即memoLoading变化memo.content更新后初始化md
setTimeout(()=>{ setTimeout(()=>{
var shixunDescr = window.editormd.markdownToHTML("memo_content_editorMd", { // var shixunDescr = window.editormd.markdownToHTML("memo_content_editorMd", {
htmlDecode: "style,script,iframe", // you can filter tags decode // htmlDecode: "style,script,iframe", // you can filter tags decode
taskList: true, // taskList: true,
tex: true, // 默认不解析 // tex: true, // 默认不解析
flowChart: true, // 默认不解析 // flowChart: true, // 默认不解析
sequenceDiagram: true // 默认不解析 // sequenceDiagram: true // 默认不解析
}); // });
}, 200) }, 200)
} }
@ -629,13 +620,8 @@ class TopicDetail extends Component {
<div className="padding40 memoContent new_li"> <div className="padding40 memoContent new_li">
<div id="memo_content_editorMd" className="new_li"> <MarkdownToHtml content={memo.content}></MarkdownToHtml>
<textarea style={{'display': 'none'}}>
{memo.content}
</textarea>
</div>
</div> </div>
{/* style={{ paddingTop: '0px'}} */}
<div className="padding40 bor-bottom-greyE" > <div className="padding40 bor-bottom-greyE" >
<div className="mt10 mb20"> <div className="mt10 mb20">
{/* ${memo.user_praise ? '' : ''} */} {/* ${memo.user_praise ? '' : ''} */}

@ -17,7 +17,7 @@
} }
/* 子回复按钮 */ /* 子回复按钮 */
.course-message .reply_to_message a.commentsbtn.task-btn-blue { .course-message .reply_to_message a.commentsbtn.task-btn-blue {
margin-right: 50px; /* margin-right: 50px; */
} }
/* 改边距 */ /* 改边距 */
/* .course-message .commentsDelegateParent { /* .course-message .commentsDelegateParent {

@ -205,7 +205,7 @@ class GraduationTasksappraise extends Component{
</div> </div>
<div className={"ml20"}> <div className={"ml20"}>
<div dangerouslySetInnerHTML={{__html: markdownToHTML(datalist&&datalist.description).replace(/▁/g,"▁▁▁")}}></div> <div dangerouslySetInnerHTML={{__html: markdownToHTML(datalist&&datalist.description===null?"--":datalist&&datalist.description).replace(/▁/g,"▁▁▁")}}></div>
</div> </div>
{/*<div className={"color-grey-6 h20 ml20"}>*/} {/*<div className={"color-grey-6 h20 ml20"}>*/}

@ -125,7 +125,7 @@ class GraduationTasksedit extends Component{
GraduationTasksedittype=false; GraduationTasksedittype=false;
// window.location.href="/courses/"+course_id+"/graduation/"+graduationId+"/graduation_tasks/"+category_id+"/questions"; // window.location.href="/courses/"+course_id+"/graduation/"+graduationId+"/graduation_tasks/"+category_id+"/questions";
// this.goback() // this.goback()
this.props.history.push("/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+graduation_id+"/"+this.props.match.params.category_id +"/setting"); window.location.href="/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+graduation_id+"/"+this.props.match.params.category_id +"/setting";
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)

@ -140,9 +140,11 @@ class GraduationTaskssettingapp extends Component{
componentDidMount(){ componentDidMount(){
let query=this.props.location.search
const type = query.split('?tab=');
let id=parseInt(type[1])
this.getsettings(); this.getsettings();
if(this.props.isAdmin()===true){ if(this.props.isAdmin()===true&&isNaN(id)){
this.editSetting() this.editSetting()
} }
} }
@ -484,6 +486,31 @@ class GraduationTaskssettingapp extends Component{
let {latepenalty,hascommit,minnums,max_nums,publish_time,end_time,crosscomment,latetime,starttimetype}=this.state; let {latepenalty,hascommit,minnums,max_nums,publish_time,end_time,crosscomment,latetime,starttimetype}=this.state;
if(isNaN(parseInt(this.state.minnum))){
this.setState({
numtype:true
})
this.scrollToAnchor("publishtimestart");
return
}else{
this.setState({
numtype:false
})
}
if(isNaN(parseInt(this.state.maxnum))){
this.setState({
numtype:true
})
this.scrollToAnchor("publishtimestart");
return
}else{
this.setState({
numtype:false
})
}
if(latepenalty===undefined){ if(latepenalty===undefined){
this.setState({ this.setState({
latepenaltytype:true, latepenaltytype:true,
@ -611,26 +638,7 @@ class GraduationTaskssettingapp extends Component{
return return
} }
if(isNaN(parseInt(this.state.minnum))){
this.setState({
numtype:true
})
return
}else{
this.setState({
numtype:false
})
}
if(isNaN(parseInt(this.state.maxnum))){
this.setState({
numtype:true
})
return
}else{
this.setState({
numtype:false
})
}
@ -1036,7 +1044,7 @@ class GraduationTaskssettingapp extends Component{
<Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>任务问答</Link> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>任务问答</Link>
<Link className="active" <Link className="active"
style={{paddingLeft:'38px'}} style={{paddingLeft:'38px'}}
to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting"}>设置</Link> to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting?tab=3"}>设置</Link>
{/*<a className={"fr color-blue font-16"}>导出</a>*/} {/*<a className={"fr color-blue font-16"}>导出</a>*/}
<style> <style>
@ -1066,7 +1074,7 @@ class GraduationTaskssettingapp extends Component{
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}> {this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i> 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xls"} calssName="color-dark">导出成绩</a></li> <li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xlsx"} calssName="color-dark">导出成绩</a></li>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} calssName="color-dark">导出作品附件</a></li> <li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} calssName="color-dark">导出作品附件</a></li>
</ul> </ul>
</li>:""} </li>:""}
@ -1093,9 +1101,9 @@ class GraduationTaskssettingapp extends Component{
{task_type===2?<div className="stud-class-set bor-bottom-greyE pd20 edu-back-white pl30" > {task_type===2?<div className="stud-class-set bor-bottom-greyE pd20 edu-back-white pl30" >
<div className={"xingrequired font-16 color-dark h20 mb20"}>分组设置 <span className={"font-14 color-grey-c"}>提交作品时需要关联同组成员组内成员作品共享</span></div> <div className={"xingrequired font-16 color-dark h20 mb20"}>分组设置 <span className={"font-14 color-grey-c"}>提交作品时需要关联同组成员组内成员作品共享</span></div>
<div className={"mb30 h20 ml40"}> <div className={"mb30 h20 ml40"}>
<Input className="mr20" style={{ width:"100px" }} value={minnum} onInput={this.setminnum} disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true}/> <Input className={numtype===true?"noticeTip mr20":"mr20"} style={{ width:"100px" }} value={minnum} onInput={this.setminnum} disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true}/>
<span className="mr20">~</span> <span className="mr20">~</span>
<Input className="mr20" style={{width:"100px" }} value={maxnum} onInput={this.setmaxnum} disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true}/> <Input className={numtype===true?"noticeTip mr20":"mr20"} style={{width:"100px" }} value={maxnum} onInput={this.setmaxnum} disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true}/>
<span className="mr10"></span> <span className="mr10"></span>
<span className={"font-14 color-grey-c"}>学生提交作品时需要关联同组成员组内成员作品共享</span> <span className={"font-14 color-grey-c"}>学生提交作品时需要关联同组成员组内成员作品共享</span>
</div> </div>

@ -726,17 +726,19 @@ class GraduationTaskssettinglist extends Component{
{this.props.isAdmin()?operation.map((tag,key) => { {this.props.isAdmin()?operation.map((tag,key) => {
return( return(
<div key={key}> <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>:""}> 其它历史评分将全部失效</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):""} 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> </div>
) )
}):""} }):""}
@ -745,9 +747,7 @@ class GraduationTaskssettinglist extends Component{
operation.map((tag,key) => { operation.map((tag,key) => {
return( return(
<div key={key}> <div key={key}>
{tag.status===0?"--": {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"} >查看</a>
}
</div> </div>
)} )}
):"" ):""
@ -858,19 +858,21 @@ class GraduationTaskssettinglist extends Component{
{this.props.isAdmin()?operation.map((tag,key) => { {this.props.isAdmin()?operation.map((tag,key) => {
return( return(
<div key={key}> <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>:""}> 其它历史评分将全部失效</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):""} 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> </div>
) )
}):""} }):""}
@ -879,9 +881,9 @@ class GraduationTaskssettinglist extends Component{
operation.map((tag,key) => { operation.map((tag,key) => {
return( return(
<div key={key}> <div key={key}>
{tag.status===0?"--": {tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >查看</a> 查看
} </a>}
</div> </div>
)} )}
):"" ):""
@ -1006,14 +1008,15 @@ class GraduationTaskssettinglist extends Component{
{this.props.isAdmin()?operation.map((tag,key) => { {this.props.isAdmin()?operation.map((tag,key) => {
return( return(
<div key={key}> <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>:""}> 其它历史评分将全部失效</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):""} onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}
>{tag.name}</a> >{tag.status===0?"":tag.name}</a>
} }
</Tooltip> </Tooltip>
} }
@ -1026,9 +1029,9 @@ class GraduationTaskssettinglist extends Component{
operation.map((tag,key) => { operation.map((tag,key) => {
return( return(
<div key={key}> <div key={key}>
{tag.status===0?"--": {tag.status===0?"--": <a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >查看</a> 查看
} </a>}
</div> </div>
)} )}
):"" ):""
@ -1138,14 +1141,16 @@ class GraduationTaskssettinglist extends Component{
{this.props.isAdmin()?operation.map((tag,key) => { {this.props.isAdmin()?operation.map((tag,key) => {
return( return(
<div key={key}> <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>:""}> 其它历史评分将全部失效</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):""} onClick={tag.name==="调分"?()=>this.showModulationtype(tag.id):tag.name==="分配"?()=>this.showAllocationModal(tag.id):""}
>{tag.name}</a> >{tag.status===0?"":tag.name}</a>
} }
</Tooltip> </Tooltip>
} }
@ -1158,9 +1163,8 @@ class GraduationTaskssettinglist extends Component{
operation.map((tag,key) => { operation.map((tag,key) => {
return( return(
<div key={key}> <div key={key}>
{tag.status===0?"--": {tag.status===0?"--":<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >
<a style={{color:'#4CACFF'}} href={"/courses/"+courseId+"/graduation_tasks/"+tag.id+"/appraise"} >查看</a> 查看</a>}
}
</div> </div>
)} )}
):"" ):""
@ -1284,7 +1288,7 @@ class GraduationTaskssettinglist extends Component{
<Link className="active" to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>任务列表</Link> <Link className="active" to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>任务列表</Link>
<Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>任务问答</Link> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>任务问答</Link>
<Link style={{paddingLeft:'38px'}} <Link style={{paddingLeft:'38px'}}
to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting"}>设置</Link> to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting?tab=3"}>设置</Link>
{/*<a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+task_Id+"/edit"}>编辑任务</a>*/} {/*<a className={"fr color-blue font-16"} href={"/courses/"+courseId+"/graduation_tasks/"+task_Id+"/edit"}>编辑任务</a>*/}
{/*<a className={"fr color-blue font-16"} onClick={this.end}>立即截止</a>*/} {/*<a className={"fr color-blue font-16"} onClick={this.end}>立即截止</a>*/}
@ -1318,7 +1322,7 @@ class GraduationTaskssettinglist extends Component{
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}> {this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i> 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xls"} calssName="color-dark">导出成绩</a></li> <li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xlsx"} calssName="color-dark">导出成绩</a></li>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} calssName="color-dark">导出作品附件</a></li> <li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} calssName="color-dark">导出作品附件</a></li>
</ul> </ul>
</li>:""} </li>:""}

@ -275,7 +275,7 @@ class GraduationTasksquestions extends Component{
<Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>任务列表</Link> <Link to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/list"}>任务列表</Link>
<Link className="active" to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>任务问答</Link> <Link className="active" to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/questions"}>任务问答</Link>
<Link style={{paddingLeft:'38px'}} <Link style={{paddingLeft:'38px'}}
to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting"}>设置</Link> to={"/courses/"+courseId+"/graduation_tasks/"+category_id+"/"+task_Id+"/setting?tab=3"}>设置</Link>
{/*<a className={"fr color-blue font-16"}>导出成绩</a>*/} {/*<a className={"fr color-blue font-16"}>导出成绩</a>*/}
{/*{this.props.isAdmin()?<a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xls"} className={"fr color-blue font-16"}>导出成绩</a>:""}*/} {/*{this.props.isAdmin()?<a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xls"} className={"fr color-blue font-16"}>导出成绩</a>:""}*/}
@ -308,7 +308,7 @@ class GraduationTasksquestions extends Component{
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}> {this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mr20 mt20" style={{"paddingLeft":"0px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i> 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xls"} calssName="color-dark">导出成绩</a></li> <li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.xlsx"} calssName="color-dark">导出成绩</a></li>
<li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} calssName="color-dark">导出作品附件</a></li> <li><a href={"/api/graduation_tasks/"+task_Id+"/tasks_list.zip"} calssName="color-dark">导出作品附件</a></li>
</ul> </ul>
</li>:""} </li>:""}

@ -337,7 +337,7 @@ onBoardsNew=()=>{
{/* 参考普通作业 - 题库选用 */} {/* 参考普通作业 - 题库选用 */}
{/* <WordsBtn style="blue" className="mr30" onClick={()=>this.useFromBank()}>题库选用</WordsBtn> 正式版没有,先隐藏*/} {/* <WordsBtn style="blue" className="mr30" onClick={()=>this.useFromBank()}>题库选用</WordsBtn> 正式版没有,先隐藏*/}
<p className="fl"><UseBank {...this.props} {...this.state} object_type={"gtopic"} useBankSuccess={this.useBankSuccess}></UseBank></p> <p className="fl"><UseBank {...this.props} {...this.state} object_type={"gtopic"} useBankSuccess={this.useBankSuccess}></UseBank></p>
< a href={`/api/courses/${this.props.match.params.coursesId}/graduation_topics/export.xls`} className={"color-blue mr20 font-16"}>导出</a> < a href={`/api/courses/${this.props.match.params.coursesId}/graduation_topics/export.xlsx`} className={"color-blue mr20 font-16"}>导出</a>
<WordsBtn style="blue" className="font-16" onClick={()=>this.onBoardsNew()}>新建</WordsBtn> <WordsBtn style="blue" className="font-16" onClick={()=>this.onBoardsNew()}>新建</WordsBtn>
</React.Fragment>):"" </React.Fragment>):""
} }

@ -1116,7 +1116,7 @@ class Listofworks extends Component {
>设置</Link> >设置</Link>
{this.props.isAdmin() ? <a {this.props.isAdmin() ? <a
className="fr color-blue font-16" className="fr color-blue font-16"
href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xls`} href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}
>导出</a> : ""} >导出</a> : ""}
{this.props.isAdmin() ? {this.props.isAdmin() ?
teacherdata && teacherdata.end_immediately === true ? teacherdata && teacherdata.end_immediately === true ?

@ -590,7 +590,7 @@ class ShixunStudentWork extends Component {
>设置</Link> >设置</Link>
{this.props.isAdmin() ? <a {this.props.isAdmin() ? <a
className="fr color-blue font-16" className="fr color-blue font-16"
href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xls`} href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}
>导出</a> : ""} >导出</a> : ""}
{this.props.isAdmin()? {this.props.isAdmin()?
data.end_immediately===true? data.end_immediately===true?

@ -1592,7 +1592,7 @@ class Trainingjobsetting extends Component {
{/*</Link>*/} {/*</Link>*/}
{this.props.isAdmin() ? <a {this.props.isAdmin() ? <a
className="fr color-blue font-16" className="fr color-blue font-16"
href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xls`} href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}
>导出</a> : ""} >导出</a> : ""}
{this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true? {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a> : "": ""} <a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a> : "": ""}

@ -411,7 +411,7 @@ class Workquestionandanswer extends Component {
{/*<a className="fr color-blue font-16" href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xls`}>导出成绩</a>*/} {/*<a className="fr color-blue font-16" href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xls`}>导出成绩</a>*/}
{this.props.isAdmin() ? <a {this.props.isAdmin() ? <a
className="fr color-blue font-16" className="fr color-blue font-16"
href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xls`} href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}
>导出</a> : ""} >导出</a> : ""}
{this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true? {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true?
<a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>:"" : ""} <a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>:"" : ""}

@ -169,7 +169,7 @@ class MemoDetailMDEditor extends Component {
} */} } */}
</style> </style>
<div nhname={`new_message_${memo.id}`} className="commentInput commentInputs" <div nhname={`new_message_${memo.id}`} className="commentInput commentInputs"
style={{ padding: '30px',boxSizing:"border-box", display: isInited ? '' : 'none' }} > style={{ padding: '30px',boxSizing:"border-box", display: isInited ? '' : 'none', paddingBottom: '40px' }} >
<div id="memo_comment_editorMd" className="editorMD" style={{ marginBottom: '0px' <div id="memo_comment_editorMd" className="editorMD" style={{ marginBottom: '0px'
, border: errorMsg ? '1px solid red' : '1px solid #ddd'}}> , border: errorMsg ? '1px solid red' : '1px solid #ddd'}}>
<textarea style={{'display': 'none'}}> <textarea style={{'display': 'none'}}>
@ -180,7 +180,7 @@ class MemoDetailMDEditor extends Component {
marginLeft: '4px'}}>{errorMsg}</span> } marginLeft: '4px'}}>{errorMsg}</span> }
<a id={`new_message_submit_btn_${memo.id}`} href="javascript:void(0)" <a id={`new_message_submit_btn_${memo.id}`} href="javascript:void(0)"
onClick={this.onCommit} className="commentsbtn task-btn task-btn-blue fr"> onClick={this.onCommit} className="commentsbtn task-btn task-btn-blue fr">
发送 {this.props.buttonText || '发送'}
</a> </a>
</div> </div>
</React.Fragment> </React.Fragment>

@ -88,7 +88,7 @@ class ShixunDiscuss extends Component {
<a href={i.user.user_url} className="content-username hide fl">{i.user.name}</a> <a href={i.user.user_url} className="content-username hide fl">{i.user.name}</a>
<span className="t_area fl">{i.time}</span> <span className="t_area fl">{i.time}</span>
</div> </div>
<p className="fr mr10 orig_reply lineh-20"> <p className="fr orig_reply lineh-20">
<span id="hidden_discuss_btn_952"></span> <span id="hidden_discuss_btn_952"></span>
<a className="color-grey-8"> <a className="color-grey-8">
<i className="iconfont icon-jiangli fl mt2"></i> <i className="iconfont icon-jiangli fl mt2"></i>

Loading…
Cancel
Save