PreTeXtBook / pretext

PreTeXt: an authoring and publishing system for scholarly documents
https://pretextbook.org
Other
266 stars 208 forks source link

iframes do not resize properly when compiling without "--stringparam html.knowl.exercise.inline no" #863

Closed heiderich closed 6 years ago

heiderich commented 6 years ago

When compiling a mathbook document containing WeBWorK exercises to HTML without the option --stringparam html.knowl.exercise.inline no iframes containing WeBWorK problems are not resized properly in Firefox 57.0.1 and Chromium 62.0.3202.89. Is this supposed to work? If so, I guess that there is a bug. While not being sure, I would guess that this is due to a problem in the interplay between iframe-resizer and knowl.

davidfarmer commented 6 years ago

Just guessing, but in that case can you check if

script type="text/javascript" src="https://webwork.pcc.edu/webwork2_files/js/vendor/iframe-resizer/js/iframeResizer.min.js

is in the HTML source?

If it isn't, then the bug is failure to correctly detect when the iframeResizer code needs to be put into the HTML. (And that would be easy to fix.)

On Thu, 3 May 2018, Florian Heiderich wrote:

When compiling a mathbook document containing WeBWorK exercises to HTML without the option --stringparam html.knowl.exercise.inline no iframes are not resized properly in Firefox 57.0.1 and Chromium 62.0.3202.89. Is this supposed to work? If so, I guess that there is a bug. While not being sure, I would guess that this is due to a problem in the interplay between iframe-resizer and knowl.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.[AAM6LP2qgXutPeoHKjOEbj3B86ISQcdSks5tuy1HgaJpZM4TxYds.gif]

Alex-Jordan commented 6 years ago

Also, which WeBWorK server are you using? In version 2.13, the iframeResizer is an old version. This has been updated in the webwork develop branch and the upgrade has been applied to a few servers, but not all 2.13 servers. If this is the issue I can give more detail about how to remedy it.

heiderich commented 6 years ago

@davidfarmer: And yes,<script type="text/javascript" src="https://webwork.pcc.edu/webwork2_files/js/vendor/iframe-resizer/js/iframeResizer.min.js"> is contained in the html files, just with our webwork server and not that of PCC.

@Alex-Jordan:

Also, which WeBWorK server are you using?

I am using a custom branch, which is based on commit 46865dc5cad599559eff105d2d8ce7176c3ebc9a in https://github.com/openwebwork/webwork2 (December 2017).

I also tried replacing the file under webwork2/htdocs/js/vendor/iframe-resizer by the master branch of https://github.com/davidjbradshaw/iframe-resizer, which did not help.

Alex-Jordan commented 6 years ago

To fully rule out that it is the iframeResizer version, can you check that going to:

https://webwork.yourschool.edu/webwork2_files/js/vendor/iframe-resizer/js/iframeResizer.min.js

shows you that it is version 3.5.15? And can you double check that the web browser has not cached the earlier version of this js?

heiderich commented 6 years ago

Thanks for mentioning the cache! This was indeed the problem.

First I used a trailing slash in the string webwork.server. I opened a pull request (#865) with a warning about that.