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

chromesetting
cxt 5 years ago
commit 36b7e72ab2

@ -465,9 +465,9 @@ class ApplicationController < ActionController::Base
# 实训主类别列表,自带描述 # 实训主类别列表,自带描述
def shixun_main_type def shixun_main_type
list = [] list = []
mirrors = MirrorRepository.select([:id, :type_name, :description]).published_main_mirror mirrors = MirrorRepository.select([:id, :type_name, :description, :name]).published_main_mirror
mirrors.try(:each) do |mirror| mirrors.try(:each) do |mirror|
list << {id: mirror.id, type_name: mirror.type_name, description: mirror.try(:description)} list << {id: mirror.id, type_name: mirror.type_name, description: mirror.try(:description), mirror_name: mirror.name}
end end
list list
end end
@ -475,9 +475,9 @@ class ApplicationController < ActionController::Base
# 小类别列表 # 小类别列表
def shixun_small_type def shixun_small_type
list = [] list = []
mirrors = MirrorRepository.select([:id, :type_name, :description]).published_small_mirror mirrors = MirrorRepository.select([:id, :type_name, :description, :name]).published_small_mirror
mirrors.try(:each) do |mirror| mirrors.try(:each) do |mirror|
list << {id: mirror.id, type_name: mirror.type_name, description: mirror.description} list << {id: mirror.id, type_name: mirror.type_name, description: mirror.description, mirror_name: mirror.name}
end end
list list
end end

@ -400,13 +400,14 @@ class ShixunsController < ApplicationController
@shixun.shixun_info.update_attributes(shixun_info_params) @shixun.shixun_info.update_attributes(shixun_info_params)
# 镜像变动 # 镜像变动
@shixun.shixun_mirror_repositories.where.not(mirror_repository_id: old_mirror_ids).destroy_all @shixun.shixun_mirror_repositories.where.not(mirror_repository_id: old_mirror_ids).destroy_all
@shixun.shixun_mirror_repositories.create!(new_mirror_id) @shixun.shixun_mirror_repositories.create!(new_mirror_id) if new_mirror_id.present?
# 镜像变动要更换服务配置 # 镜像变动要更换服务配置
@shixun.shixun_service_configs.where.not(mirror_repository_id: old_mirror_ids).destroy_all @shixun.shixun_service_configs.where.not(mirror_repository_id: old_mirror_ids).destroy_all
@shixun.shixun_service_configs.create!(service_create_params) @shixun.shixun_service_configs.create!(service_create_params) if service_create_params.present?
service_update_params&.map do |service| service_update_params&.map do |service|
smr = @shixun.shixun_service_configs.find_by(mirror_repository_id: service[:mirror_repository_id]) smr = @shixun.shixun_service_configs.find_by(mirror_repository_id: service[:mirror_repository_id])
smr.update_attributes(service) logger.info("########smr: #{smr}")
smr.update_attributes(service) if smr.present?
end end
# 添加第二仓库(管理员权限) # 添加第二仓库(管理员权限)
if params[:is_secret_repository] if params[:is_secret_repository]

@ -48,7 +48,7 @@ module JupyterService
tpiID = myshixun.id tpiID = myshixun.id
mount = myshixun.shixun.data_sets.present? mount = myshixun.shixun.data_sets.present?
params = {tpiID: tpiID, identifier: shixun.identifier, needMount: mount, params = {tpiID: tpiID, identifier: shixun.identifier, myshixunIdentifier: myshixun.identifier, needMount: mount,
:containers => "#{Base64.urlsafe_encode64(shixun_container_limit(shixun))}"} :containers => "#{Base64.urlsafe_encode64(shixun_container_limit(shixun))}"}
res = uri_post uri, params res = uri_post uri, params

@ -0,0 +1,5 @@
class ModifyTaskPassForShixuns < ActiveRecord::Migration[5.2]
def change
change_column :shixuns, :task_pass, :boolean, :default => true
end
end

@ -608,10 +608,10 @@ class App extends Component {
} }
} }
/> />
<Route {/*<Route*/}
path="/interesse" component={Interestpage} {/* path="/interesse" component={Interestpage}*/}
/> {/*/>*/}
<Route path="/shixuns/new" component={Newshixuns}> <Route path="/shixuns/new" component={Newshixuns}>
</Route> </Route>

