asker-tool 2.3.3 → 2.3.4

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: 56755735d5f19ad8e304cc5124530c85fc122ed83e883cf2f837b60e0107870b
4
- data.tar.gz: a72c98595cf2ab4fd39696725cd658a8709c52de88799d3fffebdbde7f937cfe
3
+ metadata.gz: c928893a28d5c554456f150464435ee52fbef9cb7fd833684725ec8125eefae9
4
+ data.tar.gz: b3e48175853068804767ad312df8c795404dc8161e36bd9856581e912c9b9c2f
5
5
  SHA512:
6
- metadata.gz: a22757919609b4931842b2620c456144a9a6991c4362c5881467139353cf35a93f67f74a2b463c0246fe9b66a3a4f1cd6a7917f1ca3810cc881a42e9d48b82f6
7
- data.tar.gz: d49c36b5d2993237b5a922e54e0dc36c14019f43d0984f20d50f9c6894c2c603da4d348d774963765ebc87c34869d3ce7c2330b33c77a94f3c03f081f659b715
6
+ metadata.gz: 4e30502bd72cd2a104655edce3d5263f1a1a710b859b3c3bde867bab9e48fac78f6ca8958798d9f05f22ddfacccf4700a22e1616953179c309a887c974efec10
7
+ data.tar.gz: 20264b770646e08cea9debdef442ec81cacdad4ff64b25725c3129234747f9dc58a30fcb8f5c17a38f207e003f0e61a9fae6eac33421f086871f1477f1ccc68d
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  require 'set'
4
2
 
5
3
  require_relative 'base_stage'
@@ -50,7 +48,7 @@ class StageB < BaseStage
50
48
  # Question type <b1match>: match 4 items from the same table
51
49
  e.shuffle!
52
50
  q = Question.new(:match)
53
- q.name = "#{name}-#{num}-b1match4-#{p_table.name}"
51
+ q.name = "#{name}-#{num}-b1match4x4-#{p_table.name}"
54
52
  q.tags << 'match'
55
53
  q.tags << 'random'
56
54
  q.text = random_image_for(name) \
@@ -59,21 +57,43 @@ class StageB < BaseStage
59
57
  q.matching << [e[1][:data][index1], e[1][:data][index2]]
60
58
  q.matching << [e[2][:data][index1], e[2][:data][index2]]
61
59
  q.matching << [e[3][:data][index1], e[3][:data][index2]]
62
- # Add an extra line
60
+ questions << q
61
+
63
62
  if list2.count.positive?
64
- q.matching << ['', list2[0][:data][index2]]
63
+ # Add an extra line
64
+ e.shuffle!
65
+ q = Question.new(:match)
65
66
  q.name = "#{name}-#{num}-b1match4x5-#{p_table.name}"
67
+ q.tags << 'match'
68
+ q.tags << 'random'
69
+ q.text = random_image_for(name) \
70
+ + lang.text_for(:b1, name, p_table.fields[index1].capitalize, p_table.fields[index2].capitalize)
71
+ q.matching << [e[0][:data][index1], e[0][:data][index2]]
72
+ q.matching << [e[1][:data][index1], e[1][:data][index2]]
73
+ q.matching << [e[2][:data][index1], e[2][:data][index2]]
74
+ q.matching << [e[3][:data][index1], e[3][:data][index2]]
75
+ q.matching << ['', list2[0][:data][index2]]
76
+ questions << q
66
77
  else
67
- q.tags << 'misspelled'
78
+ e.shuffle!
79
+ q = Question.new(:match)
80
+ q.name = "#{name}-#{num}-b1match4x5_1misspelled-#{p_table.name}"
81
+ q.tags << 'match'
82
+ q.tags << 'random'
83
+ q.text = random_image_for(name) \
84
+ + lang.text_for(:b1, name, p_table.fields[index1].capitalize, p_table.fields[index2].capitalize)
85
+ q.matching << [e[0][:data][index1], e[0][:data][index2]]
86
+ q.matching << [e[1][:data][index1], e[1][:data][index2]]
87
+ q.matching << [e[2][:data][index1], e[2][:data][index2]]
88
+ q.matching << [e[3][:data][index1], e[3][:data][index2]]
68
89
  q.matching << ['', lang.do_mistake_to(e[0][:data][index2])]
69
- q.name = "#{name}-#{num}-b1match4x5misspelled-#{p_table.name}"
90
+ questions << q
70
91
  end
71
- questions << q
72
92
 
73
93
  # Question type <b1match>: match 3 items from table-A and 1 item with error
