* 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-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-18 14:53 ` Christian Moe
2 siblings, 0 replies; 10+ messages in thread
From: Fraga, Eric @ 2024-01-17 12:18 UTC (permalink / raw)
To: Edward Doolittle; +Cc: emacs-orgmode@gnu.org
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.
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.
--
: Eric S Fraga, with org release_9.6.13-1003-g872c1b in Emacs 30.0.50
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Developing Moodle resources/sites with Org Mode
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 14:53 ` Christian Moe
2 siblings, 2 replies; 10+ messages in thread
From: Leo Butler @ 2024-01-17 19:23 UTC (permalink / raw)
To: Edward Doolittle; +Cc: emacs-orgmode@gnu.org
On Wed, Jan 17 2024, Edward Doolittle <ejdoolittle@outlook.com> wrote:
> 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
Hi Edward,
Thanks for your extended thoughts. I have had similar, but much less
articulate, thoughts for a while.
I have used org-mode to do all my STACK question authoring for a few
years now [1]. I do all the writing in emacs and then copy/paste into the
STACK textareas, test, repeat. It is not elegant, but it is easier than
working in a web-browser. It would be really nice to be able to create
the entire question in emacs, because defining graders in STACK is
pretty tedious.
I agree that we need ob-maxima.el to properly handle sessions. Note that
you can use Maxima to create graphs, too.
One thing that I am not sure I understand about your thoughts: do you
envision a Moodle emulator based on org-mode, or do you just want to be
able to write Moodle questions or glossaries with org-mode?
Best regards,
Leo
[1] https://sourceforge.net/p/maxima/mailman/maxima-discuss/thread/87a6d4ajgk.fsf%40t14.reltub.ca/#msg37634141
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Developing Moodle resources/sites with Org Mode
2024-01-17 19:23 ` Leo Butler
@ 2024-01-17 20:32 ` Denis Bitouzé
2024-01-18 3:35 ` Edward Doolittle
1 sibling, 0 replies; 10+ messages in thread
From: Denis Bitouzé @ 2024-01-17 20:32 UTC (permalink / raw)
To: emacs-orgmode
Le 17/01/24 à 19h23, Leo Butler a écrit :
> I have used org-mode to do all my STACK question authoring for a few
> years now [1]. I do all the writing in emacs and then copy/paste into the
> STACK textareas, test, repeat. It is not elegant, but it is easier than
> working in a web-browser. It would be really nice to be able to create
> the entire question in emacs, because defining graders in STACK is
> pretty tedious.
Maybe the ~moodle~ LaTeX package, which helps for the generation of
Moodle quizzes via LaTeX could be helpful:
┌────
│ https://www.ctan.org/pkg/moodle
└────
Just my 2 cents.
--
Denis
^ 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-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
1 sibling, 1 reply; 10+ messages in thread
From: Edward Doolittle @ 2024-01-18 3:35 UTC (permalink / raw)
To: Leo Butler; +Cc: emacs-orgmode@gnu.org
[-- Attachment #1: Type: text/plain, Size: 5846 bytes --]
Thank you for your thoughts.
I have used org-mode to do all my STACK question authoring for a few
years now [1]. I do all the writing in emacs and then copy/paste into the
STACK textareas, test, repeat. It is not elegant, but it is easier than
working in a web-browser. It would be really nice to be able to create
the entire question in emacs, because defining graders in STACK is
pretty tedious.
I had a look at the message you refer to. It is a good summary, and in line with what I thought was straightforwardly do-able. I haven't uploaded any of my problems to STACK yet but that's how I imagined it going: cutting and pasting like you say. In the long run I'd like to be able to export to Moodle XML, then automatically upload the XML to the Moodle site.
I have been making use of tex1 and texput in Maxima to generate LaTeX. It is alarming to me that they may not be supported by default in Moodle/STACK. I decided to do most of the LaTeX generation in Maxima instead of writing the LaTeX and filling in the values of variables because of situations like the following: If Maxima has a0:-3 and I write LaTeX \(x-{@a@}\) I will get \(x- -3\) which is exactly what I asked for but unconventional. If I define Maxima output0:tex1(x-a0), Maxima will do the algebra and LaTeX \({@output0@}\) will be \(x+3\) as we would normally expect. Lots of little things like that made me prefer assembling expressions in Maxima and exporting them whole hog instead of one bit at a time.
Some more thought will have to be given to how to create the grading trees. I'm sure it's documented somewhere but I'll probably just create a question with some complicated grading trees and export it from Moodle to see what the XML looks like. I think I won't go there for now because the Maxima fragments on the grading side run in the same session as the Maxima initialization on the question side in STACK, but that is rather awkward to fake in Org until there is a session capability in the Maxima blocks, I think. So it might be possible to write the grading trees in Org but would be difficult to test them.
There is no export from Moodle to XML but there are external packages that will do it ... with what quality, I don't know. But once the Org file is in "Org XML" it should be relatively straightforward to transform it to the XML required by Moodle using XSLT or whatever. Lots of details, but that's my big picture strategy. I'd like eventually to export directly from Org to Moodle XML but that's currently beyond my skill set.
I agree that we need ob-maxima.el to properly handle sessions. Note that
you can use Maxima to create graphs, too.
I posted my kludge to work around the lack of sessions to https://github.com/edoolittle/org-moodle. It's pretty ugly but works for now.
Again, the work to sessionize Maxima is probably straightforward but lots of details that are currently beyond my skill set. I am not proficient at Emacs Lisp. For now I'm concentrating on the low-hanging fruit that I can do quickly.
I have avoided for now using the Maxima "plot" command. Actually, it's "plot2d" in Maxima/Org and "plot" in Maxima/STACK. Note they are two slightly different things, which means that one must always be conscious of the context and not use any of the nicer "plot2d" features when writing questions that will eventually find their way into Moodle/STACK.
Also "plot" is just too restrictive in some cases. I can graph two curves (parametric curves even) and put dots at their intersection points but I can't figure out how to label those dots. Which is A and which is B? So even though I've used it in the past, I think I'd rather put my energy into figuring out how to generate diagrams with JSXgraph which is modern, sophisticated, and beautiful compared to plot. A difficulty is how to get the {#maxima-variable#} out of the maxima results and into the JSXgraph block. I /think/ that's just a minor issue with noweb.
One thing that I am not sure I understand about your thoughts: do you
envision a Moodle emulator based on org-mode, or do you just want to be
able to write Moodle questions or glossaries with org-mode?
I think an emulator is a bridge too far for now. What I want to do is run Maxima blocks to get a paper version of the exam with an answer key (for graders) and complete solutions (as an "exam wrapper" to return to the students with their graded exams so they can learn from the correct answers). Both questions and answers will have to be generated (the variable parts anyway) by Maxima because I want the capability to generate multiple different paper versions of any question/exam, perhaps even one version of the exam per student. Then for versatility I want the questions to be in a form that can at least be cut-and-pasted into Moodle, so I can use last year's exam questions as this year's problem set questions. With some tweaks, I hope to eventually automate the procedure of getting the questions into Moodle. The hurdles are correct XML format, grading tree, "publishing" process to include correct image files, the whole randomization and quality control subsystem (what STACK calls "deployment of variants"). I don't know how the latter can be made sense of in Org Mode. Even things like the random number seeds that index different variants might be interpreted differently in Org and STACK, breaking the connection between Org and STACK variants of a question. So lots of work to do.
An emulator is possible ... we can run a Moodle server on our local computers and see how we can get it to talk to Emacs. But that is beyond my skill set for now.
Edward
(Apologies for any formatting awkwardness; my Windows computer wants me to write all outgoing mail with Outlook. Need to figure out how to send directly from Emacs.)
[-- Attachment #2: Type: text/html, Size: 10942 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Developing Moodle resources/sites with Org Mode
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-18 14:53 ` Christian Moe
2 siblings, 0 replies; 10+ messages in thread
From: Christian Moe @ 2024-01-18 14:53 UTC (permalink / raw)
To: emacs-orgmode
Hi, Edward
Edward Doolittle writes:
> 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.)
I'm a Moodle noob and rusty on the tools, but this is interesting to
think about.
You may not need any additional library for the XML export bit. The
builtin Org HTML exporter does XHTML export by default, and XHTML is an
XML, so one could just apply XSLT to that. There may be advantages to
using a library like om-to-xml (cleaner, more semantic XML; access to
more properties than what gets exported). But it looks like Moodle only
uses XML to wrap the glossary entries and their properties; any markup
inside the glossary definitions appears to be in HTML (with the html
tags entity-escaped), not defined by the Moodle glossary XML format. So
if you're going to have some markup in the definitions, you may be
better off leaving the (X)HTML part to Org instead of reimplementing it
in XSLT.
Another option might be to dispense with XSLT entirely and just write
elisp code to map the entries of an Org glossary and generate Moodle XML
from that.
How would you format the glossary on the Org side? Would you use Org
entries (** term) or Org description lists (- term :: definition)?
On the Moodle side, do you want keywords and attachments?
Yours,
Christian
^ 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
* Re: Developing Moodle resources/sites with Org Mode
2024-01-18 3:35 ` Edward Doolittle
@ 2024-01-18 18:03 ` Leo Butler
0 siblings, 0 replies; 10+ messages in thread
From: Leo Butler @ 2024-01-18 18:03 UTC (permalink / raw)
To: Edward Doolittle; +Cc: emacs-orgmode@gnu.org
On Thu, Jan 18 2024, Edward Doolittle <ejdoolittle@outlook.com> wrote:
> Thank you for your thoughts.
> I have used org-mode to do all my STACK question authoring for a few
> years now [1]. I do all the writing in emacs and then copy/paste into the
> STACK textareas, test, repeat. It is not elegant, but it is easier than
> working in a web-browser. It would be really nice to be able to create
> the entire question in emacs, because defining graders in STACK is
> pretty tedious.
> I had a look at the message you refer to. It is a good summary, and in
> line with what I thought was straightforwardly do-able. I haven't
> uploaded any of my problems to STACK yet but that's how I imagined it
> going: cutting and pasting like you say. In the long run I'd like to
> be able to export to Moodle XML, then automatically upload the XML to
> the Moodle site.
Yes, that would be nice to have.
>
> I have been making use of tex1 and texput in Maxima to generate
> LaTeX. It is alarming to me that they may not be supported by default
> in Moodle/STACK. I decided to do most of the LaTeX generation in
> Maxima instead of writing the LaTeX and filling in the values of
> variables because of situations like the following: If Maxima has
> a0:-3 and I write LaTeX \(x-{@a@}\) I will get \(x- -3\) which is
> exactly what I asked for but unconventional. If I define Maxima
> output0:tex1(x-a0), Maxima will do the algebra and LaTeX
> \({@output0@}\) will be \(x+3\) as we would normally expect. Lots of
> little things like that made me prefer assembling expressions in
> Maxima and exporting them whole hog instead of one bit at a time.
Yes, I have gone down a similar path. I prefer to ask STACK/Moodle to do
as little as possible. One additional reason for this is that the list
of "disallowed" Maxima functions grows with each release of STACK.
>
> Some more thought will have to be given to how to create the grading
> trees. I'm sure it's documented somewhere but I'll probably just
> create a question with some complicated grading trees and export it
> from Moodle to see what the XML looks like. I think I won't go there
> for now because the Maxima fragments on the grading side run in the
> same session as the Maxima initialization on the question side in
> STACK, but that is rather awkward to fake in Org until there is a
> session capability in the Maxima blocks, I think. So it might be
> possible to write the grading trees in Org but would be difficult to
> test them.
>
> There is no export from Moodle to XML but there are external packages
> that will do it ... with what quality, I don't know. But once the Org
> file is in "Org XML" it should be relatively straightforward to
> transform it to the XML required by Moodle using XSLT or
> whatever. Lots of details, but that's my big picture strategy. I'd
> like eventually to export directly from Org to Moodle XML but that's
> currently beyond my skill set.
> I agree that we need ob-maxima.el to properly handle sessions. Note that
> you can use Maxima to create graphs, too.
> I posted my kludge to work around the lack of sessions to https://github.com/edoolittle/org-moodle. It's pretty ugly but works for now.
I have attached a different type of work-around. It uses Maxima's `save'
command and the :prologue and :epilogue header arguments.
>
> Again, the work to sessionize Maxima is probably straightforward but
> lots of details that are currently beyond my skill set. I am not
> proficient at Emacs Lisp. For now I'm concentrating on the low-hanging
> fruit that I can do quickly.
I have toyed with putting in session support. It does not seem too
difficult, but I have needed a reason to do it. Good is the enemy of
better.
>
> I have avoided for now using the Maxima "plot" command. Actually, it's
> "plot2d" in Maxima/Org and "plot" in Maxima/STACK. Note they are two
> slightly different things, which means that one must always be
> conscious of the context and not use any of the nicer "plot2d"
> features when writing questions that will eventually find their way
> into Moodle/STACK.
>
> Also "plot" is just too restrictive in some cases. I can graph two
> curves (parametric curves even) and put dots at their intersection
> points but I can't figure out how to label those dots. Which is A and
> which is B?
Oh, I encountered this problem a while ago when I submitted a patch to
the STACK documentation. IIRC, there is some undocumented numbering,
etc. etc.
I believe that `draw' support is a project goal, but I think that
jsxgraph has attracted much more attention.
> So even though I've used it in the past, I think I'd rather put my
> energy into figuring out how to generate diagrams with JSXgraph which
> is modern, sophisticated, and beautiful compared to plot. A difficulty
> is how to get the {#maxima-variable#} out of the maxima results and
> into the JSXgraph block. I /think/ that's just a minor issue with
> noweb.
Yes, that's right. If you have a small example, please feel free to share.
>
> One thing that I am not sure I understand about your thoughts: do you
> envision a Moodle emulator based on org-mode, or do you just want to be
> able to write Moodle questions or glossaries with org-mode?
> I think an emulator is a bridge too far for now. What I want to do is
> run Maxima blocks to get a paper version of the exam with an answer
> key (for graders) and complete solutions (as an "exam wrapper" to
> return to the students with their graded exams so they can learn from
> the correct answers). Both questions and answers will have to be
> generated (the variable parts anyway) by Maxima because I want the
> capability to generate multiple different paper versions of any
> question/exam, perhaps even one version of the exam per student. Then
> for versatility I want the questions to be in a form that can at least
> be cut-and-pasted into Moodle, so I can use last year's exam questions
> as this year's problem set questions. With some tweaks, I hope to
> eventually automate the procedure of getting the questions into
> Moodle. The hurdles are correct XML format, grading tree, "publishing"
> process to include correct image files, the whole randomization and
> quality control subsystem (what STACK calls "deployment of
> variants"). I don't know how the latter can be made sense of in Org
> Mode. Even things like the random number seeds that index different
> variants might be interpreted differently in Org and STACK, breaking
> the connection between Org and STACK variants of a question. So lots
> of work to do.
>
> An emulator is possible ... we can run a Moodle server on our local computers and see how we can get it to talk to Emacs. But that is beyond my skill set for now.
Ok, that clarifies things somewhat for me.
Best,
Leo
>
> Edward
>
> (Apologies for any formatting awkwardness; my Windows computer wants me to write all outgoing mail with Outlook. Need to figure out how to send directly from Emacs.)
^ 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, 0 replies; 10+ messages in thread
From: Devin Prater @ 2024-01-19 14:45 UTC (permalink / raw)
To: emacs-orgmode
I don't like Moodle's interface at all. Just a web page edit field to
type into. So, I have everything in Markdown on Github, and I link to
that with Moodle URL type lessons. I'd love more support for Moodle in
other software, since a folder of files is tons easier than tons of web
pages. I'm not a programmer, but I can manage to use Emacs and the
command line.
On 1/17/2024 7:25 PM, Doolittle, Edward wrote:
> "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
> <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
>
--
Devin Prater
^ 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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.