asker-tool 2.3.0 → 2.3.3

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
  SHA256:
3
- metadata.gz: 426d13cb48d1dc13c0363945a5e22a4e3228983e616f3f4e2f56a3e2bab9dd53
4
- data.tar.gz: b39f0e3e55643503d40de9f965e09f32a7ee612f6adc6a306b02d25779c5d904
3
+ metadata.gz: 56755735d5f19ad8e304cc5124530c85fc122ed83e883cf2f837b60e0107870b
4
+ data.tar.gz: a72c98595cf2ab4fd39696725cd658a8709c52de88799d3fffebdbde7f937cfe
5
5
  SHA512:
6
- metadata.gz: 224bdd9d8ee79ce875375165d55a761b27d532be298bf593c71f43957caf26fb25d8a8f89fb5aea164538017c4f071c36d0d763784f706dc577de73b1cd3938e
7
- data.tar.gz: 8328b35acbd8962726a8f5ff5104f22e08b884b5de002aeba01654609bbeaa9901d6fc10aff5bca1bc49970ea43b65b8df1e9b4e7d7c6e3d6a8f65fce935fc41
6
+ metadata.gz: a22757919609b4931842b2620c456144a9a6991c4362c5881467139353cf35a93f67f74a2b463c0246fe9b66a3a4f1cd6a7917f1ca3810cc881a42e9d48b82f6
7
+ data.tar.gz: d49c36b5d2993237b5a922e54e0dc36c14019f43d0984f20d50f9c6894c2c603da4d348d774963765ebc87c34869d3ce7c2330b33c77a94f3c03f081f659b715
data/README.md CHANGED
@@ -1,6 +1,5 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/asker-tool.svg)](https://badge.fury.io/rb/asker-tool)
2
2
  ![GitHub](https://img.shields.io/github/license/dvarrui/asker)
3
- ![Gem](https://img.shields.io/gem/dv/asker-tool/2.2.5)
4
3
 
5
4
  # ASKER
6
5
 
@@ -17,11 +16,9 @@ ASKER helps trainers to create a huge amount of questions, from a definitions (_
17
16
  ## Installation
18
17
 
19
18
  1. Install Ruby on your system.
20
- 2. Install Asker on your system. Two ways:
21
- * (a) `sudo gem install asker-tool` as superuser (root) or
22
- * (b) `gem install --user-install asker-tool` as regular user.
19
+ 2. Install Asker on your system: `sudo gem install asker-tool`
23
20
 
24
- > To update Asker we do `sudo gem update asker-tool`
21
+ > REMEMBER: To update Asker execute `sudo gem update asker-tool`
25
22
 
26
23
  ## Usage
27
24
 
@@ -1,4 +1,3 @@
1
- # frozen_string_literal: true
2
1
 
3
2
  require_relative 'stage_d'
4
3
  require_relative 'stage_b'
@@ -31,8 +31,6 @@ class StageB < BaseStage
31
31
 
32
32
  questions
33
33
  end
34
- # rubocop:enable Metrics/AbcSize
35
- # rubocop:enable Metrics/MethodLength
36
34
 
37
35
  ##
38
36
  # Process table data to generate match questions
@@ -52,7 +50,7 @@ class StageB < BaseStage
52
50
  # Question type <b1match>: match 4 items from the same table
53
51
  e.shuffle!
54
52
  q = Question.new(:match)
55
- q.name = "#{name}-#{num}-b1match4x4-#{p_table.name}"
53
+ q.name = "#{name}-#{num}-b1match4-#{p_table.name}"
56
54
  q.tags << 'match'
57
55
  q.tags << 'random'
58
56
  q.text = random_image_for(name) \
@@ -64,9 +62,11 @@ class StageB < BaseStage
64
62
  # Add an extra line
65
63
  if list2.count.positive?
66
64
  q.matching << ['', list2[0][:data][index2]]
65
+ q.name = "#{name}-#{num}-b1match4x5-#{p_table.name}"
67
66
  else
68
- q.tags << 'misspell'
67
+ q.tags << 'misspelled'
69
68
  q.matching << ['', lang.do_mistake_to(e[0][:data][index2])]
69
+ q.name = "#{name}-#{num}-b1match4x5misspelled-#{p_table.name}"
70
70
  end
71
71
  questions << q
72
72
 
@@ -85,9 +85,11 @@ class StageB < BaseStage
85
85
  # Add an extra line
86
86
  if list2.count.positive?
87
87
  q.matching << ['', list2[0][:data][index2]]
88
+ q.name = "#{name}-#{num}-b1match3x1misspelledx1error-#{p_table.name}"
88
89
  else
89
- q.tags << 'misspell'
90
+ q.tags << 'misspelled'
90
91
  q.matching << ['', lang.do_mistake_to(e[0][:data][index2])]
92
+ q.name = "#{name}-#{num}-b1match3x1misspelledx1misspelled-#{p_table.name}"
91
93
  end
92
94
  questions << q
93
95
  end
@@ -103,7 +105,7 @@ class StageB < BaseStage
103
105
  # Question 3 items from table-A, and 1 item from table-B
104
106
  if s.count > 3
105
107
  q = Question.new(:match)
106
- q.name = "#{name}-#{num}-b1match3x1-#{p_table.name}"
108
+ q.name = "#{name}-#{num}-b1match3x1errorx1misspelled-#{p_table.name}"
107
109
  q.tags << 'match'
108
110
  q.tags << 'random'
109
111
  q.text = random_image_for(name) \
@@ -119,10 +121,4 @@ class StageB < BaseStage
119
121
 
120
122
  questions
121
123
  end
122
- # rubocop:enable Metrics/AbcSize
123
- # rubocop:enable Metrics/MethodLength
124
- # rubocop:enable Metrics/CyclomaticComplexity
125
- # rubocop:enable Style/ConditionalAssignment
126
- # rubocop:enable Metrics/BlockLength
127
- # rubocop:enable Metrics/PerceivedComplexity
128
124
  end
@@ -33,8 +33,9 @@ class Application
33
33
  @config['questions']['stages'] = stages.map(&:to_sym)
34
34
 
35
35
  fractions = @config['questions']['fractions'].split(',')
36
- @config['questions']['fractions'] = fractions
37
-
36
+ @config['questions']['fractions'] = fractions + Array.new(5, '0')
37
+ # require 'debug'; binding.break
38
+
38
39
  Rainbow.enabled = false
39
40
  Rainbow.enabled = true if @config['global']['color'].downcase == 'yes'
40
41
  end
@@ -47,6 +47,7 @@ formula_weights = 1, 1, 1
47
47
 
48
48
  ; Default values
49
49
  ; fractions = 0 to disable
50
+ ; Only used for multichoice questions
50
51
  fractions = 0, -50, -33.33, -25, -20
51
52
 
52
53
  ; List of values d,b,f,i,s,t
@@ -1,16 +1,16 @@
1
- %map{ :lang => 'en', :context => 'music, band', :version => '1'}
1
+ %map{ lang: 'en', context: 'music, band', version: '1'}
2
2
 
3
3
  %concept
4
4
  %names AC/DC, ACDC
5
5
  %tags rock, band, australia
6
6
  %def Australian rock band formed by Scottish-born brothers Malcolm and Angus Young
7
- %table{ :fields => 'members'}
7
+ %table{ fields: 'members'}
8
8
  %row Bon Scott
9
9
  %row Angus Young
10
10
  %row Malcolm Young
11
11
  %row Phil Rudd
12
12
  %row Cliff Williams
13
- %table{ :fields => 'attribute, value'}
13
+ %table{ fields: 'attribute, value'}
14
14
  %row
15
15
  %col Genres
16
16
  %col Hard rock blues rock rock and roll
@@ -20,7 +20,7 @@
20
20
  %row
21
21
  %col Formed in
22
22
  %col Sydney
23
- %table{ :fields => 'Albums', :sequence => 'Albums sorted by date'}
23
+ %table{ fields: 'Albums', sequence: 'Albums sorted by date'}
24
24
  %row Albums High Voltage
25
25
  %row Powerage
26
26
  %row Highway to Hell
@@ -36,7 +36,6 @@
36
36
  </feedback>
37
37
  </answer>
38
38
  <%
39
- question.bads.shuffle! if question.shuffle?
40
39
  question.bads.each do |i|
41
40
  %>
42
41
  <answer fraction="<%= penalty %>" format="html">
@@ -15,6 +15,7 @@ module QuestionMoodleFormatter
15
15
  fractions = Application.instance.config['questions']['fractions']
16
16
  # penalties = ['', '-50', '-33.33333', '-25', '-20']
17
17
  penalties = fractions
18
+
18
19
  penalty = penalties[question.bads.size]
19
20
  template = File.read(File.join(File.dirname(__FILE__), 'moodle', 'multichoice.erb'))
20
21
  when :boolean
data/lib/asker/version.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  # Global parameters
3
3
  module Version
4
4
  MAJOR_NUMBER = '2.3'
5
- VERSION = "#{MAJOR_NUMBER}.0"
5
+ VERSION = "#{MAJOR_NUMBER}.3"
6
6
  NAME = 'asker'
7
7
  GEM = 'asker-tool'
8
8
  CONFIGFILE = 'asker.ini'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asker-tool
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Vargas Ruiz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-15 00:00:00.000000000 Z
11
+ date: 2022-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: haml
@@ -108,48 +108,6 @@ dependencies:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0.20'
111
- - !ruby/object:Gem::Dependency
112
- name: minitest
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: '5.11'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: '5.11'
125
- - !ruby/object:Gem::Dependency
126
- name: pry-byebug
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: '3.9'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: '3.9'
139
- - !ruby/object:Gem::Dependency
140
- name: rubocop
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: '0.74'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: '0.74'
153
111
  description: ASKER helps trainers to create a huge amount of questions, from a definitions
154
112
  input file.
155
113
  email: teuton.software@protonmail.com