moodle2cc 0.2.33 → 0.2.34
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b1d22bdd944f0925c2befbbee3d813434430390
|
4
|
+
data.tar.gz: 9df2399db6f8d7c7f69cd06dc614a47efd19e466
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa64d74660520a99a1a10684f9dce33f93a5561b4e082e71143274ea9a04bbf29a39869fd58ce63e46c4703f2ea59cd87e0dded1b1dedced31fed52360bf4771
|
7
|
+
data.tar.gz: b984fdff074b0571fe6374da222ec5afc7e22e0ffbc063440f9c1458ad1d42f9547a3eb12a7578d31c63bac0bd7794e8c969704cd033bad3acfc6e27b6f20761
|
@@ -9,13 +9,13 @@ module Moodle2CC::CanvasCC
|
|
9
9
|
presentation_node.response_lid(:ident => "response_#{match[:id]}") do |response_node|
|
10
10
|
next unless match[:question_text].length > 0
|
11
11
|
response_node.material do |material_node|
|
12
|
-
material_node.mattext(match[:question_text], :texttype => 'text/plain')
|
12
|
+
material_node.mattext(match[:question_text], :texttype => ((match[:question_text_format].to_i == 1) ? 'text/html' : 'text/plain'))
|
13
13
|
end
|
14
14
|
response_node.render_choice do |choice_node|
|
15
15
|
question.matches.each do |possible_match|
|
16
16
|
choice_node.response_label(:ident => possible_match[:id]) do |label_node|
|
17
17
|
label_node.material do |material_node|
|
18
|
-
material_node.mattext(possible_match[:answer_text], :texttype => 'text/plain')
|
18
|
+
material_node.mattext(possible_match[:answer_text], :texttype => ((match[:answer_text_format].to_i == 1) ? 'text/html' : 'text/plain'))
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
@@ -12,8 +12,10 @@ module Moodle2CC::Moodle2Converter
|
|
12
12
|
copy = match.dup
|
13
13
|
copy[:question_text] ||= ''
|
14
14
|
copy[:question_text].gsub(/\{(.*?)\}/, '[\1]')
|
15
|
-
|
16
|
-
|
15
|
+
if copy[:question_text_format].to_i == 4 # markdown
|
16
|
+
copy[:question_text] = RDiscount.new(copy[:question_text]).to_html
|
17
|
+
copy[:question_text_format] = '1' # html
|
18
|
+
end
|
17
19
|
canvas_question.matches << copy
|
18
20
|
end
|
19
21
|
canvas_question
|
data/lib/moodle2cc/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.34
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Durtschi
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-07-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rubyzip
|