1

Having an issue where a Sakai instance is puking on importing a QTI file that has a mattext node containing an image whose alt text attribute is 1033 characters. I've found spec docs that suggest, in general terms, you shouldn't exceed 1024 characters in alt attributes (and I agree that anything that long should be presented differently). I'm not in control of the source data, but I can truncate the text on output if need be.

I can't find any hard evidence that there is any sort of limit, either in the Sakai import, in the handling of the mattext nodes, or in the limited Sakai code searches I've performed.

Anyone know if I'm missing something?

My expected long term fix is to approach the creators of the information and ensure they set reasonable limits when creating the data, but I can not count on that always happening.

Thanks!

(Note: we have shortened the text in the node - specifically the alt="" image attribute and the import then worked. There were no special characters or odd groupings of characters in the data - it appears to be just a size thing.)

Here's the offending node:

<mattext charset="ascii-us" texttype="text/plain" xml:space="default">
<![CDATA[
<p style="padding:0px;margin:0px;">Using the periodic table below, determine the atomic number of silicon (Si).</p> <p><img style="max-width: 100%; height: auto; width: auto;" src="https://www.founderseducation.net/assets/images/d58d6d19cf4e2b0f48a3650e5a3933a22ddb9508.png" alt="Image of the periodic table for use on test questions. Only elements that will potentially be in questions are included. Format of each block will be the name of the element, the symbol, the atomic number, and finally the mass number. Hydrogen, H, 1, 1. Helium, He, 2, 4. Lithium, Li, 3, 7. Berylium, Be, 4, 9. Boron, B, 5, 10.8. Carbon, C, 6, 12. Nitrogen, N, 7, 14. Oxygen, O, 8, 16. Fluorine, F, 9, 19. Neon, Ne, 10, 20.2. Sodium, Na, 11, 23. Magnesium, Mg, 12, 24.3. Aluminum, Al, 13, 27. Silicon, Si, 14, 28. Phosphorus, P, 15, 31. Sulfur, S, 16, 32. Chlorine, Cl, 17, 35.45. Argon, Ar 18, 40. Potassium, K, 19, 39. Calcium, Ca, 20, 40. Scandium, Sc, 21, 45. Titanium, Ti, 22, 47.9. Vanadium, V, 23, 51. Chromium, Cr, 24, 52. Manganese, Mn, 25, 55. Iron, Fe, 26, 55.8. Cobalt, Co, 27, 59. Nickel, Ni, 28, 58.7. Copper, Cu, 29, 63.5. Zinc, Zn, 30, 65.4. Gallum, Ga, 31, 69.7. Germanium, Ge, 32, 72.6. Arsenic, As, 33, 75. Selenium, Se, 34, 79. Bromine, Br, 35, 80. Krypton, Kr, 36, 83.8. Silver, Ag, 47, 107.8. Gold, Au, 79, 197." /></p>
]]>
</mattext>
ChrisH
  • 975
  • 12
  • 21
  • Does it print an error to the logs? I haven't heard of this before but alt sounds like the wrong attribute to use and that's pretty long (https://www.washington.edu/accessit/print.html?ID=1257). You could file this as an issue on https://jira.sakaiproject.org/ with more information. – jonespm Jun 23 '16 at 19:55

0 Answers0