@ -893,7 +893,6 @@ class PollNew extends Component {
//保存并继续 //保存并继续
//保存并继续,即提交本题的新建并继续创建一个相同的题(该新题处于编辑模式,题目和选项不要清空) //保存并继续,即提交本题的新建并继续创建一个相同的题(该新题处于编辑模式,题目和选项不要清空)
Deleteadddomtwo = (indexo, object,bool) => { Deleteadddomtwo = (indexo, object,bool) => {
debugger
var thiss = this; var thiss = this;
@ -1038,7 +1037,7 @@ class PollNew extends Component {
if(object.question.max_choices){ if(object.question.max_choices){
if(object.question.max_choices>0){ if(object.question.max_choices>0){
if (object.question.max_choices < object.question.min_choices) { if (object.question.max_choices < object.question.min_choices) {
this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); this.props.showNotification(`可选的最大限制不能小于最小限制`);
return; return;
} }
} }
@ -1258,7 +1257,7 @@ class PollNew extends Component {
if(object.question.max_choices){ if(object.question.max_choices){
if(object.question.max_choices>0){ if(object.question.max_choices>0){
if (object.question.max_choices < object.question.min_choices) { if (object.question.max_choices < object.question.min_choices) {
this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); this.props.showNotification(`可选的最大限制不能小于最小限制`);
return; return;
} }
} }
@ -1449,9 +1448,7 @@ class PollNew extends Component {
// indexo 第几个数组 // indexo 第几个数组
//object 单个数组数据 //object 单个数组数据
Deleteadddomthree = (indexo, object,bool) => { Deleteadddomthree = (indexo, object,bool) => {
this.setState({
newoption: false,
})
// console.log("deleteadddom 349") // console.log("deleteadddom 349")
var thiss = this; var thiss = this;
let arr = this.state.adddom; let arr = this.state.adddom;
@ -1477,9 +1474,14 @@ class PollNew extends Component {
} }
if (newarr[indexo].question.question_title === "") { if (newarr[indexo].question.question_title === "") {
this.props.showNotification('题目不能为空!'); this.props.showNotification('题目不能为空!');
return
}
if (newarr[indexo].question.question_title.match(/^[ ]*$/)) {
this.props.showNotification('题目不能为空!');
return return
} }
if (max > 0) { if (max > 0) {
if (object.question.question_type === 1) { if (object.question.question_type === 1) {
this.props.showNotification('选项内容不能为空!'); this.props.showNotification('选项内容不能为空!');
@ -1579,7 +1581,7 @@ class PollNew extends Component {
if(object.question.max_choices){ if(object.question.max_choices){
if(object.question.max_choices>0){ if(object.question.max_choices>0){
if (object.question.max_choices < object.question.min_choices) { if (object.question.max_choices < object.question.min_choices) {
this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); this.props.showNotification(`可选的最大限制不能小于最小限制`);
return; return;
} }
} }
@ -1790,7 +1792,7 @@ class PollNew extends Component {
if(object.question.max_choices){ if(object.question.max_choices){
if(object.question.max_choices>0){ if(object.question.max_choices>0){
if (object.question.max_choices < object.question.min_choices) { if (object.question.max_choices < object.question.min_choices) {
this.props.showNotification(`可选:最小和最大限制须同时为数值或者“--"`); this.props.showNotification(`可选的最大限制不能小于最小限制`);
return; return;
} }
} }
@ -1867,7 +1869,6 @@ class PollNew extends Component {
}; };
question = {"question": questiontwo}; question = {"question": questiontwo};
//插入多选题 //插入多选题
if (uuk !== -1) { if (uuk !== -1) {
// console.log("修改") // console.log("修改")
this.edittotheserver(object, 2, arrc, null, object.question.max_choices, object.question.min_choices,object.question.answers.length); this.edittotheserver(object, 2, arrc, null, object.question.max_choices, object.question.min_choices,object.question.answers.length);
@ -2016,10 +2017,11 @@ class PollNew extends Component {
if (result !== undefined) { if (result !== undefined) {
if (result.data.status === 0) { if (result.data.status === 0) {
this.props.showNotification(`已完成`); this.props.showNotification(`已完成`);
thiss.thisinitializationdatanew(); thiss.thisinitializationdatanew();
this.setState({ this.setState({
Newdisplay:false, Newdisplay:false,
newoption: false,
}) })
// console.log("确认创建问题") // console.log("确认创建问题")
// console.log(result) // console.log(result)
@ -2032,11 +2034,24 @@ class PollNew extends Component {
// //
// } // }
} }
}else{
this.setState({
Newdisplay:true,
newoption: false,
})
} }
// } catch (e) { // } catch (e) {
// //
// } // }
}).catch((error) => {
console.log(error)
this.setState({
Newdisplay:true,
newoption: false,
})
}) })
@ -2096,11 +2111,24 @@ class PollNew extends Component {
if (result.data.status === 0) { if (result.data.status === 0) {
this.props.showNotification(`编辑题目成功`); this.props.showNotification(`编辑题目成功`);
thiss.thisinitializationdatanew(); thiss.thisinitializationdatanew();
this.setState({
Newdisplay:false,
newoption: false,
})
} }
} catch (e) { } catch (e) {
// console.log("调用了edittotheserver") // console.log("调用了edittotheserver")
console.log(e) this.setState({
Newdisplay:true,
newoption: false,
})
} }
}).catch((error) => {
console.log(error)
this.setState({
Newdisplay:true,
newoption: false,
})
}) })
} }
@ -2685,7 +2713,8 @@ class PollNew extends Component {
// console.log("2301"); // console.log("2301");
// console.log(newr); // console.log(newr);
// window.history.pushState('','',newUrl+'?tab='+e); // window.history.pushState('','',newUrl+'?tab='+e);
window.location.href = `/courses/${coursesId}/polls/${result.data.data.id}/edit`;
// window.location.href = `/courses/${coursesId}/polls/${result.data.data.id}/edit`;
}) })
} else { } else {
@ -2773,6 +2802,7 @@ class PollNew extends Component {
height: '30px', height: '30px',
lineHeight: '30px', lineHeight: '30px',
}; };
const hejiine=this.state.mysingles + this.state.mydoubles + this.state.mymainsint;
// console.log(this.state.projects===undefined?"":this.state.projects.poll_questions) // console.log(this.state.projects===undefined?"":this.state.projects.poll_questions)
var displaymysave = (mysave === true) ? "" : "display:none;"; var displaymysave = (mysave === true) ? "" : "display:none;";
@ -2942,7 +2972,7 @@ class PollNew extends Component {
{ {
this.state.mysingles + this.state.mydoubles + this.state.mymainsint === 0 ? "" : hejiine=== 0 ? "" :
<div> <div>
<span className="fl"> <span className="fl">
{this.state.mysingles === 0 ? "" : <span {this.state.mysingles === 0 ? "" : <span
@ -2959,7 +2989,7 @@ class PollNew extends Component {
</span> </span>
<span className="fr">合计 <span <span className="fr">合计 <span
className="color-blue">{this.state.mysingles === undefined ? "" : this.state.mydoubles === undefined ? "" : this.state.mymainsint === undefined ? "" : this.state.mysingles + this.state.mydoubles + this.state.mymainsint}</span> </span> className="color-blue">{this.state.mysingles === undefined ? "" : this.state.mydoubles === undefined ? "" : this.state.mymainsint === undefined ? "" : hejiine}</span> </span>
</div> </div>
} }

@ -46,6 +46,7 @@ const {Option} = Select;
//作品列表(学生) //作品列表(学生)
let allow_lates=false; let allow_lates=false;
let answer_open_evaluation=false; let answer_open_evaluation=false;
// Curcomlevel
class Listofworksstudentone extends Component { class Listofworksstudentone extends Component {
//unifiedsetting 统一设置 //unifiedsetting 统一设置
//allowreplenishment 允许补交 //allowreplenishment 允许补交
@ -269,7 +270,7 @@ class Listofworksstudentone extends Component {
), ),
}, },
{ {
title: '提交状态', title: '作品状态',
dataIndex: 'submitstate', dataIndex: 'submitstate',
key: 'submitstate', key: 'submitstate',
align: "center", align: "center",
@ -277,15 +278,17 @@ class Listofworksstudentone extends Component {
width: '98px', width: '98px',
render: (text, record) => ( render: (text, record) => (
<span style={{width: '98px',}}> <span style={{width: '98px',}}>
<span style={record.submitstate === "延时完成" ? { <span style={record.submitstate === "迟交通关" ? {
color: '#DD1717', color: '#DD1717',
textAlign: "center", textAlign: "center",
width: '98px', width: '98px',
} : record.submitstate === "按时完成" ? {color: '#29BD8B', textAlign: "center", width: '98px',} : { } : record.submitstate === "按时通关" ? {color: '#29BD8B', textAlign: "center", width: '98px',}
color: '#747A7F', : record.submitstate === "未通关" ? {color: '#F69707', textAlign: "center", width: '98px',}
textAlign: "center", : {
width: '98px', color: '#747A7F',
}}>{record.submitstate === undefined ? "--" : record.submitstate === "" ? "--" : record.submitstate === null ? "--" : record.submitstate}</span> textAlign: "center",
width: '98px',
}}>{record.submitstate === undefined ? "--" : record.submitstate === "" ? "--" : record.submitstate === null ? "--" : record.submitstate}</span>
</span> </span>
), ),
@ -310,14 +313,14 @@ class Listofworksstudentone extends Component {
} }
}> }>
{record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time === "--" ? "--" : {record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time === "--" ? "--" :
<span style={ <span style={
{ {
color: '#747A7F', color: '#747A7F',
textAlign: "center", textAlign: "center",
width: '145px', width: '145px',
}
} }
>{record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time} }
>{record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time}
</span> </span>
} }
</span> </span>
@ -340,7 +343,26 @@ class Listofworksstudentone extends Component {
// ), // ),
// }, // },
{ {
title: '完成情况', title: '当前完成关卡',
dataIndex: 'curcomlevel',
key: 'curcomlevel',
align: "center",
className: 'font-14',
width: '99px',
render: (text, record) => (
<span style={{
width: '99px',
}}>
<span style={{
color: '#07111B',
textAlign: "center",
width: '99px'
}}>{record.Curcomlevel + "/" + this.state.challenges_count}</span>
</span>
),
},
{
title: '截止前完成关卡',
dataIndex: 'completion', dataIndex: 'completion',
key: 'completion', key: 'completion',
align: "center", align: "center",
@ -359,7 +381,9 @@ class Listofworksstudentone extends Component {
), ),
}, },
{ {
title: '关卡得分', title:<span>关卡得分<Tooltip placement="top" title={<pre>
截止前学员完成的关卡才有成绩<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'levelscore', dataIndex: 'levelscore',
key: 'levelscore', key: 'levelscore',
align: 'center', align: 'center',
@ -638,7 +662,7 @@ class Listofworksstudentone extends Component {
), ),
}, },
{ {
title: '提交状态', title: '作品状态',
dataIndex: 'submitstate', dataIndex: 'submitstate',
key: 'submitstate', key: 'submitstate',
align: "center", align: "center",
@ -646,15 +670,17 @@ class Listofworksstudentone extends Component {
width: '98px', width: '98px',
render: (text, record) => ( render: (text, record) => (
<span style={{width: '98px',}}> <span style={{width: '98px',}}>
<span style={record.submitstate === "延时完成" ? { <span style={record.submitstate === "迟交通关" ? {
color: '#DD1717', color: '#DD1717',
textAlign: "center", textAlign: "center",
width: '98px', width: '98px',
} : record.submitstate === "按时完成" ? {color: '#29BD8B', textAlign: "center", width: '98px',} : { } : record.submitstate === "按时通关" ? {color: '#29BD8B', textAlign: "center", width: '98px',}
color: '#747A7F', : record.submitstate === "未通关" ? {color: '#F69707', textAlign: "center", width: '98px',}
textAlign: "center", : {
width: '98px', color: '#747A7F',
}}>{record.submitstate === undefined ? "--" : record.submitstate === "" ? "--" : record.submitstate === null ? "--" : record.submitstate}</span> textAlign: "center",
width: '98px',
}}>{record.submitstate === undefined ? "--" : record.submitstate === "" ? "--" : record.submitstate === null ? "--" : record.submitstate}</span>
</span> </span>
), ),
@ -709,7 +735,26 @@ class Listofworksstudentone extends Component {
// ), // ),
// }, // },
{ {
title: '完成情况', title: '当前完成关卡',
dataIndex: 'curcomlevel',
key: 'curcomlevel',
align: "center",
className: 'font-14',
width: '99px',
render: (text, record) => (
<span style={{
width: '99px',
}}>
<span style={{
color: '#07111B',
textAlign: "center",
width: '99px'
}}>{record.Curcomlevel + "/" + this.state.challenges_count}</span>
</span>
),
},
{
title: '截止前完成关卡',
dataIndex: 'completion', dataIndex: 'completion',
key: 'completion', key: 'completion',
align: "center", align: "center",
@ -728,7 +773,9 @@ class Listofworksstudentone extends Component {
), ),
}, },
{ {
title: '关卡得分', title:<span>关卡得分<Tooltip placement="top" title={<pre>
截止前学员完成的关卡才有成绩<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'levelscore', dataIndex: 'levelscore',
key: 'levelscore', key: 'levelscore',
align: 'center', align: 'center',
@ -967,19 +1014,21 @@ class Listofworksstudentone extends Component {
) )
}, },
{ {
title: '提交状态', title: '作品状态',
dataIndex: 'submitstate', dataIndex: 'submitstate',
key: 'submitstate', key: 'submitstate',
align: 'center', align: 'center',
className: 'font-14', className: 'font-14',
render: (text, record) => ( render: (text, record) => (
<span style={record.submitstate === "延时完成" ? { <span style={record.submitstate === "迟交通关" ? {
color: '#DD1717', color: '#DD1717',
textAlign: "center" textAlign: "center"
} : record.submitstate === "按时完成" ? {color: '#29BD8B', textAlign: "center"} : { } : record.submitstate === "按时通关" ? {color: '#29BD8B', textAlign: "center"}
color: '#747A7F', : record.submitstate === "未通关" ? {color: '#F69707', textAlign: "center", width: '98px'}
textAlign: "center" : {
}}>{record.submitstate} color: '#747A7F',
textAlign: "center"
}}>{record.submitstate}
</span> </span>
) )
@ -1036,7 +1085,26 @@ class Listofworksstudentone extends Component {
// ), // ),
// }, // },
{ {
title: '完成情况', title: '当前完成关卡',
dataIndex: 'curcomlevel',
key: 'curcomlevel',
align: "center",
className: 'font-14',
width: '99px',
render: (text, record) => (
<span style={{
width: '99px',
}}>
<span style={{
color: '#07111B',
textAlign: "center",
width: '99px'
}}>{record.Curcomlevel + "/" + this.state.challenges_count}</span>
</span>
),
},
{
title: '截止前完成关卡',
dataIndex: 'completion', dataIndex: 'completion',
key: 'completion', key: 'completion',
align: 'center', align: 'center',
@ -1051,7 +1119,9 @@ class Listofworksstudentone extends Component {
) )
}, },
{ {
title: '关卡得分', title:<span>关卡得分<Tooltip placement="top" title={<pre>
截止前学员完成的关卡才有成绩<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'levelscore', dataIndex: 'levelscore',
key: 'levelscore', key: 'levelscore',
align: 'center', align: 'center',
@ -1094,12 +1164,12 @@ class Listofworksstudentone extends Component {
{ {
record.efficiencyscore && record.efficiencyscore === "--" ? ( record.efficiencyscore && record.efficiencyscore === "--" ? (
this.state.allow_late && this.state.allow_late === false ? this.state.allow_late && this.state.allow_late === false ?
<span style={{color: "#9A9A9A"}}> <span style={{color: "#9A9A9A"}}>
-- --
</span> </span>
: :
this.state.allow_late && this.state.allow_late === true ? this.state.allow_late && this.state.allow_late === true ?
<span style={{color: "#9A9A9A"}}> <span style={{color: "#9A9A9A"}}>
-- --
</span> </span>
: :
@ -1315,19 +1385,21 @@ class Listofworksstudentone extends Component {
) )
}, },
{ {
title: '提交状态', title: '作品状态',
dataIndex: 'submitstate', dataIndex: 'submitstate',
key: 'submitstate', key: 'submitstate',
align: 'center', align: 'center',
className: 'font-14', className: 'font-14',
render: (text, record) => ( render: (text, record) => (
<span style={record.submitstate === "延时完成" ? { <span style={record.submitstate === "迟交通关" ? {
color: '#DD1717', color: '#DD1717',
textAlign: "center" textAlign: "center"
} : record.submitstate === "按时完成" ? {color: '#29BD8B', textAlign: "center"} : { } : record.submitstate === "按时通关" ? {color: '#29BD8B', textAlign: "center"}
color: '#747A7F', : record.submitstate === "未通关" ? {color: '#F69707', textAlign: "center", width: '98px'}
textAlign: "center" : {
}}>{record.submitstate} color: '#747A7F',
textAlign: "center"
}}>{record.submitstate}
</span> </span>
) )
@ -1360,20 +1432,39 @@ class Listofworksstudentone extends Component {
} }
}> }>
{record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time === "--" ? "--" : {record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time === "--" ? "--" :
<a style={ <a style={
{ {
color: '#747A7F', color: '#747A7F',
textAlign: "center" textAlign: "center"
}
} }
>{record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time} }
</a> >{record.cost_time === null ? "--" : record.cost_time === undefined ? "--" : record.cost_time}
</a>
} }
</span> </span>
) )
}, },
{ {
title: '完成情况', title: '当前完成关卡',
dataIndex: 'curcomlevel',
key: 'curcomlevel',
align: "center",
className: 'font-14',
width: '99px',
render: (text, record) => (
<span style={{
width: '99px',
}}>
<span style={{
color: '#07111B',
textAlign: "center",
width: '99px'
}}>{record.Curcomlevel + "/" + this.state.challenges_count}</span>
</span>
),
},
{
title: '截止前完成关卡',
dataIndex: 'completion', dataIndex: 'completion',
key: 'completion', key: 'completion',
align: 'center', align: 'center',
@ -1388,7 +1479,9 @@ class Listofworksstudentone extends Component {
) )
}, },
{ {
title: '关卡得分', title:<span>关卡得分<Tooltip placement="top" title={<pre>
截止前学员完成的关卡才有成绩<br/>
</pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'levelscore', dataIndex: 'levelscore',
key: 'levelscore', key: 'levelscore',
align: 'center', align: 'center',
@ -1431,12 +1524,12 @@ class Listofworksstudentone extends Component {
{ {
record.efficiencyscore && record.efficiencyscore === "--" ? ( record.efficiencyscore && record.efficiencyscore === "--" ? (
this.state.allow_late && this.state.allow_late === false ? this.state.allow_late && this.state.allow_late === false ?
<span style={{color: "#9A9A9A"}}> <span style={{color: "#9A9A9A"}}>
-- --
</span> </span>
: :
this.state.allow_late && this.state.allow_late === true ? this.state.allow_late && this.state.allow_late === true ?
<span style={{color: "#9A9A9A"}}> <span style={{color: "#9A9A9A"}}>
-- --
</span> </span>
: :
@ -1977,7 +2070,7 @@ class Listofworksstudentone extends Component {
stduynumber: teacherdata.student_id, stduynumber: teacherdata.student_id,
classroom: teacherdata.group_name, classroom: teacherdata.group_name,
cost_time: teacherdata.cost_time, cost_time: teacherdata.cost_time,
submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "按时完成" : teacherdata.work_status === 2 ? "延时完成" : "未提交", submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "未通关" : teacherdata.work_status === 2 ? "按时通关" : "迟交通关",
// updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:this.state.teacherdata.student_works[i].update_time,
// updatetime:"", // updatetime:"",
updatetime: timedata === "Invalid date" ? "--" : timedata, updatetime: timedata === "Invalid date" ? "--" : timedata,
@ -1991,6 +2084,7 @@ class Listofworksstudentone extends Component {
ultimate_score: teacherdata.ultimate_score, ultimate_score: teacherdata.ultimate_score,
user_name: teacherdata.user_name, user_name: teacherdata.user_name,
user_login: teacherdata.user_login, user_login: teacherdata.user_login,
Curcomlevel: teacherdata.current_complete_count===undefined||teacherdata.current_complete_count===null||teacherdata.current_complete_count===""?0:teacherdata.current_complete_count,
}) })
// } // }
@ -2019,7 +2113,7 @@ class Listofworksstudentone extends Component {
stduynumber: student_works[i].student_id, stduynumber: student_works[i].student_id,
classroom: student_works[i].group_name, classroom: student_works[i].group_name,
cost_time: student_works[i].cost_time, cost_time: student_works[i].cost_time,
submitstate: student_works[i].work_status === 0 ? "未提交" : student_works[i].work_status === 1 ? "按时完成" : student_works[i].work_status === 2 ? "延时完成" : "未提交", submitstate: student_works[i].work_status === 0 ? "未提交" : student_works[i].work_status === 1 ? "未通关" : student_works[i].work_status === 2 ? "按时通关" : "迟交通关",
// updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:this.state.teacherdata.student_works[i].update_time,
// updatetime:"", // updatetime:"",
updatetime: timedata === "Invalid date" ? "--" : timedata, updatetime: timedata === "Invalid date" ? "--" : timedata,
@ -2033,6 +2127,7 @@ class Listofworksstudentone extends Component {
ultimate_score: student_works[i].ultimate_score, ultimate_score: student_works[i].ultimate_score,
user_name: student_works[i].user_name, user_name: student_works[i].user_name,
user_login: student_works[i].user_login, user_login: student_works[i].user_login,
Curcomlevel:student_works[i].current_complete_count===null||student_works[i].current_complete_count===null||student_works[i].current_complete_count===""?0:student_works[i].current_complete_count,
}) })
} }
@ -2178,7 +2273,7 @@ class Listofworksstudentone extends Component {
stduynumber: teacherdata.student_id, stduynumber: teacherdata.student_id,
classroom: teacherdata.group_name, classroom: teacherdata.group_name,
cost_time: teacherdata.cost_time, cost_time: teacherdata.cost_time,
submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "按时完成" : teacherdata.work_status === 2 ? "延时完成" : "未提交", submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "未通关" : teacherdata.work_status === 2 ? "按时通关" : "迟交通关",
// updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:this.state.teacherdata.student_works[i].update_time,
// updatetime:"", // updatetime:"",
updatetime: timedata === "Invalid date" ? "--" : timedata, updatetime: timedata === "Invalid date" ? "--" : timedata,
@ -2192,6 +2287,8 @@ class Listofworksstudentone extends Component {
ultimate_score: teacherdata.ultimate_score, ultimate_score: teacherdata.ultimate_score,
user_name: teacherdata.user_name, user_name: teacherdata.user_name,
user_login: teacherdata.user_login, user_login: teacherdata.user_login,
Curcomlevel: teacherdata.current_complete_count===null|| teacherdata.current_complete_count===undefined|| teacherdata.current_complete_count===""?0: teacherdata.current_complete_count,
}) })
// } // }
@ -2537,7 +2634,7 @@ class Listofworksstudentone extends Component {
stduynumber: student_works[i].student_id, stduynumber: student_works[i].student_id,
classroom: student_works[i].group_name, classroom: student_works[i].group_name,
cost_time: student_works[i].cost_time, cost_time: student_works[i].cost_time,
submitstate: student_works[i].work_status === 0 ? "未提交" : student_works[i].work_status === 1 ? "按时完成" : student_works[i].work_status === 2 ? "延时完成" : "未提交", submitstate: student_works[i].work_status === 0 ? "未提交" : student_works[i].work_status === 1 ? "未通关" : student_works[i].work_status === 2 ? "按时通关" : "迟交通关",
// updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:this.state.teacherdata.student_works[i].update_time,
// updatetime:"", // updatetime:"",
updatetime: timedata === "Invalid date" ? "--" : timedata, updatetime: timedata === "Invalid date" ? "--" : timedata,
@ -2551,6 +2648,7 @@ class Listofworksstudentone extends Component {
ultimate_score: student_works[i].ultimate_score, ultimate_score: student_works[i].ultimate_score,
user_name: student_works[i].user_name, user_name: student_works[i].user_name,
user_login: student_works[i].user_login, user_login: student_works[i].user_login,
Curcomlevel: student_works[i].current_complete_count===undefined||student_works[i].current_complete_count===null||student_works[i].current_complete_count===""?0:student_works[i].current_complete_count,
}) })
} }
@ -3356,13 +3454,42 @@ class Listofworksstudentone extends Component {
} }
render() { render() {
let {columns, course_groupysls, datajs, isAdmin, homework_status, course_groupyslstwo, unlimited, unlimitedtwo, course_group_info, orders, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, game_list, columnsstu, columnsstu2, limit, experience, boolgalist, viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate, computeTimetype} = this.state; let {columns,columnss, course_groupysls, datajs, isAdmin, homework_status, course_groupyslstwo, unlimited, unlimitedtwo, course_group_info, orders, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, game_list, columnsstu, columnsstu2, limit, experience, boolgalist, viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate, computeTimetype} = this.state;
const antIcon = <Icon type="loading" style={{fontSize: 24}} spin/>; const antIcon = <Icon type="loading" style={{fontSize: 24}} spin/>;
let course_is_end = this.props.current_user && this.props.current_user.course_is_end; let course_is_end = this.props.current_user && this.props.current_user.course_is_end;
// console.log("Listofworksstudentone.js"); // console.log("Listofworksstudentone.js");
// console.log(orders); // console.log(orders);
let homewrok=false;
if(homework_status && homework_status.length > 0){
for(var i=0;i<homework_status.length;i++){
if(homework_status[i]==="已截止"){
homewrok=true;
}
}
if(homewrok===false){
for(var i=0;i<columnsstu.length;i++){
if (columnsstu[i].title === "当前完成关卡"){//item.id==122
columnsstu.splice(i,1)
}
}
for(var i=0;i<columnsstu2.length;i++){
if (columnsstu2[i].title === "当前完成关卡"){//item.id==122
columnsstu2.splice(i,1)
}
}
for(var i=0;i<columns.length;i++){
if (columns[i].title === "当前完成关卡"){//item.id==122
columns.splice(i,1)
}
}
for(var i=0;i<columnss.length;i++){
if (columnss[i].title === "当前完成关卡"){//item.id==122
columnss.splice(i,1)
}
}
}
}
return ( return (
this.props.isAdmin() === true ? this.props.isAdmin() === true ?
@ -3675,7 +3802,7 @@ class Listofworksstudentone extends Component {
height: 58px; height: 58px;
} }
.ysltableo .ant-table-thead > tr > th, .ant-table-tbody > tr > td { .ysltableo .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 9px; padding: 0px;
} }
`}</style> `}</style>
<div className="edu-table edu-back-white ant-tables ysltableo table1"> <div className="edu-table edu-back-white ant-tables ysltableo table1">
@ -3846,10 +3973,10 @@ class Listofworksstudentone extends Component {
{teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" : {teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" :
<span className="ml20">{teacherdata.left_time.status}</span> <span className="ml20">{teacherdata.left_time.status}</span>
} }
{teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" : {teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" :
<span className="ml20" <span className="ml20"
style={{color: '#FF6800'}}>{teacherdata.left_time.time}</span> style={{color: '#FF6800'}}>{teacherdata.left_time.time}</span>
} }
</span> </span>
</span> </span>
@ -3901,7 +4028,7 @@ class Listofworksstudentone extends Component {
height: 58px; height: 58px;
} }
.ysltableow .ant-table-thead > tr > th, .ant-table-tbody > tr > td { .ysltableow .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 9px; padding: 0px;
} }
`}</style> `}</style>
<div className="edu-table edu-back-white ysltableow table2"> <div className="edu-table edu-back-white ysltableow table2">
@ -4005,7 +4132,7 @@ class Listofworksstudentone extends Component {
height: 58px; height: 58px;
} }
.ysltableows .ant-table-thead > tr > th, .ant-table-tbody > tr > td { .ysltableows .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 9px; padding: 0px;
} }
` `
} }
@ -4043,9 +4170,9 @@ class Listofworksstudentone extends Component {
<span style={{color: "#666"}}> <span style={{color: "#666"}}>
{teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" : {teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" :
<span className="ml20">{teacherdata.left_time.status}</span>} <span className="ml20">{teacherdata.left_time.status}</span>}
{teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" : {teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" :
<span className="ml20" <span className="ml20"
style={{color: '#FF6800'}}>{teacherdata.left_time.time}</span>} style={{color: '#FF6800'}}>{teacherdata.left_time.time}</span>}
</span> </span>
</span> </span>
<style> <style>
@ -4134,7 +4261,7 @@ class Listofworksstudentone extends Component {
height: 58px; height: 58px;
} }
.ysltableowss .ant-table-thead > tr > th, .ant-table-tbody > tr > td { .ysltableowss .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 9px; padding: 0px;
} }
`}</style> `}</style>
<div className="edu-table edu-back-white ysltableowss table4"> <div className="edu-table edu-back-white ysltableowss table4">

