部分BUG修正

This commit is contained in:
nwb 2014-06-30 17:26:11 +08:00
parent 25a3114a5a
commit e863c30352
2 changed files with 4 additions and 4 deletions

View File

@ -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
#<EFBFBD><EFBFBD><EFBFBD>course_id<EFBFBD><EFBFBD>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
#获取课程
#<EFBFBD><EFBFBD>ȡ<EFBFBD>γ<EFBFBD>
def find_course
@course= Course.find(params[:id])
rescue ActiveRecord::RecordNotFound

View File

@ -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 %>