From d4ad370635592fd362a4292dae325a6fc2613466 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 23 May 2019 11:29:29 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=81=8C=E4=B8=9A=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=97=A0=E6=B3=95=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/managements/_profession_index.html.erb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/views/managements/_profession_index.html.erb b/app/views/managements/_profession_index.html.erb index f8f906b3..668aa0f1 100644 --- a/app/views/managements/_profession_index.html.erb +++ b/app/views/managements/_profession_index.html.erb @@ -37,13 +37,13 @@ <%= format_time career.created_at %> <%= format_time career.published_at %> - <%# if !career.status %> - - <%# end %> - - <%# if !career.status %> - - <%# end %> + <% if !career.status %> + 发布 + <% end %> + 编辑 + <% if !career.status %> + 删除 + <% end %> <% end %> \ No newline at end of file From fe2eab517b2e71c97fec9c76c5afab948fc5a2a8 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 23 May 2019 16:27:39 +0800 Subject: [PATCH 2/4] =?UTF-8?q?post=E4=B8=AD=E9=97=B4=E5=B1=82=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=A2=9E=E5=8A=A0=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ade22d4e..fbad5606 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1187,7 +1187,9 @@ module ApplicationHelper end res rescue Exception => e - Rails.logger.error("post failed! #{e}") + Rails.logger.error("post failed! #{e.message}") + # 增加错误栈信息 + e.backtrace.each { |msg| Rails.logger.error(msg) } raise("实训云平台繁忙(繁忙等级:#{status})") end end @@ -1198,7 +1200,7 @@ module ApplicationHelper res = Net::HTTP.get_response(uri).body res = JSON.parse(res) rescue => e - logger.error("get response failed ! #{e}") + logger.error("get response failed ! #{e.message}") raise("实训云平台繁忙(繁忙等级:84)") end end From 07e6182c7e753c0883cc782d4af03634b560ee5e Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 23 May 2019 16:28:44 +0800 Subject: [PATCH 3/4] =?UTF-8?q?post=E4=B8=AD=E9=97=B4=E5=B1=82=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=A2=9E=E5=8A=A0=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index fbad5606..55ebb3e7 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1189,7 +1189,7 @@ module ApplicationHelper rescue Exception => e Rails.logger.error("post failed! #{e.message}") # 增加错误栈信息 - e.backtrace.each { |msg| Rails.logger.error(msg) } + e.backtrace.each { |msg| Rails.logger.error("post_backtrace: #{msg}") } raise("实训云平台繁忙(繁忙等级:#{status})") end end From b124c358c9c86050d1a597b62b5a270ed79aa78b Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 23 May 2019 18:14:57 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3cedeb18..35449aad 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -6580,7 +6580,7 @@ def update_shixun_work_status homework myshixuns = Myshixun.where(:shixun_id => shixun.id, :user_id => student_works.map(&:user_id)) myshixuns.each do |myshixun| work = student_works.where(:user_id => myshixun.user_id).first - member = homework.course.members.find_by(:user_id => work.user_id) + member = homework.course.members.find_by_user_id(work.user_id) setting_time = homework_group_setting homework, member.try(:course_group_id) games = myshixun.games.where(:challenge_id => challeng_ids) myshixun_endtime = games.select{|game| game.status == 2}.size == games.size ? games.map(&:end_time).max : nil