emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Edward Doolittle <ejdoolittle@outlook.com>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Developing Moodle resources/sites with Org Mode
Date: Wed, 17 Jan 2024 04:17:47 +0000	[thread overview]
Message-ID: <PH0PR12MB8799671709A1215A71982551BB722@PH0PR12MB8799.namprd12.prod.outlook.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 5086 bytes --]

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


[-- Attachment #2: Type: text/html, Size: 6996 bytes --]

             reply	other threads:[~2024-01-17  7:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-17  4:17 Edward Doolittle [this message]
2024-01-17 12:18 ` Developing Moodle resources/sites with Org Mode Fraga, Eric
2024-01-17 19:23 ` Leo Butler
2024-01-17 20:32   ` Denis Bitouzé
2024-01-18  3:35   ` Edward Doolittle
2024-01-18 18:03     ` Leo Butler
2024-01-18 14:53 ` Christian Moe
  -- strict thread matches above, loose matches on Subject: below --
2024-01-18  1:25 Doolittle, Edward
2024-01-19 14:45 ` Devin Prater
2024-01-18 16:57 Brett Presnell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PH0PR12MB8799671709A1215A71982551BB722@PH0PR12MB8799.namprd12.prod.outlook.com \
    --to=ejdoolittle@outlook.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).