Update to pg 2.17#89
Conversation
there that are still needed by the standalone renderer when rendering a problem. Requests to webwork2_files are redirected as appropriate by the renderer. Most go to PG/htdocs.
(or PG-2.17 branch) of PG.
|
Note 35 files were changed/added outside of the lib/WeBWorK/htdocs directory. So that means the other 2981 are just the files deleted from lib/WeBWorK/htdocs. |
|
I am trying to test this via Docker. (I set up a 2 stage build process, so that the base system is fixed, as I kept getting errors.) I added lines to install node 16 to the (stage 1) and added I changed the line with the as that seems to be where it should be run. However, the So far, the only workaround I have found is to remove I also needed to add an Once I managed to get an image created and to run - I can see problems, etc. |
|
@drgrice1 - Bravo. After overcoming the Docker build problems - the basic functionality certainly seems to work on quite a few problems I tried, including problems using In my current usage with the older version of the renderer I worked around the fact that the MQ toolbar was on the far right (often hiding input boxes) by adding the CSS below via a locally added |
|
@taniwallach I'm not sure if you saw the comment on openwebwork#2, but we're shifting over to the openwebwork fork as the 'main' target for development and release. I'll continue to use this fork for my own development, and future updates will all go through openwebwork instead of here. 👍 For now, I'm going to merge this one here -- would you mind also approving the PR on openwebwork#2? 🙏 |
Thanks for pointing that out. Would it be possible to change the ownership of this (root level) repository on GitHub to openwebwork, so the openwebwork was the "primary"? It might be necessary to first delete the current openwebwork fork, but that really did not yet have much activity? I would assume you could then create a new personal fork, but then the tree of forks would be more natural for the future. There seems to be a requirement that you have "repository creation permissions in the receiving organization" when you make the transfer. See: https://docs.github.com/en/repositories/creating-and-managing-repositories/transferring-a-repository |
Update the standalone renderer to use pg version 2.17.
The entire lib/WeBWorK/htdocs directory has been removed. The few files that are needed by the standalone renderer are now in public/Problem and public/PGCodeMirror.
To make this work, static file handling had to be revises. See lib/RenderApp/Controller/StaticFiles.pm. Basically, the only files that are served from
webwork2_filesare CAPA_graphics files (now served directly fromContrib/CAPA/CAPA_graphics) or tmp files (served from a directory in the app root nametmp). PG files are served from thepg_fileslocation (files are inlib/PG/htdocs).A
getAssetURLmethod is inlib/WeBWorK/lib/WeBWorK/Utils.pmmuch like webwork2's method handles the correct redirection of thepg_files.Note that codemirror is no longer serving their javascript and css files. So temporarily this has add an
npm installstep in the root directory of the renderer. Avendorlink in public makes those files available. We can either switch to another CDN to serve those files or go with this. I much prefer this. CDN's are not reliable. I think it would be best to switch all third party javascript to using this approach.Note that MathQuill is now optional much the same way as in #83, but the default is that it is enabled. Of course, the standalone renderer no longer adds MathQuill itself as PG now does that.
I recommend running
git diff develop :^lib/WeBWorK/htdocs*from this branch to see the changes without the lengthy list of deletions from the lib/WeBWorK/htdocs directory.