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

dev_hss
caicai8 5 years ago
commit be8ad563f9

@ -74,6 +74,7 @@ class GamesController < ApplicationController
#@vnc_url = "http://#{service_host}:#{res['port']}/vnc_lite.html?password=headless"
# 有域名版本
@vnc_url = "https://#{res['port']}.#{service_host}/vnc_lite.html?password=headless"
@vnc_evaluate = @shixun.vnc_evaluate
rescue Exception => e
Rails.logger.error(e.message)
end
@ -535,13 +536,14 @@ class GamesController < ApplicationController
end
testCases = Base64.urlsafe_encode64(testSet.to_json) unless testSet.blank?
# 评测类型: 012 用于webssh的评测 3用于vnc
podType = @shixun.vnc_evaluate ? 3 : @shixun.webssh
# 注意:这个地方的参数写的时候不能换行
content_modified = params[:content_modified] # 决定文件内容是否有修改有修改如果中间层pull没有更新则轮询等待更新
br_params = {:tpiID => "#{@myshixun.id}", :tpiGitURL => "#{gitUrl}", :buildID => "#{@game.id}",
:instanceChallenge => "#{step}", :testCases => "#{testCases}", :resubmit => "#{resubmit}",
:times => params[:first].to_i, :podType => @shixun.webssh, :content_modified => content_modified,
:times => params[:first].to_i, :podType => podType, :content_modified => content_modified,
:containers => "#{Base64.urlsafe_encode64(shixun_container_limit(@shixun))}",
:persistenceName => @shixun.identifier, :tpmScript => "#{tpmScript}", :sec_key => sec_key,
:timeLimit => game_challenge.exec_time, :isPublished => (@shixun.status < 2 ? 0 : 1) }

@ -266,7 +266,8 @@ class MyshixunsController < ApplicationController
:identifier => @sec_key, :exec_time => exec_time)
uid_logger("-- game build: file update #{@sec_key}, record id is #{record.id}, time is **** #{Time.now.strftime("%Y-%m-%d %H:%M:%S.%L")}")
end
unless @hide_code
# 隐藏代码文件 和 VNC的都不需要走版本库
unless @hide_code || @myshixun.shixun&.vnc_evaluate
# 远程版本库文件内容
last_content = GitService.file_content(repo_path: @repo_path, path: path)["content"]
content = params[:content]

@ -931,7 +931,7 @@ private
raise("实训名称不能为空") if params[:shixun][:name].blank?
params.require(:shixun).permit(:name, :trainee, :webssh, :can_copy, :use_scope, :vnc, :test_set_permission,
:task_pass, :multi_webssh, :opening_time, :mirror_script_id, :code_hidden,
:hide_code, :forbid_copy)
:hide_code, :forbid_copy, :vnc_evaluate)
end
def shixun_info_params

@ -5,6 +5,9 @@ class Shixun < ApplicationRecord
# hide_code 隐藏代码窗口
# code_hidden: 隐藏代码目录
# task_pass: 跳关
# webssh 0不开启webssh1开启练习模式; 2开启评测模式
# trainee 实训的难度
# vnc: VCN实训是否用于评测
has_many :challenges, -> {order("challenges.position asc")}, dependent: :destroy
has_many :challenge_tags, through: :challenges
has_many :myshixuns, :dependent => :destroy

@ -3,6 +3,7 @@ json.(@base_date, :st, :discusses_count, :game_count, :record_onsume_time, :prev
:shixun, :myshixun, :git_url)
if @shixun.vnc
json.vnc_url @vnc_url
json.vnc_evaluate @vnc_evaluate
end
json.user do
json.partial! 'users/user', user: @user

@ -22,6 +22,7 @@ json.shixun do
json.hide_code @shixun.hide_code # 隐藏代码窗口
json.code_hidden @shixun.code_hidden # 代码目录隐藏
json.vnc @shixun.vnc
json.vnc_evaluate @shixun.vnc_evaluate
#json.exec_time @shixun.exec_time
json.webssh @shixun.webssh
json.multi_webssh @shixun.multi_webssh

