Update to pg 2.17#2
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.
|
This repository really needs to become the primary repository for the standalone renderer, and not @drdrew42's repository. The same needs to be true of the OPLv3 repository if these are going to be considered for use with webwork. |
drdrew42
left a comment
There was a problem hiding this comment.
Tested and everything works great!
Caveats:
- make sure Mojolicious is updated (and Future::AsyncAwait as well), needs 9.17+
- git submodule update (for PG)
- npm install x2 (for app AND for PG)
Could the ownership of the root level repository be transferred to openwebwork? |
taniwallach
left a comment
There was a problem hiding this comment.
I tested this at and posted comments about the Docker build issues I ran into at drdrew42#89 (comment) and some general comment at drdrew42#89 (comment).
This works and even supports right-to-left (Hebrew) problems better than was the case in the old version where a special rtl.css was added (via a local hack).
|
@taniwallach: What do you mean by root level ownership? Do you mean the github reference that this is forked from drdrew42/renderer? |
Yes, and more. The tree shown at https://github.com/openwebwork/renderer/network/members would also then show openwebwork as the "root" of the tree of forks. I am more interested is trying to have the PR history, discussions, etc. move over to this repository if that is possible. AFAIK a transfer of repository ownership in GitHub would keep all that as part of what would be available. |
|
Testing the local version of this and started fresh (deleting the old directory). A few things:
|
|
@pstaabp: There is no need to change the quasar.conf.js for webwork3. Check your render_app.conf file. |
homogenize / in urls
|
@pstaabp asset URLs should now be fixed -- I had a similar issue with requests being misrouted. No need to change anything else, just pull the latest updates to this branch. |
|
Also, be sure to run |
|
With the newest changes, everything is working out of the box, except the following warning: |
|
@pstaabp: The use of uninitialized value warnings are caused by the variables $LTIGradeMessage and $problemSeed being in the ww3_format.pl file, but never defined in the preceding code of FormatRenderedProblem.pm. The same things happens for the other formats when using the standalone renderer directly. Unfortunately the substitution |
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/htdocsfrom this branch to see the changes without the lengthy list of deletions from the lib/WeBWorK/htdocs directory.