-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Update the AppletObjects.pl macro for changes in the ADD_JS_FILE usage #549
Conversation
Add the usage of ADD_JS_FILE and ADD_CSS_FILE to the parserGraphTool.pl macro.
@taniwallach: I don't really think this one needs that much testing. It is a pretty straightforward change. |
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.
With this PR and openwebwork/webwork2#1258 active - the 3 files are all loaded properly when I tested Library/CSUOhio/appletDemonstrationProblems/DerivativeDraw11.pg
a random OPL problem using AppletObjects.pl
. That problem has a flash applet - so the applet itself does not work, but that was not what needed to be tested.
Ready to merge once openwebwork/webwork2#1258 is merged. |
I'm recommending adding minor changes to the documentation in |
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.
Recommend the patch to the PG.pl
documentation (in the comments regarding ADD_CSS_FILE
and ADD_JS_FILE
) be added, as they also relate to the changes made in openwebwork/webwork2#1258 and I don't see any reason to make a separate PR for that.
accept an additional argument that determines if the first argument is a file located in the htdocs directory or an external url. The documentation is updated. This documentation is now proper POD.
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.
In my last commit I reversed the polarity of that second argument. So now if the argument is 0 (or not given) then it is assumed to be in the htdocs directory. Furthermore, I added that argument to the ADD_CSS_FILE method. This maintains the usage of the ADD_CSS_FILE method from before, and makes the ADD_JS_FILE usage consistent with that as you were expecting.
I just tested quickly with the revised version of this and the changes to webwork2 made in openwebwork/webwork2#1258 (the quote above is taken from the discussion there).
I think the revised default to assume additions come from htdocs
is a good decision for both functions in PG. Thanks @drgrice1 and thanks for making the POD documentation.
I think this pair of PRs are ready to merge.
This adds the
js
prefix to the location of the javascript files added by AppletObjects.pl via ADD_JS_FILE.This should be merged if and only if openwebwork/webwork2#1258 is merged.