moodle2cc 0.2.0 → 0.2.1

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: 7258b41260e20424fd1f99850e066ab30f206cc4
4
- data.tar.gz: c3065280c0c4a880e846de58712345b0e62e6292
3
+ metadata.gz: be523a4b92d0920e6e7bef88d5bf693552a69b7d
4
+ data.tar.gz: ff8df82f8c6779019a2e0730ffa76f02b75d384d
5
5
  SHA512:
6
- metadata.gz: 0ff46d7f34807dcd9d9911e36506826f7cb1a11556d1aeda982cf6bed6c606365d2e7e0045160c621609f7099c5c1c39f9c3b38eb3815f0c9e471d04ad614d7c
7
- data.tar.gz: 519aa8dfe4ed0996be52b619be3c5056a74b46a8956fca66ac41671cc1c6a61b9e7fb00d7929bc45f2e046b4237c6ebee884829b47f3c076826c8bf4803e34f8
6
+ metadata.gz: 4430e423442d0272bae6204ae5fcb9729a1327bd315f46f093eee1ea5ff84a3dc9f26d8ced30061882288fc4f364b4c75b0f0c359f2f5cd7f306b8bac9992c00
7
+ data.tar.gz: fe3a02508e3514150e19c49ab6503593bf18efd338d52922257f608f59ad863ed2fbc59df0bcc1dc5ff1c9cc736c211e041c9d07083baf53157a32ed603504a3
data/Changelog CHANGED
@@ -1,3 +1,6 @@
1
+ 2014-04-02 Version 0.2.1
2
+ * Fixed true/false questions conversion for moodle 2
3
+
1
4
  2014-04-01 Version 0.2.0
2
5
  * Add support for converting Moodle 2 exports to canvas
3
6
  flavored common cartridge
@@ -7,10 +7,7 @@ module Moodle2CC::Moodle2Converter
7
7
  def convert_question(moodle_question)
8
8
  moodle_question.answers = moodle_question.answers.select{|a|
9
9
  [moodle_question.true_answer.to_s, moodle_question.false_answer.to_s].include?(a.id.to_s)
10
- }.map do |a|
11
- a.fraction = (moodle_question.true_answer.to_s == a.id.to_s) ? 1.0 : 0.0
12
- a
13
- end
10
+ }
14
11
 
15
12
  canvas_question = super(moodle_question)
16
13
  canvas_question
@@ -1,3 +1,3 @@
1
1
  module Moodle2CC
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -18,8 +18,7 @@ module Moodle2CC::Moodle2Converter::QuestionConverters
18
18
  converted_question = QuestionConverter.new.convert(moodle_question)
19
19
 
20
20
  expect(converted_question.identifier).to eq moodle_question.id
21
- expect(converted_question.answers.detect{|a| a.id == true_answer.id}.fraction).to eq 1.0
22
- expect(converted_question.answers.detect{|a| a.id == false_answer.id}.fraction).to eq 0.0
21
+ expect(converted_question.answers.count).to eq 2
23
22
  end
24
23
 
25
24
  end
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.0
4
+ version: 0.2.1
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: 2014-04-01 00:00:00.000000000 Z
13
+ date: 2014-04-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rubyzip