lesson completed - maybe a bug?

lesson completed - maybe a bug?

by andrea giorgini -
Number of replies: 10

Hi all,

I'm using 1.9.10+ (weekly) and having troubles with lesson's status. This is what I do:

- open a lesson (flash)

- watch for a while

- close the lesson

- take a look to the attempt: it says (correctly) incomplete

then I re-open the lesson, what for another while, the close it again: the attempt report says now complete. And so on: every time I open it it changes the status, from complete to incomplete and so on... is this a bug or am I missing something?

Thanks a lot

Average of ratings: -
In reply to andrea giorgini

Re: lesson completed - maybe a bug?

by Amy Groshek -
Hi Andrea,

Have you checked the API log for the SCORM sessions in question? It may just be the way your SCORM package behaves. This would only be a moodle bug if the SCORM object's sent values were not saved or represented correctly in Moodle.

http://docs.moodle.org/en/SCORM_FAQ#Asking_for_Help_in_the_SCORM_Forum

Regards,
Amy
In reply to Amy Groshek

Re: lesson completed - maybe a bug?

by andrea giorgini -

Hi Amy,

this is the log of the first time:

Thu, 09 Dec 2010 15:47:17 GMT: Moodle SCORM 1.2 API Loaded, Activity: scorm impress diff, SCO: ITEM-537F12382DF592CBDA9998C7E5AB704F
Thu, 09 Dec 2010 15:47:28 GMT: LMSInitialize("", "") => 0
Thu, 09 Dec 2010 15:47:28 GMT: LMSGetValue("cmi.core.lesson_location") - 3 => 0
Thu, 09 Dec 2010 15:47:29 GMT: LMSGetValue("cmi.core._children") - student_id, student_name, lesson_location, credit, lesson_status, entry, score, total_time, lesson_mode, exit, session_time => 0
Thu, 09 Dec 2010 15:47:29 GMT: LMSGetValue("cmi.suspend_data") - D0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP1Enone$nP1Enone$nP1Enone$nP1Enone$nPA => 0
Thu, 09 Dec 2010 15:47:29 GMT: LMSGetValue("cmi.interactions._children") - id, objectives, time, type, correct_responses, weighting, student_response, result, latency => 0
Thu, 09 Dec 2010 15:47:29 GMT: LMSGetValue("cmi.interactions._count") - 0 => 0
Thu, 09 Dec 2010 15:47:29 GMT: LMSGetValue("cmi.launch_data") - => 0
Thu, 09 Dec 2010 15:47:30 GMT: LMSGetValue("cmi.objectives._count") - 0 => 0
Thu, 09 Dec 2010 15:47:30 GMT: LMSGetValue("cmi.core.score._children") - raw, min, max => 0
Thu, 09 Dec 2010 15:47:30 GMT: LMSGetValue("cmi.core.lesson_location") - 3 => 0
Thu, 09 Dec 2010 15:47:30 GMT: LMSGetValue("cmi.core.score.max") - => 0
Thu, 09 Dec 2010 15:47:30 GMT: LMSGetValue("cmi.core.score.min") - => 0
Thu, 09 Dec 2010 15:47:30 GMT: LMSGetValue("cmi.core.score.raw") - 0 => 0
Thu, 09 Dec 2010 15:47:31 GMT: LMSSetValue("cmi.core.score.raw", "0") => 0
Thu, 09 Dec 2010 15:47:31 GMT: LMSSetValue("cmi.core.lesson_status", "incomplete") => 0
Thu, 09 Dec 2010 15:47:32 GMT: LMSSetValue("cmi.core.lesson_location", "0") => 0
Thu, 09 Dec 2010 15:47:32 GMT: LMSSetValue("cmi.core.session_time", "00:00:03") => 0
Thu, 09 Dec 2010 15:47:32 GMT: LMSSetValue("cmi.suspend_data", "A0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP1Enone$nP1Enone$nP1Enone$nP1Enone$nPA") => 0
Thu, 09 Dec 2010 15:47:32 GMT: Commit("", "") => 0
Thu, 09 Dec 2010 15:47:32 GMT: LMSCommit("AJAXResult", "") => 0
Thu, 09 Dec 2010 15:47:32 GMT: LMSCommit("result", "false") => 0
Thu, 09 Dec 2010 15:47:32 GMT: LMSCommit("", "") => 0
Thu, 09 Dec 2010 15:47:32 GMT: LMSSetValue("cmi.core.score.raw", "0") => 0
Thu, 09 Dec 2010 15:47:33 GMT: LMSSetValue("cmi.core.lesson_status", "incomplete") => 0
Thu, 09 Dec 2010 15:47:33 GMT: LMSSetValue("cmi.core.lesson_location", "3") => 0
Thu, 09 Dec 2010 15:47:33 GMT: LMSSetValue("cmi.core.session_time", "00:00:04") => 0
Thu, 09 Dec 2010 15:47:33 GMT: LMSSetValue("cmi.suspend_data", "D0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP1Enone$nP1Enone$nP1Enone$nP1Enone$nPA") => 0
Thu, 09 Dec 2010 15:47:33 GMT: Commit("", "") => 0
Thu, 09 Dec 2010 15:47:33 GMT: LMSCommit("AJAXResult", "true") => 0
Thu, 09 Dec 2010 15:47:33 GMT: LMSCommit("result", "true") => 0
Thu, 09 Dec 2010 15:47:33 GMT: LMSCommit("", "") => 0
Thu, 09 Dec 2010 15:47:34 GMT: LMSFinish("AJAXResult", "true") => 0
Thu, 09 Dec 2010 15:47:34 GMT: LMSFinish("result", "true") => 0
Thu, 09 Dec 2010 15:47:34 GMT: LMSFinish("", "") => 0
and this is the same of the second one (both are incomplete):
Thu, 09 Dec 2010 15:48:43 GMT: Moodle SCORM 1.2 API Loaded, Activity: scorm impress diff, SCO: ITEM-537F12382DF592CBDA9998C7E5AB704F
Thu, 09 Dec 2010 15:48:46 GMT: LMSInitialize("", "") => 0
Thu, 09 Dec 2010 15:48:46 GMT: LMSGetValue("cmi.core.lesson_location") - 3 => 0
Thu, 09 Dec 2010 15:48:46 GMT: LMSGetValue("cmi.core._children") - student_id, student_name, lesson_location, credit, lesson_status, entry, score, total_time, lesson_mode, exit, session_time => 0
Thu, 09 Dec 2010 15:48:46 GMT: LMSGetValue("cmi.suspend_data") - D0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP1Enone$nP1Enone$nP1Enone$nP1Enone$nPA => 0
Thu, 09 Dec 2010 15:48:46 GMT: LMSGetValue("cmi.interactions._children") - id, objectives, time, type, correct_responses, weighting, student_response, result, latency => 0
Thu, 09 Dec 2010 15:48:46 GMT: LMSGetValue("cmi.interactions._count") - 0 => 0
Thu, 09 Dec 2010 15:48:47 GMT: LMSGetValue("cmi.launch_data") - => 0
Thu, 09 Dec 2010 15:48:47 GMT: LMSGetValue("cmi.objectives._count") - 0 => 0
Thu, 09 Dec 2010 15:48:47 GMT: LMSGetValue("cmi.core.score._children") - raw, min, max => 0
Thu, 09 Dec 2010 15:48:47 GMT: LMSGetValue("cmi.core.lesson_location") - 3 => 0
Thu, 09 Dec 2010 15:48:47 GMT: LMSGetValue("cmi.core.score.max") - => 0
Thu, 09 Dec 2010 15:48:47 GMT: LMSGetValue("cmi.core.score.min") - => 0
Thu, 09 Dec 2010 15:48:48 GMT: LMSGetValue("cmi.core.score.raw") - 0 => 0
Thu, 09 Dec 2010 15:48:48 GMT: LMSSetValue("cmi.core.score.raw", "0") => 0
Thu, 09 Dec 2010 15:48:48 GMT: LMSSetValue("cmi.core.lesson_status", "incomplete") => 0
Thu, 09 Dec 2010 15:48:49 GMT: LMSSetValue("cmi.core.lesson_location", "0") => 0
Thu, 09 Dec 2010 15:48:49 GMT: LMSSetValue("cmi.core.session_time", "00:00:02") => 0
Thu, 09 Dec 2010 15:48:49 GMT: LMSSetValue("cmi.suspend_data", "A0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP1Enone$nP1Enone$nP1Enone$nP1Enone$nPA") => 0
Thu, 09 Dec 2010 15:48:49 GMT: Commit("", "") => 0
Thu, 09 Dec 2010 15:48:49 GMT: LMSCommit("AJAXResult", "") => 0
Thu, 09 Dec 2010 15:48:50 GMT: LMSCommit("result", "false") => 0
Thu, 09 Dec 2010 15:48:50 GMT: LMSCommit("", "") => 0
Thu, 09 Dec 2010 15:48:50 GMT: LMSSetValue("cmi.core.score.raw", "0") => 0
Thu, 09 Dec 2010 15:48:50 GMT: LMSSetValue("cmi.core.lesson_status", "incomplete") => 0
Thu, 09 Dec 2010 15:48:50 GMT: LMSSetValue("cmi.core.lesson_location", "3") => 0
Thu, 09 Dec 2010 15:48:50 GMT: LMSSetValue("cmi.core.session_time", "00:00:03") => 0
Thu, 09 Dec 2010 15:48:50 GMT: LMSSetValue("cmi.suspend_data", "D0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP0Enone$nP1Enone$nP1Enone$nP1Enone$nP1Enone$nPA") => 0
Thu, 09 Dec 2010 15:48:54 GMT: Commit("", "") => 0
Thu, 09 Dec 2010 15:48:54 GMT: LMSCommit("AJAXResult", "true") => 0
Thu, 09 Dec 2010 15:48:54 GMT: LMSCommit("result", "true") => 0
Thu, 09 Dec 2010 15:48:54 GMT: LMSCommit("", "") => 0
Thu, 09 Dec 2010 15:48:54 GMT: LMSFinish("AJAXResult", "true") => 0
Thu, 09 Dec 2010 15:48:54 GMT: LMSFinish("result", "true") => 0
Thu, 09 Dec 2010 15:48:54 GMT: LMSFinish("", "") => 0
as u can see the scorm sets the status as incomplete, but in the attempt report I saw, after the first attempt, the status as completed. I can provide the scorm if necessary.
Thank you very much for your answer.
Andrea
In reply to andrea giorgini

