echo "<tr><td class='launch_headerName' colspan='2'>Launch Instances</td>"; echo "<td class='launch_time'>Launch Time</td>"; echo "<td class='launch_duration'>Duration</td></tr></table>"; echo '<div id="historyDetails" class="history_details" runat="server">'; echo "<div class='launch_list'>"; $idx = 1; foreach ($resultArray as $result) { $lid = $result->getId(); //echo var_dump($result).'<br/>'; echo "<div class='LaunchPlaceHolder' id='launch_" . $result->getId() . "' regid='" . $regid . "'>"; echo "<div class='hide_show_div' >"; echo "<table>"; echo "<tr><td class='launch_listPrefix'>+</td>"; echo "<td class='launch_index'>" . $idx . ".</td>"; echo "<td class='launch_time'>" . cloud_formatHistoryTime($result->getLaunchTime()) . "</td>"; echo "<td class='launch_duration'><script>document.write(fmtDuration(" . (cloud_convertTimeToInt($result->getExitTime()) - cloud_convertTimeToInt($result->getLaunchTime())) * 1000 . "))</script></td>"; echo "</tr></table>"; echo "</div>"; echo "<div class='launch_activity_list'><div id='receiver' class='div_receiver'></div></div>"; echo "</div>"; $idx++; } echo " </div>"; echo '</div></div>'; //echo $regService->GetLaunchInfo($lid); Display::display_footer(); function cloud_formatHistoryTime($timestr) { //2009-08-19T18:41:33.257+0000 $dt = substr($timestr, 5, 2) . '/' . substr($timestr, 8, 2) . '/' . substr($timestr, 0, 4); $hr = (int) substr($timestr, 11, 2);
function cloud_getCourseLaunchTime($regid) { $ScormService = cloud_getScormEngineService(); $regService = $ScormService->getRegistrationService(); $resultArray = $regService->GetLaunchHistory($regid); if (count($resultArray) > 0) { return cloud_convertTimeToInt($resultArray[0]->getLaunchTime()); } }