ExamSimple 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +1 -0
  3. data/.gitignore +15 -0
  4. data/.rspec +3 -0
  5. data/.travis.yml +5 -0
  6. data/Exam.gemspec +28 -0
  7. data/Gemfile +8 -0
  8. data/Guardfile +41 -0
  9. data/LICENSE.txt +22 -0
  10. data/README.md +48 -0
  11. data/README.rdoc +0 -0
  12. data/Rakefile +24 -0
  13. data/doc/prct10.pdf +0 -0
  14. data/doc/prct11.pdf +0 -0
  15. data/doc/prct5.pdf +0 -0
  16. data/doc/prct6.pdf +0 -0
  17. data/doc/prct7.pdf +0 -0
  18. data/doc/prct8.pdf +0 -0
  19. data/doc/prct9.pdf +0 -0
  20. data/doc/test/index.html +467 -0
  21. data/html/Exam.html +316 -0
  22. data/html/Examui.html +230 -0
  23. data/html/List.html +469 -0
  24. data/html/Object.html +119 -0
  25. data/html/Question.html +357 -0
  26. data/html/README_rdoc.html +82 -0
  27. data/html/TrueOrFalse.html +169 -0
  28. data/html/created.rid +10 -0
  29. data/html/fonts.css +167 -0
  30. data/html/fonts/Lato-Light.ttf +0 -0
  31. data/html/fonts/Lato-LightItalic.ttf +0 -0
  32. data/html/fonts/Lato-Regular.ttf +0 -0
  33. data/html/fonts/Lato-RegularItalic.ttf +0 -0
  34. data/html/fonts/SourceCodePro-Bold.ttf +0 -0
  35. data/html/fonts/SourceCodePro-Regular.ttf +0 -0
  36. data/html/images/add.png +0 -0
  37. data/html/images/arrow_up.png +0 -0
  38. data/html/images/brick.png +0 -0
  39. data/html/images/brick_link.png +0 -0
  40. data/html/images/bug.png +0 -0
  41. data/html/images/bullet_black.png +0 -0
  42. data/html/images/bullet_toggle_minus.png +0 -0
  43. data/html/images/bullet_toggle_plus.png +0 -0
  44. data/html/images/date.png +0 -0
  45. data/html/images/delete.png +0 -0
  46. data/html/images/find.png +0 -0
  47. data/html/images/loadingAnimation.gif +0 -0
  48. data/html/images/macFFBgHack.png +0 -0
  49. data/html/images/package.png +0 -0
  50. data/html/images/page_green.png +0 -0
  51. data/html/images/page_white_text.png +0 -0
  52. data/html/images/page_white_width.png +0 -0
  53. data/html/images/plugin.png +0 -0
  54. data/html/images/ruby.png +0 -0
  55. data/html/images/tag_blue.png +0 -0
  56. data/html/images/tag_green.png +0 -0
  57. data/html/images/transparent.png +0 -0
  58. data/html/images/wrench.png +0 -0
  59. data/html/images/wrench_orange.png +0 -0
  60. data/html/images/zoom.png +0 -0
  61. data/html/index.html +102 -0
  62. data/html/js/darkfish.js +140 -0
  63. data/html/js/jquery.js +18 -0
  64. data/html/js/navigation.js +142 -0
  65. data/html/js/search.js +109 -0
  66. data/html/js/search_index.js +1 -0
  67. data/html/js/searcher.js +228 -0
  68. data/html/rdoc.css +580 -0
  69. data/html/table_of_contents.html +159 -0
  70. data/lib/Exam.rb +2 -0
  71. data/lib/Exam/base.rb +5 -0
  72. data/lib/Exam/examen.rb +37 -0
  73. data/lib/Exam/examui.rb +27 -0
  74. data/lib/Exam/list.rb +106 -0
  75. data/lib/Exam/question.rb +44 -0
  76. data/lib/Exam/quiz.rb +52 -0
  77. data/lib/Exam/trueorfalse.rb +15 -0
  78. data/lib/Exam/version.rb +5 -0
  79. data/spec/Exam_spec.rb +392 -0
  80. data/spec/spec_helper.rb +98 -0
  81. metadata +226 -0
