-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path03-exams.Rmd
More file actions
201 lines (107 loc) · 5.25 KB
/
03-exams.Rmd
File metadata and controls
201 lines (107 loc) · 5.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# Exams {#exams}
```{r echo=FALSE, results=FALSE, messages=FALSE}
knitr::opts_chunk$set(eval = FALSE)
#library(exams)
```
## Concepts
**Goals**
* reduce the risk of cheating
* have a one-for-all exams generator
_References_:
* [First Steps (website of R_Exams)](https://www.r-exams.org/tutorials/first_steps/)
* Achim Zeileis, Nikolaus Umlauf, Friedrich Leisch (2014). "Flexible Generation of E-Learning Exams in R: Moodle Quizzes, OLAT Assessments, and Beyond." Journal of Statistical Software, 58(1), 1-36. <doi:10.18637/jss.v058.i01>
* [Moodle Tests: Not So Much of a Fuss When You Have R
M. Cristina Miranda, Anabela Rocha, ICSIT 2022](https://www.iiis.org/DOI2022/EB443PN/)
**Techniques**
Techniques to reduce the risk of cheating:
* Randomly selecting one (or more) out of a set of exercises for each participant.
* Randomly shuffling answer alternatives in single-choice and multiple-choice questions.
* Randomly selecting numbers, text blocks, graphics, etc. using the R programming language.
_Reference_ [First Steps](https://www.r-exams.org/tutorials/first_steps/)
**Output to several formats**
- html and pdf/LaTeX
- pandoc (for customizable outputs in various formats (Docx, ODF, PDF, ...).
- nops (fixed PDF format that can be automatically scanned and evaluated),
- LMS: moodle, blackboard,
- QTI XML (various learning management systems: canvaslms, openOlat), arsnova (JSON format)

_References_:
* [file demo-all.Rmd](https://www.r-exams.org/assets/posts/2017-09-10-first_steps//demo-all.R)
**An exercise, in a standalone file**
Each exercise (or rather “exercise template”):
* Data-generating process written in R.
* Question text.
* Solution text.
* Meta-information.
_Reference_ [First Steps](https://www.r-exams.org/tutorials/first_steps/)
**cloze type - a special question format**
"cloze" question type can handle *several questions types*, in the same file, for example inside an R `list` or explicitly described.
## In your machine
**Install**
Some steps:
* [Install R, then RStudio](https://posit.co/download/rstudio-desktop/)
* [RTools42](https://cran.r-project.org/bin/windows/Rtools/rtools42/rtools.html)
* For some tasks (e.g., output for some learning management systems) it is necessary that the base R zip() function works. On Windows this requires to install the Rtools and to include them in the PATH environment variable. "Rtools is a toolchain bundle used for building R packages from source"
* Install `exams` package:
```r
install.packages("exams", dependencies = TRUE)
```
_Reference_ [Installing R/exams](https://www.r-exams.org/tutorials/installation/)
**Only once**
Create a folder for questions and then do:
```r
setwd("c:/<folder>/rexams-questions")
```
_Note_ in R one must use "c:/" instead of "c:\\".
```r
library("exams")
exams_skeleton(markup = "markdown",
writer = c("exams2html", "exams2pdf", "exams2moodle"))
```
_Reference_ [First steps](https://www.r-exams.org/tutorials/first_steps/)
## The Slow Development Cycle
We use [already created contents](https://www.r-exams.org/templates/) - there creation coul be an addictive process!!
**Decision about exam contents (step 1/5)** -- a vector of filenames
```{r}
# setwd("~/<root of r-exams project>")
library("exams")
elearn_exam <- c(
"swisscapital.Rmd",
"deriv.Rmd",
"ttest.Rmd",
"boxplots.Rmd",
"function.Rmd",
"lm.Rmd",
"fourfold2.Rmd")
```
**Appreciate, in html, the future exam (step 2/5)** -- `exams::exams2html()`
```{r}
set.seed(2023-05-16) # or 2002
exams2html(elearn_exam, n = 1, name = "R-exams")
```
* `exams2html` produce html output reading from "exercises" folder and writing to "output" folder
* `name = "R-exams"` specifies the Moodle Category. Below "R-exams" will reside all the exercises numbered "Exercise 1", "Exercise 2", ....
* `n` is the number of variations of a question
rules-of-thumb about *n*:
- maybe one can correct a moodle question in runtime (during exam)
- n=6 is a good number if questions are new (easy to correct)
- n much greater avoid completely participant copy of solutions but in case of error, a lot of work expects the evaluator/teacher
**Publish the exam (step 3/5)** -- `exams::exams2moodle()`
```{r}
set.seed(2023-05-16)
exams2moodle(elearn_exam, n = 3, name = "R-exams", dir="output")
## This yields the file R-exams.xml that can be imported into Moodle.
##output folder should contain the xml file.
```
* `name = "R-exams"` the "R-exams" string will define a new category in Moodle structure.
**Moodle import (step 4/5)**
A step-by-step video guide to importing and customizing the quiz in Moodle is available on YouTube at <https://www.youtube.com/watch?v=5K9hrE3YkPs>.
**Moodle direct observation (step 5/5)**
Direct observation, of questions, in moodle can clean last mistakes or errors.
_Reference_ [E-Learning Quizzes](https://www.r-exams.org/tutorials/elearning/)
## stackoverflow
More than 250 questions:
Exemple: "Change TRUE and FALSE to Verdadero and Falso in "mchoice" exercises of R-exams":
[answer here](https://stackoverflow.com/questions/75249954/change-true-and-false-to-verdadero-and-falso-in-mchoice-exercises-of-r-exams)
* More questions: <https://stackoverflow.com/questions/tagged/r-exams/>
_Reference_ [Resources](https://www.r-exams.org/resources/)