-
Notifications
You must be signed in to change notification settings - Fork 220
WeBWorK 2.19 support (Tacoma 2024 project) #2336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for putting this together for us. |
|
I've checked all of this against existing behavior, and will have some comments in a minute. But, I don't see any reason to not start testing behavior on Runestone now, step (3) of above with @bnmnetp. |
|
Thanks, @Alex-Jordan for putting all of this together. Some comments:
Not much, given the quantity of code. Good job. I'm going to familiarize myself with the new features now, so may have more to say. But wanted to get this going in the right direction as quickly as possible. |
OK, I see |
|
And with AIM's 2.19 server, the |
|
|
Ideally, an Ubuntu package would provide what I need? |
|
Yes, the |
|
Thanks, @drgrice1! I needed the following Ubuntu packages to get through the sample chapter. |
|
Built representations throug to the end. Some non-fatal errors. About 6 instances, problem numbers 62-68 (or so), and maybe the very last one. Can't tell what I might be missing. |
|
Thanks Rob! Some quick responses and I may do more this evening.
What's going on here is the PTX HTML page has a div with id
OK, I will follow up with this.
I neglected to test with the makefile but I'll do that to make sure things are still working. I was testing by running
Are you viewing with
Sounds like an oversight. Will follow up.
I'll add to the documentation as best I can about what packages are needed. Or maybe a generic "you may need to install some perl packages". With Ubuntu packages, using
This indicates a host course doesn't have the access it needs to the |
I think that this was when @rbeezer was testing the local approach based on the output line "sending webwork-62 to socket". The local approach adds the macros directory in the generated directory to the macro path. So the macro should be available. Although, I also don't see that path in the output that @rbeezer showed. |
Looking over the diff, I think this is from |
OK, this one is addressed. I added a commit (rather than force push) but it can be squashed later as it indicates. |
Copy-paste oversight. The second one should have had its title changed to be about using a renderer. |
|
@drgrice1 Do you have a recommendation about what I should put in the documentation about which perl version (or later) is required for local PG processing? |
|
I am not exactly sure how old of a Perl version will work for local PG processing. I know that Perl 5.16 or newer is certainly needed. I suspect that versions that old will have problems though. I think that 5.26 is probably the oldest that we should try to support, and so I guess put that in the documentation. Although you would need 5.32 or newer for a version that I can truly guarantee everything will work for. |
|
I just pushed an additional commit with some guidance for the perl version and packages. I think what remains is:
|
|
Publication file: Use the Sample Chapter stanza for Now have fresh (within PTX distribution): but when doing Is that book-title directory in the way? I'm not 100% sure what I'm debugging here exactly. And other PreTeXt projects (that other people are hanging fire on) are going to keep me busy. |
|
I may merge #2341 in a bit. Which will require a rebase here. (And perhaps you can fix in (not squash) the newer commits along the way?) |
|
OK, as suspected, I was not hitting that error because at some previous time I had manually placed the needed macro file in an OK place. But it's working now with my testing. And while fixing this up, I noticed parallel issues with making a problem set archive and fixed those too. Summary:
So for example if you run Lastly, say you clear out your generated folder, and then run |
3636712 to
07feb70
Compare
|
We tested at RSA and for a while we had some issues with multiple choice questions. But we've ironed that all out. So I think this is ready unless there is more PTX-side testing to do. After this is merged, my next step would be to upgrade the AIM WW server (the production one) to version 2.19. Of course, with advanced warning posted on -announce. (We don't expect bad consequences, but it's always possible.) Eventually the changes here would make it into the CLI. Then we could upgrade the RSA WW server to 2.19, but I think it is less stressful to wait and do that in June. The commits here are still separated in case it helps to only put eyes on new changes since whenever the last review was. Let me know if you would prefer I (a) squash all related commits [for example, all that are about the js] or (b) squash it all into one big commit. Ideally we somehow still assign credit (and blame) to me, Drew, and Glenn though. |
|
Oh, I also rebased from master since there was a small conflict. |
|
Thanks - I'll try to address this one in about a week. If there is no change for status quo (as is the intent) then I'm inclined to merge this with new features being subject to change after used in the wild. If you haven't already, you might prepare a blurb for |
|
I force pushed a small change regarding the recent thread on -dev about |
|
Will it help with whittling this down if I opened a PR now that applies |
|
With current commits, I get: |
|
Sorry, I wasn't clear enough. I marked this as draft and meant to convey
it's in a limbo state, halfway through some revision work. Thanks for
giving it a try though. I think I will have one to three more atomic PRs
for you now that the archiving PR is in, before getting back to this one.
Alex Jordan
Mathematics Instructor
Portland Community College
…On Fri, May 30, 2025, 4:49 PM Rob Beezer ***@***.***> wrote:
*rbeezer* left a comment (PreTeXtBook/pretext#2336)
<https://urldefense.com/v3/__https://github.com/PreTeXtBook/pretext/pull/2336*issuecomment-2923745144__;Iw!!Ka_JY85zDv0FFw!iUVhGkXrbC51zKh23Rp42hSvC_qH-y_7bgemqxhF-Vpn-oj_hSGD3BLo6KIAfc1y_eLKT7Rj-2kA9JV7Q7HPMBMyMIs$>
With current commits, I get:
~/mathbook/mathbook/examples/webwork$ make sample-chapter-representations
<snip>
PTX:INFO : successful application of /home/rob/mathbook/mathbook/xsl/support/pretext-pg-macros.xsl
Traceback (most recent call last):
File "/home/rob/mathbook/mathbook/pretext/pretext", line 879, in <module>
main()
File "/home/rob/mathbook/mathbook/pretext/pretext", line 685, in main
ptx.webwork_to_xml(
File "/home/rob/mathbook/mathbook/pretext/lib/pretext.py", line 1289, in webwork_to_xml
"courseID": extracted_pg_xml.find("server-params-pub").find("course-id").text,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'text'
make: *** [Makefile:129: sample-chapter-representations] Error 1
—
Reply to this email directly, view it on GitHub
<https://urldefense.com/v3/__https://github.com/PreTeXtBook/pretext/pull/2336*issuecomment-2923745144__;Iw!!Ka_JY85zDv0FFw!iUVhGkXrbC51zKh23Rp42hSvC_qH-y_7bgemqxhF-Vpn-oj_hSGD3BLo6KIAfc1y_eLKT7Rj-2kA9JV7Q7HPMBMyMIs$>,
or unsubscribe
<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ABEDOAA3JMC3YNH5L3E3QLL3BDVBLAVCNFSM6AAAAABUAAAGXKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSMRTG42DKMJUGQ__;!!Ka_JY85zDv0FFw!iUVhGkXrbC51zKh23Rp42hSvC_qH-y_7bgemqxhF-Vpn-oj_hSGD3BLo6KIAfc1y_eLKT7Rj-2kA9JV7Q7HPEkKUdAM$>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I looked for that and did not see it. Now I do. GH does not make it particularly obvious... Sorry for the noise. |
d56b75b to
e00928e
Compare
|
@Alex-Jordan let me know if I can help with testing this. Getting this new javascript in place is going to be great. |
|
This won't be the branch to test. I'm posting to -dev as we speak about this though. |
|
Er, well, nothing I was about to post to -dev can't wait until I actually open the PR. So I'll just wait and put it there. Hoping for later today if I can get one last round of clean testing in. |
69ada8e to
6e74e69
Compare
|
Intermingled in this thread is the discussion of a new better way to handle LaTeX macros for the interactive problems. Rather than rewriting the latex macro definitons into every piece of math within the problem, the idea is to only load them once at the beginning of the problem. To accomplish this, I added the macros as hidden text in the ambient PTX HTML page, so our js can grab them and use them at the right place. At first, I had them as a data attribute on an HTML element. You requested they move to an element instead of an attribute. So I moved them into a hidden
The problem is that can't be done. Javascript doesn't access the HTML source file, it accesses the DOM. And the "existing version" of the LaTeX macros is gone by the time I need to get it. The existing version is of course first written into the PTX .html output file. But pretty quickly, MathJax has gobbled that up and replaced this nice thing that I would like to grab: with this: At this point, the actual macro definitions only exist it the browser memory. Nowhere in the DOM for me to get them. So this is why I need a plain text version of the macro definitions, a duplicate that will not be touched by MathJax. I could keep it in an attribute, or in an element. Do you have a preference? (Or an observation that I am missing somehting?) I could also make it only appear for projects that use WeBWorK. The tradeoff would be having less stuff in HTML pages for non-WW-using projects, in exchanges for some conditional code in |
|
Closing this now. I've made a list of the items that were in here that are yet to be implemented:
|
This is a large PR, just in time for everyone to be going on vacation :)
I'm doing my best to group the contributions from @drgrice1. @drdrew42, and myself from Tacoma. According to my testing, with these changes:
Once using a 2.19 server, there are new features that I have tested and documented using the minimal webwork example and the sample-chapter.
Possibly, we need a schedule for pulling the trigger on this. Here's a draft.