Forum Discussion

TamiTaylor's avatar
TamiTaylor
Community Member
3 years ago

Passing Calculated Variable Back to LMS

Hi, 

I created a drag and drop activity that added a point to a "Total" custom numeric variable for each correct response to allow for partial scoring. I would like that calculated "Total" score to pass back to my LMS. I've tried lots of suggestions that I found on this forum (adding a survey question, using JavaScript), but have not been successful. Any additional ideas? My example file is attached. 

Thanks in advance!

  • using a survey question should work but you will need a results slide and to report on that slide

  • TamiTaylor's avatar
    TamiTaylor
    Community Member

    I've tried the survey questions - this process (at the bottom) doesn't work because the Short Answer question won't recognize the variable as a TextEntry (I'm guessing because it's a number?) I tried to do the same thing using a How Many survey question, which does allow me to replace the NumericEntry variable with my "Total". However, when I preview, it always asks for an entry and won't even progress onto the results slide. I've also tried to insert the variable into the box, but no luck doing that either. 

    • PhilMayor's avatar
      PhilMayor
      Super Hero

      Can you post your file and I can fix it for you

      Sent from my iPhone

    • PhilMayor's avatar
      PhilMayor
      Super Hero

      Thanks will have a look as soon as I get back in

      Sent from my iPhone

  • Hi, Tami.

    Since Total is a NumericEntry, you have to use the How Many survey type, as you mentioned above.

    I like to create the following triggers:

    • Set NumericEntry to variable Total when the timeline starts.
    • Submit interaction when the timeline ends 

    On your Results slide, you also need to make sure the survey question is checked:

    Windows 10 (1) 2022-03-17 at 10.29.31 AM

    I'm attaching the edited file here, but maybe Phil will have a different or better suggestion for you! 

    Let me know if this works!

    • PhilMayor's avatar
      PhilMayor
      Super Hero

      That would be my solution, you have to assign the value before submitting

      Thanks Maria

      Sent from my iPhone

  • TamiTaylor's avatar
    TamiTaylor
    Community Member

    Thanks for the idea. It still gives me a 0 score in my LMS, no matter what the calculated Total on my results slide says. 😞

    • PhilMayor's avatar
      PhilMayor
      Super Hero

      It will pass as an interaction id rather than a score. If you want to pass as a score the simple thing is to have a graded numeric question and pass a score ideally out of 100 as the LMS is expecting a percentage then send that via a results slide.

      Sent from my iPhone

  • Hi, Tami.

    When publishing to LMS, are you choosing to track the quiz? See below:

    Windows 10 (1) 2022-03-17 at 11.31.08 AM

    I tested the project in SCORM Cloud, and the report showed the value of the Total variable:

    SCORM Cloud Reporting 2022-03-17 at 11.30.20 AM

    Let me know if this helps!