Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthorkurono
    • CommentTimeMay 14th 2008 edited
     
    I recently decided to test the AS3 scorm class (the demo) on moodle, it worked like a charm except for the completion status that moodle is giving me after opening the SCO again.

    This is what i've done so far...

    1. Add pipwerks AS3 demo as a SCO on moodle LMS
    2. Testing the SCO, click trough the 3 pages and cmi.completion_status shows it changed to "completed" successfully
    3. Exit activity
    4. Checking my report on that SCO, it says Status: "completed"
    5. Open the SCO again...

    but according to the code on the .fla file

    if(course.lesson_status == "passed" || course.lesson_status == "completed"){
    console("You have already completed this course.");

    //Disconnect from the LMS.
    scorm.disconnect();
    }


    the SCO is supposed to not let me check it again, but that never happens.

    I did a trace of cmi.completion_status in the scorm console, just after connecting to SCORM, and it always returned an "unknown" value, which from what i've read it's the default for cmi.completion_status on the LMS.

    Then i decided to make some research, maybe i had something wrong in the SCO options, but i tested every posibility.

    After browsing trough the SCORM books, i found the deliveryControls element on the imsmanifest, which controls if the completion_status will be set by the SCO, but after checking the manifest contained in the AS3 scorm example...

    <imsss:deliveryControls completionSetByContent="true" objectiveSetByContent="true"/>

    It was already set to true.

    Any ideas of what might be happening?

    I hope its not a LMS problem, anyway i'll have to test it on other platform to see if i get the same results, so I'll keep editing.
    • CommentAuthorphilip
    • CommentTimeMay 14th 2008
     
    Hi

    Thanks for the post and feedback.

    First of all, I just realized i didn't clean up my code well enough... the "passed" part of the code shouldn't even be in there (I wrote the 1.2 version first, then ported to 2004; 1.2 uses "passed" but 2004 doesn't).


    //Set course variables
    course.lesson_status = scorm.get("cmi.completion_status");

    //If course has already been completed
    if(course.lesson_status == "completed"){

    console("You have already completed this course.");

    //Disconnect from the LMS.
    scorm.disconnect();

    } else {

    //Set course status to incomplete
    success = scorm.set("cmi.completion_status", "incomplete");



    The only possible return values for cmi.completion_status are: "completed", "incomplete", "not attempted", and "unknown".

    As you know, the code checks for a status of "completed"; if any other value is found, the course automatically sets the completion_status to "incomplete". This means that the value "unknown" should only appear at the very first launch, and every subsequent launch should return the value "incomplete" or "completed".

    The only reasons I can think of for an "unknown" value are if the "incomplete" status is either not being persisted by the server, or if the LMS is overriding the status for some reason.

    As I wrote in my journal the other day (cmi.core.exit & cmi.exit), this example file doesn't include a call to cmi.exit. By neglecting to set cmi.exit to "suspend" when logging out, the LMS is supposed to consider the course activity completed:


    If the SCO set the cmi.exit to "", then this indicates that the exit state is undetermined and the learner attempt on the SCO ended. A subsequent learner attempt on the SCO will involve a new set of run-time data.


    Note the phrase "new set of run-time data". The default completion_status value for an unattempted course is "unknown", therefore any subsequent launch will be handled as a brand-new launch, without saving suspend_data.

    So the culprit is probably the lack of a cmi.exit call. The trick here is when do you call it?

    I've been mulling this issue over for the last few days. If the user closes the browser window before the course has been completed, the code needs to invoke cmi.exit("suspend") or else risk losing all saved data. But the code also needs to be able to check whether the course has been completed; if it has been completed, cmi.exit("normal") should be invoked.

    The difficulty for a Flash-beased SCO is that JavaScript handles the browser window's onunload behavior; Flash doesn't handle onunload. That means the task needs to be handed over to the SCORM wrapper (the JavaScript-based wrapper, not the ActionScript class).

    So basically I need to add some functionality to the wrapper that can automatically handle this stuff without a Flash developer needing to worry about it. Sounds like I know what I'm doing this weekend. :neutral:
    • CommentAuthorkurono
    • CommentTimeMay 16th 2008
     
    Hello philip

    Thanks for your reply

    I've been doing some tests and it seems that the lack of a "cmi.exit" it's not the culprit for this kind of trouble, but the lack of it will surely cause some trouble in the future.

    Now from what i've discovered (sorry i didn't know and i would like to share this), moodle can open a SCO in 3 different modes: browse, preview and normal. The browse and preview mode, open the SCO like there were no previously data recorded, but for Preview mode it kind of weird because it saves report data like it was on normal mode.

    I had no idea that i was opening the SCO in Browse mode (clicking on the link's Topic of the TOC, will open the SCO in browse mode) therefore i was always getting an unknown value for the cmi.completion_status, so Normal mode was the way to go for making the demo work.

    In normal mode the SCO gives you a number of attempts previously setup when adding the SCORM activity, (as techer you get to decide how many times the SCO can be attempted) i selected unlimited attempts. When you access the SCORM activity moddle will ask how would you like to open the SCO.

    Now when i open the SCO in normal mode, it saves the completion_status sucessfully. Then i quit the activity and try it again, then moodle asks me (with a checkbox) if i want to re attempt the activity, if you check this, all data previously saved will be deleted, and i'll get an "unknown" value for completion_status.

    If my SCO was setup with only one attempt, there will be no checkbox for a new attempt, obviously. But the interesting part is when i try to enter once more to the activity in normal mode, if the status is completed and there are no attempts left (like in this case), SCORM won't let you connect; It always returned me false to scorm.connect() on the SCORM console, and if i can't connect i can't get the cmi.completion_status, maybe i can tweak the code so it takes this in consideration.

    All my trouble was to not let the student enter again if the activity was once completed (i just wanted to do it, i still don't need it but i'm sure i'll) but preview and browse modes were my enemies. So by using cmi.mode in my ActionScript code i can now control if my SCO will have access from preview or browse moodle modes, or even have a different handing when it comes to SCORM calls, like not sending a Score.

    Oh, and please consider i'm a newbie when it comes to moodle, and maybe i had some wrong assumptions.
    • CommentAuthorphilip
    • CommentTimeMay 16th 2008
     
    Hi Kurono

    SCORM 2004 uses cmi.mode to indicate what mode the SCO is in: browse, normal (the default), and review. cmi.mode is read-only and is supposed to be controlled by the LMS, not the SCO.

    Exerpt of the SCORM 2004 documentation:

    Data Model Element Implementation Requirements:

    • Data Type: state (browse, normal, review) [1]

    • Value Space: The IEEE defines three state values. SCORM binds these state values to the following restricted vocabulary tokens:
      • “browse”: The SCO is presented without the intent of recording any information about the current learner session [1].

      • “normal”: The SCO is presented with the intent of recording information about the current learner session [1]. This is the default value if no mechanism is in place to identify the mode.

      • “review”: The SCO has previously recorded information about the learner attempt and is presented without the intent of updating this information with data from the current learner session [1].


    LMS Behavior Requirements:

    • This data model element is mandatory and shall be implemented by the LMS as read-only.

    • There is currently no mechanism in place to determine the mode of a SCO. This is currently left to the implementation of an LMS. If the LMS wants to provide a way of previewing (or browsing) a content organization or a way of reviewing a content organization, then this is one mechanism for initializing the cmi.mode in which the content (SCO) in the content organization should be viewed. The “normal” mode shall be the default mode for all SCOs.



    If all you're trying to do is allow a student to open and 'flip through' a previously completed course, you should be able to handle the code in the SCO. I'm not sure how the moodle SCORM implementation was configured, but in my own experiences with other LMSs, I have always been able to re-launch previously completed courses.

    Examining what you said:

    Now when i open the SCO in normal mode, it saves the completion_status sucessfully. Then i quit the activity and try it again, then moodle asks me (with a checkbox) if i want to re attempt the activity, if you check this, all data previously saved will be deleted, and i'll get an "unknown" value for completion_status.


    This is the correct behavior, and what I'd expect to happen.


    If my SCO was setup with only one attempt, there will be no checkbox for a new attempt, obviously. But the interesting part is when i try to enter once more to the activity in normal mode, if the status is completed and there are no attempts left (like in this case), SCORM won't let you connect; It always returned me false to scorm.connect() on the SCORM console, and if i can't connect i can't get the cmi.completion_status, maybe i can tweak the code so it takes this in consideration.


    I think the key phrase here is "if the status is completed and there are no attempts left (like in this case), SCORM won't let you connect"; It sounds like the cause of your problem is not SCORM, but the fact that you have moodle implementing a restriction on launch attempts.

    Restrictions on launch attempts is not handled by SCORM or the SCO.

    Has that answered your question? :smile:

    - philip

    PS: I've added modified the SCORM wrapper code to automatically handle cmi.exit, but only if it hasn't been explicitly set by the SCO. I'll be uploading it sometime this weekend.