Showing posts with label hack. Show all posts
Showing posts with label hack. Show all posts

Friday, November 4, 2011

Access Score Variables from an Articulate Quizmaker Quiz

I often get developers to my blog that are interested in using Articulate's Quizmaker to enhance their custom Flash based eLearning courses. I have previously written about how to load a Quizmaker quiz into your own Actionscript 2.0 swf and still report to SCORM. What if we want to do our own custom reporting? How do we access Quizmaker's score variables?

Well, assuming you've loaded the quiz into a MovieClip "_root.myContainer" here you are:

Score in % = _root.myContainer.g_oVariableMgr.m_arrVariables[7].m_nNumber
Total Points Awarded = _root.myContainer.g_oVariableMgr.m_arrVariables[2].m_nNumber

The Passing Percent = _root.myContainer.g_oVariableMgr.m_arrVariables[5].m_nNumber
The Passing Points = _root.myContainer.g_oVariableMgr.m_arrVariables[6].m_nNumber

Total Max Points = _root.myContainer.g_oVariableMgr.m_arrVariables[4].m_nNumber
Total Answered Max Points = _root.myContainer.g_oVariableMgr.m_arrVariables[3].m_nNumber

Enjoy!

Wednesday, April 7, 2010

Get Student Name on Print Results Page in Articulate Quizmaker using SCORM

Seems to be a couple requests for this one, but basically the problem is that by default there is no way to put the Students name on the Print Results page other than selecting the prompt student for name checkbox in quizmaker.

Well no worries, this is actually a simple fix, as long as you're publishing for your SCORM LMS.

Here's the code/solution:

In your quizzes published folder look for quiz_content/report.html

This is the html page that gets loaded.

Now, we need to add this code:

"window.opener.parent.GetStudentName()"

Where do we add it? well that depends on where you want it to show up!

For now just search for:

document.write("<P><H1>" + strTitle + "</H1></P>");

and replace with:

document.write("<P><H1>" + strTitle +"<br>"+window.opener.parent.GetStudentName()+ "</H1></P>");

This will put it just below the header! Test it out, and then try out moving it to different locations or adding formatting!

Hope this helps!

Wednesday, March 24, 2010

Load an Articulate Quiz into your Flash Project

I recently completed work on a new flash based course. Basically the course is made up of several captivate demos and a final articulate quiz that are all loaded and navigated through a main flash portal / shell. This main swf file loads all the other swfs including that quiz.swf file that Articulate Quizmaker produces.

I also used the SCORM HTML and javascript that Articulate publishes when you choose publish for LMS. In my case I just swapped out the body of the quiz.html and embedded my own swf portal. This way when I load the quiz it will still have access to all the JS it uses when it's by it self right?

well yes and no.

It seems that if the quiz.swf doesn't get the flashvars it needs when it first loads up, it shuts off all tracking calls, boo-urns!

Well the trick here seems to be in the actionscript, this works for IE I have not tested for other browsers:

function onLoadComplete(mc:MovieClip)
{
/*assuming mc is the quiz.swf, initiating these variables will turn on tracking*/
mc.vHtmlContainer=true;
mc.vCaptureRC=false;
mc.vIE=true;
}

Enjoy! and if you have a better way feel free to contact me!

Friday, February 5, 2010

Internal or Offline Learner Tracking for Articulate Quizmaker

Based on a discussion at the eGuild, it seems there is a demand to setup Quizmaker for tracking users without using a LMS or any online solution.

The following is the beginning steps into creating your own custom tracking, this will show you how to extract users interactions from Quizmaker, from here you will need to use whatever technology (asp, php etc) to save the information.

I think that this solution is perfect for those who have no other option than to develop their own internal solution, and can not use third party web apps. For those who do not have this restriction, I highly recommend that you use Articulate Online. You can go swimming in JS and Server Side Languages all you want but you're not going to get as complete and detailed reports as Articulate Online can offer you.

Anyways, the solution:

1. Publish a Quiz for a LMS

2. In the main quiz folder remove everything except quiz.html, quiz.swf and the quiz_content folder.

3. Create a new javascript file named tracking.js

4. In that javascript write the following function:

function lms_DoFSCommand(command, args)
{
alert("command" + command);
alert("args" + args);
}


5. In quiz.html add this to the header:

<script LANGUAGE="JavaScript1.2" SRC="tracking.js" TYPE="text/javascript"></script>


You should now get Popups while you use the quiz, this shows you all the quiz interactions. From here you can parse and send this information to a flat file.

Wednesday, January 27, 2010

Can't set the adlcp:scormtype in Reload Editor

Reload Editor is a fantastic and free SCORM packaging tool. One problem I ran into with it however is that I can't seem to set the resource attribute 'adlcp:scormtype'. Since an undefined adlcp:scormtype will default to asset, my LMS won't show any Navigation!

