ExamSimple 1.0.0

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.
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/Exam.html ADDED
@@ -0,0 +1,316 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class Exam - 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
+
69
+
70
+ <!-- Method Quickref -->
71
+ <div id="method-list-section" class="nav-section">
72
+ <h3>Methods</h3>
73
+
74
+ <ul class="link-list" role="directory">
75
+
76
+ <li ><a href="#method-c-new">::new</a>
77
+
78
+ <li ><a href="#method-i-push">#push</a>
79
+
80
+ <li ><a href="#method-i-right">#right</a>
81
+
82
+ <li ><a href="#method-i-to_s">#to_s</a>
83
+
84
+ </ul>
85
+ </div>
86
+
87
+ </div>
88
+ </nav>
89
+
90
+ <main role="main" aria-labelledby="class-Exam">
91
+ <h1 id="class-Exam" class="class">
92
+ class Exam
93
+ </h1>
94
+
95
+ <section class="description">
96
+
97
+ <p>Clase para la gestión de examens con preguntas.</p>
98
+
99
+ <p>Clase para ver las diferentes versiones de la gema</p>
100
+
101
+ </section>
102
+
103
+
104
+
105
+
106
+ <section id="5Buntitled-5D" class="documentation-section">
107
+
108
+
109
+
110
+
111
+
112
+ <section class="constants-list">
113
+ <header>
114
+ <h3>Constants</h3>
115
+ </header>
116
+ <dl>
117
+
118
+ <dt id="VERSION">VERSION
119
+
120
+ <dd>
121
+
122
+
123
+ </dl>
124
+ </section>
125
+
126
+
127
+
128
+ <section class="attribute-method-details" class="method-section">
129
+ <header>
130
+ <h3>Attributes</h3>
131
+ </header>
132
+
133
+
134
+ <div id="attribute-i-exam" class="method-detail">
135
+ <div class="method-heading attribute-method-heading">
136
+ <span class="method-name">exam</span><span
137
+ class="attribute-access-type">[RW]</span>
138
+ </div>
139
+
140
+ <div class="method-description">
141
+
142
+
143
+
144
+ </div>
145
+ </div>
146
+
147
+ </section>
148
+
149
+
150
+
151
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
152
+ <header>
153
+ <h3>Public Class Methods</h3>
154
+ </header>
155
+
156
+
157
+ <div id="method-c-new" class="method-detail ">
158
+
159
+ <div class="method-heading">
160
+ <span class="method-name">new</span><span
161
+ class="method-args">(o)</span>
162
+
163
+ <span class="method-click-advice">click to toggle source</span>
164
+
165
+ </div>
166
+
167
+
168
+ <div class="method-description">
169
+
170
+ <p>Creacion de una isntancia a partir de una pregunta.</p>
171
+
172
+
173
+
174
+
175
+ <div class="method-source-code" id="new-source">
176
+ <pre><span class="ruby-comment"># File lib/Exam/examen.rb, line 9</span>
177
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">o</span>)
178
+ <span class="ruby-ivar">@exam</span> = <span class="ruby-constant">List</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">o</span>)
179
+ <span class="ruby-keyword">end</span></pre>
180
+ </div>
181
+
182
+ </div>
183
+
184
+
185
+
186
+
187
+ </div>
188
+
189
+
190
+ </section>
191
+
192
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
193
+ <header>
194
+ <h3>Public Instance Methods</h3>
195
+ </header>
196
+
197
+
198
+ <div id="method-i-push" class="method-detail ">
199
+
200
+ <div class="method-heading">
201
+ <span class="method-name">push</span><span
202
+ class="method-args">(*input)</span>
203
+
204
+ <span class="method-click-advice">click to toggle source</span>
205
+
206
+ </div>
207
+
208
+
209
+ <div class="method-description">
210
+
211
+ <p>Metodo para la inserción de preguntas sucesivamente.</p>
212
+
213
+
214
+
215
+
216
+ <div class="method-source-code" id="push-source">
217
+ <pre><span class="ruby-comment"># File lib/Exam/examen.rb, line 20</span>
218
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">push</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">input</span>)
219
+ <span class="ruby-identifier">input</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">o</span><span class="ruby-operator">|</span> <span class="ruby-ivar">@exam</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">o</span>)}
220
+ <span class="ruby-identifier">input</span>
221
+ <span class="ruby-keyword">end</span></pre>
222
+ </div>
223
+
224
+ </div>
225
+
226
+
227
+
228
+
229
+ </div>
230
+
231
+
232
+ <div id="method-i-right" class="method-detail ">
233
+
234
+ <div class="method-heading">
235
+ <span class="method-name">right</span><span
236
+ class="method-args">()</span>
237
+
238
+ <span class="method-click-advice">click to toggle source</span>
239
+
240
+ </div>
241
+
242
+
243
+ <div class="method-description">
244
+
245
+ <p>Metodo para obtener el conjunto de respuestas correctas asociadas a las
246
+ respuestas.</p>
247
+
248
+
249
+
250
+
251
+ <div class="method-source-code" id="right-source">
252
+ <pre><span class="ruby-comment"># File lib/Exam/examen.rb, line 26</span>
253
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">right</span>
254
+ <span class="ruby-identifier">result</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>()
255
+ <span class="ruby-identifier">i</span>=<span class="ruby-value">0</span>
256
+ <span class="ruby-ivar">@exam</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">q</span><span class="ruby-operator">|</span>
257
+ <span class="ruby-identifier">result</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-identifier">q</span>.<span class="ruby-identifier">r1</span>
258
+ <span class="ruby-identifier">i</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
259
+ <span class="ruby-keyword">end</span>
260
+ <span class="ruby-identifier">result</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-to_s" class="method-detail ">
273
+
274
+ <div class="method-heading">
275
+ <span class="method-name">to_s</span><span
276
+ class="method-args">()</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
+ <p>Metodo to_s.</p>
286
+
287
+
288
+
289
+
290
+ <div class="method-source-code" id="to_s-source">
291
+ <pre><span class="ruby-comment"># File lib/Exam/examen.rb, line 14</span>
292
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
293
+ <span class="ruby-node">&quot;#{@exam}&quot;</span>
294
+ <span class="ruby-keyword">end</span></pre>
295
+ </div>
296
+
297
+ </div>
298
+
299
+
300
+
301
+
302
+ </div>
303
+
304
+
305
+ </section>
306
+
307
+ </section>
308
+ </main>
309
+
310
+
311
+ <footer id="validator-badges" role="contentinfo">
312
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
313
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
314
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
315
+ </footer>
316
+
data/html/Examui.html ADDED
@@ -0,0 +1,230 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class Examui - 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
+
69
+
70
+ <!-- Method Quickref -->
71
+ <div id="method-list-section" class="nav-section">
72
+ <h3>Methods</h3>
73
+
74
+ <ul class="link-list" role="directory">
75
+
76
+ <li ><a href="#method-c-new">::new</a>
77
+
78
+ <li ><a href="#method-i-compare">#compare</a>
79
+
80
+ </ul>
81
+ </div>
82
+
83
+ </div>
84
+ </nav>
85
+
86
+ <main role="main" aria-labelledby="class-Examui">
87
+ <h1 id="class-Examui" class="class">
88
+ class Examui
89
+ </h1>
90
+
91
+ <section class="description">
92
+
93
+ <p>Clase para la muestra de examenes con interfaz grafica.</p>
94
+
95
+ </section>
96
+
97
+
98
+
99
+
100
+ <section id="5Buntitled-5D" class="documentation-section">
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+ <section class="attribute-method-details" class="method-section">
109
+ <header>
110
+ <h3>Attributes</h3>
111
+ </header>
112
+
113
+
114
+ <div id="attribute-i-examui" class="method-detail">
115
+ <div class="method-heading attribute-method-heading">
116
+ <span class="method-name">examui</span><span
117
+ class="attribute-access-type">[RW]</span>
118
+ </div>
119
+
120
+ <div class="method-description">
121
+
122
+
123
+
124
+ </div>
125
+ </div>
126
+
127
+ </section>
128
+
129
+
130
+
131
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
132
+ <header>
133
+ <h3>Public Class Methods</h3>
134
+ </header>
135
+
136
+
137
+ <div id="method-c-new" class="method-detail ">
138
+
139
+ <div class="method-heading">
140
+ <span class="method-name">new</span><span
141
+ class="method-args">(o)</span>
142
+
143
+ <span class="method-click-advice">click to toggle source</span>
144
+
145
+ </div>
146
+
147
+
148
+ <div class="method-description">
149
+
150
+ <p>inicialización de la instancia a partir de una pregunta.</p>
151
+
152
+
153
+
154
+
155
+ <div class="method-source-code" id="new-source">
156
+ <pre><span class="ruby-comment"># File lib/Exam/examui.rb, line 9</span>
157
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">o</span>)
158
+ <span class="ruby-ivar">@examui</span> = <span class="ruby-constant">Exam</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">o</span>)
159
+ <span class="ruby-keyword">end</span></pre>
160
+ </div>
161
+
162
+ </div>
163
+
164
+
165
+
166
+
167
+ </div>
168
+
169
+
170
+ </section>
171
+
172
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
173
+ <header>
174
+ <h3>Public Instance Methods</h3>
175
+ </header>
176
+
177
+
178
+ <div id="method-i-compare" class="method-detail ">
179
+
180
+ <div class="method-heading">
181
+ <span class="method-name">compare</span><span
182
+ class="method-args">(useranswers)</span>
183
+
184
+ <span class="method-click-advice">click to toggle source</span>
185
+
186
+ </div>
187
+
188
+
189
+ <div class="method-description">
190
+
191
+ <p>Comparacion de respuestas que se evaluan con la indicacion de cuales son
192
+ correctas y cuales no.</p>
193
+
194
+
195
+
196
+
197
+ <div class="method-source-code" id="compare-source">
198
+ <pre><span class="ruby-comment"># File lib/Exam/examui.rb, line 15</span>
199
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">compare</span>(<span class="ruby-identifier">useranswers</span>)
200
+ <span class="ruby-identifier">right</span> = <span class="ruby-ivar">@examui</span>.<span class="ruby-identifier">right</span>
201
+ <span class="ruby-identifier">comp</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">right</span>.<span class="ruby-identifier">count</span>, <span class="ruby-keyword">false</span>)
202
+ <span class="ruby-identifier">i</span> = <span class="ruby-value">0</span>
203
+ <span class="ruby-keyword">while</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">right</span>.<span class="ruby-identifier">count</span> <span class="ruby-keyword">do</span>
204
+ <span class="ruby-identifier">comp</span>[<span class="ruby-identifier">i</span>] = (<span class="ruby-identifier">right</span>[<span class="ruby-identifier">i</span>].<span class="ruby-identifier">eql?</span><span class="ruby-identifier">useranswers</span>[<span class="ruby-identifier">i</span>])<span class="ruby-operator">?</span> <span class="ruby-keyword">true</span> <span class="ruby-operator">:</span> <span class="ruby-keyword">false</span>
205
+ <span class="ruby-identifier">i</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
206
+ <span class="ruby-keyword">end</span>
207
+ <span class="ruby-identifier">comp</span>
208
+ <span class="ruby-keyword">end</span></pre>
209
+ </div>
210
+
211
+ </div>
212
+
213
+
214
+
215
+
216
+ </div>
217
+
218
+
219
+ </section>
220
+
221
+ </section>
222
+ </main>
223
+
224
+
225
+ <footer id="validator-badges" role="contentinfo">
226
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
227
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
228
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
229
+ </footer>
230
+