Scorm cloud info on completion or connection

318 views
Skip to first unread message

igirl

unread,
Sep 15, 2010, 2:30:34 PM9/15/10
to eLearning Technology and Development
I added the flash wrapper to my flash quiz. In this quiz each question
is a swf file imported into a movie clip in a swf, MovieHolder.
MovieHolder has this code on the first frame:

stop();
import com.greensock.*;
import com.greensock.plugins.*;
import com.greensock.easing.*;
import src.pipwerks.*;

var lessonStatus:String;
var lmsConnected:Boolean;
var success:Boolean;
var scorm = new SCORM();
lmsConnected = scorm.connect();
lmsConnected = scorm.connect();

if(lmsConnected){
lessonStatus = scorm.get("cmi.core.lesson_status");
if(lessonStatus == "completed"){

//Course has already been completed.
scorm.disconnect();
} else {

//Must tell LMS course has not been completed yet.
success = scorm.set("cmi.core.lesson_status", "incomplete");
}
} else {
trace("Could not connect to LMS.");
}
movieHolder.loadMovie("ShopOutsideAnim01.swf");





on the second "End" frame this:

success = scorm.set("cmi.core.lesson_status", "completed");
scorm.disconnect();
lmsConnected = false;
trace("ENDED");


The last correct answer moves the playhead to the second frame. One
question is how can I test if it is connected and when it disconnects?
I'm using Scorm cloud the file works fine. Although I'm getting this
error:

The external metadata referenced at /mnt/content/courses/W5YQA1C8L0/
Fishing017e2ab69f-ccd7-47ba-b825-86f097526343/0\imsmetadata.xml could
not be opened. The specific exception was:
java.io.FileNotFoundException: /mnt/content/courses/W5YQA1C8L0/
Fishing017e2ab69f-ccd7-47ba-b825-86f097526343/0 (Is a directory).

The other question since each question is a swf that is loaded into a
clip will I be able to bookmark and have the user return where he
left. Can I close the connection and bookmark it on browser exit?

So many questions, any help is appreciated!!!!!

Jessica

igirl

unread,
Sep 15, 2010, 2:51:29 PM9/15/10
to eLearning Technology and Development
I got this log no idea what it means:

+ [13:17:49.686] OverallSequencingProcess for SCORM 1.1 / SCORM 1.2
[13:17:49.686] Transferring RTE data to Activity data
[13:17:49.686] Rolling up activity data
[13:17:49.688] Checking for first SCO pretest
[13:17:49.688] Using finalScoCourseNotSatisfiedNormalExitAction
parameter
[13:17:49.688] No API Runtime Nav Request, exit action=exit,no
confirmation

