canvas_cc 0.0.35 → 0.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2feb0091945201639c9ac6979145ac654621232d
|
|
4
|
+
data.tar.gz: 1201761ccbf06821771f2960cd5cf456cffbab8a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dbf6e6cc521afc31f27aa4f49641f17794dfc063b3080d45b80901eb7651363ee532f20001ff6806d54f302dacd3e78194bc3087619642319f06429e879022ac
|
|
7
|
+
data.tar.gz: c81cf9ac0a83029ec4602cb9281fe607cb23ad7fafce95e15182dac7a1b25a7a27c0c25eb13eda7db5597f5fb3fa077152a00e10c235467d799141b48ca82617
|
data/Gemfile.lock
CHANGED
|
@@ -115,10 +115,12 @@ module CanvasCc::CanvasCC
|
|
|
115
115
|
course_setting_file = File.join(course_setting_dir, CanvasCc::CanvasCC::CourseSettingWriter::COURSE_SETTINGS_FILE)
|
|
116
116
|
module_meta_file = File.join(course_setting_dir, CanvasCc::CanvasCC::ModuleMetaWriter::MODULE_META_FILE)
|
|
117
117
|
grading_standards_file = File.join(course_setting_dir, CanvasCc::CanvasCC::GradingStandardWriter::GRADING_STANDARD_FILE)
|
|
118
|
+
learning_outcomes_file = File.join(course_setting_dir, CanvasCc::CanvasCC::OutcomeWriter::LEARNING_OUTCOMES_FILE)
|
|
118
119
|
xml.resource('identifier' => @course.identifier + SETTINGS_POSTFIX, 'type' => TYPE_LAR, 'href' => export_file) { |xml|
|
|
119
120
|
xml.file('href' => course_setting_file)
|
|
120
121
|
xml.file('href' => module_meta_file) if @course.canvas_modules.count > 0
|
|
121
122
|
xml.file('href' => grading_standards_file)
|
|
123
|
+
xml.file('href' => learning_outcomes_file) if @course.outcomes.count > 0
|
|
122
124
|
}
|
|
123
125
|
end
|
|
124
126
|
|
|
@@ -8,7 +8,7 @@ module CanvasCc::CanvasCC
|
|
|
8
8
|
# It is assumed that ratings will be written only within the context of another object,
|
|
9
9
|
# such as learning outcomes or rubrics
|
|
10
10
|
def write
|
|
11
|
-
Nokogiri::XML::Builder.new
|
|
11
|
+
Nokogiri::XML::Builder.new do |xml|
|
|
12
12
|
xml.ratings do |xml|
|
|
13
13
|
@ratings.each do |rating|
|
|
14
14
|
xml.rating do
|
|
@@ -20,7 +20,7 @@ module CanvasCc::CanvasCC
|
|
|
20
20
|
end
|
|
21
21
|
end
|
|
22
22
|
end
|
|
23
|
-
end.to_xml
|
|
23
|
+
end.doc.root.to_xml
|
|
24
24
|
end
|
|
25
25
|
end
|
|
26
26
|
|
data/lib/canvas_cc/version.rb
CHANGED
|
@@ -21,6 +21,12 @@ describe CanvasCc::CanvasCC::RatingWriter do
|
|
|
21
21
|
expect(node.at_xpath('long_description').text).to eql rating.long_description
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
+
it 'does not include xml header' do
|
|
25
|
+
writer = CanvasCc::CanvasCC::RatingWriter.new rating
|
|
26
|
+
xml = writer.write
|
|
27
|
+
expect(xml.match(/<\?xml/)).to eq nil
|
|
28
|
+
end
|
|
29
|
+
|
|
24
30
|
private
|
|
25
31
|
def write_xml(rating)
|
|
26
32
|
writer = CanvasCc::CanvasCC::RatingWriter.new rating
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: canvas_cc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.36
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Instructure
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-08-
|
|
11
|
+
date: 2017-08-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rubyzip
|