Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
33c883146a
|
@ -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
|
||||
|
|
|
@ -179,6 +179,7 @@ class Attachment < ActiveRecord::Base
|
|||
File.join(self.class.storage_path, disk_directory.to_s, disk_filename.to_s)
|
||||
end
|
||||
|
||||
#标题
|
||||
def title
|
||||
title = filename.to_s
|
||||
if description.present?
|
||||
|
|
|
@ -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 %>
|
||||
|
|
Loading…
Reference in New Issue