Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating an interaction #10

Closed
bevdokimov opened this issue Aug 14, 2018 · 2 comments
Closed

Updating an interaction #10

bevdokimov opened this issue Aug 14, 2018 · 2 comments

Comments

@bevdokimov
Copy link

Hi,

first of all, thank you for providing the SCOBot open-source, it's really a big helper.

I am using the SCOBot#setInteraction method to record question answers. I have a case in my project where I want to update only the timestamp(the time when the user starts working actively on the interaction). In the wiki section it is stated that one could send only the items that have updated(another great feature).
Unfortunately, I get error messages stating that I have not set some items. I was assuming that the SCOBot would just write the timestamp in the existing interaction. Do I misunderstand what you have written in the wiki?

Thank you very much in advance for your time.

@cybercussion
Copy link
Owner

cybercussion commented Aug 22, 2018

@bevdokimov thanks I'm glad its helped people get exposed to SCORM in a Open Source capacity.

So SCOBot from memory is detecting the latency for you.

Lets see if I can dig into the setInteraction method quick -
You need a id for sure and the original timestamp is calculated based on a prior interaction to calculate the latency.

I took a look at some of the error handling here:
https://github.com/cybercussion/SCOBot/blob/master/QUnit-Tests/js/scorm/SCOBot.js#L1361

Essentially you'd want to at minimum pass the proper types. Least the way I wrote it I assumed you'd be passing a interaction object as defined there (even empty arrays and data types) so you could populate the same object. If your familiar with say MongoDB you could upsert data against a object and this method doesn't appear to manage that least how I interpret your attempting to.

So maybe that will give you a bread crumb with example to at least have a Interaction object which I believe the main reason I did it like that was to maintain journaling. Least with some of the code I'm seeing there its testing to see if you are passing an Array and if not sending a log message that an array wasn't found.
Thats not necessarily bad although flagged as a error. Its just letting you know (because it happens) you didn't specify it.

Also use SCOVerseer to evaluate your interaction data if you want to see if you are getting the result you are looking for. It may be working after all?

@cybercussion
Copy link
Owner

Closing this out. Let me know if you have any further issues or debugging needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants