已结束课程显示正常
This commit is contained in:
parent
24d7234fec
commit
a4557d4d19
|
@ -165,6 +165,8 @@ class UsersController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
include CoursesHelper
|
||||||
def user_courses
|
def user_courses
|
||||||
|
|
||||||
unless User.current.admin?
|
unless User.current.admin?
|
||||||
|
@ -186,10 +188,11 @@ class UsersController < ApplicationController
|
||||||
now_time = Time.now.year
|
now_time = Time.now.year
|
||||||
@memberships.map { |e|
|
@memberships.map { |e|
|
||||||
end_time = e.project.course_extra.get_time.year
|
end_time = e.project.course_extra.get_time.year
|
||||||
if end_time >= now_time
|
isDone = course_endTime_timeout?(e.project)
|
||||||
@memberships_doing.push e
|
if isDone
|
||||||
else
|
|
||||||
@memberships_done.push e
|
@memberships_done.push e
|
||||||
|
else
|
||||||
|
@memberships_doing.push e
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
# respond_to do |format|
|
# respond_to do |format|
|
||||||
|
|
Loading…
Reference in New Issue