Skip to main content
osbornsm
Inspiring
May 15, 2015
해결됨

Submit MY quiz score to the LMS, not the "native quiz" results

  • May 15, 2015
  • 4 답변들
  • 3494 조회

I have gotten better at Advanced Actions in Cap, and as a result... I wish to submit my custom quiz results to the LMS and not the Captivate "quiz slide" method.

I realize i need JavaScript to communicate with the LMS... but how do i set "my_result" to the Captivate quiz score submission?

Thanks!!

~ Sean

이 주제는 답변이 닫혔습니다.
최고의 답변: TLCMediaDesign

System:

Captivate 8 x64

Windows 7 x64

SCORM 1.2

I "thought" SCORM_objAPI was the correct API to call the cmi.core features.

So cpQuizInfoPointsscored is readonly

and cpQuizInfoTotalPointsscored is read only too?

That sounds an awful lot like "what you want isn't possible."

But that's just my thoughts... Thank you for yours!

~ Sean


They definitely are read only if you try to set them from within Captivate. Not so sure if everything is exposed in JavaScript. Don't really have time right now to test all of that. Getting to your script, try this:

Put this function in the head of the HTML page.

function submit_score()

{

var cp = document.Captivate;

var sendScore = cp.cpEIGetValue("m_VarHandle.quiz_score");

SCORM_SetValue("cmi.core.score.raw", Number(sendScore));

SCORM_SetValue('cmi.core.lesson_status', 'passed');

SCORM_Finish('EXIT_TYPE_FINISH', 'true');

}

On you last page, click a button and execute the JavaScript

submit_score();

4 답변

Participating Frequently
February 25, 2017

The following strategy enables creating a custom score without requiring direct SCORM interaction.  It modifies the internal scoring process in Captivate:

https://medium.com/@hdecisions/custom-quiz-scoring-in-adobe-captivate-245b60ef49d3#.apbzqvl8m

Participating Frequently
February 1, 2017

We are using xapi rather than scorm.  Will these approaches still work,  or are they scorm specific?

TLCMediaDesign
Inspiring
May 16, 2015

Here are some of the SORM values for 2004 and 1.2:

 

SCORM 2004 Score

 

  • Set cmi.score.raw to 8
  • Set cmi.score.min to 0
  • Set cmi.score.max to 10
  • Set cmi.score.scaled to 0.8SCORM 1.2 Score

  

  1. cmi.core.score.raw

Yes

Yes

CMIDecimal/CMIBlank

a normalized value between 0 and 100, initially blank

  1. cmi.core.score.min*

Yes

Yes

CMIDecimal/CMIBlank

a normalized value between 0 and 100, initially blank

  1. cmi.core.score.max*

Yes

Yes

CMIDecimal/CMIBlank

a normalized value between 0 and 100, initially blank

 

 

This may work to set these values if they are not already set. It may also affect the lesson status and success as the roll-up[ rules are different for each SCORM version.

To make the calls, use the following JavaScript examples. 

SCORM2004_SetValue(“cmi.score.scaled”,yourVar)

SCORM_SetValue(“cmi.core.score.raw”,yourVar)

Note that you'll need to get the CP var for whatever version of CP and may have to be in quotes in the script window.

 

Lilybiri
Legend
May 16, 2015

The only results that ar transferred to a LMS are the ones in the quizzing system variables. And those variables are read-only, you cannot control/change them.

If you explained more in detail how the 'my_result' variable is getting its value, maybe I could offer some suggestions. Here are two older articles, where you'll find some information about reporting the results of custom questions. I think you are pointing to that kind of questions, my apologies if it is not the case.

Report Custom Questions - part 1 - Captivate blog

Report Custom Questions - part 2 - Captivate blog

osbornsm
osbornsm작성자
Inspiring
May 18, 2015

I have a basic practice quiz setup, using SCORM 1.2.

== Description ============================================

10 questions

10 slides + a results slide

Advanced Action validates a drop-down widget choice

If widget = correct {

quiz score is incremented from it's initial value of "0"

}

I then divide total questions / correct answers to get a score, which i called "my_result".

...which i would then like to submit to the LMS in place of Captivate's native quizzing.. if possible that is.   :-)

========================================================

== Question ============================================


Your comment above said the native quiz values are read-only.

Any chance we could get around the read-only-ness via JavaScript?

========================================================

Thank you for your thoughts!

~ Sean

One of the advanced actions in Cap -->>

TLCMediaDesign
Inspiring
May 18, 2015

You can try using the JavaScript depending on when Captivate actually writes the score. Your may get overridden unless you hijack the function that writes the score.

JavaScript Window:

var cp = document.Captivate;

var sendScore = cp.cpEIGetValue("m_VarHandle.my_result");

SCORM_SetValue("cmi.core.score.raw", sendScore);