@ -1294,8 +1294,9 @@ submittojoinclass=(value)=>{
<li><a onClick={(url)=>this.getUser("/courses/new")}>{this.props.user&&this.props.user.main_site===false?"新建课堂":"新建翻转课堂"}</a></li>:"" <li><a onClick={(url)=>this.getUser("/courses/new")}>{this.props.user&&this.props.user.main_site===false?"新建课堂":"新建翻转课堂"}</a></li>:""
} }
{shixuntype===true?"":<li><a onClick={(url)=>this.getUser("/shixuns/new")}>新建实训项目</a></li>} {shixuntype===true?"":<li><a onClick={(url)=>this.getUser("/shixuns/new")}>新建实训项目</a></li>}
{this.props.Headertop===undefined?"": {this.props.user&&this.props.user.main_site===false?"":this.props.Headertop===undefined?"":<li><a onClick={(url)=>this.getUser("/paths/new")} >新建实践课程</a></li>}
pathstype===true?"":this.props.user&&this.props.user.admin===true||this.props.user&&this.props.user.is_teacher===true||this.props.user&&this.props.user.business===true?<li><a onClick={(url)=>this.getUser("/paths/new")} >新建实践课程</a></li>:"" {this.props.user&&this.props.user.main_site===true?"":this.props.Headertop===undefined?"":
pathstype===true?"":this.props.user&&this.props.user.admin===true||this.props.user&&this.props.user.is_teacher===true||this.props.user&&this.props.user.business===true?<li><a onClick={(url)=>this.getUser("/paths/new")} >新建实践课程</a></li>:""
} }
{this.props.user&&this.props.user.main_site===true?<li><a onClick={(url)=>this.getUser("/projects/new","projects")} target="_blank">新建开发项目</a></li>:""} {this.props.user&&this.props.user.main_site===true?<li><a onClick={(url)=>this.getUser("/projects/new","projects")} target="_blank">新建开发项目</a></li>:""}
</ul> </ul>

