已结束课程显示正常

This commit is contained in:
Wen 2014-04-02 17:34:06 +08:00
parent 24d7234fec
commit a4557d4d19
1 changed files with 6 additions and 3 deletions

View File

@ -165,6 +165,8 @@ class UsersController < ApplicationController
end
end
include CoursesHelper
def user_courses
unless User.current.admin?
@ -186,10 +188,11 @@ class UsersController < ApplicationController
now_time = Time.now.year
@memberships.map { |e|
end_time = e.project.course_extra.get_time.year
if end_time >= now_time
@memberships_doing.push e
else
isDone = course_endTime_timeout?(e.project)
if isDone
@memberships_done.push e
else
@memberships_doing.push e
end
}
# respond_to do |format|