asker-tool 2.1.3 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -19
  3. data/bin/asker +2 -1
  4. data/lib/asker/ai/ai.rb +10 -3
  5. data/lib/asker/ai/ai_calculate.rb +20 -6
  6. data/lib/asker/ai/code/base_code_ai.rb +104 -0
  7. data/lib/asker/{code/ai → ai/code}/code_ai_factory.rb +11 -1
  8. data/lib/asker/{code/ai → ai/code}/javascript_code_ai.rb +2 -5
  9. data/lib/asker/ai/code/problem_code_ai.rb +176 -0
  10. data/lib/asker/{code/ai → ai/code}/python_code_ai.rb +2 -5
  11. data/lib/asker/{code/ai → ai/code}/ruby_code_ai.rb +14 -7
  12. data/lib/asker/{code/ai → ai/code}/sql_code_ai.rb +2 -5
  13. data/lib/asker/ai/concept_ai.rb +12 -2
  14. data/lib/asker/ai/question.rb +28 -6
  15. data/lib/asker/ai/stages/base_stage.rb +45 -6
  16. data/lib/asker/ai/stages/stage_b.rb +100 -50
  17. data/lib/asker/ai/stages/stage_d.rb +75 -90
  18. data/lib/asker/ai/stages/stage_f.rb +64 -36
  19. data/lib/asker/ai/stages/stage_i.rb +79 -92
  20. data/lib/asker/ai/stages/stage_s.rb +41 -36
  21. data/lib/asker/ai/stages/stage_t.rb +149 -108
  22. data/lib/asker/application.rb +24 -7
  23. data/lib/asker/checker.rb +149 -52
  24. data/lib/asker/cli.rb +37 -32
  25. data/lib/asker/data/code.rb +76 -0
  26. data/lib/asker/data/column.rb +31 -21
  27. data/lib/asker/data/concept.rb +108 -65
  28. data/lib/asker/data/data_field.rb +14 -0
  29. data/lib/asker/data/row.rb +75 -52
  30. data/lib/asker/data/table.rb +91 -42
  31. data/lib/asker/data/template.rb +3 -1
  32. data/lib/asker/data/world.rb +61 -32
  33. data/lib/asker/{exporter/code_screen_exporter.rb → displayer/code_displayer.rb} +13 -6
  34. data/lib/asker/displayer/concept_ai_displayer.erb +10 -0
  35. data/lib/asker/displayer/concept_ai_displayer.rb +133 -0
  36. data/lib/asker/displayer/concept_displayer.rb +34 -0
  37. data/lib/asker/displayer/stats_displayer.rb +22 -0
  38. data/lib/asker/exporter/code_gift_exporter.rb +10 -11
  39. data/lib/asker/exporter/concept_ai_gift_exporter.rb +21 -13
  40. data/lib/asker/exporter/concept_ai_moodle_exporter.rb +44 -0
  41. data/lib/asker/exporter/concept_ai_yaml_exporter.rb +14 -9
  42. data/lib/asker/exporter/concept_doc_exporter.rb +21 -14
  43. data/lib/asker/exporter/data_gift_exporter.rb +29 -0
  44. data/lib/asker/exporter/output_file_exporter.rb +21 -0
  45. data/lib/asker/files/{config.ini → asker.ini} +48 -1
  46. data/lib/asker/files/example-concept.haml +24 -8
  47. data/lib/asker/files/language/du/connectors.yaml +81 -0
  48. data/lib/asker/files/language/du/mistakes.yaml +82 -0
  49. data/lib/asker/files/language/du/templates.yaml +29 -0
  50. data/lib/asker/files/language/en/connectors.yaml +44 -0
  51. data/lib/asker/files/language/en/mistakes.yaml +37 -0
  52. data/lib/asker/files/language/en/templates.yaml +29 -0
  53. data/lib/asker/files/language/es/connectors.yaml +92 -0
  54. data/lib/asker/files/language/es/mistakes.yaml +84 -0
  55. data/lib/asker/files/language/es/templates.yaml +29 -0
  56. data/lib/asker/files/language/fr/connectors.yaml +76 -0
  57. data/lib/asker/files/language/fr/mistakes.yaml +82 -0
  58. data/lib/asker/files/language/fr/templates.yaml +29 -0
  59. data/lib/asker/files/language/javascript/connectors.yaml +11 -0
  60. data/lib/asker/files/language/javascript/mistakes.yaml +30 -0
  61. data/lib/asker/files/language/javascript/templates.yaml +3 -0
  62. data/lib/asker/files/language/math/connectors.yaml +2 -0
  63. data/lib/asker/files/language/math/mistakes.yaml +2 -0
  64. data/lib/asker/files/language/math/templates.yaml +1 -0
  65. data/lib/asker/files/language/python/connectors.yaml +11 -0
  66. data/lib/asker/files/language/python/mistakes.yaml +26 -0
  67. data/lib/asker/files/language/python/templates.yaml +3 -0
  68. data/lib/asker/files/language/ruby/connectors.yaml +11 -0
  69. data/lib/asker/files/language/ruby/mistakes.yaml +33 -0
  70. data/lib/asker/files/language/ruby/templates.yaml +3 -0
  71. data/lib/asker/files/language/sql/connectors.yaml +6 -0
  72. data/lib/asker/files/language/sql/mistakes.yaml +11 -0
  73. data/lib/asker/files/language/sql/templates.yaml +2 -0
  74. data/lib/asker/formatter/concept_string_formatter.rb +13 -9
  75. data/lib/asker/formatter/moodle/matching.erb +38 -0
  76. data/lib/asker/formatter/moodle/multichoice.erb +49 -0
  77. data/lib/asker/formatter/moodle/shortanswer.erb +30 -0
  78. data/lib/asker/formatter/moodle/truefalse.erb +47 -0
  79. data/lib/asker/formatter/question_gift_formatter.rb +30 -20
  80. data/lib/asker/formatter/question_moodle_formatter.rb +27 -0
  81. data/lib/asker/lang/lang.rb +18 -12
  82. data/lib/asker/lang/lang_factory.rb +32 -5
  83. data/lib/asker/lang/text_actions.rb +87 -69
  84. data/lib/asker/loader/code_loader.rb +4 -4
  85. data/lib/asker/loader/content_loader.rb +16 -12
  86. data/lib/asker/loader/directory_loader.rb +3 -3
  87. data/lib/asker/loader/embedded_file.rb +42 -0
  88. data/lib/asker/loader/file_loader.rb +3 -12
  89. data/lib/asker/loader/haml_loader.rb +15 -0
  90. data/lib/asker/loader/image_url_loader.rb +9 -11
  91. data/lib/asker/loader/input_loader.rb +24 -8
  92. data/lib/asker/loader/project_loader.rb +42 -30
  93. data/lib/asker/logger.rb +30 -6
  94. data/lib/asker/project.rb +28 -117
  95. data/lib/asker/skeleton.rb +40 -29
  96. data/lib/asker.rb +68 -79
  97. metadata +57 -74
  98. data/docs/changelog/v2.1.md +0 -99
  99. data/docs/commands.md +0 -12
  100. data/docs/contributions.md +0 -18
  101. data/docs/history.md +0 -40
  102. data/docs/idea.md +0 -44
  103. data/docs/inputs/README.md +0 -39
  104. data/docs/inputs/code.md +0 -69
  105. data/docs/inputs/concepts.md +0 -142
  106. data/docs/inputs/jedi.md +0 -68
  107. data/docs/inputs/tables.md +0 -112
  108. data/docs/inputs/templates.md +0 -87
  109. data/docs/install/README.md +0 -38
  110. data/docs/install/manual.md +0 -26
  111. data/docs/install/scripts.md +0 -38
  112. data/docs/revise/asker-file.md +0 -41
  113. data/docs/revise/buenas-practicas/01-convocatoria.md +0 -30
  114. data/docs/revise/buenas-practicas/02-formulario.md +0 -35
  115. data/docs/revise/buenas-practicas/03-descripcion.md +0 -63
  116. data/docs/revise/buenas-practicas/04-resultados.md +0 -17
  117. data/docs/revise/buenas-practicas/05-reproducir.md +0 -10
  118. data/docs/revise/ejemplos/01/README.md +0 -27
  119. data/docs/revise/ejemplos/02/README.md +0 -31
  120. data/docs/revise/ejemplos/03/README.md +0 -31
  121. data/docs/revise/ejemplos/04/README.md +0 -37
  122. data/docs/revise/ejemplos/05/README.md +0 -25
  123. data/docs/revise/ejemplos/06/README.md +0 -43
  124. data/docs/revise/ejemplos/README.md +0 -11
  125. data/docs/revise/projects.md +0 -74
  126. data/lib/asker/code/ai/base_code_ai.rb +0 -48
  127. data/lib/asker/code/code.rb +0 -53
  128. data/lib/asker/exporter/concept_ai_screen_exporter.rb +0 -115
  129. data/lib/asker/exporter/concept_screen_exporter.rb +0 -25
  130. data/lib/asker/exporter/main.rb +0 -9
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.1.3
4
+ version: 2.2.0
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: 2020-02-25 00:00:00.000000000 Z
11
+ date: 2021-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: haml
@@ -117,69 +117,20 @@ extensions: []
117
117
  extra_rdoc_files:
