remove unused columns from courses
Change-Id: I064fbde82894820bacc8604779a75c8aeb060092 Reviewed-on: https://gerrit.instructure.com/5633 Tested-by: Hudson <hudson@instructure.com> Reviewed-by: Jacob Fugal <jacob@instructure.com>
This commit is contained in:
parent
28e34154d6
commit
24485249b1
|
@ -262,7 +262,7 @@ class Account < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def fast_course_base(opts)
|
||||
columns = "courses.id, courses.name, courses.section, courses.workflow_state, courses.course_code, courses.sis_source_id"
|
||||
columns = "courses.id, courses.name, courses.workflow_state, courses.course_code, courses.sis_source_id"
|
||||
associated_courses = self.associated_courses.active
|
||||
associated_courses = associated_courses.with_enrollments if opts[:hide_enrollmentless_courses]
|
||||
associated_courses = associated_courses.for_term(opts[:term]) if opts[:term].present?
|
||||
|
|
|
@ -36,7 +36,6 @@ class Course < ActiveRecord::Base
|
|||
:hashtag,
|
||||
:show_public_context_messages,
|
||||
:syllabus_body,
|
||||
:hidden_tabs,
|
||||
:allow_student_forum_attachments,
|
||||
:default_wiki_editing_roles,
|
||||
:allow_student_organized_groups,
|
||||
|
@ -1925,7 +1924,7 @@ class Course < ActiveRecord::Base
|
|||
[ :group_weighting_scheme, :grading_standard_id, :is_public,
|
||||
:publish_grades_immediately, :allow_student_wiki_edits,
|
||||
:allow_student_assignment_edits, :hashtag, :show_public_context_messages,
|
||||
:syllabus_body, :hidden_tabs, :allow_student_forum_attachments,
|
||||
:syllabus_body, :allow_student_forum_attachments,
|
||||
:default_wiki_editing_roles, :allow_student_organized_groups,
|
||||
:default_view, :show_all_discussion_entries, :open_enrollment,
|
||||
:storage_quota, :tab_configuration, :allow_wiki_comments,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<li class="course" id="course_<%= course ? course.id : "blank" %>" style="<%= hidden unless course %>">
|
||||
<div class="course <%= 'unpublished' if course && course.read_attribute(:workflow_state) && (course.created? || course.claimed?) %>">
|
||||
<div class="name">
|
||||
<a href="<%= course_path(course ? course.id : "{{ id }}") %>" class="name"><%= (course && (course.name || course.section)) || nbsp %></a>
|
||||
<a href="<%= course_path(course ? course.id : "{{ id }}") %>" class="name"><%= (course && course.name) || nbsp %></a>
|
||||
<%= image_tag "hammer.png", :title => t(:course_unpublished_title, "This course hasn't been published yet"), :alt => t(:course_unpublished_tooltip, "Unpublished"), :class => "unpublished_icon", :style => (course && course.read_attribute(:workflow_state) && (course.created? || course.claimed?) ? "" : "display: none;") %>
|
||||
</div>
|
||||
<% if course %>
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
class RemoveSectionAndHiddenTabsFromCourses < ActiveRecord::Migration
|
||||
def self.up
|
||||
remove_column :courses, :section
|
||||
remove_column :courses, :hidden_tabs
|
||||
end
|
||||
|
||||
def self.down
|
||||
add_column :courses, :section, :string
|
||||
add_column :courses, :hidden_tabs, :text
|
||||
end
|
||||
end
|
|
@ -25,7 +25,7 @@ module Canvas::MigratorHelper
|
|||
OVERVIEW_JSON = "overview.json"
|
||||
ALL_FILES_ZIP = "all_files.zip"
|
||||
|
||||
COURSE_NO_COPY_ATTS = [:name, :course_code, :start_at, :conclude_at, :grading_standard_id, :hidden_tabs, :tab_configuration, :syllabus_body, :storage_quota]
|
||||
COURSE_NO_COPY_ATTS = [:name, :course_code, :start_at, :conclude_at, :grading_standard_id, :tab_configuration, :syllabus_body, :storage_quota]
|
||||
|
||||
attr_reader :overview
|
||||
|
||||
|
|
|
@ -39,7 +39,6 @@ end
|
|||
def course_valid_attributes
|
||||
{
|
||||
:name => 'value for name',
|
||||
:section => 'value for section',
|
||||
:group_weighting_scheme => 'value for group_weighting_scheme',
|
||||
:start_at => Time.now,
|
||||
:conclude_at => Time.now + 100,
|
||||
|
|
Loading…
Reference in New Issue