:(

Philip Hutchison

unread,
Sep 15, 2010, 2:52:04 PM9/15/10
to elearning-technolo...@googlegroups.com
you have two connection calls:

lmsConnected = scorm.connect();
lmsConnected = scorm.connect();

this will cause problems.

you can't connect and disconnect multiple times in a SCO, you can only do it once.

the best thing to do is write a custom function that contains all of your end-of-course code and then place a reference to this function in all the places a course could conceivably end.

something like

function byeBye(){
   scorm.set("cmi.core.location", "my bookmark string");
   scorm.set("cmi.core.lesson_status", "completed"); //or "incomplete"
   scorm.save();
   scorm.disconnect();
   lmsConnected = false;
  //etc
}



--
You received this message because you are subscribed to the Google Groups "eLearning Technology and Development" group.
To post to this group, send email to elearning-technolo...@googlegroups.com.
To unsubscribe from this group, send email to elearning-technology-and...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/elearning-technology-and-development?hl=en.


Ryan Meyer

unread,
Sep 15, 2010, 3:23:56 PM9/15/10
to elearning-technolo...@googlegroups.com
Looks like you just have a problem in the path to reference your metadata file:


The external metadata referenced at /mnt/content/courses/W5YQA1C8L0/
Fishing017e2ab69f-ccd7-47ba-b825-86f097526343/0\imsmetadata.xml could
not be opened. The specific exception was:
java.io.FileNotFoundException: /mnt/content/courses/W5YQA1C8L0/
Fishing017e2ab69f-ccd7-47ba-b825-86f097526343/0 (Is a directory).

There's a pesky backslash instead of a forward slash in there, and the URL isn't processing properly. You'll be able to find this reference somewhere inside your imsmanifest.xml file.

That shouldn't have any impact on the runtime connect()/disconnect() issues that Phillip was discussing though.

-Ryan

igirl

unread,
Sep 15, 2010, 3:29:02 PM9/15/10
to eLearning Technology and Development
Thank you for that.

This code on the "end" frame is not working.

success = scorm.set("cmi.core.lesson_status", "completed");
scorm.disconnect();
lmsConnected = false;

The course is not showing up in Scorm Cloud as completion status
incomplete.

igirl

unread,
Sep 15, 2010, 3:31:56 PM9/15/10
to eLearning Technology and Development
Thanks Ryan.

Also the time is not recording. Will be a long night.

Philip Hutchison

unread,
Sep 15, 2010, 3:38:08 PM9/15/10
to elearning-technolo...@googlegroups.com
make sure you haven't already terminated the connection somewhere... you have multiple disconnect calls in your code.





--

igirl

unread,
Sep 15, 2010, 4:15:21 PM9/15/10
to eLearning Technology and Development
Is anything wrong with this code?

stop();
import src.pipwerks.*;

var lessonStatus:String;
var lmsConnected:Boolean;
var success:Boolean;
var scorm = new SCORM(); //when I add type :SCORM I get an error

lmsConnected = scorm.connect();

if(lmsConnected){
lessonStatus = scorm.get("cmi.core.lesson_status");
if(lessonStatus == "completed"){
//Course has already been completed.
scorm.disconnect();
}else{
//Must tell LMS course has not been completed yet.
success = scorm.set("cmi.core.lesson_status","incomplete");
}
}else{
trace("Could not connect to LMS.");
}

movieHolder.loadMovie("ShopOutsideAnim01.swf");

function resetPlanets() {
success = scorm.set("cmi.core.lesson_status","completed");
scorm.disconnect();
lmsConnected = false;
trace("WHA!!!!!!!!!!");
}//I call this last function when playhead moves to second frame

My status after I play the movie is Incomplete.

igirl

unread,
Sep 15, 2010, 4:26:09 PM9/15/10
to eLearning Technology and Development
Does the flash file have to be in the src folder? When i import the
scorm class I use:

import src.pipwerks.*;
not
import pipwerks.SCORM;

that causes an error. I'm using as2. I'm going by the Planets demo
file.

igirl

unread,
Sep 15, 2010, 4:58:51 PM9/15/10
to eLearning Technology and Development
OK the source flash needed to be in the src folder and the class was
not being called correctly. Thank you!

Do all the source files have to be in the src? I dont get why? I have
alot of imported swfs.

Philip Hutchison

unread,
Sep 15, 2010, 6:41:33 PM9/15/10
to elearning-technolo...@googlegroups.com
you can save the SCORM.as file anywhere you like, you just have to make sure it gets imported correctly.  the import statement tells Flash where to find the file.  since you used "src" in the import statement, Flash was expecting to find in it a subfolder named "src"


igirl

unread,
Sep 15, 2010, 7:25:40 PM9/15/10
to eLearning Technology and Development
it was in src.pipwerks is the path read from the swf file? or the fla?

Philip Hutchison

unread,
Sep 15, 2010, 8:15:25 PM9/15/10
to elearning-technolo...@googlegroups.com
class files are read by the FLA and merged into your FLA's compiled code when you publish to SWF.  they do not need to accompany SWF files, only FLAs.


On Wed, Sep 15, 2010 at 4:25 PM, igirl <jessic...@gmail.com> wrote:
it was in src.pipwerks is the path read from the swf file? or the fla?

--

Ajay Kumar

unread,
Sep 29, 2010, 9:16:10 AM9/29/10
to elearning-technolo...@googlegroups.com
Hi Jessica,
 
If you have any sample flash quiz, can you please share the template with me.
 
Thanks,
Ajay

Reply all
Reply to author
Forward
0 new messages