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


Reply via email to