28 $b_storeObjectives=
'false';
29 if ($slm_obj->getObjectives()) $b_storeObjectives=
'true';
30 $b_storeInteractions=
'false';
31 if ($slm_obj->getInteractions()) $b_storeInteractions=
'true';
32 $b_readInteractions=
'false';
33 $c_storeSessionTime=
's';
34 if ($slm_obj->getTime_from_lms()) $c_storeSessionTime=
'i';
35 $i_lessonScoreMax=
'-1';
36 $i_lessonMasteryScore=$slm_obj->getMasteryScore();
39 $b_messageLog=
'false';
40 if ($ilLog->current_log_level == 30) $b_messageLog=
'true';
42 if (
$_GET[
"autolaunch"] !=
"") $launchId=
$_GET[
"autolaunch"];
44 if ($slm_obj->getSession()) {
45 require_once(
'./Services/WebAccessChecker/classes/class.ilWACSignedPath.php');
48 if ($session_timeout > $max_idle) $session_timeout = $max_idle;
50 if ($session_timeout > $min_idle) $session_timeout = $min_idle;
51 $session_timeout -= 10;
53 $b_autoReview=
'false';
54 if ($slm_obj->getAutoReview()) $b_autoReview=
'true';
56 if ($slm_obj->getDebug()) $b_debug=
'true';
57 $b_autoContinue=
'false';
58 if ($slm_obj->getAutoContinue()) $b_autoContinue=
'true';
59 $b_checkSetValues=
'false';
60 if ($slm_obj->getCheck_values()) $b_checkSetValues=
'true';
61 $b_autoLastVisited=
'false';
62 if ($slm_obj->getAuto_last_visited()) {
63 $b_autoLastVisited=
'true';
64 if ($launchId ==
'0') $launchId=$slm_obj->getLastVisited($ilUser->getID());
67 $b_sessionDeactivated=
'false';
68 if ($slm_obj->getSessionDeactivated()) $b_sessionDeactivated=
'true';
73 $val_set = $ilDB->queryF(
' 74 SELECT sc_item.obj_id,prereq_type,prerequisites,maxtimeallowed,timelimitaction,datafromlms,masteryscore 75 FROM sc_item, scorm_object 76 WHERE scorm_object.obj_id=sc_item.obj_id 77 AND scorm_object.c_type = %s 78 AND scorm_object.slm_id = %s',
79 array(
'text',
'integer'),
80 array(
'sit',$slm_obj->getId())
82 while($val_rec = $ilDB->fetchAssoc($val_set)) {
83 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) {
84 $tmp_man=
array((
int)$val_rec[
"obj_id"],null,null,null,null,null,null);
85 if($val_rec[
"prereq_type"]!=null) $tmp_man[1]=self::encodeURIComponent($val_rec[
"prereq_type"]);
86 if($val_rec[
"prerequisites"]!=null) $tmp_man[2]=self::encodeURIComponent($val_rec[
"prerequisites"]);
87 if($val_rec[
"maxtimeallowed"]!=null) $tmp_man[3]=self::encodeURIComponent($val_rec[
"maxtimeallowed"]);
88 if($val_rec[
"timelimitaction"]!=null) $tmp_man[4]=self::encodeURIComponent($val_rec[
"timelimitaction"]);
89 if($val_rec[
"datafromlms"]!=null) $tmp_man[5]=self::encodeURIComponent($val_rec[
"datafromlms"]);
90 if($val_rec[
"masteryscore"]!=null) $tmp_man[6]=self::encodeURIComponent($val_rec[
"masteryscore"]);
96 .
'"refId":'.
$_GET[
"ref_id"].
',' 97 .
'"objId":'.$slm_obj->getId().
',' 98 .
'"clientId":"'.CLIENT_ID.
'",' 99 .
'"launchId":'.$launchId.
',' 101 .
'"pingSession":'. $session_timeout.
',' 102 .
'"studentId":'.$ilias->account->getId().
',' 103 .
'"studentName":"'.self::encodeURIComponent($ilias->account->getLastname().
', '.$ilias->account->getFirstname()).
'",' 104 .
'"studentLogin":"'.self::encodeURIComponent($ilias->account->getLogin()).
'",' 105 .
'"studentOu":"'.self::encodeURIComponent($ilias->account->getDepartment()).
'",' 106 .
'"credit":"'.str_replace(
"_",
"-", $slm_obj->getCreditMode()).
'",' 107 .
'"lesson_mode":"'.$slm_obj->getDefaultLessonMode().
'",' 108 .
'"b_autoReview":'.$b_autoReview.
',' 109 .
'"b_messageLog":'.$b_messageLog.
',' 110 .
'"b_checkSetValues":'.$b_checkSetValues.
',' 111 .
'"b_storeObjectives":'.$b_storeObjectives.
',' 112 .
'"b_storeInteractions":'.$b_storeInteractions.
',' 113 .
'"b_readInteractions":'.$b_readInteractions.
',' 114 .
'"c_storeSessionTime":"'.$c_storeSessionTime.
'",' 115 .
'"b_autoContinue":'.$b_autoContinue.
',' 116 .
'"b_autoLastVisited":'.$b_autoLastVisited.
',' 117 .
'"b_sessionDeactivated":'.$b_sessionDeactivated.
',' 118 .
'"i_lessonScoreMax":'.$i_lessonScoreMax.
',' 119 .
'"i_lessonMasteryScore":"'.$i_lessonMasteryScore.
'",' 120 .
'"b_debug":'.$b_debug.
',' 121 .
'"a_itemParameter":'.json_encode($a_man).
',' 122 .
'"status":'.json_encode(self::getStatus($slm_obj->getId(), $ilUser->getID(), $slm_obj->getAuto_last_visited())).
',' 123 .
'"dataDirectory":"'.self::encodeURIComponent($slm_obj->getDataDirectory(
"output").
'/').
'",' 130 .
'"not_attempted":"'.self::encodeURIComponent(
ilUtil::getImagePath(
'scorm/not_attempted.svg')).
'",' 135 .
'"wait":"'.self::encodeURIComponent($lng->txt(
"please_wait")).
'",' 136 .
'"status":"'.self::encodeURIComponent($lng->txt(
"cont_status")).
'",' 137 .
'"browsed":"'.self::encodeURIComponent($lng->txt(
"cont_sc_stat_browsed")).
'",' 138 .
'"completed":"'.self::encodeURIComponent($lng->txt(
"cont_sc_stat_completed")).
'",' 139 .
'"failed":"'.self::encodeURIComponent($lng->txt(
"cont_sc_stat_failed")).
'",' 140 .
'"incomplete":"'.self::encodeURIComponent($lng->txt(
"cont_sc_stat_incomplete")).
'",' 141 .
'"not_attempted":"'.self::encodeURIComponent($lng->txt(
"cont_sc_stat_not_attempted")).
'",' 142 .
'"passed":"'.self::encodeURIComponent($lng->txt(
"cont_sc_stat_passed")).
'",' 143 .
'"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.