emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Developing Moodle resources/sites with Org Mode
@ 2024-01-17  4:17 Edward Doolittle
  2024-01-17 12:18 ` Fraga, Eric
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Edward Doolittle @ 2024-01-17  4:17 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

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

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: Developing Moodle resources/sites with Org Mode
@ 2024-01-18  1:25 Doolittle, Edward
  2024-01-19 14:45 ` Devin Prater
  0 siblings, 1 reply; 10+ messages in thread
From: Doolittle, Edward @ 2024-01-18  1:25 UTC (permalink / raw)
  To: e.fraga@ucl.ac.uk; +Cc: emacs-orgmode@gnu.org

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



"Fraga, Eric" e.fraga@ucl.ac.uk<mailto:e.fraga@ucl.ac.uk> writes:



> This sounds very good!  I am particularly impressed with being able to

> use maxima to create questions that have a random element.  I wish I'd

> had what you have done back at the start of the pandemic when I had to

> create quizzes for my moduless.



Thanks!  I have been thinking about getting something like this going

for a while.  WebWork sort of does some of this, but I like Moodle/STACK

so much better.



When I came across Org Mode it was quite a revelation.  Like you, I wish

I had done something some time ago: I should have learned about Org Mode

years ago.  It is very close to being exactly what I want: a rich

environment for creating and previewing randomizable test questions that

can be used to automatically generate paper tests or STACK questions for

Moodle.



I've started a GitHub site: https://github.com/edoolittle/org-moodle

I've posted the final exam to the site.  Lots of work needs to be done

on it still: in particular the full solutions need to be added, and the

randomization needs to be implemented.  Currently versions are

varied/randomized manually by adjusting the Parameters section at the

beginning of each question.  Finally, I have just copy/pasted from one

version to another but that needs to be redesigned.  There should be

only one copy of the test in the master file, and versions could be

created by exporting Org to Org (so that the parameters chosen for the

version are stored in the secondary Org file).



> In answer to your actual question: no, I do not believe you are off the

> mark.  I no longer have a need for what you are doing but I'm sure

> others would benefit greatly if they have to interact with moodle and

> its xml formats etc.



Thank you for the assessment.  I moved very quickly into this space, but

I was fortunate to be able to have 3 full days free over the holidays to

get up to speed.  Lots of fumbling around but I have been pleased with

how it all turned out.



Going forward, I am most confused about whether to transform Org to XML

and then to Moodle XML, or whether to export from Org directly to Moodle

XML.  In the short term the first will be easier for me, I think.



Edward

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

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: Developing Moodle resources/sites with Org Mode
@ 2024-01-18 16:57 Brett Presnell
  0 siblings, 0 replies; 10+ messages in thread
From: Brett Presnell @ 2024-01-18 16:57 UTC (permalink / raw)
  To: emacs-orgmode


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

Nice idea.  You might find it useful to look into the source code for
the R/Exams package for R (https://www.r-exams.org/).  The format there
is RMarkdown as opposed to org mode, but I imagine a lot of the same
ideas might apply.  I'm pretty sure that Moodle was the original
platform that the developers were using, but they now support most of
the big platforms.

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

I've used R/Exams a good bit by now, and I always generate at least 16
random versions of every quiz or exam.  The process is pretty automatic.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-01-19 14:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-17  4:17 Developing Moodle resources/sites with Org Mode Edward Doolittle
2024-01-17 12:18 ` 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

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