Site icon R-bloggers

New R/exams Version: exams2forms, Written NOPS Exams, and More

[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.

New CRAN releases of the R/exams package and the accompanying exams2forms package with many new features and enhancements, especially for the written multiple-choice exams (NOPS).

Overview

The new version 2.4-2 of the R/exams package has been released on the Comprehensive R Archive Network at https://CRAN.R-project.org/package=exams along with version 0.2-0 of the accompanying exams2forms package at https://CRAN.R-project.org/package=exams2forms. For an overview of all changes in both packages, see their respective NEWS files: exams NEWS and exams2forms NEWS.

The development of exams2forms was originally prompted by requests for R/exams infrastructure in online books via R/Markdown or Quarto. However, it turned out to be very useful for quite a few other applications including:

The other main area of development were extensions to the written multiple-choice exams (NOPS) that can be automatically scanned and evaluated. This was prompted by the decision of the Faculty of Economics and Statistics at Universität Innsbruck to conduct all of their large-scale exams during the first years of the bachelor program using this infrastructure. Below we give an overview of the R functionality in the exams package that support this endeavor. Those who are interested in how the administrative aspects are organized in Gitlab repositories with corresponding issues can check out the workflow documentation and a demo project (both in German) on the university’s self-hosted Gitlab system.

Interactive web exercises via exams2forms

Version 0.1-0 of the package had been introduced in an exams2forms tutorial in a previous blog post. Prompted by our own needs as well as a lot of positive and constructive feedback, version 0.2-0 now contains many useful improvements and new features. Also, all exercise template pages on the R/exams web page now feature an interactive preview generated with exams2forms using three random variations of each exercise. See boxplots or lm2 for two examples.

Obfuscation

The function exams2forms() as well as all underlying forms_*() functions gained an argument obfuscate = TRUE which provides some basic obfuscation of the correct answers for all forms in the underlying HTML code. Thus, all correct answers are still stored in the HTML but, by default, they are not easily readable anymore.

Auto-display of filled-in exercises

The function exams2forms() gained additional arguments auto, show_filename, and show_tolerance, which are useful for inspecting exercises during their development. To see the results with all forms pre-filled, check enabled, and display of solution, tolerances, and the file name, try:

exams2webquiz("lm2.Rmd", auto = TRUE)

Regular expression in string solutions

The package now ships with some example exercises that illustrate a feature of exams2forms that is not (or not easily) available in other exams2xyz interfaces: regular expressions for the correct answers of string exercises. To generate a demo quiz with these you can use:

exams2webquiz(c("geography2.Rmd", "email.Rmd"), regex = TRUE, n = 3,
  edir = system.file(package = "exams2forms"))

Multiple-choice NOPS exams

R/exams long provides infrastructure for large-scale multiple-choice exams that can be automatically scanned and evaluated, see the exams2nops tutorial for an introduction. Previously, the workflow just comprised exams2nops() for generating the PDF exams, nops_scan() for reading the filled-out and scanned exam sheets, and nops_eval() for evaluating all results, grading the exams, and generating reports for the participants.

However, addressing errors that occurred, in particularl during scanning, used to be rather inconvenient and necessitated editing some of the intermediate files manually. Therefore, version 2.4-1 of the package introduced a new function nops_fix() that greatly facilitates interactive quality control of exam sheets directly in R (and/or the browser). A dedicated tutorial for this functionality is under preparation.

Below we summarize the most important additions and improvements from version 2.4-1 (which had not yet been included in previous blog posts) and 2.4-2.

nops_fix

The new function nops_fix() can be applied to the ZIP file resulting from nops_scan(). By default it goes through all rows of the scanned data and interactively prompts for updates to fields from the scanned exam sheets that need updating. It can also be applied repeatedly to iteratively check and resolve different potential problems.

nops_scan

By default, nops_scan() now relies on the R packages qpdf and magick for merging/rotating/splitting PDF files and converting them to PNG, respectively. This greatly facilitates installation of the scanning infrastructure, especially for novice R/exams users.

Improvements have been made in nops_scan() for reading scans from different paper formats (e.g., letter paper instead of A4) and for reading the registration id more reliably. Also, scanner markings are found more reliably, especially if the top-left marking is missing completely (e.g., because it was cut erroneously).

exams2nops and language support

Additional NOPS language support has been added: Bulgarian (bg, contributed by Nikolay Rachev), Catalan (ca, contributed by Paco Rivière), and Polish (pl, contributed by Paweł Kleka). Corrections in French (fr, contributed by Jean-Philippe Georget), Russian (ru, contributed by Nikolay Rachev), and Spanish (es, contributed by Flavio Lozano Isla).

Moreover, there are various improvements and new arguments in exams2nops():

More features and improvements

New exercises

There are two new demo exercises: flags illustrating the handling of Unicode characters for flags in a flexible way. sumdiff is a minimal example for using random numbers in arithmetic exercises.

Evaluation strategies in learning managment systems

The default evaluation rule for all learning management systems (including exams2moodle, exams2canvas, exams2openolat, etc.) is now consistently negative = FALSE and partial = TRUE with rule = "false2". Thus, there should not be negative points for any exercise type and partial credits should be used for mchoice exercises (and mchoice interactions within cloze exercises).

Stress-testing exercises

New arguments have been added in stresstest_exercise() to facilitate stress-testing exercises, especially for large collections of exercises:

Standalone PDF files

Customizing the LaTeX template in exams2pdf() has been facilitated by adding the usepackage argument and streamlining processing of the header argument.

Additionally, the {Sweave} LaTeX package is no longer loaded in the LaTeX templates (like plain.tex, exams.tex, solution.tex, etc.). Instead the LaTeX environments for displaying R code and the accompanying LaTeX dependencies are loaded directly.

Misc

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.
Exit mobile version