Adobe Connect User Community
Menu

#1 2009-04-30 09:19:55

**_tastoHelp_**

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.

Offline

#2 2010-03-10 07:20:13

**_Mattc_**

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 15:05:28

**_acomeau_**

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 13:28:27

**_AChemey_**

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 16:10:51

**_acomeau_**

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 16:11:30)

Offline

#6 2010-09-01 16:55:31

**_AChemey_**

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

#7 2012-09-10 03:35:39

**_vogloblinsky_**

Re: Updating time spent on content via JavaScript

Hi, i updated the topic for an AICC debug session.
I have a course in Adobe Connect Pro.
I used the js files from tutorial to talk to LMS for an AICC course.
I can update the status and the score, but not the time spent in the AU.
And the answer from the LMS doesn't contain core.time:


error=0
error_text=none
aicc_data=
[CORE]
STUDENT_ID=1090174248
STUDENT_NAME=Regards, User
LESSON_LOCATION=null
CREDIT=
LESSON_MODE=
LESSON_STATUS=NEW
SCORE=
[Core_Lesson]
acStatus=incomplete
acLocation=
acScore=0,100,0
acData=
[CORE_VENDOR]

Did i miss something ?

Offline

#8 2012-09-10 07:53:06

**_vogloblinsky_**

Re: Updating time spent on content via JavaScript

Ok found the problem : there is no problem, Adobe Connect save fine my time given in putparam ; i finally find the time in reports view ...

Offline

Board footer