29 $b_storeObjectives=
'false';
30 if ($slm_obj->getObjectives()) {
31 $b_storeObjectives=
'true';
33 $b_storeInteractions=
'false';
34 if ($slm_obj->getInteractions()) {
35 $b_storeInteractions=
'true';
37 $b_readInteractions=
'false';
38 $c_storeSessionTime=
's';
39 if ($slm_obj->getTime_from_lms()) {
40 $c_storeSessionTime=
'i';
42 $i_lessonScoreMax=
'-1';
43 $i_lessonMasteryScore=$slm_obj->getMasteryScore();
46 $b_messageLog=
'false';
47 if ($ilLog->current_log_level == 30) {
51 if (
$_GET[
"autolaunch"] !=
"") {
52 $launchId=
$_GET[
"autolaunch"];
55 if ($slm_obj->getSession()) {
56 require_once(
'./Services/WebAccessChecker/classes/class.ilWACSignedPath.php');
59 if ($session_timeout > $max_idle) {
60 $session_timeout = $max_idle;
63 if ($session_timeout > $min_idle) {
64 $session_timeout = $min_idle;
66 $session_timeout -= 10;
68 $b_autoReview=
'false';
69 if ($slm_obj->getAutoReview()) {
72 $b_autoSuspend=
'false';
73 if ($slm_obj->getAutoSuspend()) {
74 $b_autoSuspend=
'true';
77 if ($slm_obj->getDebug()) {
80 $b_autoContinue=
'false';
81 if ($slm_obj->getAutoContinue()) {
82 $b_autoContinue=
'true';
84 $b_checkSetValues=
'false';
85 if ($slm_obj->getCheck_values()) {
86 $b_checkSetValues=
'true';
88 $b_autoLastVisited=
'false';
89 if ($slm_obj->getAuto_last_visited()) {
90 $b_autoLastVisited=
'true';
91 if ($launchId ==
'0') {
92 $launchId=$slm_obj->getLastVisited($ilUser->getID());
96 $b_sessionDeactivated=
'false';
97 if ($slm_obj->getSessionDeactivated()) {
98 $b_sessionDeactivated=
'true';
104 $val_set = $ilDB->queryF(
106 SELECT sc_item.obj_id,prereq_type,prerequisites,maxtimeallowed,timelimitaction,datafromlms,masteryscore 107 FROM sc_item, scorm_object 108 WHERE scorm_object.obj_id=sc_item.obj_id 109 AND scorm_object.c_type = %s 110 AND scorm_object.slm_id = %s',
111 array(
'text',
'integer'),
112 array(
'sit',$slm_obj->getId())
114 while ($val_rec = $ilDB->fetchAssoc($val_set)) {
115 if ($val_rec[
"prereq_type"]!=null || $val_rec[
"prerequisites"]!=null || $val_rec[
"maxtimeallowed"]!=null || $val_rec[
"timelimitaction"]!=null || $val_rec[
"datafromlms"]!=null || $val_rec[
"masteryscore"]!=null) {
116 $tmp_man=
array((
int) $val_rec[
"obj_id"],null,null,null,null,null,null);
117 if ($val_rec[
"prereq_type"]!=null) {
118 $tmp_man[1]=self::encodeURIComponent($val_rec[
"prereq_type"]);
120 if ($val_rec[
"prerequisites"]!=null) {
121 $tmp_man[2]=self::encodeURIComponent($val_rec[
"prerequisites"]);
123 if ($val_rec[
"maxtimeallowed"]!=null) {
124 $tmp_man[3]=self::encodeURIComponent($val_rec[
"maxtimeallowed"]);
126 if ($val_rec[
"timelimitaction"]!=null) {
127 $tmp_man[4]=self::encodeURIComponent($val_rec[
"timelimitaction"]);
129 if ($val_rec[
"datafromlms"]!=null) {
130 $tmp_man[5]=self::encodeURIComponent($val_rec[
"datafromlms"]);
132 if ($val_rec[
"masteryscore"]!=null) {
133 $tmp_man[6]=self::encodeURIComponent($val_rec[
"masteryscore"]);
140 .
'"refId":' .
$_GET[
"ref_id"] .
',' 141 .
'"objId":' . $slm_obj->getId() .
',' 142 .
'"clientId":"' . CLIENT_ID .
'",' 143 .
'"launchId":' . $launchId .
',' 145 .
'"pingSession":' . $session_timeout .
',' 146 .
'"studentId":"' . $slm_obj->getApiStudentId() .
'",' 147 .
'"studentName":"' . self::encodeURIComponent($slm_obj->getApiStudentName()) .
'",' 148 .
'"studentLogin":"' . self::encodeURIComponent($ilias->account->getLogin()) .
'",' 149 .
'"studentOu":"' . self::encodeURIComponent($ilias->account->getDepartment()) .
'",' 150 .
'"credit":"' . str_replace(
"_",
"-", $slm_obj->getCreditMode()) .
'",' 151 .
'"lesson_mode":"' . $slm_obj->getDefaultLessonMode() .
'",' 152 .
'"b_autoReview":' . $b_autoReview .
',' 153 .
'"b_autoSuspend":' . $b_autoSuspend .
',' 154 .
'"b_messageLog":' . $b_messageLog .
',' 155 .
'"b_checkSetValues":' . $b_checkSetValues .
',' 156 .
'"b_storeObjectives":' . $b_storeObjectives .
',' 157 .
'"b_storeInteractions":' . $b_storeInteractions .
',' 158 .
'"b_readInteractions":' . $b_readInteractions .
',' 159 .
'"c_storeSessionTime":"' . $c_storeSessionTime .
'",' 160 .
'"b_autoContinue":' . $b_autoContinue .
',' 161 .
'"b_autoLastVisited":' . $b_autoLastVisited .
',' 162 .
'"b_sessionDeactivated":' . $b_sessionDeactivated .
',' 163 .
'"i_lessonScoreMax":' . $i_lessonScoreMax .
',' 164 .
'"i_lessonMasteryScore":"' . $i_lessonMasteryScore .
'",' 165 .
'"b_debug":' . $b_debug .
',' 166 .
'"a_itemParameter":' . json_encode($a_man) .
',' 167 .
'"status":' . json_encode(self::getStatus($slm_obj->getId(), $ilUser->getID(), $slm_obj->getAuto_last_visited())) .
',' 168 .
'"dataDirectory":"' . self::encodeURIComponent($slm_obj->getDataDirectory(
"output") .
'/') .
'",' 172 .
'"completed":"' . self::encodeURIComponent(
ilUtil::getImagePath(
'scorm/completed.svg')) .
'",' 174 .
'"incomplete":"' . self::encodeURIComponent(
ilUtil::getImagePath(
'scorm/incomplete.svg')) .
'",' 175 .
'"not_attempted":"' . self::encodeURIComponent(
ilUtil::getImagePath(
'scorm/not_attempted.svg')) .
'",' 180 .
'"wait":"' . self::encodeURIComponent($lng->txt(
"please_wait")) .
'",' 181 .
'"status":"' . self::encodeURIComponent($lng->txt(
"cont_status")) .
'",' 182 .
'"browsed":"' . self::encodeURIComponent($lng->txt(
"cont_sc_stat_browsed")) .
'",' 183 .
'"completed":"' . self::encodeURIComponent($lng->txt(
"cont_sc_stat_completed")) .
'",' 184 .
'"failed":"' . self::encodeURIComponent($lng->txt(
"cont_sc_stat_failed")) .
'",' 185 .
'"incomplete":"' . self::encodeURIComponent($lng->txt(
"cont_sc_stat_incomplete")) .
'",' 186 .
'"not_attempted":"' . self::encodeURIComponent($lng->txt(
"cont_sc_stat_not_attempted")) .
'",' 187 .
'"passed":"' . self::encodeURIComponent($lng->txt(
"cont_sc_stat_passed")) .
'",' 188 .
'"running":"' . self::encodeURIComponent($lng->txt(
"cont_sc_stat_running")) .
'"' static getCookieMaxLifetimeInSeconds()
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static getIdleValue($fixedMode=false)
Returns the idle time in seconds.
Create styles array
The data for the language used.