Quizport does not accept html tags in title of hotpots

Quizport does not accept html tags in title of hotpots

by Jeff Finnan -
Number of replies: 18
Since I am dealing with chemistry I have been using tags for superscript to show 2p5 and similar. The tags work fine in the html generated by a hotpot. However, when I use Quizport, the superscripts are not being applied. It appears that this is only in the title of the hotpot such as a jmix or jmatch. The tags work in the mix or match itself just fine. Fortunately, the tags work there. Otherwise, I would have to abandon Quizport for such quiz types. I guess I could put an image of an electron configuration or whatever in the title as necessary.

Jeff

PS. I tried both the hotpot file directly or the html file generated from the hotpot with the same lack of superscripting in Quizport.


Average of ratings: -
In reply to Jeff Finnan

Re: Quizport does not accept html tags in title of hotpots

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
To help me understand your intentions more precisely, please attach a screenshot of where you would like the superscripts to appear. Even better, please give me a quiz to test on.

As far as I know it is not possible to use superscript in the names and titles of other types of Moodle activity, resources, lessons, quizzes, so it is not too surprizing for me that QuizPort strips out superscript tags, and any html tags for that matter, from the quiz titles.

Out of interest, what does 2p5 mean?

Gordon
In reply to Gordon Bateson

Re: Quizport does not accept html tags in title of hotpots

by Jeff Finnan -
This screen shot shows the superscripting in the title right after the N. In Quizport the superscripts are lost.
Attachment hotpotsuperscripttitle.jpg
In reply to Gordon Bateson

Re: Quizport does not accept html tags in title of hotpots

by Jeff Finnan -
2p5? It would mean that there would be five electrons in the p-sublevel with principal quantum number 2. The element fluorine has the electron configuration 1s22s22p5. s is another sublevel. Fluorine has nine electrons, 2+2+5.
In reply to Gordon Bateson

Re: Quizport does not accept html tags in title of hotpots

by Jeff Finnan -
Here's the actual hotpot.
In reply to Jeff Finnan

Re: Quizport does not accept html tags in title of hotpots

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

It seems you are using the "title" as a "question" in JMix. Ingenious, but Quizport wasn't built with that in mind, so for the time being please try one of the following:

Thanks for the screenshot and quiz file. I will use those to investigate other options.

Gordon

 

Average of ratings: Useful (1)
In reply to Gordon Bateson

Re: Quizport does not accept html tags in title of hotpots

by Jeff Finnan -
Thanks. Will put in subtitle for now. Will look back at how to do unicode.
In reply to Jeff Finnan

Re: Quizport does not accept html tags in title of hotpots

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Just my opinion, but I would think that the unicode option will serve you best in the long run, because you can use those unicode chars anywhere in Moodle and they will always appear just like you want them too.
Average of ratings: Useful (1)
In reply to Gordon Bateson

Re: Quizport does not accept html tags in title of hotpots

by Jeff Finnan -
Will go that route. I need to study a bit more. Need to get this quizport up and running asap. I know how to do the tags right now.


In reply to Jeff Finnan

Re: Quizport does not accept html tags in title of hotpots

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Jeff,
I investigated this issue a little further and found that you can use the <subscript> and <superscript> tags just as they are, if you do the following:

  • login to your Moodle site as an administrator
  • Site administration -> Appearance -> HTML Setting
  • uncheck the box marked "Remove HTML tags from all activity names"
  • click the "Save changes" button

Now go to your QuizPort and use the following settings on quizzes in which you wish to use html tags in the title that appears on the quiz when it is presented to the student:

  • go to the "Updating: Quiz" page for your QuizPort quiz
  • in the "Display" section, set "Title" to "Get from source file"
  • click the "Save changes" button

Having set one QuizPort quiz, you can set other quizzes easily via the "Edit quizzes" page for that QuizPort. This page allows you to apply settings to quizzes in the same QuizPort, or within all QuizPorts in a particular course, or even within all QuizPorts on the current Moodle site. Probably you want that last option:

At the top of the "Edit quizzes" page:

  • set "Show columns" to "Display"
  • select "Title" column
  • in the "Default" column, select the row for the quiz which has "Title" set to "Get from source file"

At the bottom of the "Edit quizzes" page

  • select "Apply selected default value"
  • select "Quizzes matching the following filters"
  • set "Course" to "All"
  • click the "Go" button

that should do it!
Gordon