74
94
  e.shuffle!
75
95
  q = Question.new(:match)
76
- q.name = "#{name}-#{num}-b1match3x1misspelled-#{p_table.name}"
96
+ q.name = "#{name}-#{num}-b1match4x4_1misspelled-#{p_table.name}"
77
97
  q.tags << 'match'
78
98
  q.tags << 'random'
79
99
  q.text = random_image_for(name) \
@@ -82,16 +102,40 @@ class StageB < BaseStage
82
102
  q.matching << [e[1][:data][index1], e[1][:data][index2]]
83
103
  q.matching << [e[2][:data][index1], e[2][:data][index2]]
84
104
  q.matching << [lang.do_mistake_to(e[3][:data][index1]), lang.text_for(:misspelling)]
85
- # Add an extra line
105
+ questions << q
106
+
86
107
  if list2.count.positive?
108
+ # Add an extra line error
109
+ e.shuffle!
110
+ q = Question.new(:match)
111
+ q.name = "#{name}-#{num}-b1match4x5_1misspelled_1error-#{p_table.name}"
112
+ q.tags << 'match'
113
+ q.tags << 'random'
114
+ q.text = random_image_for(name) \
115
+ + lang.text_for(:b1, name, p_table.fields[index1].capitalize, p_table.fields[index2].capitalize)
116
+ q.matching << [e[0][:data][index1], e[0][:data][index2]]
117
+ q.matching << [e[1][:data][index1], e[1][:data][index2]]
118
+ q.matching << [e[2][:data][index1], e[2][:data][index2]]
119
+ q.matching << [lang.do_mistake_to(e[3][:data][index1]), lang.text_for(:misspelling)]
87
120
  q.matching << ['', list2[0][:data][index2]]
88
- q.name = "#{name}-#{num}-b1match3x1misspelledx1error-#{p_table.name}"
121
+ questions << q
89
122
  else
123
+ # Add an extra line misspelled
124
+ e.shuffle!
125
+ q = Question.new(:match)
126
+ q.name = "#{name}-#{num}-b1match4x5_2misspelled-#{p_table.name}"
127
+ q.tags << 'match'
128
+ q.tags << 'random'
90
129
  q.tags << 'misspelled'
130
+ q.text = random_image_for(name) \
131
+ + lang.text_for(:b1, name, p_table.fields[index1].capitalize, p_table.fields[index2].capitalize)
132
+ q.matching << [e[0][:data][index1], e[0][:data][index2]]
133
+ q.matching << [e[1][:data][index1], e[1][:data][index2]]
134
+ q.matching << [e[2][:data][index1], e[2][:data][index2]]
135
+ q.matching << [lang.do_mistake_to(e[3][:data][index1]), lang.text_for(:misspelling)]
91
136
  q.matching << ['', lang.do_mistake_to(e[0][:data][index2])]
92
- q.name = "#{name}-#{num}-b1match3x1misspelledx1misspelled-#{p_table.name}"
137
+ questions << q
93
138
  end
94
- questions << q
95
139
  end
96
140
  end
97
141
 
@@ -105,7 +149,19 @@ class StageB < BaseStage
105
149
  # Question 3 items from table-A, and 1 item from table-B
106
150
  if s.count > 3
107
151
  q = Question.new(:match)
108
- q.name = "#{name}-#{num}-b1match3x1errorx1misspelled-#{p_table.name}"
152
+ q.name = "#{name}-#{num}-b1match4x4_1error-#{p_table.name}"
153
+ q.tags << 'match'
154
+ q.tags << 'random'
155
+ q.text = random_image_for(name) \
156
+ + lang.text_for(:b1, name, p_table.fields[index1].capitalize, p_table.fields[index2].capitalize)
157
+ q.matching << [list1[0][:data][index1], list1[0][:data][index2]]
158
+ q.matching << [list1[1][:data][index1], list1[1][:data][index2]]
159
+ q.matching << [list1[2][:data][index1], list1[2][:data][index2]]
160
+ q.matching << [list2[0][:data][index1], lang.text_for(:error)]
161
+ questions << q
162
+
163
+ q = Question.new(:match)
164
+ q.name = "#{name}-#{num}-b1match4x5_1error_1misspelled-#{p_table.name}"
109
165
  q.tags << 'match'
110
166
  q.tags << 'random'
111
167
  q.text = random_image_for(name) \
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}.3"
5
+ VERSION = "#{MAJOR_NUMBER}.4"
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.3
4
+ version: 2.3.4
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-24 00:00:00.000000000 Z
11
+ date: 2022-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: haml