ruql 0.1.5 → 1.0.5
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 +5 -5
- data/.gitignore +14 -0
- data/.travis.yml +7 -0
- data/Gemfile +6 -0
- data/LICENSE +6 -0
- data/README.md +318 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/ruql +90 -114
- data/bin/setup +8 -0
- data/examples/estilo.css +1 -0
- data/examples/example.rb +37 -0
- data/examples/file.html +94 -0
- data/examples/help.txt +55 -0
- data/examples/preguntas-TFG-20140224-0050.txt +32 -0
- data/examples/preguntas-TFG-20140224-0050.xml +168 -0
- data/examples/prueba.js +3 -0
- data/lib/ruql.rb +10 -3
- data/lib/ruql/answer.rb +6 -14
- data/lib/ruql/json.rb +12 -0
- data/lib/ruql/multiple_choice.rb +1 -1
- data/lib/ruql/open_assessment/open_assessment.rb +1 -1
- data/lib/ruql/question.rb +27 -56
- data/lib/ruql/quiz.rb +50 -69
- data/lib/ruql/renderers/edxml_renderer.rb +1 -1
- data/lib/ruql/renderers/html5_renderer.rb +65 -27
- data/lib/ruql/renderers/json_renderer.rb +35 -1
- data/lib/ruql/renderers/xml_renderer.rb +148 -0
- data/lib/ruql/select_multiple.rb +5 -1
- data/lib/ruql/stats.rb +18 -0
- data/lib/ruql/true_false.rb +1 -1
- data/lib/ruql/version.rb +3 -0
- data/ruql.gemspec +43 -0
- metadata +71 -38
- data/templates/autoqcm.tex.erb +0 -1
- data/templates/html5.html.erb +0 -42
- data/templates/htmlform.html.erb +0 -44
data/templates/autoqcm.tex.erb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
<%= yield %>
|
data/templates/html5.html.erb
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<title><%= quiz.title %></title>
|
4
|
-
<style type="text/css" media="all">
|
5
|
-
body { font-family: Times, serif; }
|
6
|
-
.header { text-align: right; font-weight: bold; padding-right: 30%; line-height: 300%; }
|
7
|
-
h1 { text-align: center; }
|
8
|
-
ol.questions { list-style-type: number; }
|
9
|
-
li.question { page-break-inside: avoid; border-bottom: 1px solid grey; }
|
10
|
-
li.multiplechoice ol.answers { list-style-type: lower-alpha; }
|
11
|
-
li.selectmultiple ol.answers { vertical-align: center; list-style-type: none; list-style-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUAQMAAAC3R49OAAAABlBMVEUAAAD///+l2Z/dAAAAEklEQVQImWNgAIL6/w+ogoEAAKI4Kp2NVIeDAAAAAElFTkSuQmCC'); }
|
12
|
-
li.truefalse ol.answers { list-style-type: none; }
|
13
|
-
.correct { color: green; font-weight: bold; border: 1px solid black; padding: 0.2ex; }
|
14
|
-
.incorrect { color: red }
|
15
|
-
.explanation { font-style: italic }
|
16
|
-
.instructions { clear: both; border: 1px solid black; align: center; padding: 2ex; margin: 2ex; }
|
17
|
-
</style>
|
18
|
-
</head>
|
19
|
-
<body>
|
20
|
-
<div class="header">
|
21
|
-
<div id="name">Name:</div>
|
22
|
-
<div id="sid">SID:</div>
|
23
|
-
</div>
|
24
|
-
<h1><%= quiz.title %></h1>
|
25
|
-
<div class="instructions">
|
26
|
-
<ul>
|
27
|
-
<li>No books, notes, or electronic devices allowed. </li>
|
28
|
-
<li>Time limit is 30 minutes.</li>
|
29
|
-
<li><%= quiz.num_questions %> multiple-choice questions, points indicated per question,
|
30
|
-
<%= quiz.points %> points total. Points per question are intended
|
31
|
-
to reflect approximate times they should take, at about 1 point per minute.</li>
|
32
|
-
<li>For 'select all that apply' questions worth N points,
|
33
|
-
you get 1/N of the points for each RIGHT answer that you check, plus
|
34
|
-
1/N of the points for each WRONG answer that you correctly
|
35
|
-
leave unchecked. That is, equal weight is given to deciding
|
36
|
-
whether each choice is part of the right answer or not.</li>
|
37
|
-
</ul>
|
38
|
-
<b>Good skill!</b>
|
39
|
-
</div>
|
40
|
-
<%= yield %>
|
41
|
-
</body>
|
42
|
-
</html>
|
data/templates/htmlform.html.erb
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<title><%= quiz.title %></title>
|
4
|
-
<style type="text/css" media="all">
|
5
|
-
body { font-family: Times, serif; }
|
6
|
-
.header { text-align: right; font-weight: bold; padding-right: 30%; line-height: 300%; }
|
7
|
-
h1 { text-align: center; }
|
8
|
-
ol.questions { list-style-type: number; }
|
9
|
-
li.question { page-break-inside: avoid; border-bottom: 1px solid grey; padding-bottom: 2ex; }
|
10
|
-
li.multiplechoice ol.answers { list-style-type: lower-alpha; }
|
11
|
-
li.multiplechoice ol.answers li { padding-bottom: 0.5ex; }
|
12
|
-
li.selectmultiple ol.answers { vertical-align: center; list-style-type: none; list-style-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUAQMAAAC3R49OAAAABlBMVEUAAAD///+l2Z/dAAAAEklEQVQImWNgAIL6/w+ogoEAAKI4Kp2NVIeDAAAAAElFTkSuQmCC'); }
|
13
|
-
li.truefalse ol.answers { list-style-type: none; }
|
14
|
-
li.truefalse ol.answers li { width: 15%; display: inline-block; }
|
15
|
-
.correct { color: green }
|
16
|
-
.incorrect { color: red }
|
17
|
-
.explanation { font-style: italic }
|
18
|
-
.instructions { clear: both; border: 1px solid black; align: center; padding: 2ex; margin: 2ex; }
|
19
|
-
</style>
|
20
|
-
</head>
|
21
|
-
<body>
|
22
|
-
<div class="header">
|
23
|
-
<div id="name">Name:</div>
|
24
|
-
<div id="sid">SID:</div>
|
25
|
-
</div>
|
26
|
-
<h1><%= quiz.title %></h1>
|
27
|
-
<div class="instructions">
|
28
|
-
<ul>
|
29
|
-
<li>No books, notes, or electronic devices allowed. </li>
|
30
|
-
<li>Time limit is 30 minutes.</li>
|
31
|
-
<li><%= quiz.num_questions %> multiple-choice questions, points indicated per question,
|
32
|
-
<%= quiz.points %> points total. Points per question are intended
|
33
|
-
to reflect approximate times they should take, at about 1 point per minute.</li>
|
34
|
-
<li>For 'select all that apply' questions worth N points,
|
35
|
-
you get 1/N of the points for each RIGHT answer that you check, plus
|
36
|
-
1/N of the points for each WRONG answer that you correctly
|
37
|
-
leave unchecked. That is, equal weight is given to deciding
|
38
|
-
whether each choice is part of the right answer or not.</li>
|
39
|
-
</ul>
|
40
|
-
<b>Good skill!</b>
|
41
|
-
</div>
|
42
|
-
<%= yield %>
|
43
|
-
</body>
|
44
|
-
</html>
|