Merge branch 'develop' into educoder

dev_ec
daiao 6 years ago
commit dee79a3d75

@ -1267,7 +1267,8 @@ end
if school.present?
customer = Customer.new(school_id: s)
customer.save!
PartnerCustomer.create(partner_id: partner_id,customer_id: customer.id )
PartnerCustomer.create!(partner_id: partner_id,customer_id: customer.id )
school.update_attributes(customer_id: customer.id)
end
end
render :json => {status: 1, message: "创建成功!"}

@ -466,7 +466,8 @@ class MyshixunsController < ApplicationController
end
# taskId 即返回的game id
# 返回结果params [:stauts] 0 表示成功,其它则失败
# 返回结果params [:stauts] 0 表示运行结果成功,其它则失败
# compile_success 1 表示成功; 0表示失败
# msg 错误信息
# output 为测试用户编译输出结果
# myshixun:status 1为完成实训
@ -526,7 +527,7 @@ class MyshixunsController < ApplicationController
logger.info("training_task_status start#3**#{game_id}**** #{Time.now.strftime("%Y-%m-%d %H:%M:%S.%L")}")
# status0表示评测成功
if status == "0"
if compile_success.to_i == 1 && status == "0"
if !resubmit.blank?
game.update_attributes!(:retry_status => 2, :resubmit_identifier => resubmit)
#if game.had_done == 1

@ -46,7 +46,7 @@ module SubjectsHelper
content = if (shixun.status == 2 && !shixun.hidden) || User.current.manager_of_shixun?(shixun)
content_before = "<a href=\"#{shixun_path(shixun)}\" class=\"mr30 color-blue_4C shixun_detail pointer fl none\" target=\"_blank\">查看详情</a>"
if User.current.try(:mail).blank?
%Q{<a class="btn_auto user_bluebg_btn fl none" onclick="sure_box_redirect_without_newtab_btn('#{security_settings_path}', '开启实训,请先绑定邮箱','绑定邮箱');" id = "shixun_operation">开始实战</a>}
%Q{<a class="btn_auto user_bluebg_btn fl none" onclick="sure_box_redirect_without_newtab_btn('#{my_account_path}', '开启实训,请先绑定邮箱','绑定邮箱');" id = "shixun_operation">开始实战</a>}
elsif shixun.challenges_count > 0
if is_modify.blank?
%Q{#{link_to '开始实战', shixun_exec_shixun_path(shixun, :is_subject => subject.id), :class => "btn_auto user_bluebg_btn fl none", :id => "shixun_operation", :target => "_blank"}}

Loading…
Cancel
Save