@ -0,0 +1,5 @@
class AddVncEvaluateForShixuns < ActiveRecord::Migration[5.2]
def change
add_column :shixuns, :vnc_evaluate, :boolean, default: false
end
end

File diff suppressed because one or more lines are too long

@ -330,7 +330,8 @@ class App extends Component {
title: 'EduCoder',
desc: '创新源于实践',
link: currentUrl,
imgUrl: (currentUrl.endsWith('/') ? currentUrl : currentUrl + '/') + 'images/educoder/index/subject/subject15.jpg'
imgUrl: window.__testImageUrl
|| (currentUrl.endsWith('/') ? currentUrl : currentUrl + '/') + 'images/educoder/index/subject/subject15.jpg'
};
wx.onMenuShareAppMessage(shareData);//分享给好友
@ -428,7 +429,14 @@ class App extends Component {
return (<Topicbank {...this.props} {...props} {...this.state} />)
}
}></Route>
{/*题库*/}
<Route path="/topicbank/:topicstype"
render={
(props) => {
return (<Topicbank {...this.props} {...props} {...this.state} />)
}
}></Route>
{/*众包创新*/}
<Route path={"/crowdsourcing"} component={ProjectPackages}/>
{/*认证*/}

@ -130,31 +130,31 @@ class Listofworksstudentone extends Component {
<span className="maxnamewidth100">
{record.name === undefined ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
color: '#9A9A9A',
textAlign: "center"
}}>--</span>
:
record.name === "" ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
color: '#9A9A9A',
textAlign: "center"
}}>--</span>
:
record.name === null ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
color: '#9A9A9A',
textAlign: "center"
}}>--</span>
:
record.name === "--" ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
color: '#9A9A9A',
textAlign: "center"
}}>--</span>
:
<a className="maxnamewidth100" title={record.name} style={{
"color": '#07111B',
"text-align": "center"
color: '#07111B',
textAlign: "center"
}}>{record.name}</a>
}
@ -172,20 +172,20 @@ class Listofworksstudentone extends Component {
<span className="maxnamewidth110">
{record.stduynumber === undefined ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
color: '#9A9A9A',
textAlign: "center"
}}>--
</span>
: record.stduynumber === null ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
color: '#9A9A9A',
textAlign: "center"
}}>--
</span>
: record.stduynumber === "" ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
color: '#9A9A9A',
textAlign: "center"
}}>--
</span>
:
@ -193,8 +193,8 @@ class Listofworksstudentone extends Component {
title={record.stduynumber}
className="maxnamewidth110"
style={{
"color": '#9A9A9A',
"text-align": "center"
color: '#9A9A9A',
textAlign: "center"
}}>{
record.stduynumber
}
@ -214,8 +214,8 @@ class Listofworksstudentone extends Component {
render: (text, record) => (
<span>
<span className="ysltable" style={{
"color": '#9A9A9A',
"text-align": "center"
color: '#9A9A9A',
textAlign: "center"
}}>{record.classroom === undefined ? "--" : record.classroom === "" ? "--" : record.classroom === null ? "--" : record.classroom}</span>
</span>
),
@ -229,11 +229,11 @@ class Listofworksstudentone extends Component {
render: (text, record) => (
<span>
<span style={record.submitstate === "延时提交" ? {
"color": '#DD1717',
"text-align": "center"
} : record.submitstate === "按时提交" ? {"color": '#29BD8B', "text-align": "center"} : {
"color": '#747A7F',
"text-align": "center"
color: '#DD1717',
textAlign: "center"
} : record.submitstate === "按时提交" ? {color: '#29BD8B', textAlign: "center"} : {
color: '#747A7F',
textAlign: "center"
}}>{record.submitstate === undefined ? "--" : record.submitstate === "" ? "--" : record.submitstate === null ? "--" : record.submitstate}</span>
</span>
@ -248,8 +248,8 @@ class Listofworksstudentone extends Component {
render: (text, record) => (
<span style={
{
"color": '#747A7F',
"text-align": "center"
color: '#747A7F',
textAlign: "center"
}
}>{record.cost_time === null ? "--":record.cost_time === undefined ?"--":record.cost_time }
</span>
@ -265,8 +265,8 @@ class Listofworksstudentone extends Component {
render: (text, record) => (
<span>
<span style={{
"color": '#9A9A9A',
"text-align": "center"
color: '#9A9A9A',
textAlign: "center"
}}>{record.updatetime === undefined ? "--" : record.updatetime === "" ? "--" : record.updatetime}</span>
</span>
),
@ -279,7 +279,7 @@ class Listofworksstudentone extends Component {
className:'font-14',
render: (text, record) => (
<span>
<span style={{"color": '#07111B', "text-align": "center"}}>{record.completion+"/"+this.state.challenges_count}</span>
<span style={{color: '#07111B', textAlign: "center"}}>{record.completion+"/"+this.state.challenges_count}</span>
</span>
),
},
@ -292,14 +292,14 @@ class Listofworksstudentone extends Component {
render: (text, record) => (
<span>
<span style={parseInt(record.levelscore) <= 60 ? {
"color": '#747A7F',
"text-align": "center"
color: '#747A7F',
textAlign: "center"
} : parseInt(record.levelscore) < 90 ? {
"color": '#FF6800',
"text-align": "center"
} : parseInt(record.levelscore) >= 90 ? {"color": '#DD1717', "text-align": "center"} : {
"color": '#747A7F',
"text-align": "center"
color: '#FF6800',
textAlign: "center"
} : parseInt(record.levelscore) >= 90 ? {color: '#DD1717', textAlign: "center"} : {
color: '#747A7F',
textAlign: "center"
}}>{record.levelscore}</span>
</span>
)
@ -320,15 +320,15 @@ class Listofworksstudentone extends Component {
)
:
<span style={parseInt(record.efficiencyscore) <= 60 ? {
"color": '#747A7F',
"text-align": "center"
color: '#747A7F',
textAlign: "center"
} : parseInt(record.efficiencyscore) < 90 ? {
"color": '#FF6800',
"text-align": "center"
color: '#FF6800',
textAlign: "center"
} : parseInt(record.efficiencyscore) >= 90 ? {
"color": '#DD1717',
"text-align": "center"
} : {"color": '#747A7F', "text-align": "center"}}>{record.efficiencyscore}</span>
color: '#DD1717',
textAlign: "center"
} : {color: '#747A7F', textAlign: "center"}}>{record.efficiencyscore}</span>
}
</span>
@ -344,15 +344,15 @@ class Listofworksstudentone extends Component {
<span>
{
record.levelscore && record.levelscore === "--"?
<span style={{"color": '#9A9A9A', "text-align": "center"}}>{record.levelscore}</span>
<span style={{color: '#9A9A9A', textAlign: "center"}}>{record.levelscore}</span>
:
<span style={parseInt(record.levelscore) >=90 ? {
"color": '#DD1717',
"text-align": "center"
color: '#DD1717',
textAlign: "center"
} : parseInt(record.levelscore) <= 60?{
"color": '#FF6800',
"text-align": "center",
}: {"color": '#747A7F', "text-align": "center"}}>{record.levelscore}</span>
color: '#FF6800',
textAlign: "center",
}: {color: '#747A7F', textAlign: "center"}}>{record.levelscore}</span>
}
</span>
@ -395,8 +395,8 @@ class Listofworksstudentone extends Component {
course_group: null,
publish_immediately: undefined,
end_immediately: undefined,
mystyle: {"display": "block", "color": '#07111B', "text-align": "center"},
mystyles: {"display": "none", "color": '#07111B', "text-align": "center"},
mystyle: {"display": "block", color: '#07111B', textAlign: "center"},
mystyles: {"display": "none", color: '#07111B', textAlign: "center"},
mystyle1: {"display": "block"},
mystyles1: {"display": "none"},
unlimited: 0,
@ -413,7 +413,7 @@ class Listofworksstudentone extends Component {
align: 'center',
className:'font-14',
render: (text, record) => (
<span style={{"color": '#07111B', "text-align": "center"}}>{record.number}
<span style={{color: '#07111B', textAlign: "center"}}>{record.number}
</span>
)
},
@ -425,7 +425,7 @@ class Listofworksstudentone extends Component {
className:'font-14 maxnamewidth100',
width:'100px',
render: (text, record) => (
<a className="maxnamewidth100" title={record.name} style={{"color": '#07111B', "text-align": "center"}}>{record.name}</a>
<a className="maxnamewidth100" title={record.name} style={{color: '#07111B', textAlign: "center"}}>{record.name}</a>
)
},
{
@ -439,20 +439,20 @@ class Listofworksstudentone extends Component {
<span className="maxnamewidth110">
{record.stduynumber === undefined ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
color: '#9A9A9A',
textAlign: "center"
}}>--
</span>
: record.stduynumber === null ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
color: '#9A9A9A',
textAlign: "center"
}}>--
</span>
: record.stduynumber === "" ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
color: '#9A9A9A',
textAlign: "center"
}}>--
</span>
:
@ -460,8 +460,8 @@ class Listofworksstudentone extends Component {
title={record.stduynumber}
className="maxnamewidth110"
style={{
"color": '#9A9A9A',
"text-align": "center"
color: '#9A9A9A',
textAlign: "center"
}}>{
record.stduynumber
}
@ -480,7 +480,7 @@ class Listofworksstudentone extends Component {
className:'font-14',
render: (text, record) => (
<span>
{record.classroom === undefined ?<span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}> --</span> : record.classroom === "" ? <span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>--</span>: record.classroom === null ? <span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>--</span> : <span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span>}
{record.classroom === undefined ?<span className="ysltable" style={{color: '#07111B', textAlign: "center"}}> --</span> : record.classroom === "" ? <span className="ysltable" style={{color: '#07111B', textAlign: "center"}}>--</span>: record.classroom === null ? <span className="ysltable" style={{color: '#07111B', textAlign: "center"}}>--</span> : <span className="ysltable" style={{color: '#07111B', textAlign: "center"}}>{record.classroom}</span>}
</span>
)
},
@ -492,11 +492,11 @@ class Listofworksstudentone extends Component {
className:'font-14',
render: (text, record) => (
<span style={record.submitstate === "延时提交" ? {
"color": '#DD1717',
"text-align": "center"
} : record.submitstate === "按时提交" ? {"color": '#29BD8B', "text-align": "center"} : {
"color": '#747A7F',
"text-align": "center"
color: '#DD1717',
textAlign: "center"
} : record.submitstate === "按时提交" ? {color: '#29BD8B', textAlign: "center"} : {
color: '#747A7F',
textAlign: "center"
}}>{record.submitstate}
</span>
)
@ -511,8 +511,8 @@ class Listofworksstudentone extends Component {
render: (text, record) => (
<span style={
{
"color": '#747A7F',
"text-align": "center"
color: '#747A7F',
textAlign: "center"
}
}>{record.cost_time === null ? "--":record.cost_time === undefined ?"--":record.cost_time }
</span>
@ -526,7 +526,7 @@ class Listofworksstudentone extends Component {
align: 'center',
className:'font-14',
render: (text, record) => (
<span style={{"color": '#9A9A9A', "text-align": "center"}}>{record.updatetime}</span>
<span style={{color: '#9A9A9A', textAlign: "center"}}>{record.updatetime}</span>
),
},
{
@ -541,7 +541,7 @@ class Listofworksstudentone extends Component {
<Tooltip placement="bottom" title={<div>
<div>已通过{record.completion}{this.state.challenges_count}</div>
</div>}>
<span style={{"color": '#07111B', "text-align": "center"}}>{record.completion+"/"+this.state.challenges_count} </span>
<span style={{color: '#07111B', textAlign: "center"}}>{record.completion+"/"+this.state.challenges_count} </span>
</Tooltip>
</span>
@ -556,14 +556,14 @@ class Listofworksstudentone extends Component {
render: (text, record) => (
<span>
<span style={parseInt(record.levelscore) <= 60 ? {
"color": '#747A7F',
"text-align": "center"
color: '#747A7F',
textAlign: "center"
} : parseInt(record.levelscore) < 90 ? {
"color": '#FF6800',
"text-align": "center"
} : parseInt(record.levelscore) >= 90 ? {"color": '#DD1717', "text-align": "center"} : {
"color": '#747A7F',
"text-align": "center"
color: '#FF6800',
textAlign: "center"
} : parseInt(record.levelscore) >= 90 ? {color: '#DD1717', textAlign: "center"} : {
color: '#747A7F',
textAlign: "center"
}}>{record.levelscore}</span>
</span>
)
@ -602,15 +602,15 @@ class Listofworksstudentone extends Component {
)
:
<span style={parseInt(record.efficiencyscore) <= 60 ? {
"color": '#747A7F',
"text-align": "center"
color: '#747A7F',
textAlign: "center"
} : parseInt(record.efficiencyscore) < 90 ? {
"color": '#FF6800',
"text-align": "center"
color: '#FF6800',
textAlign: "center"
} : parseInt(record.efficiencyscore) >= 90 ? {
"color": '#DD1717',
"text-align": "center"
} : {"color": '#747A7F', "text-align": "center"}}>{record.efficiencyscore}</span>
color: '#DD1717',
textAlign: "center"
} : {color: '#747A7F', textAlign: "center"}}>{record.efficiencyscore}</span>
}
</span>
@ -634,19 +634,19 @@ class Listofworksstudentone extends Component {
record.finalscore&&record.finalscore==="--"?
<span style=
{{
"color": '#9A9A9A',
"text-align": "center"
color: '#9A9A9A',
textAlign: "center"
}}>{record.finalscore}</span>
:
<span style={parseInt(record.finalscore) <= 60 ? {
"color": '#747A7F',
"text-align": "center"
color: '#747A7F',
textAlign: "center"
} : parseInt(record.finalscore) < 90 ? {
"color": '#FF6800',
"text-align": "center"
} : parseInt(record.finalscore) >= 90 ? {"color": '#DD1717', "text-align": "center"} : {
"color": '#747A7F',
"text-align": "center"
color: '#FF6800',
textAlign: "center"
} : parseInt(record.finalscore) >= 90 ? {color: '#DD1717', textAlign: "center"} : {
color: '#747A7F',
textAlign: "center"
}}>{record.finalscore}</span>
}
</Tooltip>
@ -662,19 +662,19 @@ class Listofworksstudentone extends Component {
record.finalscore&&record.finalscore==="--"?
<span style=
{{
"color": '#9A9A9A',
"text-align": "center"
color: '#9A9A9A',
textAlign: "center"
}}>{record.finalscore}</span>
:
<span style={parseInt(record.finalscore) <= 60 ? {
"color": '#747A7F',
"text-align": "center"
color: '#747A7F',
textAlign: "center"
} : parseInt(record.finalscore) < 90 ? {
"color": '#FF6800',
"text-align": "center"
} : parseInt(record.finalscore) >= 90 ? {"color": '#DD1717', "text-align": "center"} : {
"color": '#747A7F',
"text-align": "center"
color: '#FF6800',
textAlign: "center"
} : parseInt(record.finalscore) >= 90 ? {color: '#DD1717', textAlign: "center"} : {
color: '#747A7F',
textAlign: "center"
}}>{record.finalscore}</span>
}
</Tooltip>
@ -707,7 +707,7 @@ class Listofworksstudentone extends Component {
align: 'center',
className:'font-14',
render: (text, record) => (
<span style={{"color": '#07111B', "text-align": "center"}}>{record.number}
<span style={{color: '#07111B', textAlign: "center"}}>{record.number}
</span>
)
},
@ -719,7 +719,7 @@ class Listofworksstudentone extends Component {
className:'font-14 maxnamewidth100',
width:'100px',
render: (text, record) => (
<a className="maxnamewidth100" title={record.name} style={{"color": '#07111B', "text-align": "center"}}>{record.name}</a>
<a className="maxnamewidth100" title={record.name} style={{color: '#07111B', textAlign: "center"}}>{record.name}</a>
)
},
{
@ -733,20 +733,20 @@ class Listofworksstudentone extends Component {
<span className="maxnamewidth110">
{record.stduynumber === undefined ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
color: '#9A9A9A',
textAlign: "center"
}}>--
</span>
: record.stduynumber === null ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
color: '#9A9A9A',
textAlign: "center"
}}>--
</span>
: record.stduynumber === "" ?
<span style={{
"color": '#9A9A9A',
"text-align": "center"
color: '#9A9A9A',
textAlign: "center"
}}>--
</span>
:
@ -754,8 +754,8 @@ class Listofworksstudentone extends Component {
title={record.stduynumber}
className="maxnamewidth110"
style={{
"color": '#9A9A9A',
"text-align": "center"
color: '#9A9A9A',
textAlign: "center"
}}>{
record.stduynumber
}
@ -774,7 +774,7 @@ class Listofworksstudentone extends Component {
className:'font-14',
render: (text, record) => (
<span>
{record.classroom === undefined ?<span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}> --</span> : record.classroom === "" ? <span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>--</span>: record.classroom === null ? <span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>--</span> : <span className="ysltable" style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</span>}
{record.classroom === undefined ?<span className="ysltable" style={{color: '#07111B', textAlign: "center"}}> --</span> : record.classroom === "" ? <span className="ysltable" style={{color: '#07111B', textAlign: "center"}}>--</span>: record.classroom === null ? <span className="ysltable" style={{color: '#07111B', textAlign: "center"}}>--</span> : <span className="ysltable" style={{color: '#07111B', textAlign: "center"}}>{record.classroom}</span>}
</span>
)
},
@ -786,11 +786,11 @@ class Listofworksstudentone extends Component {
className:'font-14',
render: (text, record) => (
<span style={record.submitstate === "延时提交" ? {
"color": '#DD1717',
"text-align": "center"
} : record.submitstate === "按时提交" ? {"color": '#29BD8B', "text-align": "center"} : {
"color": '#747A7F',
"text-align": "center"
color: '#DD1717',
textAlign: "center"
} : record.submitstate === "按时提交" ? {color: '#29BD8B', textAlign: "center"} : {
color: '#747A7F',
textAlign: "center"
}}>{record.submitstate}
</span>
)
@ -803,7 +803,7 @@ class Listofworksstudentone extends Component {
align: 'center',
className:'font-14',
render: (text, record) => (
<span style={{"color": '#9A9A9A', "text-align": "center"}}>{record.updatetime}</span>
<span style={{color: '#9A9A9A',textAlign: "center"}}>{record.updatetime}</span>
),
},
{
@ -815,8 +815,8 @@ class Listofworksstudentone extends Component {
render: (text, record) => (
<span style={
{
"color": '#747A7F',
"text-align": "center"
color: '#747A7F',
textAlign: "center"
}
}>{record.cost_time === null ? "--":record.cost_time === undefined ?"--":record.cost_time }
</span>
@ -835,7 +835,7 @@ class Listofworksstudentone extends Component {
<Tooltip placement="bottom" title={<div>
<div>已通过{record.completion}{this.state.challenges_count}</div>
</div>}>
<span style={{"color": '#07111B', "text-align": "center"}}>{record.completion+"/"+this.state.challenges_count} </span>
<span style={{color: '#07111B',textAlign: "center"}}>{record.completion+"/"+this.state.challenges_count} </span>
</Tooltip>
</span>
@ -850,14 +850,14 @@ class Listofworksstudentone extends Component {
render: (text, record) => (
<span>
<span style={parseInt(record.levelscore) <= 60 ? {
"color": '#747A7F',
"text-align": "center"
color: '#747A7F',
textAlign: "center"
} : parseInt(record.levelscore) < 90 ? {
"color": '#FF6800',
"text-align": "center"
} : parseInt(record.levelscore) >= 90 ? {"color": '#DD1717', "text-align": "center"} : {
"color": '#747A7F',
"text-align": "center"
color: '#FF6800',
textAlign: "center"
} : parseInt(record.levelscore) >= 90 ? {color: '#DD1717', textAlign: "center"} : {
color: '#747A7F',
textAlign: "center"
}}>{record.levelscore}</span>
</span>
)
@ -896,15 +896,15 @@ class Listofworksstudentone extends Component {
)
:
<span style={parseInt(record.efficiencyscore) <= 60 ? {
"color": '#747A7F',
"text-align": "center"
color: '#747A7F',
textAlign: "center"
} : parseInt(record.efficiencyscore) < 90 ? {
"color": '#FF6800',
"text-align": "center"
color: '#FF6800',
textAlign: "center"
} : parseInt(record.efficiencyscore) >= 90 ? {
"color": '#DD1717',
"text-align": "center"
} : {"color": '#747A7F', "text-align": "center"}}>{record.efficiencyscore}</span>
color: '#DD1717',
textAlign: "center"
} : {color: '#747A7F', textAlign: "center"}}>{record.efficiencyscore}</span>
}
</span>
@ -928,19 +928,19 @@ class Listofworksstudentone extends Component {
record.finalscore&&record.finalscore==="--"?
<span style=
{{
"color": '#9A9A9A',
"text-align": "center"
color: '#9A9A9A',
textAlign: "center"
}}>{record.finalscore}</span>
:
<span style={parseInt(record.finalscore) <= 60 ? {
"color": '#747A7F',
"text-align": "center"
color: '#747A7F',
textAlign: "center"
} : parseInt(record.finalscore) < 90 ? {
"color": '#FF6800',
"text-align": "center"
} : parseInt(record.finalscore) >= 90 ? {"color": '#DD1717', "text-align": "center"} : {
"color": '#747A7F',
"text-align": "center"
color: '#FF6800',
textAlign: "center"
} : parseInt(record.finalscore) >= 90 ? {color: '#DD1717', textAlign: "center"} : {
color: '#747A7F',
textAlign: "center"
}}>{record.finalscore}</span>
}
</Tooltip>
@ -956,19 +956,19 @@ class Listofworksstudentone extends Component {
record.finalscore&&record.finalscore==="--"?
<span style=
{{
"color": '#9A9A9A',
"text-align": "center"
color: '#9A9A9A',
textAlign: "center"
}}>{record.finalscore}</span>
:
<span style={parseInt(record.finalscore) <= 60 ? {
"color": '#747A7F',
"text-align": "center"
color: '#747A7F',
textAlign: "center"
} : parseInt(record.finalscore) < 90 ? {
"color": '#FF6800',
"text-align": "center"
} : parseInt(record.finalscore) >= 90 ? {"color": '#DD1717', "text-align": "center"} : {
"color": '#747A7F',
"text-align": "center"
color: '#FF6800',
textAlign: "center"
} : parseInt(record.finalscore) >= 90 ? {color: '#DD1717', textAlign: "center"} : {
color: '#747A7F',
textAlign: "center"
}}>{record.finalscore}</span>
}
</Tooltip>
@ -1031,6 +1031,8 @@ class Listofworksstudentone extends Component {
// console.log(this.props);
// console.log(this.props.isAdmin())
this.student();
console.log("Listofworksstudentone---------------");
console.log(this.props);
}
isupdatas = () => {
var homeworkid = this.props.match.params.homeworkid;
@ -2492,27 +2494,12 @@ class Listofworksstudentone extends Component {
let {columns,course_groupysls,datajs,isAdmin, course_groupyslstwo, unlimited, unlimitedtwo, course_group_info, orders, task_status, checkedValuesine, searchtext, teacherlist, visible,visibles, game_list,columnsstu, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate,computeTimetype} = this.state;
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
// console.log(this.state.student_works);
// console.log("841");
// console.log(this.state.columns);
// console.log(datajs);
// console.log("2202");
// console.log(this.props.isAdmin());
// console.log("2498");
// console.log(data);
// console.log(datas);
// console.log(this.props.isAdmin());
let course_is_end = this.props.current_user&&this.props.current_user.course_is_end;
// if(this.props.isAdmin() === false){
// if(teacherdata.student_works!==undefined){
// if(teacherdata.student_works.length>0){
//
//
// }
// }
//
// }
console.log("Listofworksstudentone+++++++++");
console.log(this.props);
return (
this.props.isAdmin() === true ?
(
@ -3217,11 +3204,11 @@ class Listofworksstudentone extends Component {
{/*<i className="iconfont icon-xiajiantou ml5 font-12 "></i>*/}
{/*<ul className="edu-position-hide undis mt10">*/}
{/*<li><a onClick={(e) => this.funorder("updated_at")} data-remote="true"*/}
{/*className="color-grey-6 font-12" style={{"text-align": "center "}}>更新时间</a></li>*/}
{/*className="color-grey-6 font-12" style={{textAlign: "center "}}>更新时间</a></li>*/}
{/*<li><a onClick={(e) => this.funorder("work_score")} data-remote="true"*/}
{/*className="color-grey-6 font-12" style={{"text-align": "center "}}>最终成绩</a></li>*/}
{/*className="color-grey-6 font-12" style={{textAlign: "center "}}>最终成绩</a></li>*/}
{/*<li><a onClick={(e) => this.funorder("student_id")} data-remote="true"*/}
{/*className="color-grey-6 font-12" style={{"text-align": "center "}}>学生学号</a></li>*/}
{/*className="color-grey-6 font-12" style={{textAlign: "center "}}>学生学号</a></li>*/}
{/*</ul>*/}
{/*</li>*/}
{/*</ul>*/}

@ -59,7 +59,7 @@ class Cooperatives extends React.Component {
<List.Item>
<div className="cooperative-item-list-item">
<a href={obj.url || 'javascript:void(0)'} target={obj.url && '_blank'}>
<img className="" height="90" src={getImageUrl(obj.img)} />
<img className="" height="90" src={getImageUrl(obj.img.substr(1))} />
</a>
</div>
</List.Item>

@ -35,6 +35,12 @@ class Topic_bank extends Component {
(props) => (<PackageIndex {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/topicbank/:topicstype"
render={
(props) => (<PackageIndex {...this.props} {...props} {...this.state} />)
}
></Route>
</Switch>
</div>

@ -86,29 +86,34 @@ class InfosTopics extends Component{
if(user_id===undefined){
user_id=this.props.match.params&&this.props.match.params.username;
}
let {per_page}=this.state;
let url=`/users/${user_id}/question_banks.json`;
axios.get(encodeURI(url),{params:{
type,
object_type:category,
course_list_id,
sort_by,
sort_direction,
page,
per_page
}
}).then((response) => {
this.setState({
data:response.data,
checkBoxValues:[],
isSpin:false
})
}).catch((error) => {
this.setState({
isSpin:false
})
});
if(user_id!=undefined){
let {per_page}=this.state;
let url=`/users/${user_id}/question_banks.json`;
axios.get(encodeURI(url),{params:{
type,
object_type:category,
course_list_id,
sort_by,
sort_direction,
page,
per_page
}
}).then((response) => {
this.setState({
data:response.data,
checkBoxValues:[],
isSpin:false
})
}).catch((error) => {
this.setState({
isSpin:false
})
});
}
}
@ -332,6 +337,8 @@ class InfosTopics extends Component{
</Menu.Item>:""}
</Menu>
);
// console.log(this.props)
return(
<div className="educontent mb50 mt40">
{/*提示*/}
@ -431,7 +438,7 @@ class InfosTopics extends Component{
<div className={types==="personal"?"topicstopfont fl ":"topicstopfont fl topcsactive"}
>我的题库</div>
<a className={types==="publicly"?"topicstopfont fr ":"topicstopfont fr topcsactive"}
href={`/topicbank/${this.props.current_user&&this.props.current_user.login}/publicly`}
href={`/topicbank/publicly`}
>公共题库</a>
</div>}

Loading…
Cancel
Save