Update the webwork version check approach.#2982
Conversation
|
Thanks! I'm sure this is good, but can't test until roughly July 7. There is some stuff in |
|
Okay. I will update that. |
bad7ae5 to
aad84c2
Compare
aad84c2 to
425bb53
Compare
|
Actually, the only reference to the |
|
Thanks, @drgrice1! I'll be able to study this closer in a couple of days. |
|
Thanks again, @drgrice1! I like it, and so does Claude. Thanks for getting this our in front of upcoming changes. Tested against current server at AIM, and results look good based on the new endpoint. Merged as-is with minor edits to commit message. |
|
Darn! I know you are particular about the commit messages, and so I tried to figure out what it should be based on the existing commit messages. It should have been a prefix of |
|
No problem! It was a good guess. |
The current method makes a request to the deprecated
html2xmlendpoint to get the version. Then falls back to retrieving and parsing the HTML for the landing page. The problem with that approach is that thehtml2xmlendpoint will eventually be removed. Most likely this will happen with the next release of WeBWorK. See openwebwork/webwork2#3034.So this switches to first making a request to the
render_rpcendpoint. If that returns a 200 okay response, then get the version from the response. Otherwise fall back to thehtml2xmlendpoint and attempt to get the version from that response. If that still fails, then try the landing page approach.The
render_rpcrequest will work for version 2.18 or newer of webwork2. The fallbackhtml2xmlrequest will only work for webwork 2.17. Any older version will not even send theww_versionin thehtml2xmlrequest, so the landing page fallback approach is the only thing that could possibly work.