So for now I have to manually add adlcp:scormtype="sco" to my resource nodes as a solution.

It looks as though this problem was addressed on the development site for Reload (see issue 873054), however the only compiled release is Version 1, so unless you're savvy enough to get the most recent source code and compile it yourself, you're likely to run into this problem as well.

Anyways hope this tidbit reaches someone wondering why their Reload package is not working in their LMS - your poor little adlcp:scormtype might just need setting!

Monday, January 25, 2010

Browser Focus Issue with Quizmaker

Ran into an issue with Quizmaker in which the Quiz essentially removes focus from the browser (in this case IE 7) and makes it so users need to click twice on any link to get it to work - once to set focus back to the web page, and once to select the link.

I must admit, I don't have a lot of experience with setting Browser focus, and the reasons behind it, but I know that having users trying to click the LMS next button and it not working is a major usability issue!

There is two solutions to this problem, the first one is just to re-write quiz.html and do a standard flash object/embed, replacing the Articulate published script. Now, I don't actually know what all that Articulate script is there to handle, so there is another way to handle this problem without removing all the script.

1. Open quiz_content/quiz.js

2. Search for "player.focus();"

3. Delete that line of code, or comment it out.

I have yet to test this on a Quiz that uses LMS tracking, so I have no idea if the focus is important to the communication, but certainly on a simple knowledge check removing this line will fix the usability bug.

Friday, January 22, 2010

Append Webex presentations (FLV)

Problem:

You have several different exported Webex presentations, and now you want to combine them all into one.

Solution:

A Webex export will give you 5 files for a presentation - index.html, presentation.swf, screen.flv, voip.flv and recording.xml.

The presentation.swf is actually just the 'controller', it's the two flv files that make up the actually video and audio content.

Lets say we want to combine 3 different exported presentations into one, here's how we do it:

1. Rename and Copy the flv files from the 2nd and 3rd presentations and put those files into the 1st presentations folder. You should have 6 flv files in there now.

2. Open the recording.xml file.

Look for this code


<video timestamp="1" name="screen.flv" width="1080" height="824" start="0" duration="7076" keyinterval="10"/>


Note: the timestamp and duration numbers are in seconds

All you need to do is cut and paste that line for each additional video you wish to append and edit the name, timestamp and duration fields. it would look something like this:


<video timestamp="1" name="screen1.flv" width="1080" height="824" start="0" duration="7076" keyinterval="10"/><video timestamp="7076" name="screen2.flv" width="1080" height="824" start="0" duration="5000" keyinterval="10"/><video timestamp="12076" name="screen3.flv" width="1080" height="824" start="0" duration="6000" keyinterval="10"/>


Notice how the timestamp value is the length of the previous videos?

Note: To know the duration of each flv you may want to open up the other presentations recording.xml files and make a note of that value.

So that handles the video, now we do the same for the audio! look for:

<video timestamp="1" name="voip.flv" duration="7076" />


Cut and paste that line just like before editing the name, timestamp, duration fields.

Ok almost done,

3. At the top of the xml file look for:

<recording topic="" number="" ... duration="7076">


You want to edit that duration so that it is the new total length of your demo.

Bingo Bango, an appended presentation without any video editing software necessary!

Wednesday, January 13, 2010

Improving the Quizmaker Matching Drag and Drop question type


Problem:

Articulate's Quizmaker only allows for Right to Left drag drop question types. Meaning the user must drag the rightmost items onto the leftmost. I personally have always felt that users are more comfortable and inclined to go the opposite direction.

Solution:

Unfortunetly there is no magic option in Articulate to solve this for us. So we write our own Actionscript to insert into the question in the form of a SWF file, this SWF file goes into the Quizmaker code and sets things straight.

Directions: (I am not hosting the swf file as of yet so you're gonna need to create it, hopefully I can get it online soon)

1. Create a new SWF 550 by 400 pixels and using Actionscript 2.0

2. The Code: Put this on frame one layer one


ddswitchObjects();

function ddfindObject()
{

var checkObj = this._parent._parent._parent;

for(i in checkObj)
{
trace(i);
if(checkObj[i]._x == 30)
return checkObj[i];
}
return null;
}

function ddswitchObjects()
{
var cur:MovieClip = ddfindObject();
cur.mcScrollContentMask._width = 1000;
cur = cur.mcScrollContent;

for(var i in cur)
{
trace(i + " " + cur[i]._x);
if(cur[i]._x == 16)
{
cur[i]._x = 212;
}
else if(cur[i]._x >= 200)
{
cur[i]._x = 16;
cur[i].startingY = cur[i]._y;
cur[i].onEnterFrame = function()
{
if(this._x == 212){
this._x = 16;
this._y = this.startingY;
}
}
}
}
}



3. Publish your swf!

4. Create a new quiz and a new matching question type.

5. In form view (NOT slide view) select Media -> Flash Movie -> and insert your published swf.

6. Publish Quiz

NOTES:

Obviously there is a flicker problem, meaning when the question loads, first the options are all in their original Quizmaker position before being switched around by our code, this is because of how the Quiz loads the question before the external swf we make, still thinking of a way to fix this...

There is also limitations on the size of the text you can enter for now. My testing and developing has all been done with small words, and the location of the drag items are hardcoded in my code which means to hack the Quizmaker I look specifically for items in certain positions, meaning if the items were longer or bigger than Quizmaker's defaults this code would fail (although I'm working on improving this as well)