Re: lesson completed - maybe a bug?

by Amy Groshek -
Thank you, Andrea.

That helps. Also, what are your SCORM activity settings? Can you upload a screenshot of the setup screen?

Especially important are number of attempts, attempts grading, and possibly preview mode.

You might also want to read through this particular topic in the faq:
http://docs.moodle.org/en/SCORM_FAQ#Handling_of_Multiple_Attempts

Regards,
Amy
In reply to Amy Groshek

Re: lesson completed - maybe a bug?

by andrea giorgini -

Hey Amy,

thanks again. Those are the settings: by the way with moodle2 we get the same behaviour.

Thank you very much

Attachment Screen shot 2010-12-10 at 10.45.51 AM.png
In reply to Amy Groshek

Re: lesson completed - maybe a bug?

by andrea giorgini -

Hey guys,

I wonder what other people do about this: nobody is interested about a lesson have been completed or not? I'm still stuck on this, please any help?

Thanks

In reply to andrea giorgini

Re: lesson completed - maybe a bug?

by federica cenacchi -
Hi, I work with Andrea and we may have found a solution to this problem, that implies commenting a few code lines in moodle.

I will resume here the problem and the solution. The question is: does our solution affect negatively other parts of the Moodle code?

The problem
As Andrea already said, we have inserted a SCORM learning object in our Moodle, and we expect to see in the reports each lesson as "completed" after viewing the 80% of it.
What we actually see is:
- viewing lesson for a few seconds (<80%) and stop: report says "incomplete"
- viewing same lesson for another few seconds (<80%): "complete"
- viewing same lesson for another few seconds (<80%): "incomplete"
- viewing same lesson for another few seconds (<80%): "complete"
- ... and so on: complete, incomplete, complete, incomplete...
- until I reach 80% of the lesson, then the report always says "complete"