118
118
  - README.md
119
119
  - LICENSE
120
- - docs/idea.md
121
- - docs/changelog/v2.1.md
122
- - docs/revise/buenas-practicas/05-reproducir.md
123
- - docs/revise/buenas-practicas/04-resultados.md
124
- - docs/revise/buenas-practicas/01-convocatoria.md
125
- - docs/revise/buenas-practicas/02-formulario.md
126
- - docs/revise/buenas-practicas/03-descripcion.md
127
- - docs/revise/ejemplos/01/README.md
128
- - docs/revise/ejemplos/04/README.md
129
- - docs/revise/ejemplos/06/README.md
130
- - docs/revise/ejemplos/02/README.md
131
- - docs/revise/ejemplos/05/README.md
132
- - docs/revise/ejemplos/03/README.md
133
- - docs/revise/ejemplos/README.md
134
- - docs/revise/asker-file.md
135
- - docs/revise/projects.md
136
- - docs/commands.md
137
- - docs/contributions.md
138
- - docs/install/scripts.md
139
- - docs/install/README.md
140
- - docs/install/manual.md
141
- - docs/inputs/concepts.md
142
- - docs/inputs/tables.md
143
- - docs/inputs/code.md
144
- - docs/inputs/jedi.md
145
- - docs/inputs/templates.md
146
- - docs/inputs/README.md
147
- - docs/history.md
148
120
  files:
