moved common cartridge folder up a level
refs #3396 Change-Id: I34eca357286e50b0d3d82c15e27dfb4015da45a4 Reviewed-on: https://gerrit.instructure.com/3041 Tested-by: Hudson <hudson@instructure.com> Reviewed-by: Brian Palmer <brianp@instructure.com>
This commit is contained in:
parent
76470f7592
commit
cfe4b5ffc8
|
@ -17,7 +17,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
class ContentExportsController < ApplicationController
|
class ContentExportsController < ApplicationController
|
||||||
before_filter :require_context
|
before_filter :require_context, :except => :xml_schema
|
||||||
before_filter { |c| c.active_tab = "settings" }
|
before_filter { |c| c.active_tab = "settings" }
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
@ -77,7 +77,7 @@ class ContentExportsController < ApplicationController
|
||||||
def xml_schema
|
def xml_schema
|
||||||
file = nil
|
file = nil
|
||||||
if params[:version]
|
if params[:version]
|
||||||
file = Rails.root + "lib/canvas/cc/xsd/#{params[:version]}.xsd"
|
file = Rails.root + "lib/cc/xsd/#{params[:version]}.xsd"
|
||||||
end
|
end
|
||||||
|
|
||||||
if File.exists?(file)
|
if File.exists?(file)
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License along
|
# You should have received a copy of the GNU Affero General Public License along
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
require 'cc/cc'
|
||||||
class ContentExport < ActiveRecord::Base
|
class ContentExport < ActiveRecord::Base
|
||||||
include Workflow
|
include Workflow
|
||||||
belongs_to :course
|
belongs_to :course
|
||||||
|
@ -51,7 +51,7 @@ class ContentExport < ActiveRecord::Base
|
||||||
self.workflow_state = 'exporting'
|
self.workflow_state = 'exporting'
|
||||||
self.save
|
self.save
|
||||||
begin
|
begin
|
||||||
if Canvas::CC::CCExporter.export(self)
|
if CC::CCExporter.export(self)
|
||||||
self.workflow_state = 'exported'
|
self.workflow_state = 'exported'
|
||||||
else
|
else
|
||||||
self.workflow_state = 'failed'
|
self.workflow_state = 'failed'
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License along
|
# You should have received a copy of the GNU Affero General Public License along
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
module Canvas::CC
|
module CC
|
||||||
module AssignmentGroups
|
module AssignmentGroups
|
||||||
def create_assignment_groups
|
def create_assignment_groups
|
||||||
return nil unless @course.assignment_groups.active.count > 0
|
return nil unless @course.assignment_groups.active.count > 0
|
|
@ -15,7 +15,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License along
|
# You should have received a copy of the GNU Affero General Public License along
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
module Canvas::CC
|
module CC
|
||||||
module AssignmentResources
|
module AssignmentResources
|
||||||
|
|
||||||
def add_assignments
|
def add_assignments
|
|
@ -15,7 +15,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License along
|
# You should have received a copy of the GNU Affero General Public License along
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
module Canvas::CC
|
module CC
|
||||||
module BasicLTILinks
|
module BasicLTILinks
|
||||||
def create_basic_lti_links
|
def create_basic_lti_links
|
||||||
return nil unless @manifest.basic_ltis.length > 0
|
return nil unless @manifest.basic_ltis.length > 0
|
|
@ -15,7 +15,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License along
|
# You should have received a copy of the GNU Affero General Public License along
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
module Canvas::CC
|
module CC
|
||||||
module CanvasResource
|
module CanvasResource
|
||||||
include ModuleMeta
|
include ModuleMeta
|
||||||
include ExternalFeeds
|
include ExternalFeeds
|
|
@ -21,20 +21,20 @@ require 'set'
|
||||||
require 'zip/zip'
|
require 'zip/zip'
|
||||||
|
|
||||||
# Canvas Common Cartridge
|
# Canvas Common Cartridge
|
||||||
module Canvas::CC
|
module CC
|
||||||
end
|
end
|
||||||
|
|
||||||
require 'canvas/cc/cc_helper'
|
require 'cc/cc_helper'
|
||||||
require 'canvas/cc/cc_exporter'
|
require 'cc/cc_exporter'
|
||||||
require 'canvas/cc/manifest'
|
require 'cc/manifest'
|
||||||
require 'canvas/cc/wiki_resources'
|
require 'cc/wiki_resources'
|
||||||
require 'canvas/cc/module_meta'
|
require 'cc/module_meta'
|
||||||
require 'canvas/cc/learning_outcomes'
|
require 'cc/learning_outcomes'
|
||||||
require "canvas/cc/canvas_resource"
|
require "cc/canvas_resource"
|
||||||
require "canvas/cc/assignment_resources"
|
require "cc/assignment_resources"
|
||||||
require "canvas/cc/topic_resources"
|
require "cc/topic_resources"
|
||||||
require "canvas/cc/web_resources"
|
require "cc/web_resources"
|
||||||
require "canvas/cc/web_links"
|
require "cc/web_links"
|
||||||
require 'canvas/cc/resource'
|
require 'cc/resource'
|
||||||
require 'canvas/cc/organization'
|
require 'cc/organization'
|
||||||
require 'canvas/cc/qti/qti'
|
require 'cc/qti/qti'
|
|
@ -15,7 +15,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License along
|
# You should have received a copy of the GNU Affero General Public License along
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
module Canvas::CC
|
module CC
|
||||||
class CCExporter
|
class CCExporter
|
||||||
|
|
||||||
attr_accessor :course, :user, :export_dir, :manifest, :zip_file
|
attr_accessor :course, :user, :export_dir, :manifest, :zip_file
|
|
@ -15,7 +15,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License along
|
# You should have received a copy of the GNU Affero General Public License along
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
module Canvas::CC
|
module CC
|
||||||
module CCHelper
|
module CCHelper
|
||||||
|
|
||||||
CANVAS_NAMESPACE = 'http://canvas.instructure.com/xsd/cccv1p0'
|
CANVAS_NAMESPACE = 'http://canvas.instructure.com/xsd/cccv1p0'
|
|
@ -15,7 +15,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License along
|
# You should have received a copy of the GNU Affero General Public License along
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
module Canvas::CC
|
module CC
|
||||||
module ExternalFeeds
|
module ExternalFeeds
|
||||||
def create_external_feeds
|
def create_external_feeds
|
||||||
return nil unless @course.external_feeds.count > 0
|
return nil unless @course.external_feeds.count > 0
|
|
@ -15,7 +15,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License along
|
# You should have received a copy of the GNU Affero General Public License along
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
module Canvas::CC
|
module CC
|
||||||
module GradingStandards
|
module GradingStandards
|
||||||
def create_grading_standards
|
def create_grading_standards
|
||||||
return nil unless @course.grading_standards.count > 0
|
return nil unless @course.grading_standards.count > 0
|
|
@ -15,7 +15,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License along
|
# You should have received a copy of the GNU Affero General Public License along
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
module Canvas::CC
|
module CC
|
||||||
module LearningOutcomes
|
module LearningOutcomes
|
||||||
def create_learning_outcomes
|
def create_learning_outcomes
|
||||||
return nil unless LearningOutcome.active.find_all_by_context_id_and_context_type(@course.id, 'Course').count > 0
|
return nil unless LearningOutcome.active.find_all_by_context_id_and_context_type(@course.id, 'Course').count > 0
|
|
@ -15,7 +15,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License along
|
# You should have received a copy of the GNU Affero General Public License along
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
module Canvas::CC
|
module CC
|
||||||
class Manifest
|
class Manifest
|
||||||
include CCHelper
|
include CCHelper
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License along
|
# You should have received a copy of the GNU Affero General Public License along
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
module Canvas::CC
|
module CC
|
||||||
module ModuleMeta
|
module ModuleMeta
|
||||||
def create_module_meta
|
def create_module_meta
|
||||||
return nil unless @course.context_modules.active.count > 0
|
return nil unless @course.context_modules.active.count > 0
|
|
@ -15,7 +15,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License along
|
# You should have received a copy of the GNU Affero General Public License along
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
module Canvas::CC
|
module CC
|
||||||
class Organization
|
class Organization
|
||||||
include CCHelper
|
include CCHelper
|
||||||
|
|
|
@ -20,5 +20,5 @@ module Canvas:CC
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
require 'canvas/cc/qti/qti_generator'
|
require 'cc/qti/qti_generator'
|
||||||
|
|
|
@ -15,10 +15,10 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License along
|
# You should have received a copy of the GNU Affero General Public License along
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
module Canvas::CC
|
module CC
|
||||||
module QTI
|
module QTI
|
||||||
class QTIGenerator
|
class QTIGenerator
|
||||||
include Canvas::CC::CCHelper
|
include CC::CCHelper
|
||||||
include QTIItems
|
include QTIItems
|
||||||
|
|
||||||
def initialize(manifest, resources_node)
|
def initialize(manifest, resources_node)
|
|
@ -15,7 +15,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License along
|
# You should have received a copy of the GNU Affero General Public License along
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
module Canvas::CC
|
module CC
|
||||||
module QTI
|
module QTI
|
||||||
module QTIItems
|
module QTIItems
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License along
|
# You should have received a copy of the GNU Affero General Public License along
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
module Canvas::CC
|
module CC
|
||||||
class Resource
|
class Resource
|
||||||
include CCHelper
|
include CCHelper
|
||||||
include WikiResources
|
include WikiResources
|
|
@ -15,7 +15,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License along
|
# You should have received a copy of the GNU Affero General Public License along
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
module Canvas::CC
|
module CC
|
||||||
module Rubrics
|
module Rubrics
|
||||||
def create_rubrics
|
def create_rubrics
|
||||||
return nil unless @course.rubrics.active.count > 0
|
return nil unless @course.rubrics.active.count > 0
|
|
@ -15,7 +15,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License along
|
# You should have received a copy of the GNU Affero General Public License along
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
module Canvas::CC
|
module CC
|
||||||
module TopicResources
|
module TopicResources
|
||||||
|
|
||||||
def add_topics
|
def add_topics
|
|
@ -15,7 +15,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License along
|
# You should have received a copy of the GNU Affero General Public License along
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
module Canvas::CC
|
module CC
|
||||||
module WebLinks
|
module WebLinks
|
||||||
def add_web_links
|
def add_web_links
|
||||||
@manifest.weblinks.each do |tag|
|
@manifest.weblinks.each do |tag|
|
|
@ -15,7 +15,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License along
|
# You should have received a copy of the GNU Affero General Public License along
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
module Canvas::CC
|
module CC
|
||||||
module WebResources
|
module WebResources
|
||||||
def add_course_files
|
def add_course_files
|
||||||
course_folder = Folder.root_folders(@course).first
|
course_folder = Folder.root_folders(@course).first
|
|
@ -15,7 +15,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License along
|
# You should have received a copy of the GNU Affero General Public License along
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
module Canvas::CC
|
module CC
|
||||||
module WikiResources
|
module WikiResources
|
||||||
|
|
||||||
def add_wiki_pages
|
def add_wiki_pages
|
Loading…
Reference in New Issue