Skip to content

Remove the html2xml endpoint.#3034

Open
drgrice1 wants to merge 1 commit into
openwebwork:WeBWorK-2.21from
drgrice1:remove-html2xml-endpoint
Open

Remove the html2xml endpoint.#3034
drgrice1 wants to merge 1 commit into
openwebwork:WeBWorK-2.21from
drgrice1:remove-html2xml-endpoint

Conversation

@drgrice1

Copy link
Copy Markdown
Member

This has been deprecated since the release of webwork 2.18. It is time for it to go. I believe that everyone that used to use this endpoint have now updated to use the render_rpc endpoint. If not, then we can wait another release for this.

@drgrice1 drgrice1 force-pushed the remove-html2xml-endpoint branch from 3df56d2 to ff7284e Compare June 26, 2026 20:09
This has been deprecated since the release of webwork 2.18. It is time
for it to go.  I believe that everyone that used to use this endpoint
have now updated to use the `render_rpc` endpoint. If not, then we can
wait another release for this.
@drgrice1 drgrice1 force-pushed the remove-html2xml-endpoint branch from ff7284e to d708d76 Compare June 26, 2026 20:10
@Alex-Jordan

Copy link
Copy Markdown
Contributor

There is one thing that PTX still uses this for. It's something about determining the WeBWorK version of a server it is contacting. I will have to refresh myself later. I suspect it is something that could be ironed out in time for PTX to support a 2.21 server, but might need to ensure there is a solid way for a webwork2 server to be broadcasting its version. I can look into it in a few weeks. But in the meantime, is there a simple way to just ask a webwork2 server to report its version?

@drgrice1

Copy link
Copy Markdown
Member Author

At this point there is no particularly clean way to make a webwork server report its version. But there are ways to get it.

One way would be to try the html2xml endpoint, and if the request fails, then you know it is 2.21 or newer.

Another way would be to get the root page https://your.server/webwork2 and parse the html. The footer has the version.

@drgrice1

Copy link
Copy Markdown
Member Author

For testing to see if the html2xml endpoint exists, I guess you have to be a little careful. The request won't exactly fail. Instead it will render the text response The course html2xml does not exist. with a status of 404. But that gives a rather definitive determination of version 2.21 or newer (assuming this pull request is merged).

@drgrice1

Copy link
Copy Markdown
Member Author

Using the html2xml endpoint to determine the webwork2 version was really not the correct thing to do. What your code should do is first try the render_rpc endpoint, and if that works get the version it sends. If that fails, then try the html2xml endpoint. This wouldn't be hard to implement in the pretext/lib/webwork.py file where this version check is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants