Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
e618ce05a3
|
@ -12,7 +12,8 @@ class CourseGroup < ActiveRecord::Base
|
|||
before_destroy :set_member_nil
|
||||
|
||||
attr_accessible :name
|
||||
validates :name, :presence => true, :length => {:maximum => 20}, :uniqueness => true
|
||||
validates :name, :presence => true, :length => {:maximum => 20},
|
||||
:uniqueness => {case_sensitive: false}
|
||||
def set_member_nil
|
||||
if self.members && self.members.count > 0
|
||||
self.members.update_all("course_group_id = 0")
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<% if User.current.logged? && User.current.member_of_course?(@course) && @group %>
|
||||
<% if !@canShowCode %>
|
||||
<%= join_in_course_group(@course.course_groups,@group, User.current) %>
|
||||
<% end %>
|
||||
<span style="font-size: 18px; float: left; margin-right: 35px">
|
||||
<% end %>
|
||||
<span style="font-size: 12px; float: left; margin-right: 5px">
|
||||
<%= l(:label_current_group)%>:
|
||||
<%= @group.name %>
|
||||
</span>
|
||||
|
|
Loading…
Reference in New Issue