-
Notifications
You must be signed in to change notification settings - Fork 4
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
Converting to Mojolicious::Template for outputFormat
#14
base: develop
Are you sure you want to change the base?
Conversation
73e3915
to
11ef91a
Compare
Still to-do:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are a few observations and suggestions.
You should delete the package.json
and package-lock.json
files in the renderer root directory, delete the public/vendor
linke, and update the links in templates/columns/editorUI.html.ep
to use the codemirror files in public/node_modules
. Also, the package-lock.json
file for the new package.json
file in public should be added.
I noticed that the submit buttons ("Preview My Answers", "Submit Answers", etc.) in problems do not seem to be working with this pull request.
Are the files in lib/WebworkClient
used anymore? Are keeping them for now for reference?
Another thing that I noticed is that the minimized javascript and css files and the public/static-assets.json file need to be added to .gitignore. |
Done.
There was an issue with changes to the JSON structure, causing an error in the js that handled updating the iframe. I have resolved it (warnings are now displayed by the default template, and there is no need to capture them as I was doing before).
DELETED! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few other things seem to need to be fixed.
The problem submit buttons are now submitting, but they are not submitting in the correct way. If you click on "Preview My Answers" or "Submit Answers" they both do the same thing. A preview does not just show a preview, but grades the problem.
It would be good to add the "Show Correct Answers" button back to the standalone renderer. That is a useful tool for editing problems.
Yep, I see that. I'll handle this tonight.
Does this seem reasonable to include by default whenever we have isInstructor true? |
That seems right to me. That is consistent with how it works in webwork2 for regular homework sets. |
I noticed there is an issue with the submithelper.js file. It is my mistake from earlier changes. There should be a (() => {
...
})(); Since that is missing the file contains an anonymous function definition, and the function is never called. As a result the minification completely removes everything, and the minimized file is actually an empty file. |
7daaa04
to
f1ad558
Compare
Okay, other than the fixes for hosting the renderer with an extended root URL, I think this is ready. I'm going to put all of those fixes in another PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets plan on merging this soon so that we can move on.
There is one minor clean up detail that was missed in my earlier comments. Please delete the package-lock.json
file in the root directory of the repository. That isn't needed anymore.
Building off of #11 and #13, this PR converts FormatRenderedProblem and AttemptsTable over to the use of Mojolicious::Template to align with WW2's RPC calls.
Deviations from WW2
Some changes were required:
Updates to Functionality
*_format.pl
files as a template. The template is nowtemplates/RPCRenderFormats/default.html.ep
unless specifically requestingptx
orraw
as theoutputFormat
displayMode: PTX
now supported