That's all, hope someone else uses this, cause i'm putting into a course today!

Thursday, November 5, 2009

Adobe Presenter Embedded swf appears choppy or twitchy

Problem:

When embedding a swf animation into adobe presenter, the final movie apears twitchy or 'stuttering'. This occurs because the "Control using presentation playbar" option is selected, and Presenter is doing odd playback control on your swf.

Basically, to keep the slide time synched with your swf time, it is either jumping ahead or backwards to keep them together, not ideal at all!

Solution:

1. Rob Rodes: http://www.connectusers.com/forums/cucbb/viewtopic.php?id=2523

I did not find this solution to work for me, but it might for you, it's pretty low effort to try and if it works great!

2. My Solution:

First I cut all of my main timeline and chucked it into a movieclip which then got thrown on frame 1 layer 1 of the main stage (make sure the main timeline is the same length as the new movieclip timeline), we'll name the new movieclip "allAnimations".

Now, the playback bar for presenter won't have access to this movieclip, so the stuttering effect is gone, but what if the user is jumping back and forward, how do we sync this animation up with the main timeline?

Here's the magic (Actionscript 2.0):

allAnimations.onEnterFrame = function()
{
if(this._currentFrame - this._parent._currentframe > 150)
allAnimations.gotoAndPlay(this._parent._currentframe)
else if(this._parent._currentframe - this._currentFrame > 150)
allAnimations.gotoAndPlay(this._parent._currentframe)
}

Basically if the animation's timeline differs from the main timeline by more than 5 seconds then sync them up!

This is a hack, i'm positive there is an unfound better solution, but for now this may work for you, if so enjoy!

Tuesday, August 4, 2009

Using Multiple Style Sheets to control the look and feel of your SCORM content without sacrificing Portability

The problem i've been looking to solve is how can I develop course content that makes use of CSS so that I can maintain the look and feel of an institutions content, but also develop portable SCORM packages.

To start off with, let's assume that you have already figured a way to hack around with your LMS and the way it stores content so that you can implement a site wide style sheet. (This is easier if you have direct access to the server)

Now anytime you're creating a new course you just make sure your html pages are linked to that stylesheet so that you can have some long term control over the look and feel of those pages, however:

What happens if you want to share or move this content? Sure you may be developing nice little SCORM packages that upload into your system just fine, and link to that CSS file you've plopped on your server, but that's not going to work for another system is it!

So you now have 2 options, A) Find away to get your stylesheet onto this new LMS in a way that the initial path from the SCORM html content doesn't break, or B) Develop your SCORM packages with two CSS links. One for the CSS file on your server, and a duplicate that will be packaged with the SCORM object:

<link type="text/css" rel="alternate" href="portable_style.css"/>
<link type="text/css" rel="stylesheet" href="../../whateverpath/default_style.css"/>

The duplicate should only be used if the browser fails to find the default. What's great about this, is it also doubles as having a 'safety' stylesheet in case your default ever gets moved/deleted from the server by accident.

Thursday, July 16, 2009

Remove the 'finish' button from quizmaker quiz endpage

*Updated*

There is a silly problem with Articulate quizzes in that they always have to have a finish button, and that button can ONLY close a window, or direct to another URL. Not very helpful if we want them to be in a linear course is it?

Anyways, I found a flash exploit to hack away the button, enjoy:

Solution Summary:

Because Articulate developers did not use "_lockroot" by inserting a custom swf on an end page, we can write custom code to turn the finish button invisible.

Solution:

1. Create a new flash movie
2. In the actions panel insert the following code:

_root.g_mcFrame.mcFinish.swapDepths(_root.getNextHighestDepth());
_root.g_mcFrame.mcFinish.removeMovieClip();


3. Publish

4. Using the slide view on your first slide in Quizmaker, choose to insert a swf, browse for your custom code and insert.

5. Publish your quiz.

Note: the object (_root.g_mcFrame.mcFinish._visible) was found by making a flash movie that simply loads a quizmaker quiz.swf to the root, then I used the flash debug options to list all objects.

Hope this helps, and also inspires some more exploration of the endless possibilities of this exploit!