Steps to reproduce
You can find the course zip here:
http://dl.dropbox.com/u/3198614/impress_scorm_con_asset_v2.0.zip
The SCORM has been generated with Adobe Captivate 4, with this reporting options:
- SCORM 1.2
- Report interactions and the score
- Report Complete/Incomplete
- Report Score to LMS as Percent
- 80% or more of total score to pass

Moodle SCORM configuration is shown in the Andrea's post screenshot.

The proposed solution
After doing some debugging with firebug and monitoring DB changes we noted that:
- every time the player loads the lesson, it's set "completed" even before actually playing it the first time (loadSCO.php)
- when the sco is being played, after each slide it sends the status information to the LMS
- when the sco is stopped, it sends the completion information to the LMS, which in case of status "incomplete", overrides the "completed" set by moodle when the player is loaded
- the problem is here: the completion status is being sent to the LMS only alternately

I think the problem is on the Captivate side.
Anyway, we have seen that commenting this lines in Moodle's moodle/mod/scorm/loadSCO.php solves the problem:

(lines from 72 to 77)

/* if ($sco->scormtype == 'asset') {
$attempt = scorm_get_last_attempt($scorm->id,$USER->id);
$element = ($scorm->version == 'scorm_13' || $scorm->version == 'SCORM_1.3') ? 'cmi.completion_status':'cmi.core.lesson_status';
$value = 'completed';
$result = scorm_insert_track($USER->id, $scorm->id, $sco->id, $attempt, $element, $value);
} */

