Signed-off-by: alan <547533434@qq.com>
This commit is contained in:
parent
d96843a1d5
commit
479a1249ae
|
@ -36,7 +36,7 @@ class Course < ActiveRecord::Base
|
|||
acts_as_attachable :view_permission => :view_course_files,
|
||||
:delete_permission => :manage_files
|
||||
|
||||
validates_presence_of :password, :term,:name,
|
||||
validates_presence_of :password, :term,:name
|
||||
validates_format_of :class_period, :with =>/^[1-9]\d*$/
|
||||
validates_format_of :name,:with =>/^[^ ]+[a-zA-Z0-9_\u4e00-\u9fa5\s\S]+$/
|
||||
validates_length_of :description, :maximum => 10000
|
||||
|
|
|
@ -79,7 +79,8 @@
|
|||
<td>
|
||||
<%=link_to l(:field_homepage), home_path %> >
|
||||
<a href="http://<%= Setting.host_contest %>" class="link_other_item">
|
||||
<%=l(:label_courses_management_platform)%>
|
||||
<%=l(:label_contests_management_platform)%>
|
||||
|
||||
</a> >
|
||||
<span title="<%= @contest.name%>">
|
||||
<%= link_to h(truncate(@contest.name, length: 20, omission: '...')), show_contest_contest_path(@contest) %>
|
||||
|
|
Loading…
Reference in New Issue