已结束课程显示正常
This commit is contained in:
parent
24d7234fec
commit
a4557d4d19
|
@ -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|
|
||||
|
|
Loading…
Reference in New Issue