From 51bf1cd678f0d1fb40b71e5d1d4be39c3a27c5e1 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 29 Aug 2015 09:53:16 +0800 Subject: [PATCH 01/15] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=94=AF=E6=8C=81enter=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_show_user_homeworks.html.erb | 8 ++++---- config/routes.rb | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/users/_show_user_homeworks.html.erb b/app/views/users/_show_user_homeworks.html.erb index 09413ddce..c14278de3 100644 --- a/app/views/users/_show_user_homeworks.html.erb +++ b/app/views/users/_show_user_homeworks.html.erb @@ -4,10 +4,10 @@
-
- - -
+ <%= form_tag user_search_homeworks_user_path(User.current.id), :multipart => true, :remote => true, :class => "coursesSearchBox" do%> + + + <% end%>
<%= form_tag(user_select_homework_users_path, :multipart => true,:remote => true,:name=>"select_homework_form",:id=>'select_homework_form') do %>
diff --git a/config/routes.rb b/config/routes.rb index 7237787bd..be1a0a263 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -328,7 +328,7 @@ RedmineApp::Application.routes.draw do match 'user_visitorlist', :to => 'users#user_visitorlist', :via => :get match 'user_homeworks', :to => 'users#user_homeworks', :via => :get get 'user_import_homeworks' - get 'user_search_homeworks' + post 'user_search_homeworks' get 'user_import_resource' match 'watch_projects', :to => 'users#watch_projects', :via => :get # From a23ec96508a456c6e30ea0d92d3df46000d9ec6d Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 29 Aug 2015 10:07:36 +0800 Subject: [PATCH 02/15] =?UTF-8?q?=E5=AD=A6=E6=A0=A1=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E6=8A=A5404?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/routes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/routes.rb b/config/routes.rb index be1a0a263..8451b7365 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -42,7 +42,7 @@ RedmineApp::Application.routes.draw do end - resources :school do + resources :school, :except => [:show] do collection do end From 2d00eb982c4250066a666a8027a8136a61484ffc Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 29 Aug 2015 10:31:53 +0800 Subject: [PATCH 03/15] =?UTF-8?q?=E5=8F=96=E6=B6=88=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E5=88=B0=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/new.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/courses/new.html.erb b/app/views/courses/new.html.erb index 75979d9f3..8c7a41ddc 100644 --- a/app/views/courses/new.html.erb +++ b/app/views/courses/new.html.erb @@ -50,7 +50,7 @@
  • 提交 - 取消 + <%= link_to "取消",user_activities_path(User.current.id),:class => "blue_btn grey_btn fl c_white"%>
  • <% end%> From 4d1fc0dc458042e81534e78554efd77b28f3c870 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 29 Aug 2015 10:54:45 +0800 Subject: [PATCH 04/15] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=BA=95=E9=83=A8?= =?UTF-8?q?=E5=AF=BC=E8=88=AA=E6=A0=8F=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/base.css | 4 ++-- public/stylesheets/header.css | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/stylesheets/base.css b/public/stylesheets/base.css index fa1bbdd4a..7cd048dde 100644 --- a/public/stylesheets/base.css +++ b/public/stylesheets/base.css @@ -1,7 +1,7 @@ /* CSS Document */ /* 2015-06-26 */ -body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{ margin:0; padding:0;} -body,table,input,textarea,select,button { font-family: "微软雅黑","宋体"; font-size:12px;line-height:1.5;} +.navContainer h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{ margin:0; padding:0;} +.navContainer body,table,input,textarea,select,button { font-family: "微软雅黑","宋体"; font-size:12px;line-height:1.5;} div,img,tr,td,table{ border:0;} table,tr,td{border:0;cellspacing:0; cellpadding:0;} ol,ul,li{ list-style-type:none} diff --git a/public/stylesheets/header.css b/public/stylesheets/header.css index 33c92809b..2ba6f0bbf 100644 --- a/public/stylesheets/header.css +++ b/public/stylesheets/header.css @@ -97,9 +97,9 @@ a.topnav_login_box:hover {color:#a1ebff;} /*底部*/ #Footer{background-color:#ffffff; padding-bottom:15px; color:#666666;} /*margin-bottom:10px;*/ .footerAboutContainer {width:auto; border-bottom:1px solid #efefef;} -.footerAbout{ width:455px; margin:0 auto;height:35px; line-height:35px;} +.footerAbout{ width:485px; margin:0 auto;height:35px; line-height:35px;} .languageBox {width:55px; height:20px; margin-left:5px; outline:none; color:#666666; border:1px solid #d9d9d9;} -.departments{ width:890px; margin:5px auto 0 auto;height:30px;line-height:30px;} +.departments{ width:950px; margin:5px auto 0 auto;height:30px;line-height:30px;} .copyright{ width:375px; margin:0 auto;height:20px;line-height:20px;} a.f_grey {color:#666666 !important;} a.f_grey:hover {color:#000000 !important;} From 189405f0a9848b259988802b7d3a0790a9f0aec0 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 29 Aug 2015 10:58:45 +0800 Subject: [PATCH 05/15] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=9C=89=E9=83=A8=E5=88=86=E6=96=87=E6=9C=AC=E9=87=8D=E5=8F=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/base.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/stylesheets/base.css b/public/stylesheets/base.css index 7cd048dde..7e2376add 100644 --- a/public/stylesheets/base.css +++ b/public/stylesheets/base.css @@ -1,6 +1,6 @@ /* CSS Document */ /* 2015-06-26 */ -.navContainer h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{ margin:0; padding:0;} +.navContainer h1,h2,h3,h4,h5,h6,hr,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{ margin:0; padding:0;} .navContainer body,table,input,textarea,select,button { font-family: "微软雅黑","宋体"; font-size:12px;line-height:1.5;} div,img,tr,td,table{ border:0;} table,tr,td{border:0;cellspacing:0; cellpadding:0;} From 00ab2bcbd48a1792c4bc6bd2d3b4b0b8e3b5cd81 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 29 Aug 2015 11:09:19 +0800 Subject: [PATCH 06/15] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E8=BF=87=E9=95=BF=E8=B6=85=E5=87=BA=E8=BE=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_user_homework_list.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/_user_homework_list.html.erb b/app/views/users/_user_homework_list.html.erb index 7998128e0..fa9b1537a 100644 --- a/app/views/users/_user_homework_list.html.erb +++ b/app/views/users/_user_homework_list.html.erb @@ -11,7 +11,7 @@ TO <%= link_to homework_common.course.name, course_path(homework_common.course_id), :class => "newsBlue ml15"%>
    -
    + From 86e9ec068f6b2831cd7d5ae566715803826fd1d0 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 29 Aug 2015 11:12:18 +0800 Subject: [PATCH 07/15] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E4=BD=9C=E4=B8=9A=E6=88=AA=E6=AD=A2=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 555c67d13..a95559554 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -352,7 +352,7 @@ class UsersController < ApplicationController homework = HomeworkCommon.new homework.name = params[:homework_common][:name] homework.description = params[:homework_common][:description] - homework.end_time = params[:homework_common][:end_time] + homework.end_time = params[:homework_common][:end_time] || Time.now homework.publish_time = Time.now homework.homework_type = 1 homework.late_penalty = 2 From 726359885187e7d3a9e5eb9054d6365a81a5e194 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 29 Aug 2015 11:17:46 +0800 Subject: [PATCH 08/15] =?UTF-8?q?=E8=AE=BF=E9=97=AE=E9=97=AE=E5=8D=B7?= =?UTF-8?q?=E6=8A=A5500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/poll_helper.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/helpers/poll_helper.rb b/app/helpers/poll_helper.rb index 170e1b92c..84e12f3b1 100644 --- a/app/helpers/poll_helper.rb +++ b/app/helpers/poll_helper.rb @@ -37,7 +37,17 @@ module PollHelper pv.vote_text end end - + + #判断用户是否已经提交了问卷 + def has_commit_poll?(poll_id,user_id) + pu = PollUser.find_by_poll_id_and_user_id(poll_id,user_id) + if pu.nil? + false + else + true + end + end + #统计答题百分比,统计结果保留两位小数 def statistics_result_percentage(e, t) e = e.to_f From e5bf355a1718c042f4bd793e8b02e737034558ad Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 29 Aug 2015 11:28:02 +0800 Subject: [PATCH 09/15] =?UTF-8?q?=E5=AF=BC=E8=88=AA=E6=A0=8F=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=94=AF=E6=8C=81enter=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_logined_header.html.erb | 13 +++++++++++-- app/views/layouts/_unlogin_header.html.erb | 13 +++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb index e48864305..56e4bef5f 100644 --- a/app/views/layouts/_logined_header.html.erb +++ b/app/views/layouts/_logined_header.html.erb @@ -19,7 +19,7 @@