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

video_transcode
caicai8 5 years ago
commit 4d97237e26

@ -0,0 +1,22 @@
#coding=utf-8
desc "纠正学生实训耗时不准的问题"
namespace :shixuns do
task correct_the_shixun_cost_time: :environment do
puts "myshixun_id: #{ENV['myshixun_id']}"
if ENV['myshixun_id'].present?
myshixun = Myshixun.find(ENV['myshixun_id'])
myshixun.games.where(status: 2).each do |game|
puts "open_time: #{game.open_time.to_i}"
puts "end_time: #{game.end_time.to_i}"
puts "game_id: #{game.id}"
cost_time = game.end_time.to_i - game.open_time.to_i
puts "cost_time: #{cost_time}"
game.update_attributes!(cost_time: cost_time)
end
end
end
end

@ -3,8 +3,9 @@ desc "统计每个学校使用数据"
namespace :static_all do
task :repo => :environment do
school_alls = School.includes(:courses, user_extensions: :user).all
proc_num = ENV['processes'].blank? ? 5 : ENV['processes'].to_i
school_alls.find_in_batches(batch_size: 50) do |schools|
Parallel.each(schools, in_processes: 5) do |school|
Parallel.each(schools, in_processes: proc_num) do |school|
puts("school_id: #{school.id}")
data = Schools::SchoolStatisticService.new(school)
sta_all = StaAll.find_or_initialize_by(school_id: school.id)

@ -282,6 +282,34 @@ class Intecomponents extends Component {
}
preservation = () => {
let mylistcour=1;
try {
mylistcour=this.state.single_question_count+this.state.multiple_question_count+this.state.judgement_question_count+this.state.program_question_count
}catch (e) {
}
if(mylistcour===0){
this.props.showNotification(`没有题不能组卷`);
return;
}
let arraycour=1;
try {
arraycour=this.Judquestio.Getdatas()[3].rbdxt+this.Judquestio.Getdatas()[4].rbdxtx+ this.Judquestio.Getdatas()[5].rbpdt+this.Judquestio.Getdatas()[6].rbbct
}catch (e) {
}
if(arraycour===0){
this.props.showNotification(`没有设置题型及数量不能组卷`);
return;
}
if (this.Judquestio.Getdatas().length === 0) {
this.scrollToAnchor("Itembankstopid");
return;

@ -1075,21 +1075,21 @@ submittojoinclass=(value)=>{
`
}
</style>
{
Periofters===true?
<li className={`pr questionbanks`} >
<Popover className="queyppors" id={"yslpopovers"} placement="bottom" content={contents} trigger="click" >
<div className=" sortinxdirection mr10">
<div style={{
color:"#fff"
}}>
题库
</div>
</div>
</Popover>
</li>
:""
}
{/*{*/}
{/* Periofters===true?*/}
{/* <li className={`pr questionbanks`} >*/}
{/* <Popover className="queyppors" id={"yslpopovers"} placement="bottom" content={contents} trigger="click" >*/}
{/* <div className=" sortinxdirection mr10">*/}
{/* <div style={{*/}
{/* color:"#fff"*/}
{/* }}>*/}
{/* 题库*/}
{/* </div>*/}
{/* </div>*/}
{/* </Popover>*/}
{/* </li>*/}
{/* :""*/}
{/*}*/}
<li

Loading…
Cancel
Save