Using LaTeX's moodle package and R's Sweave to easily create data-driven, up-to-date financial mathematics and statistics quizzes for Moodle

Agnieszka Jach


Preparation of Moodle quizzes which are data-based and contemporary tends to be tedious and time-consuming. By using innovative tools, this process can be simplified and automated, providing a substantial benefit to the teacher wishing to employ such quizzes, and ultimately improving student learning experience. The purpose of this article is to show how to create data-driven, up-to-date quizzes for Moodle in an easy fashion. The methodology is based on several popular, open-source, free tools, and its implementation details are demonstrated with an example. This makes the methodology readily-available to the practitioners.


reproducible; dynamic; data-dependent; free software; Moodle; R; LaTeX

Full Text:



French, J. A., 2013. Easy Sweave for LaTeX and R. Blog post available at: [Accessed 20 July 2018]

Hendrickson, A. O. F., 2016. The moodle package: generating Moodle quizzes via LaTeX. Available at: [Accessed 20 July 2018].

Lambert, L., 1994. LaTeX: A Document Preparation System. Reading, MA: Addison-Wesley.

LaTeX3 Team, 2018. LaTeX.

Leisch, F., 2002. Sweave: Dynamic generation of statistical reports using literate data analysis.In W. Härdle and B. Rönz, eds. Compstat 2002: Proceedings in Computational Statistics. Heidelberg: Physica Verlag. pp. 575-580.

Leisch, F., 2017. Sweave User Manual. Available at: [Accessed 20 July 2018]

Moodle HQ and Moodle Community, 2018. Moodle: Modular Object-Oriented Dynamic Learning Environment. Moodle project.

R Core Team, 2018. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing.

RStudio Team, 2018. RStudio: Integrated Development for R. Boston, MA.

Stander, J. and Eales, J., 2011. Using R for teaching financial mathematics and statistics. MSOR Connections, 11(1), pp.7-11.



  • There are currently no refbacks.