1.取消软件创客界面2个个人得分显示
2.修复软件创客界面用户参与课程显示不正确的BUG 3.添加获取用户参与的未过期的项目列表
This commit is contained in:
parent
2506e8e50d
commit
1e6693cdcf
|
@ -247,4 +247,15 @@ module UsersHelper
|
|||
displayed_flag = %w|index|
|
||||
!displayed_flag.include?(params['action'])
|
||||
end
|
||||
|
||||
#获取指定用户的未过期的课程列表
|
||||
def user_courses_list user
|
||||
result = []
|
||||
user.coursememberships.map(&:course).each do |course|
|
||||
if !course_endTime_timeout?(course)
|
||||
result << course
|
||||
end
|
||||
end
|
||||
return result
|
||||
end
|
||||
end
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
<!-- modified by bai -->
|
||||
<div style="position:relative;float:left;margin-top:-2px;margin-left: 160px">
|
||||
<%= l(:label_user_grade) %>: <span style="color:#ec6300">
|
||||
<span style="color:#ec6300">
|
||||
<%= render :partial => 'users/user_score', :locals => {:user => user}%></span>
|
||||
</div>
|
||||
<!-- end -->
|
||||
|
@ -61,14 +61,17 @@
|
|||
<% end %>
|
||||
|
||||
<p>
|
||||
<% unless user.memberships.empty? %>
|
||||
<% cond = Project.visible_condition(User.current) + " AND projects.project_type = 1" %>
|
||||
<% memberships = user.memberships.all(:conditions => cond) %>
|
||||
<%= l(:label_x_course_contribute_to, :count => memberships.count) %>
|
||||
<% for member in memberships %>
|
||||
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %>
|
||||
<% end %>
|
||||
<%# unless user.memberships.empty? %>
|
||||
<%# cond = Project.visible_condition(User.current) + " AND projects.project_type = 1" %>
|
||||
<%# memberships = user.memberships.all(:conditions => cond) %>
|
||||
<% user_courses = user.coursememberships.map(&:course) %>
|
||||
<%= l(:label_x_course_contribute_to, :count => user_courses.count) %>
|
||||
<% for course in user_courses %>
|
||||
<%# if course.name != nil %>
|
||||
<%= link_to course.name,course_path(course) %><%= (user_courses.last == course) ? '' : ',' %>
|
||||
<%# end %>
|
||||
<% end %>
|
||||
<%# end %>
|
||||
</p>
|
||||
|
||||
<%= user.changesets.count == 0 ? '' : "#{l(:label_x_total_commit, :count => user.changesets.count)}" %>
|
||||
|
|
Loading…
Reference in New Issue