Can't access cmi.student_data.mastery_score

Can't access cmi.student_data.mastery_score

by Shawn Dibble -
Number of replies: 6
I have my grade to pass set to 70 within moodle. However, when my SCORM 1.2 package calls cmi.student_data.mastery_score it isn't returning anything.
I am running Moodle 2.6.11+

Wed, 18 Nov 2015 17:39:12 GMT: Moodle SCORM 1.2 API Loaded, Activity: ICW, SCO: TTWCS_Sys_Fam_Mod_Exam
Wed, 18 Nov 2015 17:39:12 GMT: Moodle SCORM 1.2 API Loaded, Activity: ICW, SCO: TTWCS_Sys_Fam_Mod_Exam
Wed, 18 Nov 2015 17:39:14 GMT: LMSInitialize("", "") => 0
Wed, 18 Nov 2015 17:39:14 GMT: LMSGetValue("cmi.core.lesson_status") - failed => 0
Wed, 18 Nov 2015 17:39:14 GMT: LMSGetValue("cmi.student_data.mastery_score") - => 0
Wed, 18 Nov 2015 17:39:14 GMT: LMSGetValue("cmi.student_data.mastery_score") - => 0

Even if I use "Select Data Model Element to Get or Set" and manually set cmi.student_data.mastery_score, I get:

LMSGetValue Returned:
Error Code: 0
Error Description: No error

Any feedback/help on how I can get the passing grade score would be greatly appreciated.

Attachment Capture.PNG
Average of ratings: -
In reply to Shawn Dibble

Re: Can't access cmi.student_data.mastery_score

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Shawn,
the Mastery Score must be part of the SCORM package whilst the setting above plays with the Moodle Gradebook and not with the CMI Data Model Element cmi.student_data.mastery_score.

HTH,
Matteo

In reply to Matteo Scaramuccia

Re: Can't access cmi.student_data.mastery_score

by Shawn Dibble -

I would like to set a passing grade value in Moodle & have my SCORM Package be able to retrieve this value. Is this possible and if so, where can I set this value?

In reply to Shawn Dibble

Re: Can't access cmi.student_data.mastery_score

by Ron Meske -
Picture of Particularly helpful Moodlers

Hello Shawn,

That currently isn't possible with Moodle.  A SCORM SCO is not really treated as a course within Moodle, instead it is treated as an activity. 

That means, at the course level the score is calculated based on the score of each activity.  So, when you set the passing score for a course, it is independent of a passing score for an activity.  That is why you cannot retrieve it from within your SCORM SCO.

It would be a great enhancement for SCORM only courses to integrate the course passing score with the SCORM passing score so that the SCO can read it.

Hope that clears up any confusion.

Ron


 

In reply to Shawn Dibble

Re: Can't access cmi.student_data.mastery_score

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Shawn,
if "grade" here is not linked to the Moodle Gradebook, you can do it by (manually) change the imsmanifest.xml XML file of your package to add there a Mastery Score.

Search for the XML element called item and add a new child element, <adlcp:masteryscore>70</adlcp:masteryscore>:

<manifest identifier=”<manifest_id>″
xmlns=”http://www.imsproject.org/xsd/imscp_rootv1p1p2
xmlns:adlcp=”http://www.adlnet.org/xsd/adlcp_rootv1p2
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance
xsi:schemaLocation=”http://www.imsproject.org/xsd/imscp_rootv1p1p2 imscp_rootv1p1p2.xsd
http://www.imsglobal.org/xsd/imsmd_rootv1p2p1 imsmd_rootv1p2p1.xsd
http://www.adlnet.org/xsd/adlcp_rootv1p2 adlcp_rootv1p2.xsd”>
...
<item identifier="<item_id>" identifierref="<another_id>" isvisible="true">
    <title>Course Title</title>
...
    <adlcp:masteryscore>70</adlcp:masteryscore>
...
</item>
...
</manifest>

Then republish the SCORM package with the new manifest file.

HTH,
Matteo

Average of ratings: Useful (1)
In reply to Matteo Scaramuccia

Re: Can't access cmi.student_data.mastery_score

by Shawn Dibble -

Thanks for the assistance. However I am hoping to have the teacher be able to set the desired passing score. It doesn't have to be the course passing score. It could be a description or some random activity value they set within Moodle. I will just rename the field. I can then have the SCORM pull whatever field that is and just use it to render a pass/fail. Is this possible?

In reply to Shawn Dibble

Re: Can't access cmi.student_data.mastery_score

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Shawn,
yes, it should BUT you can't access that value via cmi.student_data.mastery_score: CMI Data Model is "confined" to the SCORM package as per specs.

HTH,
Matteo