diff --git a/app/views/courses/settings/_student_table.html.erb b/app/views/courses/settings/_student_table.html.erb index 3248e4616..aadc76717 100644 --- a/app/views/courses/settings/_student_table.html.erb +++ b/app/views/courses/settings/_student_table.html.erb @@ -1,7 +1,7 @@ - - - - - - - - - + + + + + + + + diff --git a/app/views/managements/_shixun_list.html.erb b/app/views/managements/_shixun_list.html.erb index 20e8ebd8b..48d58a16c 100644 --- a/app/views/managements/_shixun_list.html.erb +++ b/app/views/managements/_shixun_list.html.erb @@ -1,12 +1,13 @@
+ <% unless is_teacher %> 序号 @@ -11,14 +11,14 @@ <% end %> 用户ID姓名学号分班作业成绩发布资源发布帖子回复评论用户ID姓名学号分班作业成绩发布资源发布帖子回复评论
- + + - + @@ -16,10 +17,17 @@ + - +
ID实训名称实训名称 技术平台Fork源 实践任务 选择任务 状态创建者创建者 创建时间 color-light-green ml5" title="功能完善中,敬请期待"> 操作
<%= shixun.identifier %> <%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %> <%= shixun.language %> + <% unless shixun.try(:fork_from).nil? %> + <%= link_to shixun.try(:fork_from),shixun_path(shixun), target: '_blank'%> + <% else%> + -- + <% end%> + <%= shixun.challenges.where(:st => 0).count %> <%= shixun.challenges.where(:st => 1).count %> <%= shixun_authentication_status shixun %><%= shixun.owner.try(:show_real_name) %><%= link_to shixun.owner.try(:show_real_name),user_path(shixun.user_id),target:'_blank' %> <%= format_time shixun.created_at %> diff --git a/db/migrate/20171013081923_add_school_id_code_to_schools.rb b/db/migrate/20171013081923_add_school_id_code_to_schools.rb new file mode 100644 index 000000000..8b45b30b2 --- /dev/null +++ b/db/migrate/20171013081923_add_school_id_code_to_schools.rb @@ -0,0 +1,18 @@ +class AddSchoolIdCodeToSchools < ActiveRecord::Migration + def change + add_column :schools, :shool_code, :string + count = School.all.count / 30 + 2 + transaction do + for i in 1 ... count do i + School.page(i).per(30).each do |school| + if school.city.nil? || school.province.nil? || school.address.nil? + apply_add_school = ApplyAddSchools.where(:school_id => school.id).last + if apply_add_school + school.update_attributes(:city => apply_add_school.city, :province => apply_add_school.province, :address => apply_add_school.address) + end + end + end + end + end + end +end diff --git a/db/migrate/20171013083722_add_new_column_to_department.rb b/db/migrate/20171013083722_add_new_column_to_department.rb new file mode 100644 index 000000000..d005a2ba2 --- /dev/null +++ b/db/migrate/20171013083722_add_new_column_to_department.rb @@ -0,0 +1,11 @@ +class AddNewColumnToDepartment < ActiveRecord::Migration + def change + add_column :departments, :is_auth, :boolean, :default => 0 + + Department.where("0=0").each do |dep| + if ApplyAddDepartment.where(:department_id => dep.id, :status => 1).count > 0 + dep.update_column("is_auth", 1) + end + end + end +end