emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Leo Butler <Leo.Butler@umanitoba.ca>
To: Edward Doolittle <ejdoolittle@outlook.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Developing Moodle resources/sites with Org Mode
Date: Thu, 18 Jan 2024 18:03:59 +0000	[thread overview]
Message-ID: <87cytyfrht.fsf@t14.reltub.ca> (raw)
In-Reply-To: <PH0PR12MB87996AD8FA4B7B927C2B5A98BB712@PH0PR12MB8799.namprd12.prod.outlook.com> (Edward Doolittle's message of "Thu, 18 Jan 2024 03:35:33 +0000")

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

  reply	other threads:[~2024-01-18 18:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=87cytyfrht.fsf@t14.reltub.ca \
    --to=leo.butler@umanitoba.ca \
    --cc=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).