|
From: | Edward Doolittle |
Subject: | Developing Moodle resources/sites with Org Mode |
Date: | Wed, 17 Jan 2024 04:17:47 +0000 |
Hello everyone,
I'm new to Org Mode but I really enjoy working with it.
I have begun thinking about how I might use Org mode to improve the experience of developing resources for the open source Moodle LMS or even developing entire Moodle sites. Currently I develop Moodle content for mathematics courses using their online editors
which are quite basic. I would like to be able to edit in Emacs and preview my work before uploading to Moodle. Below are four potential use cases I see:
1) ​Development of HTML pages to upload to Moodle. This can already be done with Org export to HTML/MathJax. One nice bonus: it is possible to integrate diagrams and graphs into a Moodle HTML page using JSXgraph. JSXgraph is just _javascript_ so
is already supported in Org Mode. A couple of small modifications to the js block will create a jsxgraph source block in Org mode which will enable immediate preview of static graphs in PNG format and preview of dynamic graphs by exporting to HTML. Decent
LaTeX versions of pages with static graphs could easily be exported. I am very close to setting this up. I have JSGgraphs producing PNG files on the command line with node.js and the jsxgraph.js library. A few lines of elisp to wrap jsxgraph blocks in the
appropriate incantations is all that is needed.
2) Development of Moodle glossaries. Glossaries can be uploaded to a Moodle site using an appropriate XML file. Glossaries could be developed in Org mode, including JSXgraph diagrams and graphs, PNG images, and so on, and then Org mode converted
to XML and the XML transformed to Moodle Glossary XML using XSLT. (I don't really know those tools at all, so I don't know if that would be a good way to go about the process; exporting directly to Moodle Glossary was my first thought, but it is not a general
export that is necessary or appropriate, rather an export of a specifically designed Org file. XSLT seems old fashioned but there are tools around, and there is a project for exporting Org mode to XML.)
3) Development of Moodle quiz question databases. I know less about the format but it is documented at some level on the Moodle help site. From what I understand the same process for exporting a glossary would work for a question database (Org
-> Org XML -> XSLT -> Moodle XML), but question database are rather more complicated than glossaries, with numerous different types of questions. Still, it is mostly straightforward for simple question types. However, I am particularly interested in the
STACK question type, which is a mixture of HTML, LaTeX (MathJax), and Maxima code, which can be used (for example) to randomize a question. Maxima source code blocks already work well in Org mode. Some work might need to be done connecting them to LaTeX
in which {@maxima-variable@} can be used to refer to variables in a Maxima code block. Similarly JSXgraph blocks can refer to Maxima variables through the {#maxima-variable#} syntax. This is somewhat complicated by there being multiple Maxima code blocks
in one question (there is a main one that executes immediately and others that seem to execute when the student has provided answers). An issue I foresee is that a Maxima session might be required to correctly represent state but currently there is no Maxima
session available in Org mode.
I have already written a statistics exam with Org Mode and Maxima. I can generate as many different versions of a question (and associated answer key and solution set) as I wish with almost no additional effort. In order to facilitate import into
Moodle STACK, I have had to restrict my access to Maxima variables using accessors also written in Maxima ... I import the Maxima block into the accessor with noweb. I end up re-running the same chunk of Maxima code over and over, once for each variable access,
because there is no Maxima session. It is kind of stupid but I tossed it together in three days. I suppose I could store the results of a Maxima run in a table and just do table lookups but I've got the spare compute cycles to run Maxima over and over until
I sort this all out. I think Maxima session is the right way to go but I'm inexperienced with all this and would appreciate guidance.
4) Development of whole sites: Sites are uploaded to a Moodle server as .tgz of XML files with directories of resources (PDF files, PNG files, possibly also control files for external applications like Zoom). I see this as quite a challenge but
definitely manageable for simple sites, adding features as users call for them.
What do people think? Am I off the mark? Are there better ways to do this? Maybe even setting up my own personal Moodle server and connecting Emacs to it as an external editor would work reasonably well and save me some of the pain? But it would
be nice to export some things to formats other than Moodle: a glossary in LaTeX might be nice, for example, and quiz questions in Org mode could be used to generate paper tests as well as online Moodle tests.
I would appreciate any thoughts.
Edward
|
[Prev in Thread] | Current Thread | [Next in Thread] |