Category: Javascript

A cross-browser keypress detection javascript

We have learning modules that have a lot of pages, and it occurred to me it would be easier on people’s hands if they could simply use the right and left arrow keys to navigate through the module.

After a day of great frustration, I realized that it’s nearly hopeless. Not only do all the browsers report different keycodes for the right and left arrow keys, but Firefox and Safari report both of them as “0” which makes it impossible to distinguish between them.

keys.jpg

Continue reading

Limiting number of tries on Perception Quizzes under SCORM control

When Questionmark Perception is launched from an LMS using SCORM, Perception’s built-in user management system can’t be used. Perception receives user data from the LMS, and although it stores that data with the results of the quizzes, it can’t use the data for purposes of scheduling and limiting access to quizzes.

Unfortunately, our LMS, SumTotal 6.5, does not have a good way to limit attempts on a learning activity either. There is a rather inflexible option: If you set any learning activity to “allow access upon completion,” after the activity has been completed once, the user will only be able to launch the activity for purposes of browsing, but never take it again for credit. In other words, the user can not enroll again.

This isn’t always the best solution. For example, we wanted to allow two or three tries, depending on the quiz, and we never allow users to browse old quizzes.

Continue reading

Make any web-based Powerpoint presentation scorm compatible

It’s easy to export Powerpoint presentations to the web, but they aren’t automatically scorm compatible. To add simple scorm capability to your web-export, do the following:

This will add a button that will allow the user to mark the sco complete.

1. Add this to the head section of outline.htm or the final slide.

Continue reading

Debugging and troubleshooting HTML and javascript

Spreadfirefox Affiliate Button

Firefox, the web developer’s debugging tool of choice

The best browser to use to check javascript errors is Firefox, hands down. Other browsers have some error reporting, but none give you anywhere near the detailed information as Firebug, an addon to Firefox. The extensions available allow you to snoop into every aspect of your page, and into the communication between page and server.

You will need to get several Firefox extensions:

Firebug
Firebug is the one extension I can’t live without. It shows errors in javascript, css, allows you to inspect the HTML source, computed style, events, etc.

Continue reading