#1 2009-04-30 07:19:55
- tastoHelp
- Member Rank:
New Member
What's This - Posts: 4
Updating time spent on content via JavaScript
Hello there,
I'm looking for some information about how "time spent" data is calculated/stored in Connect Pro Training. We have prepared HTML/Flash content using guidelines found at http://www.connectusers.com/tutorials/2 … index.php.
Using a "close button/send data" strategy successfully updates time spent after closing the session but we'd like to find a way to automatically update the session time so that if user closes the browser window we still can keep track of time spent.
Calling sendTrackingData() method with setInterval seems not useful, apparently we can only save time information for the first call.
Any suggestions? Would be really appreciated!
thanks,
L.
My System Information:
Connect Pro Training / Windows
Offline
#2 2010-03-10 04:20:13
- Mattc
- Member Rank:
New Member
What's This - Posts: 1
Re: Updating time spent on content via JavaScript
Hello,
Is there any solution for this problem? I am also trying to update that via cmi.core.session_time but seems like it is not working. Any suggestion would be really appreciated.
Thank you
Offline
#3 2010-08-31 13:05:28
- acomeau
- Member Rank:
New Member
What's This - Posts: 3
Re: Updating time spent on content via JavaScript
I'm having this same issue. I followed the HTML/Javascript tutorial ( http://www.connectusers.com/tutorials/2 … /index.php ). I am able to set course Status (I am setting it to "incomplete"), but Time Taken is only being set the first time I view the course. It looks like the ConnectSCORM.js file is setting cmi.core.session_time when it's sending the exit data.
Is Connect Pro supposed to update total_time based on the session_time value when the user exits the course?
Offline
#4 2010-09-01 11:28:27
- AChemey
- Member Rank:
Participant
What's This - Posts: 83
Re: Updating time spent on content via JavaScript
It's a combination of two issues:
I have a bug in my code (sorry). The "ConnectAICC.js" file needs to be modified (or I can send an updated file individually - until I update the code in the article). See below for more informatioen.
In addition - Adobe Connect doesn't display the time that is sent by the AICC commands in the UI. It is now available in Adobe Connect via the XML-API's (which you can view by appending "mode=xml" to the URL field for viewing). The XML-API that is called is the "report-quiz-takers".
For the code change - you'll want to edit the ConnectAICC.js file in your favorite text editor.
- Search for "formatTime" references
- Note there are only two parameters passed to the formatTime method. There should be four parameters. For example, in this example:
formatTime((timeExited_int - timeEntered_int)/1000, 2);
should look like this:
formatTime((timeExited_int - timeEntered_int)/1000, "", "", 2);
- Add two empty "" parameters to the formatTime - such that type variable is the forth item in the request.
After making this change - you won't see the actual values you passed in the Time Taken field (that's the time that Adobe Connect determines on its own). You are looking for "AICC Time" (or actually time-aicc) in the resulting XML file.
Hope that makes sense.
Regards,
Andrew
Offline
#5 2010-09-01 14:10:51
- acomeau
- Member Rank:
New Member
What's This - Posts: 3
Re: Updating time spent on content via JavaScript
Thanks for your speedy response, Andrew!
I made the JS update, added "&mode=xml" to the URL and found the time-aicc attribute in the XML data.
It worked as expected with the first user. When I added a second user and spent some time in the course, the second user's time updated the time-aicc for both users' rows in the XML. Is this what is supposed to happen? time-aicc seems to be a total of all users' time in the course, rather than each user's total time in the course.
Thanks again,
-Asia
Last edited by acomeau (2010-09-01 14:11:30)
Offline
#6 2010-09-01 14:55:31
- AChemey
- Member Rank:
Participant
What's This - Posts: 83
Re: Updating time spent on content via JavaScript
Asia,
I don't always review the forums. My participation, including the articles I write, are usually on my own time, when I have it...
time-aicc should NOT be the accumulation of all users. That behavior was something that should have already been addressed, but I can still see it exists on at least one cluster. I'll have to look into it.
-Andrew
Offline


