Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

issues25489
cxt 5 years ago
commit 5fc10548e7

@ -20,3 +20,44 @@ codemirror merge.js
修改过的地方: 修改过的地方:
Raphaël 2.1.3 Raphaël 2.1.3
Element= -> __Element= Element= 替换成了 __Element= Element= -> __Element= Element= 替换成了 __Element=
js_min_all的一些tpi的js
1、
code: TPI拖拽功能 begin
tpi的上下和左右的拖拽
2、
code: window.__tpiOnResize
onRepositoryViewExpand或window resize以后需要调用这个方法重新计算命令行区域大小
3、
code: window.refresh_editor_monaco
monaco重新layout计算高宽
4、
code: reply_to_dis、 $("#all_task_show").on("click", function(e){ 、 $("#all_task_index").on("click", function(e){ 、
$("#next_step").live("click", function(){ 、 $("#prev_step").live("click", function(){ 、
function open_answer(game, myshixun, choose){ 、 function choice_answer(st, nThis){
function check_tab(allClassName,addClassName,item){ 、 function toggle_test_case_choose(t_case, id){
function toggle_test_case(open, output, actual_output, id, power){ 、
CodeMirror_fromTextArea 、 function game_praise(obj_id, obj_type){ 、 function game_tread(obj_id){
function setupAjaxIndicatorBase() { 、 function match_specific_symbol(str){
function code_evaluation(test_sets 、 function pop_box_new(value, Width, Height){
貌似没用到基本上page目录或TPIContextProvider里搜索不到的代码都是没用到的可以优化去除掉。
code:
sure_box_redirect_btn 这些弹框的话,有的会有用到,有的没用到的可以尝试删除
5、
code function tpi_html_show(newCode){ 、 function is_cdn_link(contents){
html显示效果时用到的脚本
6、
code // 这里重新加一次事件监听,不在原有事件的基础上增加代码了
新加了一次拖拽事件
7、
code
function create_editorMD_4comment(id, width, high, placeholder, imageUrl, callback, otherOptions){
老的md编辑器初始化方法考虑用心的TPMMDEditor代替

@ -237,7 +237,7 @@ class OneSelfOrderModal extends Component{
}) })
return return
} }
arr.push(items.end_time) arr.push(handleDateString(items.end_time))
} }
} }
}) })
@ -273,7 +273,7 @@ class OneSelfOrderModal extends Component{
render(){ render(){
let {group_ids,endtime,course_groups}=this.state; let {group_ids,endtime,course_groups}=this.state;
console.log(this.props.modaltype) // console.log(this.props.modaltype)
let course_groupstype=course_groups===undefined||course_groups.length===0; let course_groupstype=course_groups===undefined||course_groups.length===0;
// TODO course_groups为空时的处理 // TODO course_groups为空时的处理
return( return(

@ -1868,6 +1868,10 @@ class Listofworksstudentone extends Component {
if (item.title === "关卡得分") { if (item.title === "关卡得分") {
continue continue
} }
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "效率分") { if (item.title === "效率分") {
continue continue
} }
@ -1881,6 +1885,10 @@ class Listofworksstudentone extends Component {
} }
} else { } else {
if (work_efficiency === false) { if (work_efficiency === false) {
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "关卡得分") { if (item.title === "关卡得分") {
continue continue
} else if (item.title === "效率分") { } else if (item.title === "效率分") {
@ -1902,6 +1910,10 @@ class Listofworksstudentone extends Component {
if (item.title === "关卡得分") { if (item.title === "关卡得分") {
continue continue
} }
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "效率分") { if (item.title === "效率分") {
continue continue
} }
@ -1915,6 +1927,10 @@ class Listofworksstudentone extends Component {
} }
} else { } else {
if (work_efficiency === false) { if (work_efficiency === false) {
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "关卡得分") { if (item.title === "关卡得分") {
continue continue
} else if (item.title === "效率分") { } else if (item.title === "效率分") {
@ -2052,6 +2068,10 @@ class Listofworksstudentone extends Component {
if (item.title === "关卡得分") { if (item.title === "关卡得分") {
continue continue
} }
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "效率分") { if (item.title === "效率分") {
continue continue
} }
@ -2065,6 +2085,10 @@ class Listofworksstudentone extends Component {
} }
} else { } else {
if (this.state.work_efficiency === false) { if (this.state.work_efficiency === false) {
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "关卡得分") { if (item.title === "关卡得分") {
continue continue
} else if (item.title === "效率分") { } else if (item.title === "效率分") {
@ -2087,6 +2111,10 @@ class Listofworksstudentone extends Component {
if (item.title === "关卡得分") { if (item.title === "关卡得分") {
continue continue
} }
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "效率分") { if (item.title === "效率分") {
continue continue
} }
@ -2100,6 +2128,10 @@ class Listofworksstudentone extends Component {
} }
} else { } else {
if (this.state.work_efficiency === false) { if (this.state.work_efficiency === false) {
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "关卡得分") { if (item.title === "关卡得分") {
continue continue
} else if (item.title === "效率分") { } else if (item.title === "效率分") {
@ -2476,7 +2508,7 @@ class Listofworksstudentone extends Component {
} }
// 设置数据 // 设置数据 老师列表数据处理
seacthdatat = (teacherdata, student_works, work_efficiency, course_group_info) => { seacthdatat = (teacherdata, student_works, work_efficiency, course_group_info) => {
let {page, limit} = this.state; let {page, limit} = this.state;
@ -2522,6 +2554,7 @@ class Listofworksstudentone extends Component {
// pageSize: 20, //一页显示几条 // pageSize: 20, //一页显示几条
// current: page, // current: page,
// } // }
if (work_efficiency === false) { if (work_efficiency === false) {
if (JSON.stringify(course_group_info) === "[]" || course_group_info === undefined || course_group_info === null) { if (JSON.stringify(course_group_info) === "[]" || course_group_info === undefined || course_group_info === null) {
//这里没有分班 没有 关卡得分 没有效率分 //这里没有分班 没有 关卡得分 没有效率分
@ -2534,9 +2567,15 @@ class Listofworksstudentone extends Component {
if (item.title === "关卡得分") { if (item.title === "关卡得分") {
continue continue
} }
if (item.title === "效率分") { if (item.title === "效率分") {
continue continue
} }
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "当前成绩") { if (item.title === "当前成绩") {
continue continue
} }
@ -2552,6 +2591,10 @@ class Listofworksstudentone extends Component {
if (item.title === "关卡得分") { if (item.title === "关卡得分") {
continue continue
} }
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "效率分") { if (item.title === "效率分") {
continue continue
} else { } else {
@ -2575,6 +2618,10 @@ class Listofworksstudentone extends Component {
if (item.title === "效率分") { if (item.title === "效率分") {
continue continue
} }
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "当前成绩") { if (item.title === "当前成绩") {
continue continue
} }
@ -2590,6 +2637,10 @@ class Listofworksstudentone extends Component {
if (item.title === "关卡得分") { if (item.title === "关卡得分") {
continue continue
} }
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "效率分") { if (item.title === "效率分") {
continue continue
} else { } else {
@ -2608,6 +2659,10 @@ class Listofworksstudentone extends Component {
if (item.title === "关卡得分") { if (item.title === "关卡得分") {
continue continue
} }
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "效率分") { if (item.title === "效率分") {
continue continue
} }
@ -2623,6 +2678,10 @@ class Listofworksstudentone extends Component {
if (item.title === "关卡得分") { if (item.title === "关卡得分") {
continue continue
} }
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "效率分") { if (item.title === "效率分") {
continue continue
} else { } else {
@ -2645,6 +2704,10 @@ class Listofworksstudentone extends Component {
if (item.title === "关卡得分") { if (item.title === "关卡得分") {
continue continue
} }
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "效率分") { if (item.title === "效率分") {
continue continue
} }
@ -2677,6 +2740,10 @@ class Listofworksstudentone extends Component {
if (item.title === "关卡得分") { if (item.title === "关卡得分") {
continue continue
} }
if (item.key === "efficiencyscore") {
continue
}
if (item.title === "效率分") { if (item.title === "效率分") {
continue continue
} }

@ -37,6 +37,7 @@ class ShixunWorkReport extends Component {
showAppraiseModaltype:false, showAppraiseModaltype:false,
work_comment_hidden:undefined, work_comment_hidden:undefined,
work_comment:undefined, work_comment:undefined,
has_commit: false,
} }
} }
@ -111,7 +112,8 @@ class ShixunWorkReport extends Component {
data:result.data, data:result.data,
work_comment_hidden:result.data.work_comment_hidden, work_comment_hidden:result.data.work_comment_hidden,
work_comment:result.data.work_comment, work_comment:result.data.work_comment,
spinning:false spinning: false,
has_commit: result.data.has_commit
}) })
} }
@ -303,7 +305,7 @@ class ShixunWorkReport extends Component {
} }
render() { render() {
let{data,showAppraiseModaltype,work_comment_hidden,work_comment} =this.state; let {data, showAppraiseModaltype, work_comment_hidden, work_comment, has_commit} = this.state;
let category_id=data===undefined?"":data.category===null?"":data.category.category_id; let category_id=data===undefined?"":data.category===null?"":data.category.category_id;
let homework_common_id=data===undefined?"":data.homework_common_id; let homework_common_id=data===undefined?"":data.homework_common_id;
@ -557,7 +559,9 @@ class ShixunWorkReport extends Component {
showAppraiseModal={(type,id,show,hidden)=>this.showAppraiseModal(type,id,show,hidden)} showAppraiseModal={(type,id,show,hidden)=>this.showAppraiseModal(type,id,show,hidden)}
/> />
{
has_commit === false ? "" :
<div>
<div className="stud-class-set bor-bottom-greyE mt17"> <div className="stud-class-set bor-bottom-greyE mt17">
<div className="clearfix edu-back-white poll_list"> <div className="clearfix edu-back-white poll_list">
<div className="font-16 color-dark-21 shixunreporttitle ml20 pd20">图形统计</div> <div className="font-16 color-dark-21 shixunreporttitle ml20 pd20">图形统计</div>
@ -602,7 +606,8 @@ class ShixunWorkReport extends Component {
/> />
</div> </div>
{item.st===0?item.passed_code===null?"":<div className="font-16 color-dark-21 ml20 mr20"> {item.st === 0 ? item.passed_code === null ? "" :
<div className="font-16 color-dark-21 ml20 mr20">
<div className="bor-grey-e mt15"> <div className="bor-grey-e mt15">
<p className="clearfix pt5 pb5 pl15 pr15 back-f6-grey codebox"> <p className="clearfix pt5 pb5 pl15 pr15 back-f6-grey codebox">
<span className="fl">最近通过的代码</span> <span className="fl">最近通过的代码</span>
@ -637,6 +642,9 @@ class ShixunWorkReport extends Component {
} }
</div> </div>
</div> </div>
</div>
}
</div> </div>
</div> </div>

@ -72,12 +72,17 @@ class Osshackathon extends Component {
} }
PaginationTask=(pageNumber)=>{ PaginationTask=(pageNumber)=>{
let {hackathonedit}=this.state;
if(hackathonedit===true){
this.props.showNotification(`请先保存或者关闭编辑状态`);
}else {
this.setState({ this.setState({
page: pageNumber page: pageNumber
}) })
let {page, limit, search} = this.state; let {page, limit, search} = this.state;
this.getosshackathon(pageNumber, limit, search) this.getosshackathon(pageNumber, limit, search)
} }
}
hackathonedit=(id)=>{ hackathonedit=(id)=>{
//管理员编辑title //管理员编辑title
@ -126,6 +131,10 @@ class Osshackathon extends Component {
} }
editSignupentry=(id,name,description)=>{ editSignupentry=(id,name,description)=>{
let {hackathonedit}=this.state;
if(hackathonedit===true){
this.props.showNotification(`请先保存或者关闭编辑状态`);
}else{
// 管理员编辑项目 // 管理员编辑项目
this.setState({ this.setState({
Osshackathonmodeltype:true Osshackathonmodeltype:true
@ -145,6 +154,8 @@ class Osshackathon extends Component {
} }
} }
}
hideeditSignupentry=(id)=>{ hideeditSignupentry=(id)=>{
// 管理员取消项目 // 管理员取消项目
this.setState({ this.setState({
@ -155,6 +166,10 @@ class Osshackathon extends Component {
delSignupentry=(id)=>{ delSignupentry=(id)=>{
// 管理员删除项目 // 管理员删除项目
let {hackathonedit}=this.state;
if(hackathonedit===true){
this.props.showNotification(`请先保存或者关闭编辑状态`);
}else {
this.props.confirm({ this.props.confirm({
content: `是否确认删除该项目?`, content: `是否确认删除该项目?`,
onOk: () => { onOk: () => {
@ -162,6 +177,7 @@ class Osshackathon extends Component {
} }
}) })
} }
}
delSignupentrys=(id)=>{ delSignupentrys=(id)=>{
let url=`/osshackathon/${id}.json`; let url=`/osshackathon/${id}.json`;
axios.delete(url) axios.delete(url)
@ -180,6 +196,10 @@ class Osshackathon extends Component {
onsearchvalue=(value)=>{ onsearchvalue=(value)=>{
let {hackathonedit}=this.state;
if(hackathonedit===true){
this.props.showNotification(`请先保存或者关闭编辑状态`);
}else {
this.setState({ this.setState({
search:value search:value
}) })
@ -190,6 +210,8 @@ class Osshackathon extends Component {
this.getosshackathon(page,limit,value) this.getosshackathon(page,limit,value)
} }
}
onsetsearchvalue=(e)=>{ onsetsearchvalue=(e)=>{
this.setState({ this.setState({
@ -240,7 +262,7 @@ class Osshackathon extends Component {
<Col span={3} className={"fr textright"}> <Col span={3} className={"fr textright"}>
<div> <div>
报名整<span className={"color-red"}>{data&&data.hackathon.hackathon_users_count}</span> 报名总<span className={"color-red"}>{data&&data.hackathon.hackathon_users_count}</span>
</div> </div>
</Col> </Col>

@ -197,7 +197,7 @@ class Osshackathonmodel extends Component{
placeholder={"请输入项目描述"} placeholder={"请输入项目描述"}
onInput={(e)=>this.Textarea_comment(e)} onInput={(e)=>this.Textarea_comment(e)}
value={this.state.Textarea_comment} value={this.state.Textarea_comment}
maxlength={500} maxlength={250}
/> />
<li style={{height:"20px",lineHeight:"20px"}} className={textareavaltype===true?"color-red mt20 mb10":"none"}><span>评阅内容至少有一个不为空</span></li> <li style={{height:"20px",lineHeight:"20px"}} className={textareavaltype===true?"color-red mt20 mb10":"none"}><span>评阅内容至少有一个不为空</span></li>

Loading…
Cancel
Save