On 11/12/22 23:30, Alex Jordan wrote:
>> Maybe we need a fast ID just for "webwork"?
>> Any red flags?
>
> It could be OK, but I hesitate because it feels uncomfortable to run
> with a webwork-specific solution.
We get static MyOpenMath from a server, but each problem has a MOM id, so there
is no trouble coordinating things. And no translating between markup languages.
We build static versions of Runestone problems, but it is totally a
PreTeXT-internal-XSL process, translation, but no server communication.
WeBWorK has PreTeXt markup, which we translate to PGML, which we sent to a
server to get back static. And no natural sort of id connected to the server
(unless PTX does it). And I think we want to "repair" what comes back from old
servers that do not produce un-deprecated PreTeXt. (We contol static versions
of Runestone, so shame on us if we make old PreTeXt.)
So I don't think this is a WW thing - I think WW is just our only instance of
several moving parts all rolled into one.
Your discussion below is spot on. But the solution feels too brittle to me. I
loved the addition of the "fn" to a "url" when I did it, but it is exposing lots
of delicate matters, only partially because it can show up almost anywhere. To
make it exceptional almost defeats the purpose.
Thought du jour. One "webwork" pass/mode. Early. Compute an id as discussed.
Always happens the same place in the process, so consistent. If "extracting"
(Pass 1), then make any @copy. Perhaps make repairs later in process. Convert
to PGML, send to server, get back a representations file. But, if not
"extracting", then retrieve desired representation from the representations file
(ids are in sync!), and perhaps repair static later. Then do "real" ids last,
during what I call "augmentation" -- adding attributes that save later repeated
computation (like numbering and tagging the many categories of "exercise").
We could have made (or still could) extraction a standalone process. Put an id
on each "webwork" as part of "original" source (first!) and make PGML and send
to the server and get it back into a file of its own. Then insert
representations from the right file (based on an id computed at the same early
time as before). I'm thinking the process *could* look more like MOM, except
that we extract and make PGML (more work), and we ignore any notion of versions,
which in some extreme cases might mean more WW processing than necessary. I'm
not proposing this - only something to think about down the line.