scorm-api-wrapper | The pipwerks SCORM API Wrapper | REST library
kandi X-RAY | scorm-api-wrapper Summary
kandi X-RAY | scorm-api-wrapper Summary
Created by Philip Hutchison, January 2008 Copyright (c) Philip Hutchison MIT-style license: Inspired by APIWrapper.js, which was a demo file created by the ADL and Concurrent Technologies Corporation. The SCORM.API.find() and SCORM.API.get() functions are based on ADL code, which was modified by Mike Rustici (then further modified by Philip Hutchison. WARNING: Use at your own risk! These files are provided as-is with no implied warranties or guarantees. These wrappers are intended to make your life easier so you don't need to be a SCORM expert to add SCORM support to your e-learning course. The SCORM API wrappers are an abstraction layer that makes adding SCORM code to your course a much simpler, less confusing task. They provide simple logic and error-checking for your course's SCORM code, and include some auto-handling, such as setting cmi.exit (aka cmi.core.exit) when exiting a course.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of scorm-api-wrapper
scorm-api-wrapper Key Features
scorm-api-wrapper Examples and Code Snippets
Community Discussions
Trending Discussions on scorm-api-wrapper
QUESTION
There are very few example on SCORM implementation, so I am a little lost. I need to get the student score based on 3 questions. I don't really understand what i am doing. I know i probably need a function like calculateScore(). SCORM is confusing the crap out of me though. I use SCORMCLOUD to test but i have reupload the build everytime i wanna test something..
APP.js
...ANSWER
Answered 2021-Sep-28 at 12:47Your question is a bit confusing. SCORM is an API tying two things together:
- learning content, usually in the form of one or more so-called SCOs (i.e. HTML files with assets talking to the SCORM JS API)
- an LMS serving the learning content and providing the SCORM JS API instance
It looks like you are trying to create learning content, although you provide a way to change the learner name, which is read-only data provided by the JS API.
If that's what you're trying to do, it's not up to SCORM to tell you the score but to you. Based on your code I'm guessing you want each question to be worth a number of points (or at least just one) if answered correctly and the score should be based on that and the total number of questions.
Since you're storing all answers in cmi.interactions
already, you could try getting the number of interactions (i.e. answers) first. This tells you the total number of answers and thus the maximum number of points, or cmi.core.score.max
.
Since the lowest possible score is zero points if you do a simple tally instead of something more complicated like negative points for incorrect choices being selected, the cmi.core.score.min
would then be 0
.
The cmi.core.score.raw
would be the total number of points, so the number of answers that are correct. You could get this by iterating over the values of cmi.interactions.n.result
you set previously (with n
being the index between zero and cmi.interactions._count
and only counting those where the result
is "correct"
).
However note that submitMCQ
should set cmi.interactions.n.result
to "correct"
or "incorrect"
not true
or false
. A conforming LMS will otherwise reject the value as invalid (which does not raise an exception but instead sets an error flag you have to check explicitly because SCORM is weird like that).
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install scorm-api-wrapper
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page