KeyPad Difficulties with superscripts 1,2,3

KeyPad Difficulties with superscripts 1,2,3

by Jeff Finnan -
Number of replies: 11

Hi Gordon,

Remember, the keypad you helped me develop using Lucida Sans Unicode? We had a few challenges here and there, but you worked them out. Up to now, I have not used superscripts much. I did do with scientific notation with no trouble, but after pinpointing the problem, I understand why scientific notation was not a problem.

The Problem:

If the superscripts 1,2, or 3 are followed by another non-superscripted character, a JQuiz does not accept the correct answer and the hint shows oddball characters.

The answer for this problem is [Ar]4s¹A which gives these two responses. The second one is the hint.

 

If another problem had [Ar]4s⁸A as the correct answer, that is accepted no problem.

If another problem had [Ar]4s¹ as the answer, that is accepted again no problem. This is why scientific notation worked: it always ends in the superscripted numbers. If I put a space between the superscript and the next character, that is no problem: [Ar]4s¹ A; however, that requires entering a space after it which is not how one would write it.

If I test the JQuiz by generating the html locally and run it locally, there are no problems. If I upload the generated html file and use that instead of the JQuiz directly, it is still a problem. Bummer.  I have tested this out on an XP machine and a Windows 7 machine with Firefox and Chrome.

Now I know there is some problems with superscripts 1,2,3: http://en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts

And I am not sure where I got them originally. I think you gave me a configuration file way back when.  Although I may have generated them through for example super 3 = alt 0179.  On my Win7 machine I can see that the super 1,2,3 are bolder than the other numbers.

Any ideas?

Thanks,

Jeff

Average of ratings: -
In reply to Jeff Finnan

Re: KeyPad Difficulties with superscripts 1,2,3

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

Hi Jeff,
I suspect there is a clash of encoding and/or fonts between what your Moodle site uses and what your JQuiz needs.

Please could you attach a sample JQuiz to your next post to this thread.

Also, please could you clarify whether you are having this issue with the HotPot module or the QuizPort module, or both.

thanks
Gordon

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

Re: KeyPad Difficulties with superscripts 1,2,3

by Jeff Finnan -

Hi Gordon,

<<<whether you are having this issue with the HotPot module or the QuizPort module, or both.>>>

I had spent a lot of time going through a lot of permutations but had not considered this. When I said I tested it locally, I meant the Hot Potatoes quiz itself - not through QuizPort. Using QuizPort is the only way I have been using them online. I just tried it as a stand alone Hot Potatoes quiz in Moodle, and it works. Therefore, it appears that it is a QuizPort issue.  At least now I can run one for the time being the "olde fashioned" way as a HotPot. Thanks much for that.

I have attached the file. There are a lot of bogus questions in it. I was just trying to isolate where the problems where.

Thanks,

Jeff

In reply to Jeff Finnan

Re: KeyPad Difficulties with superscripts 1,2,3

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

Thanks for the exercise Jeff.

I added it to my Moodle 1.9 site, but I am not sure what I am looking for.

Please could you access my site, and tell me if the QuizPort and HotPot versions of this activity behave as required or not.

If you find something odd, please let me know which question I should be looking at, and which buttons I need to push to get the unexpected behavior.

thanks
Gordon

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

Re: KeyPad Difficulties with superscripts 1,2,3

by Jeff Finnan -

Hi Gordon,

Went into your site.

Okay, the HotPot by itself works fine, the one within the QuizPort does not.

Here are the questions followed by their answers. The easiest way to answer them is to copy and paste. I usually have the HotPot open and I copy from there and paste in rather than typing them out.

1. What is the electron configuration for As? [noble gas only] [Ar]4s²3d¹⁰4p³
2. What is the electron configuration for Xx? [noble gas only]  [Ar]4s⁵3d¹⁰4p³
3. What is the electron configuration for Xa? [noble gas only] [Ar]4s⁵
4. What is the electron configuration for Xb? [noble gas only] [Ar]4s⁴
5. What is the electron configuration for Xc? [noble gas only]  [Ar]4s³
6. What is the electron configuration for Xd? [noble gas only] [Ar]4s²
7. What is the electron configuration for Xe? [noble gas only] [Ar]4s¹
8. What is the electron configuration for Xf? [noble gas only]  [Ar]4s¹3
9. What is the electron configuration for Xg? [noble gas only]  [Ar]4s¹A
10. What is the electron configuration for Xh? [noble gas only] [Ar]4s⁸A
11. What is the electron configuration for Xi? [noble gas only] [Ar]4s³A
12. What is the electron configuration for Xj? [noble gas only] [Ar]4s⁰A

The ones with problems are shown in this picture:

Actually, I am surprized by the [Ar]4s⁵3d¹⁰4p³. It does not fit what I thought was the problem with only the superscripts 1,2, and 3.

Thanks,

Jeff

Average of ratings:Useful (1)
In reply to Jeff Finnan

Re: KeyPad Difficulties with superscripts 1,2,3

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

Thanks Jeff,

I'm glad you were able to reproduce the problem on my server. I makes me hopeful we can locate the cause of the problem and fix it. It is also very useful to know that the HotPot activity works.

I should have time to look at this later in the week
Gordon

In reply to Gordon Bateson

Re: KeyPad Difficulties with superscripts 1,2,3

by Jeff Finnan -

Since the HotPot itself works, I can use that. It's been a while since I have used one outside of QuizPort. I've been spoiled. I wll have to look at how to set one up to achieve similar goals.

Thanks,

Jeff

In reply to Jeff Finnan

Re: KeyPad Difficulties with superscripts 1,2,3

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

Jeff,

the problem occurs when a sub/super script number is followed by a series of numbers and/or letters used in hexadecimal numbers, i.e. 0-9 and A-F or a-f. In this situation, QuizPort mistakenly thinks that the sub/superscript number and the following chars are a single unicode character, and then everything gets messed up.

I have fixed QuizPort to be more careful when it is searching for sub/super script numbers and other double-byte charaters. I checked that the JQuiz now displays and behaves in QuizPort as it does in HotPot, so I think that fixes the problem.

When you have time, please install the new QuizPort module and confirm the fix.

thanks
Gordon

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

Re: KeyPad Difficulties with superscripts 1,2,3

by Jeff Finnan -

Hi Gordon,

That did the trick. Thanks much.

I have run into a problem though in that, when I go to the notificiations screen, it comes up blank.

Thanks,

Jeff

In reply to Jeff Finnan

Re: KeyPad Difficulties with superscripts 1,2,3

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

Oh dear, sorry about that, Jim. I think I might have a left in a line of PHP intended only for my local site.

I have removed that line (mod/quizport/lib.php, line 2278) now. Please could you download the zip file and try the installation again.

regards
Gordon

In reply to Gordon Bateson

Re: KeyPad Difficulties with superscripts 1,2,3

by Jeff Finnan -

Hi Gordon,

I still get the white screen. Since it has the same version number, I had to change it so that it would see that it was a different version. I ran into that problem once before. Once I do that, here is what I initially see.

It hangs at this spot. When I go back to the front page and come back to Notifications, it is just a white page.

Later,

Jeff

In reply to Jeff Finnan

Re: KeyPad Difficulties with superscripts 1,2,3

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
There must be a php error. Can you enable moodle's debugging or look at the web server error logs?