This way it works fine for us.
Any comment on this? Is it dangerous to leave this lines commented?

Thanks for any suggestion.

Cheers,
Federica.
In reply to federica cenacchi

Re: lesson completed - maybe a bug?

by Matteo Scaramuccia -

Hi Federica,
IMHO you should fix your package and not hack Moodle code 'cause of the bug here is in your package.

A SCO i.e. a web unit able to interact with the platform using RTE calls, must be declared as sco and not as asset, being the default type.

Looking at your package, the above statement means that e.g.:

<resource identifier="RES-379A3904953B88CE5A35E9D89CABEDF8" type="webcontent" href="I01%20Introduzione%20a%20Impress/I01%20Introduzione%20a%20Impress.htm">

should be:

<resource identifier="RES-379A3904953B88CE5A35E9D89CABEDF8" type="webcontent" adlcp:scormType="sco" href="I01%20Introduzione%20a%20Impress/I01%20Introduzione%20a%20Impress.htm">

If you look at your package you'll see you've multiple imsmanifest.xml, each one addressing a LO and those files are correct: it seems you've wrongly re-packaged those LOs in one course.

Ciao,
Matteo

In reply to Matteo Scaramuccia

Re: lesson completed - maybe a bug?

by federica cenacchi -
Hi Matteo,
thank you *very* much. You were right, the mistake was when packaging the sco. Adding the scormtype=sco in the package solved the problem.

But now we have another problem, maybe unrelated to this one.
The "resume" functionality (set in Captivate) seems to work only importing the course Moodle 1.9, but not in Moodle 2.0.

The very same package works fine in 1.9 (resumes the lesson at the point it was interrupted), while on 2.0 sometimes it resumes, sometimes it starts from the beginning.

Any hint on this?

Thanks,
federica
In reply to federica cenacchi

Re: lesson completed - maybe a bug?

by Matteo Scaramuccia -

Ciao Federica,

unfortunately I never used Captivate: from your description it sounds that "resume" is implemented using lesson_location. Not played enough with 2.x yet: AFAIK the new settings of 2.x AICC/SCORM Activity could affect some way your issue.

For further investigation you need to enable the debugging and look at the SCORM calls, to see if the Captivate framework takes some decisions upon sime values sent by the LMS (Moodle) e.g. review mode. The test should be done using the same sequence of steps both in 1.9 and in 2.0, with the same starting conditions, e.g. no tracking data at all.

HTH,
Matteo

In reply to Matteo Scaramuccia

Re: lesson completed - maybe a bug?

by federica cenacchi -
FYI

After doing some research about how the resume works, we solved the problem. (which is on Captivate's side).
The variabile cmi.core.exit should be set to "suspend" according to the standard, but Captivate doesn't do that.

Moodle 1.9 was ok with this, but probably Moodle 2.0 now wants it correctly set.
http://moodle.org/mod/forum/discuss.php?d=166358

Bye,
Fede.