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

issues25489
cxt 5 years ago
commit 5fc10548e7

@ -19,4 +19,45 @@ codemirror merge.js
修改过的地方:
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
}
arr.push(items.end_time)
arr.push(handleDateString(items.end_time))
}
}
})
@ -273,7 +273,7 @@ class OneSelfOrderModal extends Component{
render(){
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;
// TODO course_groups为空时的处理
return(

@ -347,7 +347,7 @@ class Studentshavecompletedthelist extends Component {
render: (text, record) => (
<span>
{
<span style={{color: '#999999', textAlign: "center",width:'100px'}}></span>
<span style={{color: '#999999', textAlign: "center",width:'100px'}}></span>
}
</span>
)
@ -1036,9 +1036,9 @@ class Studentshavecompletedthelist extends Component {
<span style={{textAlign: "center", color: '#999999'}}
>--</span>
:
<a style={{textAlign: "center"}} className="color-blue"
target="_blank"
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.finalscore}</a>
<a style={{textAlign: "center"}} className="color-blue"
target="_blank"
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.finalscore}</a>
}
</span>
@ -1231,10 +1231,10 @@ class Studentshavecompletedthelist extends Component {
{record.finalscore==="--"?
<span style={{textAlign: "center", color: '#999999'}}
>--</span>
:
<a style={{textAlign: "center"}} className="color-blue"
target="_blank"
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.finalscore}</a>
:
<a style={{textAlign: "center"}} className="color-blue"
target="_blank"
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.finalscore}</a>
}
</span>
@ -2664,7 +2664,7 @@ class Studentshavecompletedthelist extends Component {
{
this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status===0 || this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status===1 ?
<div className="edu-back-white">
<NoneData></NoneData>
<NoneData></NoneData>
</div>
:
<div>
@ -2883,7 +2883,7 @@ class Studentshavecompletedthelist extends Component {
{
this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 0 || this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 1 ?
<div className="edu-back-white">
<NoneData></NoneData>
<NoneData></NoneData>
</div>
:
<div className={"educontent mb20"}>
@ -2970,7 +2970,7 @@ class Studentshavecompletedthelist extends Component {
{
this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 0 || this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 1 ?
<div className="edu-back-white">
<NoneData></NoneData>
<NoneData></NoneData>
</div>
:
<div>

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

@ -37,6 +37,7 @@ class ShixunWorkReport extends Component {
showAppraiseModaltype:false,
work_comment_hidden:undefined,
work_comment:undefined,
has_commit: false,
}
}
@ -111,7 +112,8 @@ class ShixunWorkReport extends Component {
data:result.data,
work_comment_hidden:result.data.work_comment_hidden,
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() {
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 homework_common_id=data===undefined?"":data.homework_common_id;
@ -557,22 +559,24 @@ class ShixunWorkReport extends Component {
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="clearfix edu-back-white poll_list">
<div className="font-16 color-dark-21 shixunreporttitle ml20 pd20">图形统计</div>
<Shixunechart
data={data}
/>
</div>
</div>
<div className="stud-class-set bor-bottom-greyE mt17">
<div className="clearfix edu-back-white poll_list">
<div className="font-16 color-dark-21 shixunreporttitle ml20 pd20">图形统计</div>
<Shixunechart
data={data}
/>
</div>
</div>
<div className="stud-class-set bor-bottom-greyE">
<div className="stud-class-set bor-bottom-greyE">
<div className="clearfix edu-back-white poll_list pad40px">
<div className="font-16 color-dark-21 shixunreporttitle ml20 pd20">实训详情</div>
<style>
{`
<div className="clearfix edu-back-white poll_list pad40px">
<div className="font-16 color-dark-21 shixunreporttitle ml20 pd20">实训详情</div>
<style>
{`
.poll_list a{
padding:0px !important;
}
@ -580,63 +584,67 @@ class ShixunWorkReport extends Component {
background: #4CACFF;
}
`}
</style>
{
data&&data.shixun_detail===undefined?"":data.shixun_detail.map((item,key)=>{
return(
<div id={"id"+item.position} key={key} className={"mb20"}>
<div className="font-16 color-dark-21 ml20 mr20">
<p className="clearfix mb20">
</style>
{
data && data.shixun_detail === undefined ? "" : data.shixun_detail.map((item, key) => {
return (
<div id={"id" + item.position} key={key} className={"mb20"}>
<div className="font-16 color-dark-21 ml20 mr20">
<p className="clearfix mb20">
<span className="panel-inner-icon mr15 fl mt3 backgroud4CACFF">
<i className="fa fa-code font-16 color_white"></i>
</span>
<span className="fl mt3 font-14">
<span className="fl mt3 font-14">
<span className="font-bd mr15">{item.position}</span>
<Link to={/tasks/+item.game_identifier} >
<span className={"font-14"}>{item.subject}</span>
</Link>
</span>
</p>
<Coursesshixundetails
data={item.outputs}
/>
</div>
{item.st===0?item.passed_code===null?"":<div className="font-16 color-dark-21 ml20 mr20">
<div className="bor-grey-e mt15">
<p className="clearfix pt5 pb5 pl15 pr15 back-f6-grey codebox">
<span className="fl">最近通过的代码</span>
<span className="fr codeboxright">{item.path}</span>
</p>
<div className="test-code bor-top-greyE">
<li className="clearfix">
<CodeMirror
value={item.passed_code}
options={{
// mode: 'xml',
theme: 'default',
lineNumbers: true,
// extraKeys: {"Ctrl-Q": "autocomplete"}, // 快捷键
indentUnit: 4, //代码缩进为一个tab的距离
matchBrackets: true,
autoRefresh: true,
smartIndent: true,//智能换行
styleActiveLine: true,
lint: true,
readOnly: "nocursor"
}}
</p>
<Coursesshixundetails
data={item.outputs}
/>
</li>
</div>
{item.st === 0 ? item.passed_code === null ? "" :
<div className="font-16 color-dark-21 ml20 mr20">
<div className="bor-grey-e mt15">
<p className="clearfix pt5 pb5 pl15 pr15 back-f6-grey codebox">
<span className="fl">最近通过的代码</span>
<span className="fr codeboxright">{item.path}</span>
</p>
<div className="test-code bor-top-greyE">
<li className="clearfix">
<CodeMirror
value={item.passed_code}
options={{
// mode: 'xml',
theme: 'default',
lineNumbers: true,
// extraKeys: {"Ctrl-Q": "autocomplete"}, // 快捷键
indentUnit: 4, //代码缩进为一个tab的距离
matchBrackets: true,
autoRefresh: true,
smartIndent: true,//智能换行
styleActiveLine: true,
lint: true,
readOnly: "nocursor"
}}
/>
</li>
</div>
</div>
</div> : ""}
</div>
</div>
</div>:""}
</div>
)
})
}
</div>
</div>
)
})
}
</div>
</div>
</div>
}
</div>
</div>

@ -72,11 +72,16 @@ class Osshackathon extends Component {
}
PaginationTask=(pageNumber)=>{
this.setState({
page:pageNumber
})
let {page,limit,search}=this.state;
this.getosshackathon(pageNumber,limit,search)
let {hackathonedit}=this.state;
if(hackathonedit===true){
this.props.showNotification(`请先保存或者关闭编辑状态`);
}else {
this.setState({
page: pageNumber
})
let {page, limit, search} = this.state;
this.getosshackathon(pageNumber, limit, search)
}
}
hackathonedit=(id)=>{
@ -126,23 +131,29 @@ class Osshackathon extends Component {
}
editSignupentry=(id,name,description)=>{
// 管理员编辑项目
this.setState({
Osshackathonmodeltype:true
})
if(id===undefined){
this.setState({
modelid:undefined,
modelname:undefined,
modeldescription:undefined
})
let {hackathonedit}=this.state;
if(hackathonedit===true){
this.props.showNotification(`请先保存或者关闭编辑状态`);
}else{
this.setState({
modelid:id,
modelname:name,
modeldescription:description
})
// 管理员编辑项目
this.setState({
Osshackathonmodeltype:true
})
if(id===undefined){
this.setState({
modelid:undefined,
modelname:undefined,
modeldescription:undefined
})
}else{
this.setState({
modelid:id,
modelname:name,
modeldescription:description
})
}
}
}
hideeditSignupentry=(id)=>{
@ -155,12 +166,17 @@ class Osshackathon extends Component {
delSignupentry=(id)=>{
// 管理员删除项目
this.props.confirm({
content: `是否确认删除该项目?`,
onOk: () => {
this.delSignupentrys(id)
}
})
let {hackathonedit}=this.state;
if(hackathonedit===true){
this.props.showNotification(`请先保存或者关闭编辑状态`);
}else {
this.props.confirm({
content: `是否确认删除该项目?`,
onOk: () => {
this.delSignupentrys(id)
}
})
}
}
delSignupentrys=(id)=>{
let url=`/osshackathon/${id}.json`;
@ -180,14 +196,20 @@ class Osshackathon extends Component {
onsearchvalue=(value)=>{
this.setState({
search:value
})
if(value.length>300){
this.props.showNotification(`搜索字数大于300个字`);
let {hackathonedit}=this.state;
if(hackathonedit===true){
this.props.showNotification(`请先保存或者关闭编辑状态`);
}else {
this.setState({
search:value
})
if(value.length>300){
this.props.showNotification(`搜索字数大于300个字`);
}
let {page,limit,search}=this.state;
this.getosshackathon(page,limit,value)
}
let {page,limit,search}=this.state;
this.getosshackathon(page,limit,value)
}
onsetsearchvalue=(e)=>{
@ -240,7 +262,7 @@ class Osshackathon extends Component {
<Col span={3} className={"fr textright"}>
<div>
报名整<span className={"color-red"}>{data&&data.hackathon.hackathon_users_count}</span>
报名总<span className={"color-red"}>{data&&data.hackathon.hackathon_users_count}</span>
</div>
</Col>

@ -197,7 +197,7 @@ class Osshackathonmodel extends Component{
placeholder={"请输入项目描述"}
onInput={(e)=>this.Textarea_comment(e)}
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>

Loading…
Cancel
Save