diff --git a/app/controllers/content_exports_controller.rb b/app/controllers/content_exports_controller.rb
index 0166247ef29..af2548b366a 100644
--- a/app/controllers/content_exports_controller.rb
+++ b/app/controllers/content_exports_controller.rb
@@ -17,7 +17,7 @@
#
class ContentExportsController < ApplicationController
- before_filter :require_context
+ before_filter :require_context, :except => :xml_schema
before_filter { |c| c.active_tab = "settings" }
def index
@@ -77,7 +77,7 @@ class ContentExportsController < ApplicationController
def xml_schema
file = nil
if params[:version]
- file = Rails.root + "lib/canvas/cc/xsd/#{params[:version]}.xsd"
+ file = Rails.root + "lib/cc/xsd/#{params[:version]}.xsd"
end
if File.exists?(file)
diff --git a/app/models/content_export.rb b/app/models/content_export.rb
index 33a27291a2c..efe4a36a1ee 100644
--- a/app/models/content_export.rb
+++ b/app/models/content_export.rb
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
#
-
+require 'cc/cc'
class ContentExport < ActiveRecord::Base
include Workflow
belongs_to :course
@@ -51,7 +51,7 @@ class ContentExport < ActiveRecord::Base
self.workflow_state = 'exporting'
self.save
begin
- if Canvas::CC::CCExporter.export(self)
+ if CC::CCExporter.export(self)
self.workflow_state = 'exported'
else
self.workflow_state = 'failed'
diff --git a/lib/canvas/cc/assignment_groups.rb b/lib/cc/assignment_groups.rb
similarity index 99%
rename from lib/canvas/cc/assignment_groups.rb
rename to lib/cc/assignment_groups.rb
index d5bfd601170..f06dacdac59 100644
--- a/lib/canvas/cc/assignment_groups.rb
+++ b/lib/cc/assignment_groups.rb
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
#
-module Canvas::CC
+module CC
module AssignmentGroups
def create_assignment_groups
return nil unless @course.assignment_groups.active.count > 0
diff --git a/lib/canvas/cc/assignment_resources.rb b/lib/cc/assignment_resources.rb
similarity index 99%
rename from lib/canvas/cc/assignment_resources.rb
rename to lib/cc/assignment_resources.rb
index 4005c097794..01fa061be9e 100644
--- a/lib/canvas/cc/assignment_resources.rb
+++ b/lib/cc/assignment_resources.rb
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
#
-module Canvas::CC
+module CC
module AssignmentResources
def add_assignments
diff --git a/lib/canvas/cc/basic_lti_links.rb b/lib/cc/basic_lti_links.rb
similarity index 99%
rename from lib/canvas/cc/basic_lti_links.rb
rename to lib/cc/basic_lti_links.rb
index 62f86e12dcc..ddc1df39a45 100644
--- a/lib/canvas/cc/basic_lti_links.rb
+++ b/lib/cc/basic_lti_links.rb
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
#
-module Canvas::CC
+module CC
module BasicLTILinks
def create_basic_lti_links
return nil unless @manifest.basic_ltis.length > 0
diff --git a/lib/canvas/cc/canvas_resource.rb b/lib/cc/canvas_resource.rb
similarity index 99%
rename from lib/canvas/cc/canvas_resource.rb
rename to lib/cc/canvas_resource.rb
index 46ae1138f84..d3f933be009 100644
--- a/lib/canvas/cc/canvas_resource.rb
+++ b/lib/cc/canvas_resource.rb
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
#
-module Canvas::CC
+module CC
module CanvasResource
include ModuleMeta
include ExternalFeeds
diff --git a/lib/canvas/cc/cc.rb b/lib/cc/cc.rb
similarity index 61%
rename from lib/canvas/cc/cc.rb
rename to lib/cc/cc.rb
index c3817726e59..1b0b4e79a29 100644
--- a/lib/canvas/cc/cc.rb
+++ b/lib/cc/cc.rb
@@ -21,20 +21,20 @@ require 'set'
require 'zip/zip'
# Canvas Common Cartridge
-module Canvas::CC
+module CC
end
-require 'canvas/cc/cc_helper'
-require 'canvas/cc/cc_exporter'
-require 'canvas/cc/manifest'
-require 'canvas/cc/wiki_resources'
-require 'canvas/cc/module_meta'
-require 'canvas/cc/learning_outcomes'
-require "canvas/cc/canvas_resource"
-require "canvas/cc/assignment_resources"
-require "canvas/cc/topic_resources"
-require "canvas/cc/web_resources"
-require "canvas/cc/web_links"
-require 'canvas/cc/resource'
-require 'canvas/cc/organization'
-require 'canvas/cc/qti/qti'
+require 'cc/cc_helper'
+require 'cc/cc_exporter'
+require 'cc/manifest'
+require 'cc/wiki_resources'
+require 'cc/module_meta'
+require 'cc/learning_outcomes'
+require "cc/canvas_resource"
+require "cc/assignment_resources"
+require "cc/topic_resources"
+require "cc/web_resources"
+require "cc/web_links"
+require 'cc/resource'
+require 'cc/organization'
+require 'cc/qti/qti'
diff --git a/lib/canvas/cc/cc_exporter.rb b/lib/cc/cc_exporter.rb
similarity index 99%
rename from lib/canvas/cc/cc_exporter.rb
rename to lib/cc/cc_exporter.rb
index 72a0b7c2544..a2c9e4e0d6c 100644
--- a/lib/canvas/cc/cc_exporter.rb
+++ b/lib/cc/cc_exporter.rb
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
#
-module Canvas::CC
+module CC
class CCExporter
attr_accessor :course, :user, :export_dir, :manifest, :zip_file
diff --git a/lib/canvas/cc/cc_helper.rb b/lib/cc/cc_helper.rb
similarity index 99%
rename from lib/canvas/cc/cc_helper.rb
rename to lib/cc/cc_helper.rb
index 8045a2548d6..e9ebbe74c8b 100644
--- a/lib/canvas/cc/cc_helper.rb
+++ b/lib/cc/cc_helper.rb
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
#
-module Canvas::CC
+module CC
module CCHelper
CANVAS_NAMESPACE = 'http://canvas.instructure.com/xsd/cccv1p0'
diff --git a/lib/canvas/cc/external_feeds.rb b/lib/cc/external_feeds.rb
similarity index 98%
rename from lib/canvas/cc/external_feeds.rb
rename to lib/cc/external_feeds.rb
index fe34f20df6f..e02f382a453 100644
--- a/lib/canvas/cc/external_feeds.rb
+++ b/lib/cc/external_feeds.rb
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
#
-module Canvas::CC
+module CC
module ExternalFeeds
def create_external_feeds
return nil unless @course.external_feeds.count > 0
diff --git a/lib/canvas/cc/grading_standards.rb b/lib/cc/grading_standards.rb
similarity index 98%
rename from lib/canvas/cc/grading_standards.rb
rename to lib/cc/grading_standards.rb
index 2f71cb0895b..b23e515ebae 100644
--- a/lib/canvas/cc/grading_standards.rb
+++ b/lib/cc/grading_standards.rb
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
#
-module Canvas::CC
+module CC
module GradingStandards
def create_grading_standards
return nil unless @course.grading_standards.count > 0
diff --git a/lib/canvas/cc/learning_outcomes.rb b/lib/cc/learning_outcomes.rb
similarity index 99%
rename from lib/canvas/cc/learning_outcomes.rb
rename to lib/cc/learning_outcomes.rb
index f4f9da365c1..3033aadd40d 100644
--- a/lib/canvas/cc/learning_outcomes.rb
+++ b/lib/cc/learning_outcomes.rb
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
#
-module Canvas::CC
+module CC
module LearningOutcomes
def create_learning_outcomes
return nil unless LearningOutcome.active.find_all_by_context_id_and_context_type(@course.id, 'Course').count > 0
diff --git a/lib/canvas/cc/manifest.rb b/lib/cc/manifest.rb
similarity index 99%
rename from lib/canvas/cc/manifest.rb
rename to lib/cc/manifest.rb
index a4de04f30c1..d46277ce779 100644
--- a/lib/canvas/cc/manifest.rb
+++ b/lib/cc/manifest.rb
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
#
-module Canvas::CC
+module CC
class Manifest
include CCHelper
diff --git a/lib/canvas/cc/module_meta.rb b/lib/cc/module_meta.rb
similarity index 99%
rename from lib/canvas/cc/module_meta.rb
rename to lib/cc/module_meta.rb
index 7546029f0a0..9ffcdc578dd 100644
--- a/lib/canvas/cc/module_meta.rb
+++ b/lib/cc/module_meta.rb
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
#
-module Canvas::CC
+module CC
module ModuleMeta
def create_module_meta
return nil unless @course.context_modules.active.count > 0
diff --git a/lib/canvas/cc/organization.rb b/lib/cc/organization.rb
similarity index 99%
rename from lib/canvas/cc/organization.rb
rename to lib/cc/organization.rb
index 5aa2f59fa62..40e59285684 100644
--- a/lib/canvas/cc/organization.rb
+++ b/lib/cc/organization.rb
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
#
-module Canvas::CC
+module CC
class Organization
include CCHelper
diff --git a/lib/canvas/cc/qti/qti.rb b/lib/cc/qti/qti.rb
similarity index 94%
rename from lib/canvas/cc/qti/qti.rb
rename to lib/cc/qti/qti.rb
index 77d329ed991..2a9bde560ab 100644
--- a/lib/canvas/cc/qti/qti.rb
+++ b/lib/cc/qti/qti.rb
@@ -20,5 +20,5 @@ module Canvas:CC
end
end
-require 'canvas/cc/qti/qti_generator'
+require 'cc/qti/qti_generator'
diff --git a/lib/canvas/cc/qti/qti_generator.rb b/lib/cc/qti/qti_generator.rb
similarity index 99%
rename from lib/canvas/cc/qti/qti_generator.rb
rename to lib/cc/qti/qti_generator.rb
index 9c1a1636025..8fe6986bb09 100644
--- a/lib/canvas/cc/qti/qti_generator.rb
+++ b/lib/cc/qti/qti_generator.rb
@@ -15,10 +15,10 @@
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
#
-module Canvas::CC
+module CC
module QTI
class QTIGenerator
- include Canvas::CC::CCHelper
+ include CC::CCHelper
include QTIItems
def initialize(manifest, resources_node)
diff --git a/lib/canvas/cc/qti/qti_items.rb b/lib/cc/qti/qti_items.rb
similarity index 99%
rename from lib/canvas/cc/qti/qti_items.rb
rename to lib/cc/qti/qti_items.rb
index 839f9bdc727..0a929d61c5f 100644
--- a/lib/canvas/cc/qti/qti_items.rb
+++ b/lib/cc/qti/qti_items.rb
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
#
-module Canvas::CC
+module CC
module QTI
module QTIItems
diff --git a/lib/canvas/cc/resource.rb b/lib/cc/resource.rb
similarity index 99%
rename from lib/canvas/cc/resource.rb
rename to lib/cc/resource.rb
index 43a1ba86d74..2fc5c8bf2c2 100644
--- a/lib/canvas/cc/resource.rb
+++ b/lib/cc/resource.rb
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
#
-module Canvas::CC
+module CC
class Resource
include CCHelper
include WikiResources
diff --git a/lib/canvas/cc/rubrics.rb b/lib/cc/rubrics.rb
similarity index 99%
rename from lib/canvas/cc/rubrics.rb
rename to lib/cc/rubrics.rb
index 6a8109b9d19..0fd7a8a6332 100644
--- a/lib/canvas/cc/rubrics.rb
+++ b/lib/cc/rubrics.rb
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
#
-module Canvas::CC
+module CC
module Rubrics
def create_rubrics
return nil unless @course.rubrics.active.count > 0
diff --git a/lib/canvas/cc/topic_resources.rb b/lib/cc/topic_resources.rb
similarity index 99%
rename from lib/canvas/cc/topic_resources.rb
rename to lib/cc/topic_resources.rb
index 6bc5f6f5c05..e950dee27cd 100644
--- a/lib/canvas/cc/topic_resources.rb
+++ b/lib/cc/topic_resources.rb
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
#
-module Canvas::CC
+module CC
module TopicResources
def add_topics
diff --git a/lib/canvas/cc/web_links.rb b/lib/cc/web_links.rb
similarity index 98%
rename from lib/canvas/cc/web_links.rb
rename to lib/cc/web_links.rb
index cbb4a850143..fba2b0c52b8 100644
--- a/lib/canvas/cc/web_links.rb
+++ b/lib/cc/web_links.rb
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
#
-module Canvas::CC
+module CC
module WebLinks
def add_web_links
@manifest.weblinks.each do |tag|
diff --git a/lib/canvas/cc/web_resources.rb b/lib/cc/web_resources.rb
similarity index 98%
rename from lib/canvas/cc/web_resources.rb
rename to lib/cc/web_resources.rb
index 6ae37dcfcc4..a5e45a1f1bb 100644
--- a/lib/canvas/cc/web_resources.rb
+++ b/lib/cc/web_resources.rb
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
#
-module Canvas::CC
+module CC
module WebResources
def add_course_files
course_folder = Folder.root_folders(@course).first
diff --git a/lib/canvas/cc/wiki_resources.rb b/lib/cc/wiki_resources.rb
similarity index 98%
rename from lib/canvas/cc/wiki_resources.rb
rename to lib/cc/wiki_resources.rb
index 4f76bcbe5d0..20f7d5edc7a 100644
--- a/lib/canvas/cc/wiki_resources.rb
+++ b/lib/cc/wiki_resources.rb
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see .
#
-module Canvas::CC
+module CC
module WikiResources
def add_wiki_pages
diff --git a/lib/canvas/cc/xsd/cccv1p0.xsd b/lib/cc/xsd/cccv1p0.xsd
similarity index 100%
rename from lib/canvas/cc/xsd/cccv1p0.xsd
rename to lib/cc/xsd/cccv1p0.xsd