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 = %w|index|
|
||||||
!displayed_flag.include?(params['action'])
|
!displayed_flag.include?(params['action'])
|
||||||
end
|
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
|
end
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
<!-- modified by bai -->
|
<!-- modified by bai -->
|
||||||
<div style="position:relative;float:left;margin-top:-2px;margin-left: 160px">
|
<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>
|
<%= render :partial => 'users/user_score', :locals => {:user => user}%></span>
|
||||||
</div>
|
</div>
|
||||||
<!-- end -->
|
<!-- end -->
|
||||||
|
@ -61,14 +61,17 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<% unless user.memberships.empty? %>
|
<%# unless user.memberships.empty? %>
|
||||||
<% cond = Project.visible_condition(User.current) + " AND projects.project_type = 1" %>
|
<%# cond = Project.visible_condition(User.current) + " AND projects.project_type = 1" %>
|
||||||
<% memberships = user.memberships.all(:conditions => cond) %>
|
<%# memberships = user.memberships.all(:conditions => cond) %>
|
||||||
<%= l(:label_x_course_contribute_to, :count => memberships.count) %>
|
<% user_courses = user.coursememberships.map(&:course) %>
|
||||||
<% for member in memberships %>
|
<%= l(:label_x_course_contribute_to, :count => user_courses.count) %>
|
||||||
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %>
|
<% for course in user_courses %>
|
||||||
<% end %>
|
<%# if course.name != nil %>
|
||||||
|
<%= link_to course.name,course_path(course) %><%= (user_courses.last == course) ? '' : ',' %>
|
||||||
|
<%# end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<%# end %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<%= user.changesets.count == 0 ? '' : "#{l(:label_x_total_commit, :count => user.changesets.count)}" %>
|
<%= user.changesets.count == 0 ? '' : "#{l(:label_x_total_commit, :count => user.changesets.count)}" %>
|
||||||
|
|
Loading…
Reference in New Issue