@ -704,9 +704,6 @@ class Shixuninformation extends Component {
}) })
} }
}); });
this.setState({
loading: false
})
} }
Selectthestudent = (value) => { Selectthestudent = (value) => {

@ -97,6 +97,7 @@ class Newshixuns extends Component {
}) })
const mdContnet = this.contentMdRef.current.getValue().trim(); const mdContnet = this.contentMdRef.current.getValue().trim();
this.props.form.validateFieldsAndScroll((err, values) => { this.props.form.validateFieldsAndScroll((err, values) => {
debugger
if (!err) { if (!err) {
console.log('Received values of form: ', values); console.log('Received values of form: ', values);
@ -117,21 +118,20 @@ class Newshixuns extends Component {
// window.open("/shixuns/"+response.data.shixun_identifier+"/challenges"); // window.open("/shixuns/"+response.data.shixun_identifier+"/challenges");
} else { } else {
this.setState({ this.setState({
loading: true loading: false
}) })
} }
}).catch((error) => { }).catch((error) => {
this.setState({ this.setState({
loading: true loading: false
}) })
}) })
}else{
this.setState({
loading: false
})
} }
}); });
this.setState({
loading: false
})
}; };
Selectthestudent = (value) => { Selectthestudent = (value) => {
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({

@ -263,7 +263,7 @@ class Challengesjupyter extends Component {
"" ""
: :
( (
is_teacher===true||admin===true||business===true||mysidentity===true? admin===true||business===true||mysidentity===true?
<div className="sortinxdirection mt60"> <div className="sortinxdirection mt60">
<div className="renwuxiangssi sortinxdirection"> <div className="renwuxiangssi sortinxdirection">
<div><p className="renwuxiangqdiv">任务详情</p></div> <div><p className="renwuxiangqdiv">任务详情</p></div>
@ -306,7 +306,7 @@ class Challengesjupyter extends Component {
} }
</style> </style>
{ {
is_teacher===true||admin===true||business===true||mysidentity===true? admin===true||business===true||mysidentity===true?
<div className="mt35"> <div className="mt35">
<div className="pb47"> <div className="pb47">
{ {

@ -168,6 +168,8 @@ class InfosPath extends Component{
</Menu> </Menu>
); );
// console.log(this.props.user&&this.props.user.main_site)
return( return(
<div className="educontent"> <div className="educontent">
<Spin size="large" spinning={isSpin}> <Spin size="large" spinning={isSpin}>
@ -327,7 +329,10 @@ class InfosPath extends Component{
<div className="square-list clearfix"> <div className="square-list clearfix">
{/* 295 */} {/* 295 */}
{ {
page == 1 && is_current && !category ? <Create href={"/paths/new"} name={"新建实践课程"} index="3"></Create>:"" this.props.user&&this.props.user.main_site===true?page == 1 && is_current && !category ? <Create href={"/paths/new"} name={"新建实践课程"} index="3"></Create>:"":""
}
{
this.props.user&&this.props.user.main_site===false?this.props.user&&this.props.user.admin===true||this.props.user&&this.props.user.is_teacher===true||this.props.user&&this.props.user.business===true?page == 1 && is_current && !category ? <Create href={"/paths/new"} name={"新建实践课程"} index="3"></Create>:"":"":""
} }
{ {
(!data || (data && data.subjects.length==0)) && category && <NoneData></NoneData> (!data || (data && data.subjects.length==0)) && category && <NoneData></NoneData>

Loading…
Cancel
Save