149
121
  - LICENSE
150
122
  - README.md
151
123
  - bin/asker
152
- - docs/changelog/v2.1.md
153
- - docs/commands.md
154
- - docs/contributions.md
155
- - docs/history.md
156
- - docs/idea.md
157
- - docs/inputs/README.md
158
- - docs/inputs/code.md
159
- - docs/inputs/concepts.md
160
- - docs/inputs/jedi.md
161
- - docs/inputs/tables.md
162
- - docs/inputs/templates.md
163
- - docs/install/README.md
164
- - docs/install/manual.md
165
- - docs/install/scripts.md
166
- - docs/revise/asker-file.md
167
- - docs/revise/buenas-practicas/01-convocatoria.md
168
- - docs/revise/buenas-practicas/02-formulario.md
169
- - docs/revise/buenas-practicas/03-descripcion.md
170
- - docs/revise/buenas-practicas/04-resultados.md
171
- - docs/revise/buenas-practicas/05-reproducir.md
172
- - docs/revise/ejemplos/01/README.md
173
- - docs/revise/ejemplos/02/README.md
174
- - docs/revise/ejemplos/03/README.md
175
- - docs/revise/ejemplos/04/README.md
176
- - docs/revise/ejemplos/05/README.md
177
- - docs/revise/ejemplos/06/README.md
178
- - docs/revise/ejemplos/README.md
179
- - docs/revise/projects.md
180
124
  - lib/asker.rb
181
125
  - lib/asker/ai/ai.rb
182
126
  - lib/asker/ai/ai_calculate.rb
127
+ - lib/asker/ai/code/base_code_ai.rb
128
+ - lib/asker/ai/code/code_ai_factory.rb
129
+ - lib/asker/ai/code/javascript_code_ai.rb
130
+ - lib/asker/ai/code/problem_code_ai.rb
131
+ - lib/asker/ai/code/python_code_ai.rb
132
+ - lib/asker/ai/code/ruby_code_ai.rb
133
+ - lib/asker/ai/code/sql_code_ai.rb
183
134
  - lib/asker/ai/concept_ai.rb
184
135
  - lib/asker/ai/question.rb
185
136
  - lib/asker/ai/stages/base_stage.rb
@@ -193,13 +144,7 @@ files:
193
144
  - lib/asker/application.rb
194
145
  - lib/asker/checker.rb
195
146
  - lib/asker/cli.rb
