I have been experimenting with trying to get MathJax to display in the Blackboard Learning System. The tversion we are using was actually the WebCT product before Blackboard.inc bought the company. The version we have is Vista Enterprise License (Release Vista 8.0.3) [18.0.3.74]. I have been testing with MathJax beta1 which was uploaded into the Blackboard course files area.
For simple pages created or imported into the Bb (Blackboard) system MathJax loads and displays fine. However, an important part of teaching through this and other VLEs is the ability to use quiz tools to access students. When attempting to incorporate MathJax into a Bb quiz question, a fatal Javascript error occurs. This error is:
dst is undefined
[Break on this error] dst[id] = src[id]; MathJax.js (line 1251)
MathJax has been incorporated by adding HTML to the Question Text and importing the MathJax.js with <SCRIPT SRC="/webct/RelativeResourceManager/Template/js/MathJax/MathJax.js">
The path is correct and MathJax tries to load before dying on line 1251.
I have attached the exact HTML markup used.
Also note that both jsMath and ASCIIMath work fine in Bb quiz questions questions.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
HTML used in question text
What browser and version are you using?
Is there a message in the MathJax message area at the lower left when you get the error message? If so, what is it? (You indicate that it tries to load, so I assume that messages are showing up there).
If not, can you try adding the following to the page:
<script>setTimeout("alert(MathJax.Message.Log()",10000)</script>
which should cause an alert to show up 10 seconds after you load the page, and send me the contents of that alert?
Finally, the file that you attached seems to be a modified copy of the MathJax/test/index.html file rather than a file generated by Blackboard. Is that the page that is actually causing you problems? If not, can you send the page that is?
Davide
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
The problem effects all browsers (IE6, 7, 8, FF 3.6, Chrome 5, etc). As it happens, I have a colleague who is far more adept at javascript than I and we are slowly getting to the bottom of it. This aside the Log produced:
Loading [MathJax]/jax/input/TeX/config.js
Loading [MathJax]/jax/output/HTML-CSS/config.js
Loading [MathJax]/extensions/tex2jax.js
Loading [MathJax]/jax/input/TeX/jax.js
Loading [MathJax]/jax/element/mml/jax.js
What we think is happening is this. Please note that we are still investigating and need to confirm that the following really is the only problem!
The reason why MathJax breaks in Blackboard 8.0.3 is because Blackboard overrides the global js Error object with a function that returns nothing (void). By overriding Blackboards version of the Error function so that we are returning an actual object, MathJax's Insert function (which uses the Error function first) has a non-null value to work with and doesn't generate fatal Error. We can safely do this because in the assessment handling part of Blackboard, Blackboard's custom Error function is never called and never causes a problem. From a technical perspective, the Blackboard software should not be overriding the global Error function and therefore this is an error caused by Blackboard's design, not MathJax's.
However, we have since discovered another problem which we are investigating. I will of course update this comment with more info when available and hopefully be able to suggest a fix to others.
Your sleuthing sounds good. MathJax does use Error() in a significant way, not just to manage parsing errors, but also to regulate loading of extensions. The idea is that MathJax starts to load a file and then throws an error to stop the processing of an equation until the file loads; the error is trapped at a higher level, and when the file has been executed, the math is reprocessed. The result of Error() is a critical piece of that process, so if Blackboard replaces that, things will certainly go wrong. I suppose you could have a MathJax customization file that checks whether Error returns a null value and replaces it with its own version of Error. You are right that this is a Blackboard design error, not a MathJax problem.
I'll be interested in what your other problem is, when you have it narrowed down.
Davide
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Your suggestion of providing a customisation in which our own version of Error is create is exactly our approach. This solved most problems. I'll make sure I get back to you with further info once fully sleuthed!
I also did some limited testing in a test version of Blackboard NG (technically Blackbaord 9.?). MathJax rendered, but it looked as if the line height calculations were being effected as lines looked rather crunched up (very noticable in 2D arrays). I may return to test this more thoroughly, and if appropriate I'll submit problems under a separate entry.
Last edit: Anonymous 2017-10-22
OK, let me know what turns up.
In terms of the line height, there is probably some CSS that is leaking into the MathJax layout. If we can identify it, we can probably work around it. Look for changes in line-height (though MathJax was supposed to reset that), margin, or padding, and changes to SPAN or IMG tags.
Davide