From 0a7e785a1dd208756b9c23be25b600731e1408bc Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 11 Aug 2017 17:21:29 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=87=91=E5=B8=81=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 1c098ae1b..999faaf64 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -155,16 +155,16 @@ module ApplicationHelper grade = Grade.where(:user_id => user.id, :container_id => container_id, :container_type => container_type).first if grade.nil? Grade.create!(:user_id => user.id, :container_id => container_id, :container_type => container_type, :score => score) + user.update_column(:grade, (score.to_i + user.grade.to_i)) end - user.update_column(:grade, (score.to_i + user.grade.to_i)) end def reward_experience(user, container_id, container_type, score) experience = Experience.where(:user_id => user.id, :container_id => container_id, :container_type => container_type).first if experience.nil? Experience.create!(:user_id => user.id, :container_id => container_id, :container_type => container_type, :score => score) + user.update_column(:experience, (score.to_i + user.experience.to_i)) end - user.update_column(:experience, (score.to_i + user.experience.to_i)) end # codeMirror语言转换 From d5a04929149385cfa0c0f0b3b3ea0d60bc040d8a Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 11 Aug 2017 17:21:42 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E7=AD=89=E5=BE=85=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/shixuns/_shixun_top.html.erb | 7 ++++++- public/images/bigdata/shenglue-ring.gif | Bin 0 -> 1191 bytes public/javascripts/application.js | 4 ++++ public/javascripts/edu/shixun.js | 4 ++++ public/stylesheets/css/taskstyle.css | 8 ++++++++ 5 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 public/images/bigdata/shenglue-ring.gif diff --git a/app/views/shixuns/_shixun_top.html.erb b/app/views/shixuns/_shixun_top.html.erb index 8f56ebd11..b248dfc1d 100644 --- a/app/views/shixuns/_shixun_top.html.erb +++ b/app/views/shixuns/_shixun_top.html.erb @@ -46,7 +46,12 @@ <% end %> - +
+
+
EDUCODER
+

LOADING

+
+