moodle2cc 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/moodle2cc.rb +2 -0
- data/lib/moodle2cc/canvas/assessment.rb +18 -3
- data/lib/moodle2cc/canvas/converter.rb +4 -2
- data/lib/moodle2cc/canvas/course.rb +2 -4
- data/lib/moodle2cc/canvas/question.rb +11 -8
- data/lib/moodle2cc/canvas/question_bank.rb +6 -3
- data/lib/moodle2cc/canvas/question_group.rb +35 -0
- data/lib/moodle2cc/cc/converter.rb +1 -1
- data/lib/moodle2cc/cc/question.rb +1 -1
- data/lib/moodle2cc/cc/wiki.rb +1 -1
- data/lib/moodle2cc/logger.rb +5 -1
- data/lib/moodle2cc/moodle/course.rb +5 -1
- data/lib/moodle2cc/moodle/question.rb +1 -0
- data/lib/moodle2cc/moodle/section.rb +25 -3
- data/lib/moodle2cc/resource_factory.rb +1 -1
- data/lib/moodle2cc/version.rb +1 -1
- data/moodle2cc.gemspec +1 -0
- data/test/fixtures/moodle_backup/moodle.xml +20 -12
- data/test/fixtures/moodle_backup_random_questions/course_files/folder/test.txt +1 -0
- data/test/fixtures/moodle_backup_random_questions/course_files/test.txt +1 -0
- data/test/fixtures/moodle_backup_random_questions/moodle.xml +357 -0
- data/test/test_helper.rb +7 -7
- data/test/unit/canvas/assessment_test.rb +43 -0
- data/test/unit/canvas/converter_test.rb +14 -2
- data/test/unit/canvas/course_test.rb +7 -7
- data/test/unit/canvas/question_bank_test.rb +19 -0
- data/test/unit/canvas/question_group_test.rb +90 -0
- data/test/unit/canvas/question_test.rb +37 -38
- data/test/unit/canvas/wiki_test.rb +1 -1
- data/test/unit/cc/converter_test.rb +15 -3
- data/test/unit/cc/question_test.rb +6 -1
- data/test/unit/cc/wiki_test.rb +1 -1
- data/test/unit/moodle/mod_test.rb +2 -2
- data/test/unit/moodle/question_test.rb +4 -0
- data/test/unit/moodle/section_test.rb +25 -8
- data/test/unit/resource_factory_test.rb +9 -0
- metadata +33 -10
data/lib/moodle2cc.rb
CHANGED
@@ -6,6 +6,7 @@ require 'happymapper'
|
|
6
6
|
require 'logger'
|
7
7
|
require 'nokogiri'
|
8
8
|
require 'ostruct'
|
9
|
+
require 'rdiscount'
|
9
10
|
require 'uri'
|
10
11
|
|
11
12
|
require 'moodle2cc/error'
|
@@ -44,6 +45,7 @@ module Moodle2CC
|
|
44
45
|
autoload :Label, 'moodle2cc/canvas/label'
|
45
46
|
autoload :Question, 'moodle2cc/canvas/question'
|
46
47
|
autoload :QuestionBank, 'moodle2cc/canvas/question_bank'
|
48
|
+
autoload :QuestionGroup, 'moodle2cc/canvas/question_group'
|
47
49
|
autoload :Resource, 'moodle2cc/canvas/resource'
|
48
50
|
autoload :WebContent, 'moodle2cc/canvas/web_content'
|
49
51
|
autoload :WebLink, 'moodle2cc/canvas/web_link'
|
@@ -4,7 +4,7 @@ module Moodle2CC::Canvas
|
|
4
4
|
META_ATTRIBUTES = [:title, :description, :lock_at, :unlock_at, :allowed_attempts,
|
5
5
|
:scoring_policy, :access_code, :ip_filter, :shuffle_answers, :time_limit, :quiz_type]
|
6
6
|
|
7
|
-
attr_accessor :non_cc_assessments_identifier, *META_ATTRIBUTES
|
7
|
+
attr_accessor :questions, :non_cc_assessments_identifier, *META_ATTRIBUTES
|
8
8
|
|
9
9
|
def initialize(mod, position=0)
|
10
10
|
super
|
@@ -24,6 +24,22 @@ module Moodle2CC::Canvas
|
|
24
24
|
@shuffle_answers = mod.shuffle_answers
|
25
25
|
@quiz_type = mod.mod_type == 'quiz' ? 'practice_quiz' : 'survey'
|
26
26
|
@non_cc_assessments_identifier = create_key(@id, 'non_cc_assessments_')
|
27
|
+
@questions = []
|
28
|
+
mod.questions.each do |question|
|
29
|
+
if question.type == 'random'
|
30
|
+
question_bank = QuestionBank.new question.question_category
|
31
|
+
last = @questions.last
|
32
|
+
if last && last.is_a?(QuestionGroup) && last.points_per_item == question.grade && last.sourcebank_ref == question_bank.identifier
|
33
|
+
last.increment_selection_number
|
34
|
+
else
|
35
|
+
group = @questions.select { |q| q.is_a?(QuestionGroup) }.last
|
36
|
+
id = group ? group.id + 1 : 1
|
37
|
+
@questions << QuestionGroup.new(:id => id, :question_bank => question_bank, :points_per_item => question.grade)
|
38
|
+
end
|
39
|
+
else
|
40
|
+
@questions << Question.new(question, self)
|
41
|
+
end
|
42
|
+
end
|
27
43
|
end
|
28
44
|
|
29
45
|
def create_resource_node(resources_node)
|
@@ -91,8 +107,7 @@ module Moodle2CC::Canvas
|
|
91
107
|
end
|
92
108
|
end
|
93
109
|
assessment_node.section(:ident => 'root_section') do |section_node|
|
94
|
-
@
|
95
|
-
question = Question.new question, self
|
110
|
+
@questions.each do |question|
|
96
111
|
question.create_item_xml(section_node)
|
97
112
|
end
|
98
113
|
end
|
@@ -15,8 +15,10 @@ module Moodle2CC::Canvas
|
|
15
15
|
|
16
16
|
def create_question_bank_resource(resources_node, question_category)
|
17
17
|
question_bank = QuestionBank.new(question_category)
|
18
|
-
question_bank.
|
19
|
-
|
18
|
+
if question_bank.questions.length > 0
|
19
|
+
question_bank.create_resource_node(resources_node)
|
20
|
+
question_bank.create_files(@export_dir)
|
21
|
+
end
|
20
22
|
end
|
21
23
|
|
22
24
|
def create_course_content(resources_node)
|
@@ -88,14 +88,13 @@ module Moodle2CC::Canvas
|
|
88
88
|
'xmlns' => "http://canvas.instructure.com/xsd/cccv1p0"
|
89
89
|
) do |modules_node|
|
90
90
|
@course.sections.each do |section|
|
91
|
-
next
|
91
|
+
next if section.mods.length == 0
|
92
92
|
modules_node.module(:identifier => create_key(section.id, 'section_')) do |module_node|
|
93
93
|
module_node.title "#{@format} #{section.number}"
|
94
94
|
module_node.position section.number
|
95
95
|
module_node.require_sequential_progress false
|
96
96
|
module_node.items do |items_node|
|
97
97
|
section.mods.each_with_index do |mod, index|
|
98
|
-
next unless mod.visible
|
99
98
|
resource = @resource_factory.get_resource_from_mod(mod.instance)
|
100
99
|
resource.create_module_meta_item_node(items_node, index) if resource
|
101
100
|
end
|
@@ -118,8 +117,7 @@ module Moodle2CC::Canvas
|
|
118
117
|
'xmlns' => "http://canvas.instructure.com/xsd/cccv1p0"
|
119
118
|
) do |assignment_groups_node|
|
120
119
|
@course.sections.each do |section|
|
121
|
-
next unless section.
|
122
|
-
next unless section.mods.select { |mod| mod.visible && mod.instance.mod_type == "assignment" }.length > 0
|
120
|
+
next unless section.mods.select { |mod| mod.instance.mod_type == "assignment" }.length > 0
|
123
121
|
assignment_groups_node.assignmentGroup(:identifier => create_key(section.id, "assignment_group_")) do |assignment_group_node|
|
124
122
|
assignment_group_node.title "Week #{section.number}"
|
125
123
|
end
|
@@ -115,7 +115,10 @@ module Moodle2CC::Canvas
|
|
115
115
|
|
116
116
|
material = question.text
|
117
117
|
material = question.content || '' if material.nil?
|
118
|
-
|
118
|
+
material = material.gsub(/\{(.*?)\}/, '[\1]')
|
119
|
+
material = RDiscount.new(material).to_html if question.format == 4 # markdown
|
120
|
+
@material = material
|
121
|
+
|
119
122
|
if @question_type == 'multiple_dropdowns_question' && !@answers.empty?
|
120
123
|
responses = @answers[@length..-1]
|
121
124
|
responses.each_with_index do |response, index|
|
@@ -189,7 +192,7 @@ module Moodle2CC::Canvas
|
|
189
192
|
@matches.each do |match|
|
190
193
|
presentation_node.response_lid(:ident => "response_#{match.answer}") do |response_node|
|
191
194
|
response_node.material do |material_node|
|
192
|
-
material_node.mattext(match.question, :texttype => 'text/
|
195
|
+
material_node.mattext(match.question, :texttype => 'text/html')
|
193
196
|
end
|
194
197
|
response_node.render_choice do |choice_node|
|
195
198
|
match.answers.each do |ident, text|
|
@@ -208,7 +211,7 @@ module Moodle2CC::Canvas
|
|
208
211
|
@answers.each do |answer|
|
209
212
|
choice_node.response_label(:ident => answer.id) do |label_node|
|
210
213
|
label_node.material do |material_node|
|
211
|
-
material_node.mattext answer.text, :texttype => 'text/
|
214
|
+
material_node.mattext answer.text, :texttype => 'text/html'
|
212
215
|
end
|
213
216
|
end
|
214
217
|
end
|
@@ -220,7 +223,7 @@ module Moodle2CC::Canvas
|
|
220
223
|
@answers.each do |answer|
|
221
224
|
choice_node.response_label(:ident => answer.id) do |label_node|
|
222
225
|
label_node.material do |material_node|
|
223
|
-
material_node.mattext answer.text, :texttype => 'text/
|
226
|
+
material_node.mattext answer.text, :texttype => 'text/html'
|
224
227
|
end
|
225
228
|
end
|
226
229
|
end
|
@@ -239,7 +242,7 @@ module Moodle2CC::Canvas
|
|
239
242
|
answers.each do |answer|
|
240
243
|
choice_node.response_label(:ident => "#{response_id}#{answer.id}") do |label_node|
|
241
244
|
label_node.material do |material_node|
|
242
|
-
material_node.mattext answer.text, :texttype => 'text/
|
245
|
+
material_node.mattext answer.text, :texttype => 'text/html'
|
243
246
|
end
|
244
247
|
end
|
245
248
|
end
|
@@ -258,7 +261,7 @@ module Moodle2CC::Canvas
|
|
258
261
|
@answers.each do |answer|
|
259
262
|
render_choice_node.response_label(:ident => answer.id) do |response_label_node|
|
260
263
|
response_label_node.material do |material_node|
|
261
|
-
material_node.mattext(answer.text, :texttype => 'text/
|
264
|
+
material_node.mattext(answer.text, :texttype => 'text/html')
|
262
265
|
end
|
263
266
|
end
|
264
267
|
end
|
@@ -404,7 +407,7 @@ module Moodle2CC::Canvas
|
|
404
407
|
item_node.itemfeedback(:ident => 'general_fb') do |fb_node|
|
405
408
|
fb_node.flow_mat do |flow_node|
|
406
409
|
flow_node.material do |material_node|
|
407
|
-
material_node.mattext(@general_feedback, :texttype => 'text/
|
410
|
+
material_node.mattext(@general_feedback, :texttype => 'text/html')
|
408
411
|
end
|
409
412
|
end
|
410
413
|
end
|
@@ -417,7 +420,7 @@ module Moodle2CC::Canvas
|
|
417
420
|
item_node.itemfeedback(:ident => "#{answer.id}_fb") do |feedback_node|
|
418
421
|
feedback_node.flow_mat do |flow_node|
|
419
422
|
flow_node.material do |material_node|
|
420
|
-
material_node.mattext answer.feedback, :texttype => 'text/
|
423
|
+
material_node.mattext answer.feedback, :texttype => 'text/html'
|
421
424
|
end
|
422
425
|
end
|
423
426
|
end
|
@@ -1,13 +1,16 @@
|
|
1
1
|
module Moodle2CC::Canvas
|
2
2
|
class QuestionBank
|
3
3
|
include Moodle2CC::CC::CCHelper
|
4
|
-
attr_accessor :id, :title, :identifier
|
4
|
+
attr_accessor :id, :title, :questions, :identifier
|
5
5
|
|
6
6
|
def initialize(question_category)
|
7
7
|
@id = question_category.id
|
8
8
|
@title = question_category.name
|
9
9
|
@identifier = create_key(@id, 'objectbank_')
|
10
10
|
@question_category = question_category
|
11
|
+
@questions = @question_category.questions.reject { |q| q.type == 'random' }.map do |question|
|
12
|
+
Question.new question
|
13
|
+
end
|
11
14
|
end
|
12
15
|
|
13
16
|
def create_resource_node(resources_node)
|
@@ -43,8 +46,8 @@ module Moodle2CC::Canvas
|
|
43
46
|
qtimetadatafield_node.fieldentry @title
|
44
47
|
end
|
45
48
|
end
|
46
|
-
@
|
47
|
-
|
49
|
+
@questions.each do |question|
|
50
|
+
question.create_item_xml(objectbank_node) if question
|
48
51
|
end
|
49
52
|
end
|
50
53
|
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Moodle2CC::Canvas
|
2
|
+
class QuestionGroup
|
3
|
+
include Moodle2CC::CC::CCHelper
|
4
|
+
attr_accessor :id, :title, :selection_number, :points_per_item,
|
5
|
+
:question_bank, :sourcebank_ref, :identifier
|
6
|
+
|
7
|
+
def initialize(params={})
|
8
|
+
@id = params[:id] || 1
|
9
|
+
@title = "Group #{@id}"
|
10
|
+
@selection_number = 1
|
11
|
+
@points_per_item = params[:points_per_item] || 1
|
12
|
+
@question_bank = params[:question_bank]
|
13
|
+
@sourcebank_ref = @question_bank.identifier if @question_bank
|
14
|
+
@identifier = create_key @id, 'question_group_'
|
15
|
+
end
|
16
|
+
|
17
|
+
def increment_selection_number
|
18
|
+
@selection_number += 1
|
19
|
+
end
|
20
|
+
|
21
|
+
def create_item_xml(root_node)
|
22
|
+
root_node.section(:title => @title, :ident => @identifier) do |section_node|
|
23
|
+
section_node.selection_ordering do |ordering_node|
|
24
|
+
ordering_node.selection do |selection_node|
|
25
|
+
selection_node.sourcebank_ref @sourcebank_ref
|
26
|
+
selection_node.selection_number @selection_number
|
27
|
+
selection_node.selection_extension do |extension_node|
|
28
|
+
extension_node.points_per_item @points_per_item
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -91,7 +91,7 @@ module Moodle2CC::CC
|
|
91
91
|
) do |org|
|
92
92
|
org.item(:identifier => "LearningModules") do |root_item|
|
93
93
|
@moodle_backup.course.sections.each do |section|
|
94
|
-
next
|
94
|
+
next if section.mods.length == 0
|
95
95
|
root_item.item(:identifier => create_key(section.id, "section_")) do |item_node|
|
96
96
|
item_node.title "#{course.format} #{section.number}"
|
97
97
|
section.mods.each do |mod|
|
@@ -6,7 +6,7 @@ module Moodle2CC::CC
|
|
6
6
|
|
7
7
|
def initialize(question, assessment=nil)
|
8
8
|
@id = question.id
|
9
|
-
@title = (question.name || '').gsub('$@NULL@$', '')
|
9
|
+
@title = CGI.unescapeHTML((question.name || '').gsub('$@NULL@$', ''))
|
10
10
|
@identifier_prefix = "#{assessment.mod.mod_type}_" if assessment
|
11
11
|
|
12
12
|
if question.instance_id
|
data/lib/moodle2cc/cc/wiki.rb
CHANGED
data/lib/moodle2cc/logger.rb
CHANGED
@@ -12,7 +12,11 @@ module Moodle2CC
|
|
12
12
|
if logger.respond_to? :add_warning
|
13
13
|
logger.add_warning(message, exception)
|
14
14
|
elsif logger.respond_to? :warn
|
15
|
-
|
15
|
+
log = "#{message}\n #{exception.message}\n"
|
16
|
+
if exception.backtrace
|
17
|
+
exception.backtrace.each { |line| log << " #{line}\n" }
|
18
|
+
end
|
19
|
+
logger.warn log
|
16
20
|
end
|
17
21
|
end
|
18
22
|
end
|
@@ -15,7 +15,11 @@ module Moodle2CC::Moodle
|
|
15
15
|
has_many :question_categories, QuestionCategory
|
16
16
|
|
17
17
|
after_parse do |course|
|
18
|
-
course.sections.each
|
18
|
+
course.sections.each do |section|
|
19
|
+
section.course = course
|
20
|
+
mod = section.mods.find { |mod| mod.mod_type == 'summary' }
|
21
|
+
course.mods << mod.instance if mod
|
22
|
+
end
|
19
23
|
course.mods.each { |mod| mod.course = course }
|
20
24
|
course.grade_items.each { |grade_item| grade_item.course = course }
|
21
25
|
course.question_categories.each { |question_category| question_category.course = course }
|
@@ -72,6 +72,7 @@ module Moodle2CC::Moodle
|
|
72
72
|
element :id, Integer, :tag => 'ID'
|
73
73
|
element :name, String, :tag => 'NAME'
|
74
74
|
element :text, String, :tag => 'QUESTIONTEXT'
|
75
|
+
element :format, Integer, :tag => 'QUESTIONTEXTFORMAT'
|
75
76
|
element :content, String, :tag => 'CONTENT'
|
76
77
|
element :length, Integer, :tag => 'LENGTH'
|
77
78
|
element :general_feedback, String, :tag => 'GENERALFEEDBACK'
|
@@ -7,19 +7,20 @@ module Moodle2CC::Moodle
|
|
7
7
|
class Mod
|
8
8
|
include HappyMapper
|
9
9
|
|
10
|
-
attr_accessor :section
|
10
|
+
attr_accessor :section, :instance
|
11
11
|
|
12
12
|
tag 'MODS/MOD'
|
13
13
|
|
14
14
|
element :id, Integer, :tag => 'ID'
|
15
|
-
element :mod_type, String, :tag => 'TYPE'
|
16
15
|
element :instance_id, Integer, :tag => 'INSTANCE'
|
16
|
+
element :mod_type, String, :tag => 'TYPE'
|
17
17
|
element :added, Integer, :tag => 'ADDED'
|
18
18
|
element :indent, Integer, :tag => 'INDENT'
|
19
19
|
element :visible, Boolean, :tag => 'VISIBLE'
|
20
20
|
|
21
21
|
def instance
|
22
|
-
|
22
|
+
return @instance if @instance
|
23
|
+
@instance = section.course.mods.find { |mod| mod.id == instance_id && mod.mod_type == mod_type }
|
23
24
|
end
|
24
25
|
end
|
25
26
|
|
@@ -31,6 +32,27 @@ module Moodle2CC::Moodle
|
|
31
32
|
has_many :mods, Mod
|
32
33
|
|
33
34
|
after_parse do |section|
|
35
|
+
mod = Mod.new
|
36
|
+
mod.id = "section_summary_mod_#{section.id}"
|
37
|
+
mod.instance_id = "section_summary_instance_#{section.id}"
|
38
|
+
mod.mod_type = 'summary'
|
39
|
+
mod.indent = 0
|
40
|
+
mod.visible = true
|
41
|
+
|
42
|
+
instance = Moodle2CC::Moodle::Mod.new
|
43
|
+
instance.id = "section_summary_instance_#{section.id}"
|
44
|
+
instance.mod_type = 'summary'
|
45
|
+
html = Nokogiri::HTML(section.summary)
|
46
|
+
html.search('style').each(&:unlink)
|
47
|
+
instance.name = html.text.strip
|
48
|
+
instance.name = "#{instance.name[0..50]}..." if instance.name.length > 50
|
49
|
+
instance.content = section.summary
|
50
|
+
|
51
|
+
if instance.content && instance.content.length > 0
|
52
|
+
mod.instance = instance
|
53
|
+
section.mods.unshift mod
|
54
|
+
end
|
55
|
+
|
34
56
|
section.mods.each { |mod| mod.section = section }
|
35
57
|
end
|
36
58
|
end
|
@@ -20,7 +20,7 @@ class Moodle2CC::ResourceFactory
|
|
20
20
|
@namespace.const_get(:Assessment).new(mod, position)
|
21
21
|
when 'wiki'
|
22
22
|
@namespace.const_get(:Wiki).new(mod)
|
23
|
-
when 'label'
|
23
|
+
when 'label', 'summary'
|
24
24
|
html = Nokogiri::HTML(mod.content)
|
25
25
|
if html.search('img[src]').length > 0 ||
|
26
26
|
html.search('a[href]').length > 0 ||
|
data/lib/moodle2cc/version.rb
CHANGED
data/moodle2cc.gemspec
CHANGED
@@ -13,6 +13,7 @@ Gem::Specification.new do |gem|
|
|
13
13
|
gem.add_runtime_dependency "builder"
|
14
14
|
gem.add_runtime_dependency "thor"
|
15
15
|
gem.add_runtime_dependency "nokogiri"
|
16
|
+
gem.add_runtime_dependency "rdiscount"
|
16
17
|
|
17
18
|
gem.add_development_dependency "rake"
|
18
19
|
gem.add_development_dependency "minitest"
|
@@ -197,14 +197,28 @@
|
|
197
197
|
<ROLES_ASSIGNMENTS>
|
198
198
|
</ROLES_ASSIGNMENTS>
|
199
199
|
</MOD>
|
200
|
+
</MODS>
|
201
|
+
</SECTION>
|
202
|
+
<SECTION>
|
203
|
+
<ID>34567</ID>
|
204
|
+
<NUMBER>2</NUMBER>
|
205
|
+
<SUMMARY></SUMMARY>
|
206
|
+
<VISIBLE>1</VISIBLE>
|
207
|
+
</SECTION>
|
208
|
+
<SECTION>
|
209
|
+
<ID>45678</ID>
|
210
|
+
<NUMBER>3</NUMBER>
|
211
|
+
<SUMMARY><h1>Week 3 Summary</h1></SUMMARY>
|
212
|
+
<VISIBLE>0</VISIBLE>
|
213
|
+
<MODS>
|
200
214
|
<MOD>
|
201
|
-
<ID>
|
202
|
-
<TYPE>
|
203
|
-
<INSTANCE>
|
204
|
-
<ADDED>
|
215
|
+
<ID>23232</ID>
|
216
|
+
<TYPE>forum</TYPE>
|
217
|
+
<INSTANCE>765</INSTANCE>
|
218
|
+
<ADDED>1338472800</ADDED>
|
205
219
|
<SCORE>0</SCORE>
|
206
220
|
<INDENT>0</INDENT>
|
207
|
-
<VISIBLE>
|
221
|
+
<VISIBLE>1</VISIBLE>
|
208
222
|
<GROUPMODE>0</GROUPMODE>
|
209
223
|
<GROUPINGID>0</GROUPINGID>
|
210
224
|
<GROUPMEMBERSONLY>0</GROUPMEMBERSONLY>
|
@@ -216,12 +230,6 @@
|
|
216
230
|
</MOD>
|
217
231
|
</MODS>
|
218
232
|
</SECTION>
|
219
|
-
<SECTION>
|
220
|
-
<ID>34567</ID>
|
221
|
-
<NUMBER>2</NUMBER>
|
222
|
-
<SUMMARY><h1>Week 2 Summary</h1></SUMMARY>
|
223
|
-
<VISIBLE>0</VISIBLE>
|
224
|
-
</SECTION>
|
225
233
|
</SECTIONS>
|
226
234
|
<QUESTION_CATEGORIES>
|
227
235
|
<QUESTION_CATEGORY>
|
@@ -647,7 +655,7 @@
|
|
647
655
|
<MOD>
|
648
656
|
<ID>210</ID>
|
649
657
|
<MODTYPE>wiki</MODTYPE>
|
650
|
-
<NAME>My
|
658
|
+
<NAME>My wiki</NAME>
|
651
659
|
<SUMMARY>This is my wiki. There are many like it, but this one is mine.</SUMMARY>
|
652
660
|
<PAGENAME>My Wiki</PAGENAME>
|
653
661
|
<WTYPE>group</WTYPE>
|
@@ -0,0 +1 @@
|
|
1
|
+
Test
|
@@ -0,0 +1 @@
|
|
1
|
+
Test
|
@@ -0,0 +1,357 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<MOODLE_BACKUP>
|
3
|
+
<INFO>
|
4
|
+
<NAME>moodle_backup.zip</NAME>
|
5
|
+
</INFO>
|
6
|
+
<COURSE>
|
7
|
+
<HEADER>
|
8
|
+
<ID>55555</ID>
|
9
|
+
<FULLNAME>My Course</FULLNAME>
|
10
|
+
<SHORTNAME>EDU 101</SHORTNAME>
|
11
|
+
<STARTDATE>1339390800</STARTDATE>
|
12
|
+
<VISIBLE>1</VISIBLE>
|
13
|
+
<FORMAT>weeks</FORMAT>
|
14
|
+
</HEADER>
|
15
|
+
<SECTIONS>
|
16
|
+
<SECTION>
|
17
|
+
<ID>12345</ID>
|
18
|
+
<NUMBER>0</NUMBER>
|
19
|
+
<SUMMARY><h1>This is the Syllabus</h1></SUMMARY>
|
20
|
+
<VISIBLE>1</VISIBLE>
|
21
|
+
<MODS>
|
22
|
+
<MOD>
|
23
|
+
<ID>11111</ID>
|
24
|
+
<TYPE>quiz</TYPE>
|
25
|
+
<INSTANCE>98989</INSTANCE>
|
26
|
+
<ADDED>1343752552</ADDED>
|
27
|
+
<SCORE>0</SCORE>
|
28
|
+
<INDENT>0</INDENT>
|
29
|
+
<VISIBLE>1</VISIBLE>
|
30
|
+
<GROUPMODE>0</GROUPMODE>
|
31
|
+
<GROUPINGID>0</GROUPINGID>
|
32
|
+
<GROUPMEMBERSONLY>0</GROUPMEMBERSONLY>
|
33
|
+
<IDNUMBER></IDNUMBER>
|
34
|
+
<ROLES_OVERRIDES>
|
35
|
+
</ROLES_OVERRIDES>
|
36
|
+
<ROLES_ASSIGNMENTS>
|
37
|
+
</ROLES_ASSIGNMENTS>
|
38
|
+
</MOD>
|
39
|
+
</MODS>
|
40
|
+
</SECTION>
|
41
|
+
</SECTIONS>
|
42
|
+
<QUESTION_CATEGORIES>
|
43
|
+
<QUESTION_CATEGORY>
|
44
|
+
<ID>121</ID>
|
45
|
+
<NAME>Default Question Category</NAME>
|
46
|
+
<INFO>The default category for questions.</INFO>
|
47
|
+
<CONTEXT>
|
48
|
+
<LEVEL>course</LEVEL>
|
49
|
+
</CONTEXT>
|
50
|
+
<STAMP>moodle19.divergentlogic.com+120607210554+LT0tLH</STAMP>
|
51
|
+
<PARENT>0</PARENT>
|
52
|
+
<SORTORDER>999</SORTORDER>
|
53
|
+
<QUESTIONS>
|
54
|
+
<QUESTION>
|
55
|
+
<ID>656</ID>
|
56
|
+
<PARENT>0</PARENT>
|
57
|
+
<NAME>Short Answer</NAME>
|
58
|
+
<QUESTIONTEXT>What is your favorite programming language?</QUESTIONTEXT>
|
59
|
+
<QUESTIONTEXTFORMAT>1</QUESTIONTEXTFORMAT>
|
60
|
+
<IMAGE></IMAGE>
|
61
|
+
<GENERALFEEDBACK>Yay!</GENERALFEEDBACK>
|
62
|
+
<DEFAULTGRADE>1</DEFAULTGRADE>
|
63
|
+
<PENALTY>0.1</PENALTY>
|
64
|
+
<QTYPE>shortanswer</QTYPE>
|
65
|
+
<LENGTH>1</LENGTH>
|
66
|
+
<STAMP>moodle19.divergentlogic.com+120611201429+lvcAKV</STAMP>
|
67
|
+
<VERSION>moodle19.divergentlogic.com+120611201429+futzCM</VERSION>
|
68
|
+
<HIDDEN>0</HIDDEN>
|
69
|
+
<TIMECREATED>1339445669</TIMECREATED>
|
70
|
+
<TIMEMODIFIED>1339445669</TIMEMODIFIED>
|
71
|
+
<CREATEDBY>2</CREATEDBY>
|
72
|
+
<MODIFIEDBY>2</MODIFIEDBY>
|
73
|
+
<SHORTANSWER>
|
74
|
+
<ANSWERS>40,41,42</ANSWERS>
|
75
|
+
<USECASE>0</USECASE>
|
76
|
+
</SHORTANSWER>
|
77
|
+
<ANSWERS>
|
78
|
+
<ANSWER>
|
79
|
+
<ID>40</ID>
|
80
|
+
<ANSWER_TEXT>Ruby</ANSWER_TEXT>
|
81
|
+
<FRACTION>1</FRACTION>
|
82
|
+
<FEEDBACK>Good choice!</FEEDBACK>
|
83
|
+
</ANSWER>
|
84
|
+
<ANSWER>
|
85
|
+
<ID>41</ID>
|
86
|
+
<ANSWER_TEXT>JavaScript</ANSWER_TEXT>
|
87
|
+
<FRACTION>0.5</FRACTION>
|
88
|
+
<FEEDBACK>Not what I would have chosen...</FEEDBACK>
|
89
|
+
</ANSWER>
|
90
|
+
<ANSWER>
|
91
|
+
<ID>42</ID>
|
92
|
+
<ANSWER_TEXT>Java</ANSWER_TEXT>
|
93
|
+
<FRACTION>0.1</FRACTION>
|
94
|
+
<FEEDBACK>You're kidding, right?</FEEDBACK>
|
95
|
+
</ANSWER>
|
96
|
+
</ANSWERS>
|
97
|
+
</QUESTION>
|
98
|
+
<QUESTION>
|
99
|
+
<ID>545</ID>
|
100
|
+
<PARENT>0</PARENT>
|
101
|
+
<NAME>True or False</NAME>
|
102
|
+
<QUESTIONTEXT>True or False: You are taking a quiz right now.</QUESTIONTEXT>
|
103
|
+
<QUESTIONTEXTFORMAT>1</QUESTIONTEXTFORMAT>
|
104
|
+
<IMAGE></IMAGE>
|
105
|
+
<GENERALFEEDBACK>Amazing!</GENERALFEEDBACK>
|
106
|
+
<DEFAULTGRADE>1</DEFAULTGRADE>
|
107
|
+
<PENALTY>1</PENALTY>
|
108
|
+
<QTYPE>truefalse</QTYPE>
|
109
|
+
<LENGTH>1</LENGTH>
|
110
|
+
<STAMP>moodle19.divergentlogic.com+120611201858+mzdsN2</STAMP>
|
111
|
+
<VERSION>moodle19.divergentlogic.com+120611201859+VUUftZ</VERSION>
|
112
|
+
<HIDDEN>0</HIDDEN>
|
113
|
+
<TIMECREATED>1339445938</TIMECREATED>
|
114
|
+
<TIMEMODIFIED>1339445938</TIMEMODIFIED>
|
115
|
+
<CREATEDBY>2</CREATEDBY>
|
116
|
+
<MODIFIEDBY>2</MODIFIEDBY>
|
117
|
+
<TRUEFALSE>
|
118
|
+
<TRUEANSWER>44</TRUEANSWER>
|
119
|
+
<FALSEANSWER>45</FALSEANSWER>
|
120
|
+
</TRUEFALSE>
|
121
|
+
<ANSWERS>
|
122
|
+
<ANSWER>
|
123
|
+
<ID>44</ID>
|
124
|
+
<ANSWER_TEXT>True</ANSWER_TEXT>
|
125
|
+
<FRACTION>1</FRACTION>
|
126
|
+
<FEEDBACK>Smarty pants!</FEEDBACK>
|
127
|
+
</ANSWER>
|
128
|
+
<ANSWER>
|
129
|
+
<ID>45</ID>
|
130
|
+
<ANSWER_TEXT>False</ANSWER_TEXT>
|
131
|
+
<FRACTION>0</FRACTION>
|
132
|
+
<FEEDBACK>What exactly are you doing?</FEEDBACK>
|
133
|
+
</ANSWER>
|
134
|
+
</ANSWERS>
|
135
|
+
</QUESTION>
|
136
|
+
<QUESTION>
|
137
|
+
<ID>434</ID>
|
138
|
+
<PARENT>434</PARENT>
|
139
|
+
<NAME>Random Question (Random Quiz)</NAME>
|
140
|
+
<QUESTIONTEXT>1</QUESTIONTEXT>
|
141
|
+
<QUESTIONTEXTFORMAT>0</QUESTIONTEXTFORMAT>
|
142
|
+
<IMAGE></IMAGE>
|
143
|
+
<GENERALFEEDBACK></GENERALFEEDBACK>
|
144
|
+
<DEFAULTGRADE>1</DEFAULTGRADE>
|
145
|
+
<PENALTY>0</PENALTY>
|
146
|
+
<QTYPE>random</QTYPE>
|
147
|
+
<LENGTH>1</LENGTH>
|
148
|
+
<STAMP>moodle19.divergentlogic.com+120611201858+mzdsN2</STAMP>
|
149
|
+
<VERSION>moodle19.divergentlogic.com+120611201859+VUUftZ</VERSION>
|
150
|
+
<HIDDEN>0</HIDDEN>
|
151
|
+
<TIMECREATED>1233796544</TIMECREATED>
|
152
|
+
<TIMEMODIFIED>1233796544</TIMEMODIFIED>
|
153
|
+
<CREATEDBY>1781</CREATEDBY>
|
154
|
+
<MODIFIEDBY>1781</MODIFIEDBY>
|
155
|
+
</QUESTION>
|
156
|
+
<QUESTION>
|
157
|
+
<ID>323</ID>
|
158
|
+
<PARENT>323</PARENT>
|
159
|
+
<NAME>Random Question (Random Quiz)</NAME>
|
160
|
+
<QUESTIONTEXT>1</QUESTIONTEXT>
|
161
|
+
<QUESTIONTEXTFORMAT>0</QUESTIONTEXTFORMAT>
|
162
|
+
<IMAGE></IMAGE>
|
163
|
+
<GENERALFEEDBACK></GENERALFEEDBACK>
|
164
|
+
<DEFAULTGRADE>1</DEFAULTGRADE>
|
165
|
+
<PENALTY>0</PENALTY>
|
166
|
+
<QTYPE>random</QTYPE>
|
167
|
+
<LENGTH>1</LENGTH>
|
168
|
+
<STAMP>moodle19.divergentlogic.com+120611201858+mzdsN2</STAMP>
|
169
|
+
<VERSION>moodle19.divergentlogic.com+120611201859+VUUftZ</VERSION>
|
170
|
+
<HIDDEN>0</HIDDEN>
|
171
|
+
<TIMECREATED>1233796544</TIMECREATED>
|
172
|
+
<TIMEMODIFIED>1233796544</TIMEMODIFIED>
|
173
|
+
<CREATEDBY>1781</CREATEDBY>
|
174
|
+
<MODIFIEDBY>1781</MODIFIEDBY>
|
175
|
+
</QUESTION>
|
176
|
+
<QUESTION>
|
177
|
+
<ID>212</ID>
|
178
|
+
<PARENT>212</PARENT>
|
179
|
+
<NAME>Random Question (Random Quiz)</NAME>
|
180
|
+
<QUESTIONTEXT>1</QUESTIONTEXT>
|
181
|
+
<QUESTIONTEXTFORMAT>0</QUESTIONTEXTFORMAT>
|
182
|
+
<IMAGE></IMAGE>
|
183
|
+
<GENERALFEEDBACK></GENERALFEEDBACK>
|
184
|
+
<DEFAULTGRADE>1</DEFAULTGRADE>
|
185
|
+
<PENALTY>0</PENALTY>
|
186
|
+
<QTYPE>random</QTYPE>
|
187
|
+
<LENGTH>1</LENGTH>
|
188
|
+
<STAMP>moodle19.divergentlogic.com+120611201858+mzdsN2</STAMP>
|
189
|
+
<VERSION>moodle19.divergentlogic.com+120611201859+VUUftZ</VERSION>
|
190
|
+
<HIDDEN>0</HIDDEN>
|
191
|
+
<TIMECREATED>1233796544</TIMECREATED>
|
192
|
+
<TIMEMODIFIED>1233796544</TIMEMODIFIED>
|
193
|
+
<CREATEDBY>1781</CREATEDBY>
|
194
|
+
<MODIFIEDBY>1781</MODIFIEDBY>
|
195
|
+
</QUESTION>
|
196
|
+
<QUESTION>
|
197
|
+
<ID>101</ID>
|
198
|
+
<PARENT>101</PARENT>
|
199
|
+
<NAME>Random Question (Random Quiz)</NAME>
|
200
|
+
<QUESTIONTEXT>1</QUESTIONTEXT>
|
201
|
+
<QUESTIONTEXTFORMAT>0</QUESTIONTEXTFORMAT>
|
202
|
+
<IMAGE></IMAGE>
|
203
|
+
<GENERALFEEDBACK></GENERALFEEDBACK>
|
204
|
+
<DEFAULTGRADE>1</DEFAULTGRADE>
|
205
|
+
<PENALTY>0</PENALTY>
|
206
|
+
<QTYPE>random</QTYPE>
|
207
|
+
<LENGTH>1</LENGTH>
|
208
|
+
<STAMP>moodle19.divergentlogic.com+120611201858+mzdsN2</STAMP>
|
209
|
+
<VERSION>moodle19.divergentlogic.com+120611201859+VUUftZ</VERSION>
|
210
|
+
<HIDDEN>0</HIDDEN>
|
211
|
+
<TIMECREATED>1233796544</TIMECREATED>
|
212
|
+
<TIMEMODIFIED>1233796544</TIMEMODIFIED>
|
213
|
+
<CREATEDBY>1781</CREATEDBY>
|
214
|
+
<MODIFIEDBY>1781</MODIFIEDBY>
|
215
|
+
</QUESTION>
|
216
|
+
</QUESTIONS>
|
217
|
+
</QUESTION_CATEGORY>
|
218
|
+
<QUESTION_CATEGORY>
|
219
|
+
<ID>212</ID>
|
220
|
+
<NAME>Second Question Category</NAME>
|
221
|
+
<INFO>The second category for questions.</INFO>
|
222
|
+
<CONTEXT>
|
223
|
+
<LEVEL>course</LEVEL>
|
224
|
+
</CONTEXT>
|
225
|
+
<STAMP>moodle19.divergentlogic.com+120607210554+LT0tLH</STAMP>
|
226
|
+
<PARENT>0</PARENT>
|
227
|
+
<SORTORDER>999</SORTORDER>
|
228
|
+
<QUESTIONS>
|
229
|
+
<QUESTION>
|
230
|
+
<ID>878</ID>
|
231
|
+
<PARENT>0</PARENT>
|
232
|
+
<NAME>Numerical Question</NAME>
|
233
|
+
<QUESTIONTEXT>How old are you?</QUESTIONTEXT>
|
234
|
+
<QUESTIONTEXTFORMAT>1</QUESTIONTEXTFORMAT>
|
235
|
+
<IMAGE></IMAGE>
|
236
|
+
<GENERALFEEDBACK>Wow, you're old!</GENERALFEEDBACK>
|
237
|
+
<DEFAULTGRADE>1</DEFAULTGRADE>
|
238
|
+
<PENALTY>0.1</PENALTY>
|
239
|
+
<QTYPE>numerical</QTYPE>
|
240
|
+
<LENGTH>1</LENGTH>
|
241
|
+
<STAMP>moodle19.divergentlogic.com+120611201635+dGu0Ws</STAMP>
|
242
|
+
<VERSION>moodle19.divergentlogic.com+120611201635+bUiSIi</VERSION>
|
243
|
+
<HIDDEN>0</HIDDEN>
|
244
|
+
<TIMECREATED>1339445795</TIMECREATED>
|
245
|
+
<TIMEMODIFIED>1339445795</TIMEMODIFIED>
|
246
|
+
<CREATEDBY>2</CREATEDBY>
|
247
|
+
<MODIFIEDBY>2</MODIFIEDBY>
|
248
|
+
<NUMERICAL>
|
249
|
+
<ANSWER>43</ANSWER>
|
250
|
+
<TOLERANCE>2</TOLERANCE>
|
251
|
+
</NUMERICAL>
|
252
|
+
<ANSWERS>
|
253
|
+
<ANSWER>
|
254
|
+
<ID>43</ID>
|
255
|
+
<ANSWER_TEXT>28</ANSWER_TEXT>
|
256
|
+
<FRACTION>1</FRACTION>
|
257
|
+
<FEEDBACK>Great age!</FEEDBACK>
|
258
|
+
</ANSWER>
|
259
|
+
</ANSWERS>
|
260
|
+
</QUESTION>
|
261
|
+
<QUESTION>
|
262
|
+
<ID>767</ID>
|
263
|
+
<PARENT>767</PARENT>
|
264
|
+
<NAME>Random Question (Random Quiz)</NAME>
|
265
|
+
<QUESTIONTEXT>1</QUESTIONTEXT>
|
266
|
+
<QUESTIONTEXTFORMAT>0</QUESTIONTEXTFORMAT>
|
267
|
+
<IMAGE></IMAGE>
|
268
|
+
<GENERALFEEDBACK></GENERALFEEDBACK>
|
269
|
+
<DEFAULTGRADE>1</DEFAULTGRADE>
|
270
|
+
<PENALTY>0</PENALTY>
|
271
|
+
<QTYPE>random</QTYPE>
|
272
|
+
<LENGTH>1</LENGTH>
|
273
|
+
<STAMP>moodle19.divergentlogic.com+120611201858+mzdsN2</STAMP>
|
274
|
+
<VERSION>moodle19.divergentlogic.com+120611201859+VUUftZ</VERSION>
|
275
|
+
<HIDDEN>0</HIDDEN>
|
276
|
+
<TIMECREATED>1233796544</TIMECREATED>
|
277
|
+
<TIMEMODIFIED>1233796544</TIMEMODIFIED>
|
278
|
+
<CREATEDBY>1781</CREATEDBY>
|
279
|
+
<MODIFIEDBY>1781</MODIFIEDBY>
|
280
|
+
</QUESTION>
|
281
|
+
</QUESTIONS>
|
282
|
+
</QUESTION_CATEGORY>
|
283
|
+
</QUESTION_CATEGORIES>
|
284
|
+
<MODULES>
|
285
|
+
<MOD>
|
286
|
+
<ID>98989</ID>
|
287
|
+
<MODTYPE>quiz</MODTYPE>
|
288
|
+
<NAME>Random Quiz</NAME>
|
289
|
+
<INTRO>Random Quiz</INTRO>
|
290
|
+
<TIMEOPEN>0</TIMEOPEN>
|
291
|
+
<TIMECLOSE>0</TIMECLOSE>
|
292
|
+
<OPTIONFLAGS>1</OPTIONFLAGS>
|
293
|
+
<PENALTYSCHEME>1</PENALTYSCHEME>
|
294
|
+
<ATTEMPTS_NUMBER>2</ATTEMPTS_NUMBER>
|
295
|
+
<ATTEMPTONLAST>1</ATTEMPTONLAST>
|
296
|
+
<GRADEMETHOD>1</GRADEMETHOD>
|
297
|
+
<DECIMALPOINTS>2</DECIMALPOINTS>
|
298
|
+
<REVIEW>4652015</REVIEW>
|
299
|
+
<QUESTIONSPERPAGE>10</QUESTIONSPERPAGE>
|
300
|
+
<SHUFFLEQUESTIONS>1</SHUFFLEQUESTIONS>
|
301
|
+
<SHUFFLEANSWERS>1</SHUFFLEANSWERS>
|
302
|
+
<QUESTIONS>1111,1112,1113,1114,1115,1116,0</QUESTIONS>
|
303
|
+
<SUMGRADES>7</SUMGRADES>
|
304
|
+
<GRADE>10</GRADE>
|
305
|
+
<TIMECREATED>0</TIMECREATED>
|
306
|
+
<TIMEMODIFIED>1343752551</TIMEMODIFIED>
|
307
|
+
<TIMELIMIT>45</TIMELIMIT>
|
308
|
+
<PASSWORD>password</PASSWORD>
|
309
|
+
<SUBNET></SUBNET>
|
310
|
+
<POPUP>1</POPUP>
|
311
|
+
<DELAY1>7200</DELAY1>
|
312
|
+
<DELAY2>7200</DELAY2>
|
313
|
+
<QUESTION_INSTANCES>
|
314
|
+
<QUESTION_INSTANCE>
|
315
|
+
<ID>1111</ID>
|
316
|
+
<QUESTION>434</QUESTION>
|
317
|
+
<GRADE>1</GRADE>
|
318
|
+
</QUESTION_INSTANCE>
|
319
|
+
<QUESTION_INSTANCE>
|
320
|
+
<ID>1112</ID>
|
321
|
+
<QUESTION>323</QUESTION>
|
322
|
+
<GRADE>1</GRADE>
|
323
|
+
</QUESTION_INSTANCE>
|
324
|
+
<QUESTION_INSTANCE>
|
325
|
+
<ID>1113</ID>
|
326
|
+
<QUESTION>212</QUESTION>
|
327
|
+
<GRADE>2</GRADE>
|
328
|
+
</QUESTION_INSTANCE>
|
329
|
+
<QUESTION_INSTANCE>
|
330
|
+
<ID>1114</ID>
|
331
|
+
<QUESTION>545</QUESTION>
|
332
|
+
<GRADE>1</GRADE>
|
333
|
+
</QUESTION_INSTANCE>
|
334
|
+
<QUESTION_INSTANCE>
|
335
|
+
<ID>1115</ID>
|
336
|
+
<QUESTION>101</QUESTION>
|
337
|
+
<GRADE>1</GRADE>
|
338
|
+
</QUESTION_INSTANCE>
|
339
|
+
<QUESTION_INSTANCE>
|
340
|
+
<ID>1116</ID>
|
341
|
+
<QUESTION>767</QUESTION>
|
342
|
+
<GRADE>1</GRADE>
|
343
|
+
</QUESTION_INSTANCE>
|
344
|
+
</QUESTION_INSTANCES>
|
345
|
+
<FEEDBACKS>
|
346
|
+
<FEEDBACK>
|
347
|
+
<ID>44</ID>
|
348
|
+
<QUIZID>98989</QUIZID>
|
349
|
+
<FEEDBACKTEXT></FEEDBACKTEXT>
|
350
|
+
<MINGRADE>0</MINGRADE>
|
351
|
+
<MAXGRADE>11</MAXGRADE>
|
352
|
+
</FEEDBACK>
|
353
|
+
</FEEDBACKS>
|
354
|
+
</MOD>
|
355
|
+
</MODULES>
|
356
|
+
</COURSE>
|
357
|
+
</MOODLE_BACKUP>
|