196
- - lib/asker/code/ai/base_code_ai.rb
197
- - lib/asker/code/ai/code_ai_factory.rb
198
- - lib/asker/code/ai/javascript_code_ai.rb
199
- - lib/asker/code/ai/python_code_ai.rb
200
- - lib/asker/code/ai/ruby_code_ai.rb
201
- - lib/asker/code/ai/sql_code_ai.rb
202
- - lib/asker/code/code.rb
147
+ - lib/asker/data/code.rb
203
148
  - lib/asker/data/column.rb
204
149
  - lib/asker/data/concept.rb
205
150
  - lib/asker/data/data_field.rb
@@ -207,22 +152,58 @@ files:
207
152
  - lib/asker/data/table.rb
208
153
  - lib/asker/data/template.rb
209
154
  - lib/asker/data/world.rb
155
+ - lib/asker/displayer/code_displayer.rb
156
+ - lib/asker/displayer/concept_ai_displayer.erb
157
+ - lib/asker/displayer/concept_ai_displayer.rb
158
+ - lib/asker/displayer/concept_displayer.rb
159
+ - lib/asker/displayer/stats_displayer.rb
210
160
  - lib/asker/exporter/code_gift_exporter.rb
211
- - lib/asker/exporter/code_screen_exporter.rb
212
161
  - lib/asker/exporter/concept_ai_gift_exporter.rb
213
- - lib/asker/exporter/concept_ai_screen_exporter.rb
162
+ - lib/asker/exporter/concept_ai_moodle_exporter.rb
214
163
  - lib/asker/exporter/concept_ai_yaml_exporter.rb
215
164
  - lib/asker/exporter/concept_doc_exporter.rb
216
- - lib/asker/exporter/concept_screen_exporter.rb
217
- - lib/asker/exporter/main.rb
218
- - lib/asker/files/config.ini
165
+ - lib/asker/exporter/data_gift_exporter.rb
166
+ - lib/asker/exporter/output_file_exporter.rb
167
+ - lib/asker/files/asker.ini
219
168
  - lib/asker/files/example-code.haml
220
169
  - lib/asker/files/example-concept.haml
170
+ - lib/asker/files/language/du/connectors.yaml
171
+ - lib/asker/files/language/du/mistakes.yaml
172
+ - lib/asker/files/language/du/templates.yaml
173
+ - lib/asker/files/language/en/connectors.yaml
174
+ - lib/asker/files/language/en/mistakes.yaml
175
+ - lib/asker/files/language/en/templates.yaml
176
+ - lib/asker/files/language/es/connectors.yaml
177
+ - lib/asker/files/language/es/mistakes.yaml
178
+ - lib/asker/files/language/es/templates.yaml
179
+ - lib/asker/files/language/fr/connectors.yaml
180
+ - lib/asker/files/language/fr/mistakes.yaml
181
+ - lib/asker/files/language/fr/templates.yaml
182
+ - lib/asker/files/language/javascript/connectors.yaml
183
+ - lib/asker/files/language/javascript/mistakes.yaml
184
+ - lib/asker/files/language/javascript/templates.yaml
185
+ - lib/asker/files/language/math/connectors.yaml
186
+ - lib/asker/files/language/math/mistakes.yaml
187
+ - lib/asker/files/language/math/templates.yaml
188
+ - lib/asker/files/language/python/connectors.yaml
189
+ - lib/asker/files/language/python/mistakes.yaml
190
+ - lib/asker/files/language/python/templates.yaml
191
+ - lib/asker/files/language/ruby/connectors.yaml
192
+ - lib/asker/files/language/ruby/mistakes.yaml
193
+ - lib/asker/files/language/ruby/templates.yaml
194
+ - lib/asker/files/language/sql/connectors.yaml
195
+ - lib/asker/files/language/sql/mistakes.yaml
196
+ - lib/asker/files/language/sql/templates.yaml
221
197
  - lib/asker/formatter/code_string_formatter.rb
222
198
  - lib/asker/formatter/concept_doc_formatter.rb
223
199
  - lib/asker/formatter/concept_string_formatter.rb
200
+ - lib/asker/formatter/moodle/matching.erb
201
+ - lib/asker/formatter/moodle/multichoice.erb
202
+ - lib/asker/formatter/moodle/shortanswer.erb
203
+ - lib/asker/formatter/moodle/truefalse.erb
224
204
  - lib/asker/formatter/question_gift_formatter.rb
225
205
  - lib/asker/formatter/question_hash_formatter.rb
