修改合并后首页出错的问题
This commit is contained in:
parent
88c3347f7c
commit
f4aa817f42
|
@ -34,7 +34,7 @@ class Course < ActiveRecord::Base
|
||||||
:delete_permission => :manage_files
|
:delete_permission => :manage_files
|
||||||
|
|
||||||
validates_presence_of :password, :term
|
validates_presence_of :password, :term
|
||||||
validates_format_of :class_period, :message => "class period can only digital!", :with =>/^[1-9]\d*$/
|
validates_format_of :class_period, :message => l(:error_class_period_only_num), :with =>/^[1-9]\d*$/
|
||||||
|
|
||||||
after_save :create_board_sync
|
after_save :create_board_sync
|
||||||
before_destroy :delete_all_members
|
before_destroy :delete_all_members
|
||||||
|
|
|
@ -66,7 +66,6 @@
|
||||||
<tr>
|
<tr>
|
||||||
<!-- modified by zjc 课程名称添加超链接 -->
|
<!-- modified by zjc 课程名称添加超链接 -->
|
||||||
<td class="info-course"><%= link_to @course.name,course_path(@course) %></td>
|
<td class="info-course"><%= link_to @course.name,course_path(@course) %></td>
|
||||||
<td class="info-course"><%= @course.name %></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
|
|
|
@ -186,6 +186,7 @@ en:
|
||||||
notice_account_deleted: "Your account has been permanently deleted."
|
notice_account_deleted: "Your account has been permanently deleted."
|
||||||
notice_user_successful_create: "User %{id} created."
|
notice_user_successful_create: "User %{id} created."
|
||||||
|
|
||||||
|
error_class_period_only_num: "class period can only digital"
|
||||||
error_can_t_load_default_data: "Default configuration could not be loaded: %{value}"
|
error_can_t_load_default_data: "Default configuration could not be loaded: %{value}"
|
||||||
error_scm_not_found: "The entry or revision was not found in the repository."
|
error_scm_not_found: "The entry or revision was not found in the repository."
|
||||||
error_scm_command_failed: "An error occurred when trying to access the repository: %{value}"
|
error_scm_command_failed: "An error occurred when trying to access the repository: %{value}"
|
||||||
|
|
|
@ -196,6 +196,7 @@ zh:
|
||||||
|
|
||||||
error_complete_occupation: "请您填写工作单位,否则本系统的部分功能将无法正常使用。"
|
error_complete_occupation: "请您填写工作单位,否则本系统的部分功能将无法正常使用。"
|
||||||
|
|
||||||
|
error_class_period_only_num: "课程学时只能为数字"
|
||||||
error_can_t_load_default_data: "无法载入默认设置:%{value}"
|
error_can_t_load_default_data: "无法载入默认设置:%{value}"
|
||||||
error_scm_not_found: "版本库中不存在该条目和(或)其修订版本。"
|
error_scm_not_found: "版本库中不存在该条目和(或)其修订版本。"
|
||||||
error_scm_command_failed: "访问版本库时发生错误:%{value}"
|
error_scm_command_failed: "访问版本库时发生错误:%{value}"
|
||||||
|
|
|
@ -3,7 +3,7 @@ class MigrateCourseStudents < ActiveRecord::Migration
|
||||||
# 原课程的学生数据迁移成新模式
|
# 原课程的学生数据迁移成新模式
|
||||||
StudentsForCourse.all.each do |student|
|
StudentsForCourse.all.each do |student|
|
||||||
project = Project.find_by_id(student.course_id)
|
project = Project.find_by_id(student.course_id)
|
||||||
if project
|
if project && project.course_extra
|
||||||
student.course_id = project.course_extra.id
|
student.course_id = project.course_extra.id
|
||||||
student.save
|
student.save
|
||||||
end
|
end
|
||||||
|
|
|
@ -105,6 +105,7 @@ module Redmine
|
||||||
if event_type.to_s != 'course_journals_for_messages'
|
if event_type.to_s != 'course_journals_for_messages'
|
||||||
cur_objs = provider.find_events1(event_type, @user, from, to, @options)
|
cur_objs = provider.find_events1(event_type, @user, from, to, @options)
|
||||||
end
|
end
|
||||||
|
if cur_objs
|
||||||
cur_objs.each do |cur_obj|
|
cur_objs.each do |cur_obj|
|
||||||
if cur_obj.class == Issue
|
if cur_obj.class == Issue
|
||||||
if cur_obj.project != nil && cur_obj.project.project_status != nil
|
if cur_obj.project != nil && cur_obj.project.project_status != nil
|
||||||
|
@ -115,6 +116,7 @@ module Redmine
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
if e.count > options[:limit]
|
if e.count > options[:limit]
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue