Site icon R-bloggers

New R/exams Version: Improved E-Learning Tools During a Pandemic

[This article was first published on R/exams, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Substantial new release of the R/exams package to CRAN with many new features and enhancements, especially for interfacing e-learning tools and learning management systems during the pandemic.

Overview

The new version 2.4-0 of the R/exams package has been released on the Comprehensive R Archive Network at https://CRAN.R-project.org/package=exams. This is the first CRAN release after 2.5 years of very active development. Due to the challenges from distance learning during the pandemic a lot of new features were added and enhancements made, especially for the support of various e-learning tools and learning management systems.

Many of changes were prompted by the authors’ own needs (especially in the support of OpenOlat) but also by the many questions on StackOverflow, posts in the R-Forge forum, or tweets and e-mails from users all around the world. In the following the most important features from the update are highlighted. For the full list of changes including technical details and smaller bug fixes, see the NEWS of the package release. More blog posts are planned for introducing some of the new features in more detail, e.g., cloze exercises and evaluation strategies.

Facilitated support of UTF-8 and R/Markdown exercises

Initially, the package relied on Rnw (R/LaTeX) exercises only and optionally supported different encodings for non-ASCII characters, e.g., UTF-8 or latin1 (ISO-8859-1) etc. However, it was cumbersome to correctly set the encoding of input exercises and output file formats.

Given that the majority of users by now seem to rely on Rmd (R/Markdown) exercises and that most output file formats involve using the pandoc document converter (which requires to use UTF-8) for some aspects, the entire exams package and all its function now exclusively use UTF-8 as well. All templates etc. have been modified to support UTF-8 out-of-the-box. This greatly facilitates working with UTF-8 as there is no need anymore to set any encoding argument anywhere.

Support for all other encodings like ISO-8859-* (latin1, latin9, etc.), which had previously been available for Rnw exercises in certain exams2xyz() interfaces, has been disabled. This is a slight reduction of functionality but will be a great benefit for most users of the package.

Finally, to facilitate working with Rmd exercises and embedded graphics or data files, the packages base64enc, knitr, and rmarkdown are now imported in the package (and not just suggested).

Open-ended text questions with text editor or file upload

The processing of string exercises for learning management systems like Moodle, OpenOlat, or other QTI-based systems has been extended. By default, string exercises are intended for closed-format short-text answers that have to be matched exactly by the participants (e.g., asking for the name of an R function or exact value of an output string etc.). Additionally, open-ended text answers can now be enabled by setting the stringtype meta-information to essay and/or file. The former requests a text editor for entering an answer while the latter requests a file upload dialogue. The essayreg exercise has been modified to leverage this new meta-information. Such exercises then have to be evaluated by the instructors/examiners, i.e., there is no automatic evaluation by the learning management system.

Similarly, the exclozetype meta-information now also accepts essay or file instead of string for elements of a cloze exercise. Currently, the combination of these types with num or schoice elements etc. is only possible for QTI-based systems (i.e., OpenOlat in particular) but not for Moodle (whose cloze format does not support open-ended text answers). For illustration, see the new "essayreg2" and "lm3" exercise templates.

Enhancements for OpenOlat

Several enhancements and extensions have been made in exams2openolat() (or the underlying exams2qti21() function, respectively). The most important new features are:

The are some additional new arguments that allow further fine control of a test’s configuration. The most important and flexible is the argument config = TRUE. The logical specification config = TRUE/FALSE uses the default configuration or switches off the extra configuration entirely, respectively. Moreover, a list of options like config = list(cancel = TRUE, scoreprogress = TRUE) can be provided for customizing how OpenOlat renders the QTI 2.1 content, see ?openolat_config for more details.

Finally. a new argument envir has been added that is passed on to xweave(). By setting this to a common environment, e.g., envir = .GlobalEnv (or some new dedicated environment), it is possible to re-use variables generated in one exercise in previous exercises, e.g., for creating a sequence of variables based on the same data set. Note that this needs to be combined with selection = "exam" (see above).

Enhancements for Moodle

The popular exams2moodle() interface has been improved, in particular for more flexible cloze exercises:

Moreover, there is a new experimental function moodle2exams() that can take a Moodle XML quiz file with numeric, multichoice, shortanswer, and essay exercises and convert them to R/exams exercise files, either in Rmd or Rnw format. If the text formatting is more advanced (e.g., containing mathematical notation or tables etc.) the function might not lead to fully satisfactory results but still provide a useful starting point for subsequent manual editing.

New exams2xyz interfaces

Various new learning management systems or quiz engines can now be interfaced using R/exams. The work on exams2testvision() and exams2grasple() was financially supported by the Dutch Ministry of Education, Culture and Science (Project code OL20-06), and the University of Amsterdam.

Enhancements for written exams (NOPS format)

The exams2nops() function is the R/exams interface for generating exams of single-choice and multiple-choice questions, that can be scanned and evaluated automatically.

Various improvemens have been made in nops_scan(), especially for scanning the boxes pertaining to the student registration ID. Rather than reading a very small area around each box and just shaving off its borders, a larger area is read now and then shaved iteratively. Hence, it is also easily possible to further increase the size of the area which may sometimes lead to improved scanning results.

In the exams2nops() function itself, the handling of reglength < 7 has been improved. Internally, reglength = 7 is still enforced (and thus necessary in the registration CSV file) but the initial IDs are fixed to “0” in the exam sheet and corresponding boxes ticked already.

Finally, language support has been extended by two new languages: Czech (cz, by Jindřich Marek) and Galician (gl, by Marta Sestelo & Nora M. Villanueva).

Enhancements for Blackboard

In the exams2blackboard() interface the new argument mathjax = NULL has been added that optionally embeds the MathJax <script> in each of the exercises. This allows to render mathematical content by the MathJax plugin for all modern browsers. Without MathJax, the browser itself has to do the rendering directly (which is supported by Firefox and Safari but not by Chrome for example). The default is FALSE unless converter = "pandoc-mathjax" is used. But also for the default converters (producing MathML output) mathjax = TRUE can be used. (Suggested and tested by Sean Quallen and Gabriele Cantaluppi.)

Moreover, the following improvements may be useful for Blackboard users: Rendering verbatim code chunks can be fixed from <pre> to <code> tags if fix_pre = TRUE (default) which is necessary in classical Blackboard systems. Points can be specified through expoints.

Further improvements

To leave a comment for the author, please follow the link and comment on their blog: R/exams.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.