206
+ - lib/asker/formatter/question_moodle_formatter.rb
226
207
  - lib/asker/formatter/question_moodlexml_formatter.rb
227
208
  - lib/asker/formatter/rb2haml_formatter.rb
228
209
  - lib/asker/lang/lang.rb
@@ -231,18 +212,20 @@ files:
231
212
  - lib/asker/loader/code_loader.rb
232
213
  - lib/asker/loader/content_loader.rb
233
214
  - lib/asker/loader/directory_loader.rb
215
+ - lib/asker/loader/embedded_file.rb
234
216
  - lib/asker/loader/file_loader.rb
217
+ - lib/asker/loader/haml_loader.rb
235
218
  - lib/asker/loader/image_url_loader.rb
236
219
  - lib/asker/loader/input_loader.rb
237
220
  - lib/asker/loader/project_loader.rb
238
221
  - lib/asker/logger.rb
239
222
  - lib/asker/project.rb
240
223
  - lib/asker/skeleton.rb
241
- homepage: https://github.com/dvarrui/asker/blob/devel
224
+ homepage: https://github.com/dvarrui/asker/tree/v2.2
242
225
  licenses:
243
226
  - GPL-3.0
244
227
  metadata: {}
245
- post_install_message: Use asker command!
228
+ post_install_message:
246
229
  rdoc_options: []
247
230
  require_paths:
248
231
  - lib
@@ -250,14 +233,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
250
233
  requirements:
251
234
  - - ">="
252
235
  - !ruby/object:Gem::Version
253
- version: 2.3.0
236
+ version: 2.5.0
254
237
  required_rubygems_version: !ruby/object:Gem::Requirement
255
238
  requirements:
256
239
  - - ">="
257
240
  - !ruby/object:Gem::Version
258
241
  version: '0'
259
242
  requirements: []
260
- rubygems_version: 3.1.2
243
+ rubygems_version: 3.2.32
261
244
  signing_key:
262
245
  specification_version: 4
263
246
  summary: Asker generates questions from input definitions file.