P.S. Note that HTML tags will still be stripped from the quiz names that appear to the teacher in the list of quizzes on the "Edit quizzes" page, and the maybe in the menu of quizzes that is sometimes shown to the students. The only workaround for this is to use Unicode suprtscripts as described earlier.

Average of ratings: Useful (1)
In reply to Gordon Bateson

Re: Quizport does not accept html tags in title of hotpots

by Jeff Finnan -
I was looking around for a good tutorial on unicode and could not find one that I could quickly grasp and implement.
In reply to Jeff Finnan

Re: Quizport does not accept html tags in title of hotpots

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
This pages explains how to input unicode chars on Windows machines:
This page includes info on Macs too:
does that help?
Gordon
Average of ratings: Useful (1)
In reply to Gordon Bateson

Re: Quizport does not accept html tags in title of hotpots

by Jeff Finnan -
Gordon,

Got around to playing with some unicode characters. If I copy from a web page or from MS Word or if I use the utility from http://www.fileformat.info/tool/unicodeinput/index.htm , I get little square boxes. However, they show up in the html page including Quizport just fine. Should I expect this behavior?

Thanks,
Jeff

I attached a jmx for Fe₂O₃
In reply to Jeff Finnan

Re: Quizport does not accept html tags in title of hotpots

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
> Should I expect this behavior?

Not sure. The jmx file looked OK to me when I opened it in JMix (see attached screenshot).

Might be something to do with your font settings? (JMix -> Options -> Font). My system seems to use Arial which is pretty standard. Maybe your other Windows sotware uses a different font, or an encoding other than utf8?

Anyway, the end result seems to be useable, which is the main thing smile
Gordon
Attachment IronOxide.png
Average of ratings: Useful (1)
In reply to Gordon Bateson

Re: Quizport does not accept html tags in title of hotpots

by Jeff Finnan -
Gordon,

Here is what I see. Question: How are you inputing the unicode characters?
Attachment jmx.jpg
In reply to Jeff Finnan

Re: Quizport does not accept html tags in title of hotpots

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Interesting. Actually, I didn't input the unicode chars. I just opened up your jmx file.

However, I just tried the following ...
  • open MS-Word
  • type "b2", then alt-x (while holding down "alt-key", press "x")
  • "b2" should get converted to "²"
  • copy and paste "²" to JMix
Apparently, that method only works in some MS applications, but it works OK for me on my English Windows XP (with Japanese input method) and MS-Word 2002, and JMix from HP 6.3

YMMV wink
Gordon
Average of ratings: Useful (1)
In reply to Gordon Bateson

Re: Quizport does not accept html tags in title of hotpots

by Jeff Finnan -
<<<type "b2", then alt-x (while holding down "alt-key", press "x")>>>

How are the key strokes that you would use to enter a subscript 5 into MS-Word?

And if you paste it into a jmx, does it show as the character?
In reply to Jeff Finnan

Re: Quizport does not accept html tags in title of hotpots

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
> How are the key strokes that you would use to enter a subscript 5 into MS-Word?

Not quite sure what you mean by the question, but to enter subscript 5, I would ...
  • refer to the use Unicode_subscripts_and_superscripts page I mentioned earlier
  • see that the unicode value I want is "2085"
  • startup MS-Word and enter "2085" + alt-x
  • copy and paste "₅" to JMix
That seems to work fine for me.

I checked a few other things and I think perhaps that the problem is that Arial doesn't have the required subscripts and superscripts. On my system, I have various Asian fonts and possibly a few others too, and somewhere in there I have a font that has the required characters.

Here is a list of fonts that have the subscripts and superscripts that you require:
Please check those fonts and find one that is one your system. For me it was "Lucida Sans", but for you it may be something different. Whatever font you find that has the characters you want, set that font as the font you use on JMix and you should be good to go.

Gordon

Average of ratings: Useful (1)
In reply to Gordon Bateson

Re: Quizport does not accept html tags in title of hotpots

by Jeff Finnan -

I had figured out about the Lucinda Sans Unicode in MS Word on my own, and found I could use the ¹,², and ³ in the Jmix without doing anything different in Jmix but found that other subs and supers using the 20XX + altx would not paste in properly. That is why I asked my last question.

Yep, now if I set the font for the Jmix to Lucinda Sans Unicode all is well. Man, it is just all these little details that get you.

Thanks

Jeff

PS. It resolves issues with JCloze and keypad characters too.