From d049a0065592210a17c97da7e620104d5c90302c Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 20 Oct 2015 10:28:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E4=B8=AD=E6=9C=AA=E5=8F=91=E5=B8=83=E9=97=AE?= =?UTF-8?q?=E5=8D=B7=E7=9A=84=E5=8A=A8=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20151020021234_update_course_activity.rb | 23 +++++++++++++++++++ db/schema.rb | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20151020021234_update_course_activity.rb diff --git a/db/migrate/20151020021234_update_course_activity.rb b/db/migrate/20151020021234_update_course_activity.rb new file mode 100644 index 000000000..595b0d333 --- /dev/null +++ b/db/migrate/20151020021234_update_course_activity.rb @@ -0,0 +1,23 @@ +class UpdateCourseActivity < ActiveRecord::Migration + def up + count = CourseActivity.all.count / 30 + 2 + transaction do + for i in 1 ... count do i + CourseActivity.page(i).per(30).each do |activity| + if activity.course_act + if activity.course_act_type == 'Poll' + if activity.course_act.polls_status == 1 + activity.destroy + end + end + else + activity.destroy + end + end + end + end + end + + def down + end +end diff --git a/db/schema.rb b/db/schema.rb index 41efc5698..4aa12f627 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20151020014759) do +ActiveRecord::Schema.define(:version => 20151020021234) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false From 1dd0954a9400a5508527b54de61ed35021172171 Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 20 Oct 2015 10:29:51 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=84=8F=E8=A7=81=E5=8F=8D=E9=A6=88?= =?UTF-8?q?=E5=AE=BD=E5=BA=A6=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/feedback.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/javascripts/feedback.js b/public/javascripts/feedback.js index fb3b35ca7..b30c8f91d 100644 --- a/public/javascripts/feedback.js +++ b/public/javascripts/feedback.js @@ -19,12 +19,12 @@ if(options.minStatue == "true"){ show_btn.css("float", options.float); sideContent.css('width', 0); - show_btn.css('width', 25); + show_btn.css('width', 28); } //close closeBtn.bind("click",function(){ sideContent.animate({width: '0px'},"fast"); - show_btn.stop(true, true).delay(300).animate({ width: '25px'},"fast"); + show_btn.stop(true, true).delay(300).animate({ width: '28px'},"fast"); cookiesave('minStatue','true','','',''); }); //show