Which scoid should I use?

Which scoid should I use?

by cloud cui -
Number of replies: 9

Dear Wonderful Forum People smile

I'm developing a feature that manually marks a user's scorm as completed, regardless if they have done so or not, this is for cases where user have done a scorm but somehow system did not recognise.

In order to manually insert to scorm_scoes_track table, I need to know what the scoid is. But I notice that there are 2 scoes associated with each scorm, for example


In the scorm table, there is a field called "launch", which in above example is id 257, but I can tell in scorm_scoes_track table, the ones done by real users are 258.

So my questions are:

1. Why there are 2 scoes for one scorm? I can tell they have a parent-child relationship.

2. What is the "launch" field for in scorm table?

3. Can I always use whatever in "launch" field plus 1 as the scoid I insert, are there any special cases?


p.s. the version is 2.4.6


Thanks in advance guys !!

Cloud

Average of ratings: -
In reply to cloud cui

Re: Which scoid should I use?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Moving to SCORM forum...

Average of ratings: Useful (1)
In reply to Howard Miller

Re: Which scoid should I use?

by cloud cui -

Thanks Howard, sorry I was for not putting the post at the right place, I'm still getting familiar with it smile

In reply to cloud cui

Re: Which scoid should I use?

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Cloud,
tracking data should be assigned only to those records where the scormtype colum equals to "sco". The launch column is the relative path of the browser play-able file. So you can add tracking data for those records having both the constraints.
It could happen that some bad packages mark some SCO as "asset" but they're able to start a tracking session too.

Organizations (parents) are stored too, to manage the TOC of the package.

HTH,
Matteo

Average of ratings: Useful (1)
In reply to Matteo Scaramuccia

Re: Which scoid should I use?

by cloud cui -
Thank you so much Matteo!! Your answer solved my issue completely!
In reply to cloud cui

Re: Which scoid should I use?

by Sam Stevens -

Why modify all the scorm tracking data in those tables? Would be easier just to modify the mdl_course_modules_completion and mark the activity as complete at that level.

Unless you need the scorm tracking data specifically for something else. All of the reports will work off something higher up the chain so unless you are going to be looking at exactly that table and need to look at exactly that variable in the future I wouldn't bother.

In reply to Sam Stevens

Re: Which scoid should I use?

by cloud cui -

Hi Sam, I'm fairly new to moodle development, I took over a project from previous developer. Apparently there has been a lot of customization on the system. They have developed moodle to have online courses(which is scorm) and face to face courses/sessions, I'm not too sure how the face to face is related to the plugin, but they are getting the completion status from many different places, including the scorm track, however the I never saw it has anything to do with the module completion.

Does that mean, by standard, I should always be looking at the course_module_completion table for the completion status for a course?

Thanks

In reply to cloud cui

Re: Which scoid should I use?

by Sam Stevens -
Hi Cloud,


Not quite mdl_course_modules_completion stores the completion state of the individual topics in a course. So for each topic with a scorm activity in it there would be one of these. 

mdl_course_completions stores the overall course completion state.

So for example (and a problem we sometimes have) we have a multi topic course with 6 scorm activities in it. Very occasionally for some reason the completion on one will not be tracked. The course completion needs all 6 to mark the course as complete. So what I do is change the state for the activity for that user in mdl_course_modules_completion so that all 6 are complete. Then the next time the cron job runs it picks up the change and marks the course as complete as the criteria are now met.

When you look back the course will be complete, the activity will be complete and the only thing missing is the scorm tracking data but we never look at that for anything other than debugging anyway. 

The only problem with that can be that the completion date in mdl_course_modules_completion will be the time that the cron job ran not when they actually completed. So you might have to go in there and correct that as well if the difference matters.


Average of ratings: Useful (1)
In reply to Sam Stevens

Re: Which scoid should I use?

by cloud cui -
Hi Sam, your response is very inspiring, thank you so much! I will certainly try this approach in the future!
In reply to Sam Stevens

Re: Which scoid should I use?

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Sam,
that's correct but the OP didn't mention about how the completion is configured on his system and I missed to ask him for that... thanks for your deepening the OP's question smile!

BTW if you want to keep consistent records in the database you should change the tracking data too unless you accept to have some completions manually changed AND no completion is registered in the CMI tracking data. Changing those records or not depends on the way you want to "track" these manual changes and on what reports are running on that instance.

Matteo