From e863c3035285c74ca0221fa6c94af0762b65b0b5 Mon Sep 17 00:00:00 2001 From: nwb Date: Mon, 30 Jun 2014 17:26:11 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E5=88=86BUG=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 6 +++--- app/views/courses/finishcourse.js.erb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index af6fbd63..e6efca1e 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -94,7 +94,7 @@ class ApplicationController < ActionController::Base Setting.check_cache # Find the current user User.current = find_current_user - logger.info(" Current user: " + (User.current.logged? ? "#{User.current.login} (id=#{User.current.id})" : "anonymous")) if logger + #logger.info(" Current user: " + (User.current.logged? ? "#{User.current.login} (id=#{User.current.id})" : "anonymous")) if logger end # Returns the current user or nil if no user is logged in @@ -300,7 +300,7 @@ class ApplicationController < ActionController::Base render_404 end - #根据course_id找project + #锟斤拷锟絚ourse_id锟斤拷project def find_project_by_course_id @bid = Bid.find params[:course_id] @project = @bid.courses[0] @@ -354,7 +354,7 @@ class ApplicationController < ActionController::Base end #added by nwb - #获取课程 + #锟斤拷取锟轿筹拷 def find_course @course= Course.find(params[:id]) rescue ActiveRecord::RecordNotFound diff --git a/app/views/courses/finishcourse.js.erb b/app/views/courses/finishcourse.js.erb index e6742695..75c2b774 100644 --- a/app/views/courses/finishcourse.js.erb +++ b/app/views/courses/finishcourse.js.erb @@ -4,7 +4,7 @@ console.debug('璇剧▼淇敼鎴愬姛锛氱粨鏉熸椂闂存敼涓<%=Course.find_by_extra(@c <% end %> $('#content-title-top-div').html("<%= j(render partial: 'users/my_course_ex', :locals => {:memberships => @memberships,:user=>@user, :memberships_doing=>@memberships_doing,:memberships_done=>@memberships_done} )%>") -//$('#finish_course_ <%=@course.id%>').replaceWith("<%= j(render partial: 'courses/set_course_time', :locals => {:course => @course} )%>") +$('#finish_course_<%=@course.id%>').replaceWith("<%= j(render partial: 'courses/set_course_time', :locals => {:course => @course} )%>") <% else %> alert('鏉冮檺涓嶈冻锛岃缃け璐ワ紝璇峰湪璁哄潧鎻愪氦闂锛岀瓑寰呯鐞嗗憳澶勭悊銆'); <% end %>