moodle2cc 0.2.10 → 0.2.11
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog +5 -0
- data/lib/moodle2cc/canvas/assessment.rb +1 -1
- data/lib/moodle2cc/moodle2converter/question_converters/matching_converter.rb +0 -2
- data/lib/moodle2cc/resource_factory.rb +2 -1
- data/lib/moodle2cc/version.rb +1 -1
- data/test/unit/canvas/assessment_test.rb +1 -1
- data/test/unit/canvas/label_test.rb +1 -1
- data/test/unit/cc/converter_test.rb +1 -1
- data/test/unit/cc/label_test.rb +2 -2
- data/test/unit/resource_factory_test.rb +1 -1
- metadata +35 -5
- checksums.yaml +0 -15
data/Changelog
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
2014-07-14 Version 0.2.11
|
2
|
+
* Allow longer labels for Moodle 1.9
|
3
|
+
* Remove practice quiz default setting in Moodle 1.9
|
4
|
+
* Allow html in matching questions for Moodle 2
|
5
|
+
|
1
6
|
2014-06-19 Version 0.2.10
|
2
7
|
* Require students to post before viewing converted Q & A forums
|
3
8
|
* Convert multiple attempts settings from feedback activites
|
@@ -22,7 +22,7 @@ module Moodle2CC::Canvas
|
|
22
22
|
@access_code = mod.password
|
23
23
|
@ip_filter = mod.subnet
|
24
24
|
@shuffle_answers = mod.shuffle_answers
|
25
|
-
@quiz_type = mod.mod_type == 'quiz'
|
25
|
+
@quiz_type = 'survey' unless mod.mod_type == 'quiz'
|
26
26
|
@non_cc_assessments_identifier = create_key(@id, 'non_cc_assessments_')
|
27
27
|
@questions = []
|
28
28
|
mod.questions.each do |question|
|
@@ -13,8 +13,6 @@ module Moodle2CC::Moodle2Converter
|
|
13
13
|
copy[:question_text] ||= ''
|
14
14
|
copy[:question_text].gsub(/\{(.*?)\}/, '[\1]')
|
15
15
|
copy[:question_text] = RDiscount.new(copy[:question_text]).to_html if copy[:question_text_format].to_i == 4 # markdown
|
16
|
-
copy[:question_text] = Nokogiri::HTML(copy[:question_text]).text
|
17
|
-
copy[:answer_text] = Nokogiri::HTML(copy[:answer_text]).text
|
18
16
|
|
19
17
|
canvas_question.matches << copy
|
20
18
|
end
|
@@ -30,9 +30,10 @@ class Moodle2CC::ResourceFactory
|
|
30
30
|
if html.search('img[src]').length > 0 ||
|
31
31
|
html.search('a[href]').length > 0 ||
|
32
32
|
html.search('iframe[src]').length > 0 ||
|
33
|
-
html.text.strip.length >
|
33
|
+
html.text.strip.length > 200
|
34
34
|
@namespace.const_get(:WebContent).new(mod)
|
35
35
|
else
|
36
|
+
mod.name = html.text.strip
|
36
37
|
@namespace.const_get(:Label).new(mod)
|
37
38
|
end
|
38
39
|
end
|
data/lib/moodle2cc/version.rb
CHANGED
@@ -111,7 +111,7 @@ class TestUnitCanvasAssessment < MiniTest::Unit::TestCase
|
|
111
111
|
|
112
112
|
def test_it_converts_quiz_type
|
113
113
|
assessment = Moodle2CC::Canvas::Assessment.new @mod
|
114
|
-
|
114
|
+
assert assessment.quiz_type != 'survey'
|
115
115
|
|
116
116
|
questionnaire_mod = @backup.course.mods.find { |mod| mod.mod_type == 'questionnaire' }
|
117
117
|
assessment = Moodle2CC::Canvas::Assessment.new questionnaire_mod
|
@@ -22,7 +22,7 @@ class TestUnitCanvasLabel < MiniTest::Unit::TestCase
|
|
22
22
|
|
23
23
|
assert_equal 'item', xml.root.name
|
24
24
|
assert_equal 'ifcf0624ce811c812c749c53f3c914f20', xml.root.attributes['identifier'].value
|
25
|
-
assert_equal "
|
25
|
+
assert_equal "Section 1", xml.root.xpath('title').text
|
26
26
|
assert_equal '5', xml.root.xpath('position').text
|
27
27
|
assert_equal '', xml.root.xpath('new_tab').text
|
28
28
|
assert_equal '1', xml.root.xpath('indent').text
|
@@ -145,7 +145,7 @@ class TestUnitCCConverter < MiniTest::Unit::TestCase
|
|
145
145
|
assert item
|
146
146
|
assert_equal "ifcf0624ce811c812c749c53f3c914f20", item.attributes['identifier'].value
|
147
147
|
assert_equal "iddbfacadb16c78a584f81538cd53cc72", item.attributes['identifierref'].value
|
148
|
-
assert_equal '
|
148
|
+
assert_equal 'Section 1', item.xpath('xmlns:title').text
|
149
149
|
end
|
150
150
|
|
151
151
|
def test_imsmanifest_has_file_resources
|
data/test/unit/cc/label_test.rb
CHANGED
@@ -22,8 +22,8 @@ class TestUnitCCLabel < MiniTest::Unit::TestCase
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def test_it_converts_title
|
25
|
-
@mod.name = '
|
25
|
+
@mod.name = 'Section 1'
|
26
26
|
label = Moodle2CC::CC::Label.new @mod
|
27
|
-
assert_equal '
|
27
|
+
assert_equal 'Section 1', label.title
|
28
28
|
end
|
29
29
|
end
|
@@ -163,7 +163,7 @@ class TestUnitCCResource < MiniTest::Unit::TestCase
|
|
163
163
|
I will always test my code,
|
164
164
|
I will always test my code,
|
165
165
|
I will always test my code
|
166
|
-
</p>)
|
166
|
+
</p>) * 10
|
167
167
|
resource = @cc_factory.get_resource_from_mod(mod)
|
168
168
|
assert_kind_of Moodle2CC::CC::WebContent, resource
|
169
169
|
|
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moodle2cc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.11
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Christopher Durtschi
|
@@ -10,11 +11,12 @@ authors:
|
|
10
11
|
autorequire:
|
11
12
|
bindir: bin
|
12
13
|
cert_chain: []
|
13
|
-
date: 2014-
|
14
|
+
date: 2014-07-14 00:00:00.000000000 Z
|
14
15
|
dependencies:
|
15
16
|
- !ruby/object:Gem::Dependency
|
16
17
|
name: rubyzip
|
17
18
|
requirement: !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
18
20
|
requirements:
|
19
21
|
- - ! '>='
|
20
22
|
- !ruby/object:Gem::Version
|
@@ -22,6 +24,7 @@ dependencies:
|
|
22
24
|
type: :runtime
|
23
25
|
prerelease: false
|
24
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
|
+
none: false
|
25
28
|
requirements:
|
26
29
|
- - ! '>='
|
27
30
|
- !ruby/object:Gem::Version
|
@@ -29,6 +32,7 @@ dependencies:
|
|
29
32
|
- !ruby/object:Gem::Dependency
|
30
33
|
name: happymapper
|
31
34
|
requirement: !ruby/object:Gem::Requirement
|
35
|
+
none: false
|
32
36
|
requirements:
|
33
37
|
- - ! '>='
|
34
38
|
- !ruby/object:Gem::Version
|
@@ -36,6 +40,7 @@ dependencies:
|
|
36
40
|
type: :runtime
|
37
41
|
prerelease: false
|
38
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
39
44
|
requirements:
|
40
45
|
- - ! '>='
|
41
46
|
- !ruby/object:Gem::Version
|
@@ -43,6 +48,7 @@ dependencies:
|
|
43
48
|
- !ruby/object:Gem::Dependency
|
44
49
|
name: builder
|
45
50
|
requirement: !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
46
52
|
requirements:
|
47
53
|
- - ! '>='
|
48
54
|
- !ruby/object:Gem::Version
|
@@ -50,6 +56,7 @@ dependencies:
|
|
50
56
|
type: :runtime
|
51
57
|
prerelease: false
|
52
58
|
version_requirements: !ruby/object:Gem::Requirement
|
59
|
+
none: false
|
53
60
|
requirements:
|
54
61
|
- - ! '>='
|
55
62
|
- !ruby/object:Gem::Version
|
@@ -57,6 +64,7 @@ dependencies:
|
|
57
64
|
- !ruby/object:Gem::Dependency
|
58
65
|
name: thor
|
59
66
|
requirement: !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
60
68
|
requirements:
|
61
69
|
- - ! '>='
|
62
70
|
- !ruby/object:Gem::Version
|
@@ -64,6 +72,7 @@ dependencies:
|
|
64
72
|
type: :runtime
|
65
73
|
prerelease: false
|
66
74
|
version_requirements: !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
67
76
|
requirements:
|
68
77
|
- - ! '>='
|
69
78
|
- !ruby/object:Gem::Version
|
@@ -71,6 +80,7 @@ dependencies:
|
|
71
80
|
- !ruby/object:Gem::Dependency
|
72
81
|
name: nokogiri
|
73
82
|
requirement: !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
74
84
|
requirements:
|
75
85
|
- - ! '>='
|
76
86
|
- !ruby/object:Gem::Version
|
@@ -78,6 +88,7 @@ dependencies:
|
|
78
88
|
type: :runtime
|
79
89
|
prerelease: false
|
80
90
|
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
none: false
|
81
92
|
requirements:
|
82
93
|
- - ! '>='
|
83
94
|
- !ruby/object:Gem::Version
|
@@ -85,6 +96,7 @@ dependencies:
|
|
85
96
|
- !ruby/object:Gem::Dependency
|
86
97
|
name: rdiscount
|
87
98
|
requirement: !ruby/object:Gem::Requirement
|
99
|
+
none: false
|
88
100
|
requirements:
|
89
101
|
- - ! '>='
|
90
102
|
- !ruby/object:Gem::Version
|
@@ -92,6 +104,7 @@ dependencies:
|
|
92
104
|
type: :runtime
|
93
105
|
prerelease: false
|
94
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
95
108
|
requirements:
|
96
109
|
- - ! '>='
|
97
110
|
- !ruby/object:Gem::Version
|
@@ -99,6 +112,7 @@ dependencies:
|
|
99
112
|
- !ruby/object:Gem::Dependency
|
100
113
|
name: rake
|
101
114
|
requirement: !ruby/object:Gem::Requirement
|
115
|
+
none: false
|
102
116
|
requirements:
|
103
117
|
- - ! '>='
|
104
118
|
- !ruby/object:Gem::Version
|
@@ -106,6 +120,7 @@ dependencies:
|
|
106
120
|
type: :development
|
107
121
|
prerelease: false
|
108
122
|
version_requirements: !ruby/object:Gem::Requirement
|
123
|
+
none: false
|
109
124
|
requirements:
|
110
125
|
- - ! '>='
|
111
126
|
- !ruby/object:Gem::Version
|
@@ -113,6 +128,7 @@ dependencies:
|
|
113
128
|
- !ruby/object:Gem::Dependency
|
114
129
|
name: minitest
|
115
130
|
requirement: !ruby/object:Gem::Requirement
|
131
|
+
none: false
|
116
132
|
requirements:
|
117
133
|
- - ! '>='
|
118
134
|
- !ruby/object:Gem::Version
|
@@ -120,6 +136,7 @@ dependencies:
|
|
120
136
|
type: :development
|
121
137
|
prerelease: false
|
122
138
|
version_requirements: !ruby/object:Gem::Requirement
|
139
|
+
none: false
|
123
140
|
requirements:
|
124
141
|
- - ! '>='
|
125
142
|
- !ruby/object:Gem::Version
|
@@ -127,6 +144,7 @@ dependencies:
|
|
127
144
|
- !ruby/object:Gem::Dependency
|
128
145
|
name: rspec
|
129
146
|
requirement: !ruby/object:Gem::Requirement
|
147
|
+
none: false
|
130
148
|
requirements:
|
131
149
|
- - ! '>='
|
132
150
|
- !ruby/object:Gem::Version
|
@@ -134,6 +152,7 @@ dependencies:
|
|
134
152
|
type: :development
|
135
153
|
prerelease: false
|
136
154
|
version_requirements: !ruby/object:Gem::Requirement
|
155
|
+
none: false
|
137
156
|
requirements:
|
138
157
|
- - ! '>='
|
139
158
|
- !ruby/object:Gem::Version
|
@@ -141,6 +160,7 @@ dependencies:
|
|
141
160
|
- !ruby/object:Gem::Dependency
|
142
161
|
name: guard
|
143
162
|
requirement: !ruby/object:Gem::Requirement
|
163
|
+
none: false
|
144
164
|
requirements:
|
145
165
|
- - ! '>='
|
146
166
|
- !ruby/object:Gem::Version
|
@@ -148,6 +168,7 @@ dependencies:
|
|
148
168
|
type: :development
|
149
169
|
prerelease: false
|
150
170
|
version_requirements: !ruby/object:Gem::Requirement
|
171
|
+
none: false
|
151
172
|
requirements:
|
152
173
|
- - ! '>='
|
153
174
|
- !ruby/object:Gem::Version
|
@@ -155,6 +176,7 @@ dependencies:
|
|
155
176
|
- !ruby/object:Gem::Dependency
|
156
177
|
name: guard-bundler
|
157
178
|
requirement: !ruby/object:Gem::Requirement
|
179
|
+
none: false
|
158
180
|
requirements:
|
159
181
|
- - ! '>='
|
160
182
|
- !ruby/object:Gem::Version
|
@@ -162,6 +184,7 @@ dependencies:
|
|
162
184
|
type: :development
|
163
185
|
prerelease: false
|
164
186
|
version_requirements: !ruby/object:Gem::Requirement
|
187
|
+
none: false
|
165
188
|
requirements:
|
166
189
|
- - ! '>='
|
167
190
|
- !ruby/object:Gem::Version
|
@@ -169,6 +192,7 @@ dependencies:
|
|
169
192
|
- !ruby/object:Gem::Dependency
|
170
193
|
name: guard-minitest
|
171
194
|
requirement: !ruby/object:Gem::Requirement
|
195
|
+
none: false
|
172
196
|
requirements:
|
173
197
|
- - ! '>='
|
174
198
|
- !ruby/object:Gem::Version
|
@@ -176,6 +200,7 @@ dependencies:
|
|
176
200
|
type: :development
|
177
201
|
prerelease: false
|
178
202
|
version_requirements: !ruby/object:Gem::Requirement
|
203
|
+
none: false
|
179
204
|
requirements:
|
180
205
|
- - ! '>='
|
181
206
|
- !ruby/object:Gem::Version
|
@@ -183,6 +208,7 @@ dependencies:
|
|
183
208
|
- !ruby/object:Gem::Dependency
|
184
209
|
name: guard-rspec
|
185
210
|
requirement: !ruby/object:Gem::Requirement
|
211
|
+
none: false
|
186
212
|
requirements:
|
187
213
|
- - ! '>='
|
188
214
|
- !ruby/object:Gem::Version
|
@@ -190,6 +216,7 @@ dependencies:
|
|
190
216
|
type: :development
|
191
217
|
prerelease: false
|
192
218
|
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
none: false
|
193
220
|
requirements:
|
194
221
|
- - ! '>='
|
195
222
|
- !ruby/object:Gem::Version
|
@@ -197,6 +224,7 @@ dependencies:
|
|
197
224
|
- !ruby/object:Gem::Dependency
|
198
225
|
name: debugger
|
199
226
|
requirement: !ruby/object:Gem::Requirement
|
227
|
+
none: false
|
200
228
|
requirements:
|
201
229
|
- - ! '>='
|
202
230
|
- !ruby/object:Gem::Version
|
@@ -204,6 +232,7 @@ dependencies:
|
|
204
232
|
type: :development
|
205
233
|
prerelease: false
|
206
234
|
version_requirements: !ruby/object:Gem::Requirement
|
235
|
+
none: false
|
207
236
|
requirements:
|
208
237
|
- - ! '>='
|
209
238
|
- !ruby/object:Gem::Version
|
@@ -805,26 +834,27 @@ files:
|
|
805
834
|
homepage: https://github.com/instructure/moodle2cc
|
806
835
|
licenses:
|
807
836
|
- AGPLv3
|
808
|
-
metadata: {}
|
809
837
|
post_install_message:
|
810
838
|
rdoc_options: []
|
811
839
|
require_paths:
|
812
840
|
- lib
|
813
841
|
required_ruby_version: !ruby/object:Gem::Requirement
|
842
|
+
none: false
|
814
843
|
requirements:
|
815
844
|
- - ! '>='
|
816
845
|
- !ruby/object:Gem::Version
|
817
846
|
version: '0'
|
818
847
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
848
|
+
none: false
|
819
849
|
requirements:
|
820
850
|
- - ! '>='
|
821
851
|
- !ruby/object:Gem::Version
|
822
852
|
version: '0'
|
823
853
|
requirements: []
|
824
854
|
rubyforge_project:
|
825
|
-
rubygems_version:
|
855
|
+
rubygems_version: 1.8.23
|
826
856
|
signing_key:
|
827
|
-
specification_version:
|
857
|
+
specification_version: 3
|
828
858
|
summary: Migrates Moodle backup ZIP to IMS Common Cartridge package
|
829
859
|
test_files:
|
830
860
|
- spec/moodle2cc/canvas_cc/assessment_writer_spec.rb
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
NmY2ODJmNDFmYWI4NzNlNWE3MWM4ZTFlMmE4Y2Y2YTk4YjljZWRiOA==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
NjQ2ZDlhOTc4NDcxYzY0NDdiZmEyNDcyZGI0MzY1ZjBiZWM5ZDUzMw==
|
7
|
-
SHA512:
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
ZjI4M2FmYzQ1NmQ5NWJhMzExOTY5ZTViYTYxYmUyNjJmNWQ2ODgzODA1YzAx
|
10
|
-
YWMzNzJmNGY2MTI0YzkwNjRkODVhNjZiYWZlNzRhMWVmN2NhMWZhOGQwNzNl
|
11
|
-
N2M4NmFkNGJhODZmZWI1NGQzMTcwZWNlY2Y3Njc2N2NkN2EzY2Y=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
NTM4YjMwODIwNmQ4MWZkNzk0NGQyZGExMjNhMzdmMDRjZGJkMmE3MWMyMDEy
|
14
|
-
MTg5MGRmODA0MjExNDNlZGRhYjE1MWU5YTAzZGVjYWJlYjNkMzg5ZjYwYjhm
|
15
|
-
NDA1NjdkMzA3NGMyNTk4MzFmMTRjNzU4ZmQyMzdkNmQ3NWVhM2U=
|