cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
parisky
New Member

HTML tags showing up in publisher quiz imports

Jump to solution


Importing quizzes from publishers and also importing quizzes from Sakai using the QTI import....

I am getting html tags showing up in the normal text....    (see photo)...

Is there any type of "scrubber" that removes these tags... otherwise it is a laborious task to fix every question (the html tags show up in every answer too)...

Thankshtml screen.jpg

Tags (2)
1 Solution
don_bryn
Community Champion

I've had this happen a few times.   I do a LOT of quiz creation in .qti files and then import them.   Usually this is caused by a typo in the html in the qti file.   If you mess up a tag, or miss a space between tags, the HTML parser doesn't know what to do with that on import.

Some of my files somehow lost a space between attributes of an html tag, like so:

<p><iframesrc="www.google.com"></frame></p>

I had to change it to:

<p><iframe src="www.google.com"></iframe></p>

BUT, it could also be something further up the file.   For example I just had a bunch of qti import where all the questions came out looking like your html tags above.   It took a couple tries to realize that I had a "&" in the title of the quiz at the very top of the qti file.   I had to use the HTML entity "&amp;" to fix it.   I don't know why that error messed up everything following in the qti file, but it was an easy fix once I discovered it and everything suddenly worked correctly.

It might be easier to spot the error if you look at the html editor in one of your questions, but that doesn't always reveal the issue because you will only see the HTML inside the  <mattext> tag.  The qti file will show you everything else.

So I would first see if the Canvas HTML editor reveals an error, then take a quick look in the qti file in a text editor and see if you can spot an error.  Start where the first HTMl tag appears in your canvas import and work your way up the file.   Look for missed tag closings, a missing space between tags or attributes, and for any unescaped HTML characters that might not be importing correctly.

It's worth looking because it might be the same error happening every time and a multi-file find and replace might be able to fix all your errors in one fell swoop.  Or  you might be able to fix it when you export the files from the publisher.

View solution in original post

2 Replies
don_bryn
Community Champion

I've had this happen a few times.   I do a LOT of quiz creation in .qti files and then import them.   Usually this is caused by a typo in the html in the qti file.   If you mess up a tag, or miss a space between tags, the HTML parser doesn't know what to do with that on import.

Some of my files somehow lost a space between attributes of an html tag, like so:

<p><iframesrc="www.google.com"></frame></p>

I had to change it to:

<p><iframe src="www.google.com"></iframe></p>

BUT, it could also be something further up the file.   For example I just had a bunch of qti import where all the questions came out looking like your html tags above.   It took a couple tries to realize that I had a "&" in the title of the quiz at the very top of the qti file.   I had to use the HTML entity "&amp;" to fix it.   I don't know why that error messed up everything following in the qti file, but it was an easy fix once I discovered it and everything suddenly worked correctly.

It might be easier to spot the error if you look at the html editor in one of your questions, but that doesn't always reveal the issue because you will only see the HTML inside the  <mattext> tag.  The qti file will show you everything else.

So I would first see if the Canvas HTML editor reveals an error, then take a quick look in the qti file in a text editor and see if you can spot an error.  Start where the first HTMl tag appears in your canvas import and work your way up the file.   Look for missed tag closings, a missing space between tags or attributes, and for any unescaped HTML characters that might not be importing correctly.

It's worth looking because it might be the same error happening every time and a multi-file find and replace might be able to fix all your errors in one fell swoop.  Or  you might be able to fix it when you export the files from the publisher.

Mahalo for the suggestions Don~

Will keep folks posted Smiley Happy