@@ -1,99 +0,0 @@
1
-
2
- # version 2.1
3
-
4
- Things/ideas to do for 2.1 Asker version.
5
-
6
- ## GUI
7
-
8
- Create a graphic fron end to execute asker and edit input files.
9
-
10
- ## Videos
11
-
12
- * Documentation: Revise documentation
13
- * Perhaps, videos on youtube explaining all this: (1) Get documentation, (2) Installation, (3) Consult demo input, (4) Create our input file usign def, (5) Add tables to our input file.
14
-
15
- ## Languages
16
-
17
- * Language support: French, Dutch, Catalán and Esperanto.
18
-
19
- ---
20
-
21
- ## Better table keyword
22
-
23
- * Process tables definitions with more than 2 fields.
24
-
25
- ## info keyword
26
-
27
- * Add new keyword called info. Example:
28
- ```
29
- %map{ :lang => 'en', :context => 'rock, bands', :version => '1'}
30
- %info Generic text about music, rock, bands, concerts, etc.
31
- %info more...
32
- ```
33
- * When AI create new question may use (randomly) info text to be included into it. Example:
34
- ```
35
- Rock music style was created for ....
36
-
37
- Definition of [*]: Australian rock band formed by Scottish-born brothers Malcolm and Angus Young.
38
-
39
- Select right option:
40
- a. Led Zepellin
41
- b. Beatles
42
- c. ACDC
43
- d. None
44
- ```
45
-
46
- ## Code inputs
47
-
48
- Let's take a look at the [issues](https://github.com/dvarrui/asker/issues)
49
-
50
- Actually we are experimenting with new keywords: code, type, path, features.
51
-
52
- Example:
53
-
54
- ```
55
- %code
56
- %type ruby
57
- %path files/string1.rb
58
- %features
59
- %row Muestra en pantalla "Hola Mundo!"
60
- ```
61
-
62
- Where `type` could be: ruby, python or sql.
63
-
64
- > Also bash, math, crontab, fstab, etc.
65
-
66
- ## More output formats
67
-
68
- * Images
69
- * Questions with images, sounds or other files embebed.
70
- * Embeded images into question texts
71
- * Work on other export formats (Perhaps Moodle format)
72
-
73
- ## Etc
74
-
75
- * Texts
76
- * Concept name drop and fill...
77
- * Question types
78
- * crossword
79
- * type hangmann
80
- * Dictionary
81
- * Diccionario de sinónimos, antónimos
82
- * Learn about the words or better download dictonary from RAE?
83
-
84
- ## Quizzer
85
-
86
- * Export questions to YAML format then use them with app quizzer to create PDF exams.
87
- * For example:
88
- ```
89
- # Create output/funiture-questions.yaml
90
- asker en/home/furniture.haml
91
-
92
- # Create 3 PDF exams with 10 questions every one
93
- quizzer 3x10 output/furniture-questions.yaml
94
- ```
95
-
96
- ## Develop more Tests
97
-
98
- * minitest for every class into lib directory
99
- * Apply rubocop rules to all them.
data/docs/commands.md DELETED
@@ -1,12 +0,0 @@
1
-
2
- [<<back](../README.md)
3
-
4
- # Commands
5
-
6
- Running `asker` as CLI command with these available command functions:
7
- * `asker`: Show available functions.
8
- * `asker version`: Show current version.
9
- * `asker PATH/TO/INPUTFILE`: Create questions for selected input file.
10
- * `asker file PATH/TO/INPUTFILE`: It's the same as `asker PATH/TO/INPUTFILE`, because `file` keyword is optional.
11
- * `asker check PATH/TO/INPUTFILE`: Check HAML file syntax.
12
- * `asker init`: Create default config.ini file.
@@ -1,18 +0,0 @@
1
-
2
- [<< back](../README.md)
3
-
4
- # Contributions
5
-
6
- If you want to contribute:
7
- * Talk about this tool with your colleagues.
8
- * Use this tool.
9
- * Report bugs.
10
- * Report us, your ideas for new features.
11
- * Share with us your own input files.
12
- * And if you love `ruby`, you can develop with us or work on the issues.
13
-
14
- ---
15
- # Contact
16
-
17
- * **Email**: `teuton.software@protonmail.com`
18
- * **Twitter**: `@SoftwareTeuton`
data/docs/history.md DELETED
@@ -1,40 +0,0 @@
1
-
2
- [<< back](../README.md)
3
-
4
- # History
5
-
6
- > Some time ago, this project was called "Darts of teacher". We renamed it because "darts" was used. Now, it's called ASKER.
7
-
8
- ## The problem
9
-
10
- Working as a teacher, one of the most boring taks is check the same exercises
11
- again and again, for every student, and every year.
12
-
13
- The tests questions allow us to make activities that are automaticaly checked/resolved by software tools, as for example, Moodle cuestionairs.
14
- In this case, the teacher will have enough time to waste others tasks, as:
15
- * Analise results with detail.
16
- * Read information about others materials.
17
- * Test new aplications.
18
- * Develop new tools.
19
- * Etc.
20
-
21
- In resume, applying more new knowledge to improve his work,
22
- trying new ways of doing his job better, finding or redefining activities or lessons contents. Just finding a better way of teaching. And an easier way of learning for the students.
23
-
24
- ## Need a new tool
25
-
26
- I decide (about 2013) start writing this tool to help me
27
- with the process of making test questions from input definition files.
28
-
29
- With this tool, I only waste time making this input file.
30
- As a teacher I have this knowledge into my mind, so it will be easy.
31
- It's the resume, definitions or conceptual entities of the unit
32
- I'm teaching.
33
-
34
- I've been using this tools several years/courses, teaching computer
35
- science. I have a lot of work to improve it and new features to add.
36
- It's usefull (for me at least), and hope It'll be for you too.
37
-
38
- ;-)
39
-
40
- David Vargas
data/docs/idea.md DELETED
@@ -1,44 +0,0 @@
1
-
2
- [<< back](../README.md)
3
-
4
- # Basics
5
-
6
- > **Disclaimber**
7
- >
8
- > I work as a teacher, and I try to do the best I know. But I'm really a programmer. I studied Computer Science at *ULPGC*.
9
- >
10
- > The 90% of what I've learned, I must thank to *Open Source* community.
11
- The other 10%, It's luck and time wasted working.
12
-
13
- ## Open vs closed problems
14
-
15
- The big problem with test questions are that only are usefull to evaluate
16
- measurable features. So it is useless when we try measure abstract
17
- features or measure open problems. But I think, we can do it with another approach.
18
-
19
- I mean, if we get an open and abstract problem, their resolution will consist on several steps or measurable milestones. So we can transform an open problem, into a lot of closed mini-problems. And we have to focus on the measurable aspects.
20
-
21
- Besides, if I *"bomb"* the student with a huge amount of diferent test questions about one concept, probably I could be near of knowing and measuring, the student asimilation of that kownledge.
22
-
23
- ## Making Questions
24
-
25
- The task of creating test questions to solve the previous problem, becames another different problem to be solved. When I had to make manually this test questions, it took me a lot of time. And I need a lot.
26
-
27
- And usually when I was making the question number 42, I realise that I forgot the content of the 41 previous. I'm loosing time and it's slow.
28
-
29
- ## Work once
30
-
31
- Finally, I decide to write this tool that help me with the process of
32
- making test questions from input definition files.
33
-
34
- So I only waste time making an input file. But as a teacher I have this
35
- into my mind and it must be a simple job. Because the inpu file it's just a resumed concepts list about the unit I'm teaching.
36
-
37
- I've been using this tools several years/courses, teaching computer
38
- science. I have a lot of functions to be improved and features to be added.
39
- But for now, It's usefull (for me at least), and hope it will be for you too.
40
- ;-)
41
-
42
- _Thanks!_
43
-
44
- David Vargas
@@ -1,39 +0,0 @@
1
-
2
- [<< back](../../README.md)
3
-
4
- # Inputs
5
-
6
- ---
7
-
8
- ## Text plain editor
9
-
10
- How to build our asker input files?
11
-
12
- Open a plain text editor and start writting definitions.
13
- * [Learn about concepts](concepts.md)
14
- * [Learn about tables](tables.md)
15
- * [Learn about templates](templates.md)
16
- * [Learn about code](code.md)
17
-
18
- ---
19
-
20
- ## Web editor (On development)
21
-
22
- Asker has a web editor to help building our asker input files.
23
- By now only read, do not write. Sorry! Still is on development.
24
-
25
- Looks like this:
26
-
27
- ![](../images/web-editor.png)
28
-
29
- To launch web editor:
30
- 1. `asker editor`
31
- 1. Open web browser and goto URL `localhost:4567`.
32
-
33
- ---
34
-
35
- ## More examples
36
-
37
- Download our git repository with a lot of examples:
38
- * `asker donwnload` or
39
- * `git clone https://github.com/dvarrui/asker-inputs.git`
data/docs/inputs/code.md DELETED
@@ -1,69 +0,0 @@
1
-
2
- [<< back](README.md)
3
-
4
- # Learn code
5
-
6
- Now, we are going to learn experimental keywords:
7
- * code
8
-
9
- ---
10
-
11
- # Concept limits
12
-
13
- We have learn about using: map, concept, names, tags, def, table and template keywords. All them are usefull to define concepts.
14
-
15
- Commonly we use natural lenguages (en, es, fr, de, etc) to talk about them and Asker DSL is a simpler and structured language version. All languages are similar (verbs, subjects, adjective, etc.), but have their own rules.
16
- A poem, for example is writting using those rules.
17
-
18
- Exists others kind of human creations, that use other definition languages.
19
- For example, programming languages, file configurations, drawing language, math language, etc,
20
-
21
- So we had to create new DSL keyword called `code`.
22
-
23
- Let's see.
24
-
25
- ---
26
- # Code
27
-
28
- ## Example
29
-
30
- Example, using `code`keyword to define a python program from `files/string.py`file:
31
-
32
- ```
33
- %map{ :version => '1', :lang => 'en', :context=>'python, programming, language' }
34
-
35
- %code
36
- %type python
37
- %path files/string.py
38
- ```
39
-
40
- | Param | Description |
41
- | ----- | ------------------------- |
42
- | code | Define a new code concept |
43
- | type | Content type |
44
- | path | Path to content file |
45
-
46
- > Experimental type values: python, ruby, javascript, sql
47
-
48
- ## Full map
49
-
50
- Example, using `code`keyword to define several python programs from `files/` folder:
51
-
52
- ```
53
- %map{ :version => '1', :lang => 'en', :context=>'python, programming, language' }
54
-
55
- %code
56
- %type python
57
- %path files/string.py
58
-
59
- %code
60
- %type python
61
- %path files/array.py
62
-
63
- %code
64
- %type python
65
- %path files/iterator.py
66
- ```
67
-
68
- Example:
69
- * [python](../examples/code)
@@ -1,142 +0,0 @@
1
-
2
- [<< back](README.md)
3
-
4
- # Learn basics
5
-
6
- To know how to build our asker input files, we need to learn
7
- main keywords:
8
- * map
9
- * concept
10
- * names
11
- * tags
12
- * def
13
-
14
- Let's start!.
15
-
16
- ---
17
-
18
- # Text plain editor
19
-
20
- * Create a text file, called for example: `demo/furniture.haml`.
21
- * **map**: Once, at first line, we write keyword `map`. Example:
22
-
23
- ```ruby
24
- %map{ :lang => 'en', :context => 'furniture, home', :version => '1'}
25
- ```
26
-
27
- | Attribute | Description |
28
- | --------- | ---------------------------------------------- |
29
- | lang | Output texts will be created in English. Valid values: en, es |
30
- | context | Comma separated labels that define map content |
31
- | version | Input file format version. Valid value: 1 |
32
-
33
- This input file will contain concepts about furniture context.
34
- Use diferents input files to define diferents contexts.
35
-
36
- > Use separated contexts is good idea. Sometimes, diferents concept from diferents contexts has the same `names` value. For example:
37
- > * free as free of charge, costless.
38
- > * free as in freedom.
39
-
40
- * **concept, names, tags**: So we define our first concept:
41
-
42
- ```
43
- %concept
44
- %names chair
45
- %tags single, seat, leg, backrest
46
- ```
47
-
48
- | Param | Description |
49
- | ----- | ------------------------------- |
50
- | names | Comma separated concept's names |
51
- | tags | Comma separated tags that help to identify this concept |
52
-
53
- * **def**: Use def keyword to add concept meaning. The `def` content must uniquely identifies our concept. You can use `def` more than once.
54
-
55
- ```
56
- %concept
57
- %names chair
58
- %tags single, seat, leg, backrest
59
- %def Single seat with legs and backrest
60
- %def Furniture that is placed around the table to sit
61
- ```
62
-
63
- At this time, we may generate questions with:
64
-
65
- ```bash
66
- asker demo/furniture.haml
67
- ```
68
-
69
- ---
70
-
71
- # Formats
72
-
73
- HAML is a special format. It's necesary write exactly:
74
- * 0 spaces before map.
75
- * 2 spaces before concept.
76
- * 4 spaces before names, tags and def.
77
-
78
- It's posible write the same using XML format instead. Take a look:
79
-
80
- ```xml
81
- <map lang='en' context='furniture, home' version='1'>
82
- <concept>
83
- <names>chair</names>
84
- <tags>single, seat, leg, backrest</tags>
85
- <def>Single seat with legs and backrest</def>
86
- <def>Furniture that is placed around the table to sit</def>
87
- </concept>
88
- </map>
89
- ```
90
-
91
- Notice that `demo/furniture.haml` is HAML file and `demo/furniture.xml` a XML file. Both are valid.
92
-
93
- > HAML format files are the same as XML format files.
94
- Internaly HAML files are translated automaticaly to an XML equivalent.
95
- >
96
- > Why write into HAML instead of XML? HAML It's easier (for me).
97
- You don't have to close every tag, only be carefuly with indentation.
98
- >
99
- > If you prefer, you could write your input files using XML.
100
-
101
- ---
102
-
103
- # Adding images
104
-
105
- Example:
106
- ![](https://www.portobellostreet.es/imagenes_muebles/Muebles-Silla-colonial-Fusta-Bora-Bora.jpg)
107
-
108
- **def** can be used with image URL. So we have to find an image that uniquely identifies our concept and write this:
109
-
110
- ```
111
- %def{:type => 'image_url'}https://www.portobellostreet.es/imagenes_muebles/Muebles-Silla-colonial-Fusta-Bora-Bora.jpg
112
- ```
113
-
114
- | Attribute | Description |
115
- | --------- | ------------ |
116
- | type | Content type |
117
-
118
- ---
119
-
120
- # Increase questions number
121
-
122
- Adding more concepts will increase questions number generated by ASKER:
123
-
124
- ```
125
- %concept
126
- %names couch
127
- %tags furniture, seat, two, threee, people, bench, armrest
128
-
129
- %concept
130
- %names table
131
- %tags furniture, flat, top, leg, surface, work, eat
132
-
133
- %concept
134
- %names bed
135
- %tags furniture, place, sleep, relax
136
- ```
137
-
138
- Examples:
139
- * [furniture.haml](../examples/home/furniture.haml)
140
- * [furniture.xml](../examples/home/xml/furniture.xml)
141
-
142
- [>> Learn about tables](tables.md)