data/html/Object.html ADDED
@@ -0,0 +1,119 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class Object - RDoc Documentation</title>
8
+
9
+ <link href="./fonts.css" rel="stylesheet">
10
+ <link href="./rdoc.css" rel="stylesheet">
11
+
12
+ <script type="text/javascript">
13
+ var rdoc_rel_prefix = "./";
14
+ </script>
15
+
16
+ <script src="./js/jquery.js"></script>
17
+ <script src="./js/navigation.js"></script>
18
+ <script src="./js/search_index.js"></script>
19
+ <script src="./js/search.js"></script>
20
+ <script src="./js/searcher.js"></script>
21
+ <script src="./js/darkfish.js"></script>
22
+
23
+
24
+ <body id="top" role="document" class="class">
25
+ <nav role="navigation">
26
+ <div id="project-navigation">
27
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
28
+ <h2>
29
+ <a href="./index.html" rel="home">Home</a>
30
+ </h2>
31
+
32
+ <div id="table-of-contents-navigation">
33
+ <a href="./table_of_contents.html#pages">Pages</a>
34
+ <a href="./table_of_contents.html#classes">Classes</a>
35
+ <a href="./table_of_contents.html#methods">Methods</a>
36
+ </div>
37
+ </div>
38
+
39
+ <div id="search-section" role="search" class="project-section initially-hidden">
40
+ <form action="#" method="get" accept-charset="utf-8">
41
+ <div id="search-field-wrapper">
42
+ <input id="search-field" role="combobox" aria-label="Search"
43
+ aria-autocomplete="list" aria-controls="search-results"
44
+ type="text" name="search" placeholder="Search" spellcheck="false"
45
+ title="Type to search, Up and Down to navigate, Enter to load">
46
+ </div>
47
+
48
+ <ul id="search-results" aria-label="Search Results"
49
+ aria-busy="false" aria-expanded="false"
50
+ aria-atomic="false" class="initially-hidden"></ul>
51
+ </form>
52
+ </div>
53
+
54
+ </div>
55
+
56
+
57
+
58
+ <div id="class-metadata">
59
+
60
+ <div id="parent-class-section" class="nav-section">
61
+ <h3>Parent</h3>
62
+
63
+
64
+ <p class="link">BasicObject
65
+
66
+ </div>
67
+
68
+
69
+
70
+
71
+ </div>
72
+ </nav>
73
+
74
+ <main role="main" aria-labelledby="class-Object">
75
+ <h1 id="class-Object" class="class">
76
+ class Object
77
+ </h1>
78
+
79
+ <section class="description">
80
+
81
+ </section>
82
+
83
+
84
+
85
+
86
+ <section id="5Buntitled-5D" class="documentation-section">
87
+
88
+
89
+
90
+
91
+
92
+ <section class="constants-list">
93
+ <header>
94
+ <h3>Constants</h3>
95
+ </header>
96
+ <dl>
97
+
98
+ <dt id="Node">Node
99
+
100
+ <dd><p>nodos</p>
101
+
102
+
103
+ </dl>
104
+ </section>
105
+
106
+
107
+
108
+
109
+
110
+ </section>
111
+ </main>
112
+
113
+
114
+ <footer id="validator-badges" role="contentinfo">
115
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
116
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
117
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
118
+ </footer>
119
+
@@ -0,0 +1,357 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class Question - RDoc Documentation</title>
8
+
9
+ <link href="./fonts.css" rel="stylesheet">
10
+ <link href="./rdoc.css" rel="stylesheet">
11
+
12
+ <script type="text/javascript">
13
+ var rdoc_rel_prefix = "./";
14
+ </script>
15
+
16
+ <script src="./js/jquery.js"></script>
17
+ <script src="./js/navigation.js"></script>
18
+ <script src="./js/search_index.js"></script>
19
+ <script src="./js/search.js"></script>
20
+ <script src="./js/searcher.js"></script>
21
+ <script src="./js/darkfish.js"></script>
22
+
23
+
24
+ <body id="top" role="document" class="class">
25
+ <nav role="navigation">
26
+ <div id="project-navigation">
27
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
28
+ <h2>
29
+ <a href="./index.html" rel="home">Home</a>
30
+ </h2>
31
+
32
+ <div id="table-of-contents-navigation">
33
+ <a href="./table_of_contents.html#pages">Pages</a>
34
+ <a href="./table_of_contents.html#classes">Classes</a>
35
+ <a href="./table_of_contents.html#methods">Methods</a>
36
+ </div>
37
+ </div>
38
+
39
+ <div id="search-section" role="search" class="project-section initially-hidden">
40
+ <form action="#" method="get" accept-charset="utf-8">
41
+ <div id="search-field-wrapper">
42
+ <input id="search-field" role="combobox" aria-label="Search"
43
+ aria-autocomplete="list" aria-controls="search-results"
44
+ type="text" name="search" placeholder="Search" spellcheck="false"
45
+ title="Type to search, Up and Down to navigate, Enter to load">
46
+ </div>
47
+
48
+ <ul id="search-results" aria-label="Search Results"
49
+ aria-busy="false" aria-expanded="false"
50
+ aria-atomic="false" class="initially-hidden"></ul>
51
+ </form>
52
+ </div>
53
+
54
+ </div>
55
+
56
+
57
+
58
+ <div id="class-metadata">
59
+
60
+ <div id="parent-class-section" class="nav-section">
61
+ <h3>Parent</h3>
62
+
63
+
64
+ <p class="link"><a href="Object.html">Object</a>
65
+
66
+ </div>
67
+
68
+ <div id="includes-section" class="nav-section">
69
+ <h3>Included Modules</h3>
70
+
71
+ <ul class="link-list">
72
+
73
+
74
+ <li><span class="include">Comparable</span>
75
+
76
+
77
+ </ul>
78
+ </div>
79
+
80
+
81
+ <!-- Method Quickref -->
82
+ <div id="method-list-section" class="nav-section">
83
+ <h3>Methods</h3>
84
+
85
+ <ul class="link-list" role="directory">
86
+
87
+ <li ><a href="#method-c-new">::new</a>
88
+
89
+ <li ><a href="#method-i-3C-3D-3E">#&lt;=&gt;</a>
90
+
91
+ <li ><a href="#method-i-3D-3D">#==</a>
92
+
93
+ <li ><a href="#method-i-to_s">#to_s</a>
94
+
95
+ </ul>
96
+ </div>
97
+
98
+ </div>
99
+ </nav>
100
+
101
+ <main role="main" aria-labelledby="class-Question">
102
+ <h1 id="class-Question" class="class">
103
+ class Question
104
+ </h1>
105
+
106
+ <section class="description">
107
+
108
+ <p>Clase para la gestion de preguntas de multiples opciones.</p>
109
+
110
+ </section>
111
+
112
+
113
+
114
+
115
+ <section id="5Buntitled-5D" class="documentation-section">
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ <section class="attribute-method-details" class="method-section">
124
+ <header>
125
+ <h3>Attributes</h3>
126
+ </header>
127
+
128
+
129
+ <div id="attribute-i-difficulty" class="method-detail">
130
+ <div class="method-heading attribute-method-heading">
131
+ <span class="method-name">difficulty</span><span
132
+ class="attribute-access-type">[RW]</span>
133
+ </div>
134
+
135
+ <div class="method-description">
136
+
137
+
138
+
139
+ </div>
140
+ </div>
141
+
142
+ <div id="attribute-i-qt" class="method-detail">
143
+ <div class="method-heading attribute-method-heading">
144
+ <span class="method-name">qt</span><span
145
+ class="attribute-access-type">[RW]</span>
146
+ </div>
147
+
148
+ <div class="method-description">
149
+
150
+
151
+
152
+ </div>
153
+ </div>
154
+
155
+ <div id="attribute-i-r1" class="method-detail">
156
+ <div class="method-heading attribute-method-heading">
157
+ <span class="method-name">r1</span><span
158
+ class="attribute-access-type">[RW]</span>
159
+ </div>
160
+
161
+ <div class="method-description">
162
+
163
+
164
+
165
+ </div>
166
+ </div>
167
+
168
+ <div id="attribute-i-wrong" class="method-detail">
169
+ <div class="method-heading attribute-method-heading">
170
+ <span class="method-name">wrong</span><span
171
+ class="attribute-access-type">[RW]</span>
172
+ </div>
173
+
174
+ <div class="method-description">
175
+
176
+
177
+
178
+ </div>
179
+ </div>
180
+
181
+ </section>
182
+
183
+
184
+
185
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
186
+ <header>
187
+ <h3>Public Class Methods</h3>
188
+ </header>
189
+
190
+
191
+ <div id="method-c-new" class="method-detail ">
192
+
193
+ <div class="method-heading">
194
+ <span class="method-name">new</span><span
195
+ class="method-args">(args)</span>
196
+
197
+ <span class="method-click-advice">click to toggle source</span>
198
+
199
+ </div>
200
+
201
+
202
+ <div class="method-description">
203
+
204
+ <p>Inicializacion de una nueva instancia de una nueva pregunta a partir de un
205
+ texto.</p>
206
+
207
+
208
+
209
+
210
+ <div class="method-source-code" id="new-source">
211
+ <pre><span class="ruby-comment"># File lib/Exam/question.rb, line 20</span>
212
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span> (<span class="ruby-identifier">args</span>)
213
+ <span class="ruby-ivar">@qt</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value">:qt</span>]
214
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">&quot;Se esperaba una pregunta&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value">:qt</span>)
215
+ <span class="ruby-ivar">@r1</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value">:r1</span>]
216
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">&quot;Se esperaba la respuesta correcta&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value">:r1</span>)
217
+ <span class="ruby-ivar">@wrong</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value">:wrong</span>]
218
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">&quot;Se esperaba un array con las respuestas incorrectas&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value">:wrong</span>)
219
+ <span class="ruby-identifier">args</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-value">:difficulty</span>)<span class="ruby-operator">?</span> (<span class="ruby-ivar">@difficulty</span> = <span class="ruby-identifier">args</span>[<span class="ruby-value">:difficulty</span>]) <span class="ruby-operator">:</span> (<span class="ruby-ivar">@difficulty</span> = <span class="ruby-value">1</span>)
220
+ <span class="ruby-keyword">end</span></pre>
221
+ </div>
222
+
223
+ </div>
224
+
225
+
226
+
227
+
228
+ </div>
229
+
230
+
231
+ </section>
232
+
233
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
234
+ <header>
235
+ <h3>Public Instance Methods</h3>
236
+ </header>
237
+
238
+
239
+ <div id="method-i-3C-3D-3E" class="method-detail ">
240
+
241
+ <div class="method-heading">
242
+ <span class="method-name">&lt;=&gt;</span><span
243
+ class="method-args">(other)</span>
244
+
245
+ <span class="method-click-advice">click to toggle source</span>
246
+
247
+ </div>
248
+
249
+
250
+ <div class="method-description">
251
+
252
+
253
+
254
+
255
+
256
+
257
+ <div class="method-source-code" id="3C-3D-3E-source">
258
+ <pre><span class="ruby-comment"># File lib/Exam/question.rb, line 10</span>
259
+ <span class="ruby-keyword">def</span> <span class="ruby-operator">&lt;=&gt;</span>(<span class="ruby-identifier">other</span>)
260
+ <span class="ruby-ivar">@difficulty</span> <span class="ruby-operator">&lt;=&gt;</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">difficulty</span>
261
+ <span class="ruby-keyword">end</span></pre>
262
+ </div>
263
+
264
+ </div>
265
+
266
+
267
+
268
+
269
+ </div>
270
+
271
+
272
+ <div id="method-i-3D-3D" class="method-detail ">
273
+
274
+ <div class="method-heading">
275
+ <span class="method-name">==</span><span
276
+ class="method-args">(other)</span>
277
+
278
+ <span class="method-click-advice">click to toggle source</span>
279
+
280
+ </div>
281
+
282
+
283
+ <div class="method-description">
284
+
285
+
286
+
287
+
288
+
289
+
290
+ <div class="method-source-code" id="3D-3D-source">
291
+ <pre><span class="ruby-comment"># File lib/Exam/question.rb, line 14</span>
292
+ <span class="ruby-keyword">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">other</span>)
293
+ <span class="ruby-ivar">@qt</span>.<span class="ruby-identifier">eql?</span><span class="ruby-identifier">other</span>.<span class="ruby-identifier">qt</span>
294
+ <span class="ruby-keyword">end</span></pre>
295
+ </div>
296
+
297
+ </div>
298
+
299
+
300
+
301
+
302
+ </div>
303
+
304
+
305
+ <div id="method-i-to_s" class="method-detail ">
306
+
307
+ <div class="method-heading">
308
+ <span class="method-name">to_s</span><span
309
+ class="method-args">()</span>
310
+
311
+ <span class="method-click-advice">click to toggle source</span>
312
+
313
+ </div>
314
+
315
+
316
+ <div class="method-description">
317
+
318
+ <p>Metodo to_s.</p>
319
+
320
+
321
+
322
+
323
+ <div class="method-source-code" id="to_s-source">
324
+ <pre><span class="ruby-comment"># File lib/Exam/question.rb, line 32</span>
325
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
326
+ <span class="ruby-identifier">s</span> = <span class="ruby-node">&quot;#{@qt}\n&quot;</span>
327
+ <span class="ruby-identifier">opt</span> = [<span class="ruby-ivar">@r1</span>] <span class="ruby-operator">+</span> <span class="ruby-ivar">@wrong</span>
328
+ <span class="ruby-identifier">opt</span> = <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">shuffle</span>
329
+ <span class="ruby-identifier">i</span> = <span class="ruby-value">1</span>
330
+ <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">o</span><span class="ruby-operator">|</span>
331
+ <span class="ruby-identifier">s</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;#{i}- #{o}\n&quot;</span>
332
+ <span class="ruby-identifier">i</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
333
+ <span class="ruby-keyword">end</span>
334
+ <span class="ruby-identifier">s</span>
335
+ <span class="ruby-keyword">end</span></pre>
336
+ </div>
337
+
338
+ </div>
339
+
340
+
341
+
342
+
343
+ </div>
344
+
345
+
346
+ </section>
347
+
348
+ </section>
349
+ </main>
350
+
351
+
352
+ <footer id="validator-badges" role="contentinfo">
353
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
354
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
355
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
356
+ </footer>
357
+