Signed-off-by: alan <547533434@qq.com>

memcached_alan
alan 11 years ago
parent d96843a1d5
commit 479a1249ae

@ -36,7 +36,7 @@ class Course < ActiveRecord::Base
acts_as_attachable :view_permission => :view_course_files, acts_as_attachable :view_permission => :view_course_files,
:delete_permission => :manage_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 :class_period, :with =>/^[1-9]\d*$/
validates_format_of :name,:with =>/^[^ ]+[a-zA-Z0-9_\u4e00-\u9fa5\s\S]+$/ validates_format_of :name,:with =>/^[^ ]+[a-zA-Z0-9_\u4e00-\u9fa5\s\S]+$/
validates_length_of :description, :maximum => 10000 validates_length_of :description, :maximum => 10000

@ -79,7 +79,8 @@
<td> <td>
<%=link_to l(:field_homepage), home_path %> > <%=link_to l(:field_homepage), home_path %> >
<a href="http://<%= Setting.host_contest %>" class="link_other_item"> <a href="http://<%= Setting.host_contest %>" class="link_other_item">
<%=l(:label_courses_management_platform)%> <%=l(:label_contests_management_platform)%>
</a> > </a> >
<span title="<%= @contest.name%>"> <span title="<%= @contest.name%>">
<%= link_to h(truncate(@contest.name, length: 20, omission: '...')), show_contest_contest_path(@contest) %> <%= link_to h(truncate(@contest.name, length: 20, omission: '...')), show_contest_contest_path(@contest) %>

Loading…
Cancel
Save