To render a file using the moodle library you can use the following code in the heading
---
title: "Example of Moodle and Quarto"
author: Joaquim Puig
format:
pdf:
include-in-header:
- text: |
\usepackage{moodle}
keep-tex: true
pdf-engine: lualatex
---