scorm | SCORM 1.2/2004 Wrapper for JavaScript/TypeScript
kandi X-RAY | scorm Summary
kandi X-RAY | scorm Summary
SCORM 1.2/2004 Wrapper for JavaScript/TypeScript. Integrate your e-learning course with SCORM 1.2/2004 LMS. This implementation is highly based on a battle tested version from pipwerks/scorm-api-wrapper.
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
scorm Key Features
scorm Examples and Code Snippets
Community Discussions
Trending Discussions on scorm
QUESTION
I'm trying to record some text values (cmi.interactions.n.learner_response, and cmi.interactions.n.description) on the backend. I'm sending them in a post response from a JS object that uses JSON.stringify.
Inspecting the response in PHP, accented characters äöå (and spaces) are recorded as underscores in learner_response, and in description, they are omitted altogether. Inspecting the response string, it appears to be an ASCII encoded string.
Is it possible to set encoding in SCORM 2004 so that I can see accented characters in the response? My client would like record the interactions more thoroughly. The content was created in Adobe Captivate.
Thanks.
...ANSWER
Answered 2022-Mar-29 at 13:39Essentially, no. SCORM's scope limits it to what is happening in the runtime layer that is implemented as the JavaScript API that the SCORM player (the thing launching the content) provides. So the transfer mechanism between that runtime environment and the storage layer (whether that is on a server, local, etc.) is outside the scope of the spec and is therefore implementation specific.
There is reference to ISO-10646-1 which will take you down a path that likely leads to not a lot more information. Essentially it is a character set without including specifics about how to handle those elements, which for this use case probably boils down to JavaScript string.
Having said all of that you should seek support from the SCORM player to see if they have the ability to adjust that so that larger ranges of characters can be supported.
QUESTION
Guys, tell me, can SCORM 2004 give to the LMS at the end to show a list of correct and incorrect questions? if so, which model is responsible for this?
...ANSWER
Answered 2022-Feb-04 at 13:27Questions are called 'interactions' in the SCORM run-time data model.
The specific property that says whether a question response is correct or incorrect (or how correct the response is) is cmi.interactions.n.result
(where n
is the index of the interaction).
You might also want to look at cmi.interactions.n.correct_responses.n.pattern
and cmi.interactions.n.student_response
.
QUESTION
I am working on a serious game project on Unity for a client that must be playable on a browser and compatible with SCORM.
I discovered the concept of SCORM and LMS with this project. I made an internal backup system, with a JSON file, which works very well when I build for PC, my score saves well and when I restart my project, I can load my backup.
Unfortunately when I build in WebGL and publish to the SCORM Cloud website, the save and load information doesn't pass.
I found on the internet that I should use suspend_data functions, I did find the description of its functions, but I can't find how to send or retrieve my score. I must have a problem in the conversion of JSON in string. Can you help me with this, or give me a hint.
I thank you in advance. Sincerely
...ANSWER
Answered 2022-Jan-05 at 19:46There might be a couple different issues at play here.
First off, I'm not sure that SCORM Cloud allows for the Unity Player mime type today. That could be verified with a request to support@scorm.com and it may be able to be added if it isn't currently supported.
Second, how are you communicating with the SCORM API? When a SCORM course is launched in the player, there is a javascript API exposed with some basic calls you need to make. This is where you'd set completion or a score (or suspend_data if needed) and it tells the LMS what data to persist for the learner session and makes values available from previous launches if set to resume.
This won't happen automatically, so you need to handle that in your Unity package with either a wrapper, or some javascript calls to the proper context from within the package.
Hopefully all this is helpful for your understanding of SCORM. Feel free to reach out to support@scorm.com since you're using SCORM Cloud and they can help you if you need more information.
Note: I work for Rustici Software on the SCORM Cloud team and have some light Unity experience.
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).
QUESTION
The SCORM 2004 4th Edition pseudocode handles the case for a choice request (SB.2.9, steps 12 onward) like so:
...ANSWER
Answered 2021-Sep-13 at 15:03Your reading of the pseudocode is correct. Choice is a bit special compared to the other flow events, but the steps of termination and showing the user a "please select an activity from the activity tree" screen could happen in several cases. The only somewhat unique part is the setting of the current activity, which makes it so other flow navigation events the user may select start from their last intentional choice, and not from whatever was previously loaded. It's not unusual for the Current Activity to be on a cluster, as stated on SN-4-18: "During termination behavior, Sequencing Exit Action rules are evaluated on all of the ancestors of the current activity – this is done in the Sequencing Exit Action Rule Subprocess. The result of this subprocess will be that either the “just terminated” leaf activity remains the Current Activity, or an ancestor of the leaf activity becomes the Current Activity".
You're also correct that OP.1 ("Overall Sequencing Process") is mute on the topic, going so far as to say "Behavior not specified." for a Not Valid sequencing request. I believe the most common choice is the aforementioned "please select an activity from the activity tree" style screen in place of where the visible SCO would have been.
The spec tries very hard to separate LMS display choices from how sequencing itself operates. SN-5-3 states: "SCORM imposes no requirements on the type or style of the user interface presented to a learner at run-time, including any user interface devices for navigation. The nature of the user interface and the mechanisms for capturing interactions between the learner and the LMS are intentionally unspecified. Issues such as look and feel, presentation style and placement of user interface devices or controls are outside the scope of SCORM."
But the specification otherwise says some instructive things. Page SN-3-6 states that "As depicted in Figure 3.2.1c, the target of the Choice navigation request (Activity B) has a Sequencing Control Flow defined to be False. In this case, no activity can be identified for delivery (clusters cannot be delivered). Because Activity B has Sequencing Control Choice defined to be True, an LMS shall provide some mechanism for the learner to select (trigger a navigation request for) one of Activity B’s children directly, but not Activity B."
While this doesn't explicitly state that there should be instructive text displayed to the learner in that SCO area or that the choice shouldn't be allowed, it does state that something should be done that should guide the learner into intentionally performing another step to launch something else. Again, this isn't exactly the same use case, but it's probably the closest it gets relative to choice.
QUESTION
I have to do a college project, where I have to do an LMS, and one of the requirements is to allow the import of SCORM files. However, when I went to research I saw something about SCORM using the flash player, which ended support this year. Can anyone answer the question if SCORM really needs the flash player to work?
...ANSWER
Answered 2021-Mar-11 at 14:24No. The only hard technical requirement is a JavaScript environment (or an environment that sufficiently mimics a JavaScript environment) which is why SCORM is very often considered a browser based specification. "Browsers" and therefore JS environments are finding their way into all kinds of places.
QUESTION
I am trying to open my SCORM education in a new window but when i do, all the reporting stops working (The same goes if i do it in an iframe). When i just do location.href = scormURL; then it works fine. My scorm file is in a different domain then the LMS.
It seems like the SCORM api doesn't get initialized after doing loadFromJSON(response) on my scorm response. But this problem only occurs when i open in a new window or show the scorm education in an iframe.
I use SCORM2004.
EDIT: It was XSS problem and it was solved by routing to azure CDN via ocelot gateway to get the same domain.
...ANSWER
Answered 2021-Mar-04 at 04:04My scorm file is in a different domain then the LMS.
This is your problem.
The only link the SCORM package has to your LMS (and therefore to your reporting) is the SCORM API. Modern browsers do not allow CORS (cross-origin resource sharing) by default because it opens you to XSS (cross-site scripting) attacks.
The package may be able to find the API if one exists on the external domain, but it will not be able to communicate with the LMS directly.
The way I worked around this was to add a wrapper .js
file on the external domain that hosted the SCORM API and used Window.postMessage
to pass calls back to the LMS.
You then use window.open
or your iframe
to open a page on the external domain which has access to scorm_wrapper.js
and its own iframe
that hosts your package.
Because the Window.opener
method is not reliable and not fully-featured when the current window
was opened from a different origin, we will use the domain directly.
Since we control the LMS, we know the domain it is running on and since we just opened the package, we know it should be active. We can postMessage
it to ask for a reply.
QUESTION
I have a view under my elearning app named home(), which should load index.html from within the app's directory. Instead it loads an instance of index.html from a different app (symposium/templates/index.html). It should be loading it from (elearning/templates/index.html).
Can someone please explain why this is happening and how to fix it?
...ANSWER
Answered 2021-Mar-14 at 22:25Django searches for a templates folder within each app for the relevant template to render. Looks like the first it found was index.html
from within the symposium
app.
The convention of directory structure for templates is to put your templates within another folder with the name of the app in order to avoid this exact situation with templates of the same name.
Move your index.html
file from
/elearning/templates/index.html
to
/elearning/templates/elearning/index.html
and then change your home view function to
QUESTION
IMPORTANT EDIT: The logic described below appears to be all correct. The root of my issue was actually being caused by the utility we used to push new data to the ES database, not with the query itself. I have accepted the answer that says that the query works as intended.
I have an Elasticsearch server whose mapping looks like this (as output by curl 'elastic:9200/resourcelibrary/_mapping
):
ANSWER
Answered 2021-Jan-12 at 03:10This might help to solve & analyze your problem locally.
I have created the index:
PUT /resourcelibrary
QUESTION
I have installed a moodle environment and uploaded a SCORM package. I run all my courses through SCORM therefore the additional activities are not needed.
Is there any way I can make the Course button link directly into the SCORM package to cut the additional clicking?
...ANSWER
Answered 2020-Nov-20 at 19:19Here are a couple options:
Select the "single activity" course format: This prevents the /course/view.php page from appearing. Users still have to click a button to enter the SCORM activity, but takes clicks and page views out of the UX. This option can be selected in the course settings.
Customize: Create a version of the SCORM activity that launches without requiring the user to click the entry button on the SCORM activity page. This requires replicating what occurs when the the user clicks the entry button on the SCORM page, but is possible.
Hope one of these is helpful - good luck w/ it!
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install scorm
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