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=
'-1';
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 $session_timeout = (int)($ilias->ini->readVariable(
"session",
"expire"))/2;
47 $b_autoReview=
'false';
48 if ($slm_obj->getAutoReview()) $b_autoReview=
'true';
50 if ($slm_obj->getDebug()) $b_debug=
'true';
51 $b_autoContinue=
'false';
52 if ($slm_obj->getAutoContinue()) $b_autoContinue=
'true';
53 $b_checkSetValues=
'false';
54 if ($slm_obj->getCheck_values()) $b_checkSetValues=
'true';
55 $b_autoLastVisited=
'false';
56 if ($slm_obj->getAuto_last_visited()) {
57 $b_autoLastVisited=
'true';
58 if ($launchId ==
'0') $launchId=$slm_obj->getLastVisited($ilUser->getID());
64 $val_set = $ilDB->queryF(
' 65 SELECT sc_item.obj_id,prereq_type,prerequisites,maxtimeallowed,timelimitaction,datafromlms,masteryscore 66 FROM sc_item, scorm_object 67 WHERE scorm_object.obj_id=sc_item.obj_id 68 AND scorm_object.c_type = %s 69 AND scorm_object.slm_id = %s',
70 array(
'text',
'integer'),
71 array(
'sit',$slm_obj->getId())
73 while($val_rec = $ilDB->fetchAssoc($val_set)) {
74 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) {
75 $tmp_man=array((
int)$val_rec[
"obj_id"],null,null,null,null,null,null);
76 if($val_rec[
"prereq_type"]!=null) $tmp_man[1]=self::encodeURIComponent($val_rec[
"prereq_type"]);
77 if($val_rec[
"prerequisites"]!=null) $tmp_man[2]=self::encodeURIComponent($val_rec[
"prerequisites"]);
78 if($val_rec[
"maxtimeallowed"]!=null) $tmp_man[3]=self::encodeURIComponent($val_rec[
"maxtimeallowed"]);
79 if($val_rec[
"timelimitaction"]!=null) $tmp_man[4]=self::encodeURIComponent($val_rec[
"timelimitaction"]);
80 if($val_rec[
"datafromlms"]!=null) $tmp_man[5]=self::encodeURIComponent($val_rec[
"datafromlms"]);
81 if($val_rec[
"masteryscore"]!=null) $tmp_man[6]=self::encodeURIComponent($val_rec[
"masteryscore"]);
87 .
'"refId":'.
$_GET[
"ref_id"].
',' 88 .
'"objId":'.$slm_obj->getId().
',' 89 .
'"launchId":'.$launchId.
',' 91 .
'"pingSession":'. $session_timeout.
',' 92 .
'"studentId":'.$ilias->account->getId().
',' 93 .
'"studentName":"'.self::encodeURIComponent($ilias->account->getLastname().
', '.$ilias->account->getFirstname()).
'",' 94 .
'"studentLogin":"'.self::encodeURIComponent($ilias->account->getLogin()).
'",' 95 .
'"studentOu":"'.self::encodeURIComponent($ilias->account->getDepartment()).
'",' 96 .
'"credit":"'.str_replace(
"_",
"-", $slm_obj->getCreditMode()).
'",' 97 .
'"lesson_mode":"'.$slm_obj->getDefaultLessonMode().
'",' 98 .
'"b_autoReview":'.$b_autoReview.
',' 99 .
'"b_messageLog":'.$b_messageLog.
',' 100 .
'"b_checkSetValues":'.$b_checkSetValues.
',' 101 .
'"b_storeObjectives":'.$b_storeObjectives.
',' 102 .
'"b_storeInteractions":'.$b_storeInteractions.
',' 103 .
'"b_readInteractions":'.$b_readInteractions.
',' 104 .
'"c_storeSessionTime":"'.$c_storeSessionTime.
'",' 105 .
'"b_autoContinue":'.$b_autoContinue.
',' 106 .
'"b_autoLastVisited":'.$b_autoLastVisited.
',' 107 .
'"i_lessonScoreMax":'.$i_lessonScoreMax.
',' 108 .
'"i_lessonMasteryScore":'.$i_lessonMasteryScore.
',' 109 .
'"b_debug":'.$b_debug.
',' 110 .
'"a_itemParameter":'.json_encode($a_man).
',' 111 .
'"status":'.json_encode(self::getStatus($slm_obj->getId(), $ilUser->getID())).
',' 112 .
'"dataDirectory":"'.self::encodeURIComponent($slm_obj->getDataDirectory(
"output").
'/').
'",' 119 .
'"not_attempted":"'.self::encodeURIComponent(
ilUtil::getImagePath(
'scorm/not_attempted.png')).
'",' 124 .
'"wait":"'.self::encodeURIComponent($lng->txt(
"please_wait")).
'",' 125 .
'"status":"'.self::encodeURIComponent($lng->txt(
"cont_status")).
'",' 126 .
'"browsed":"'.self::encodeURIComponent($lng->txt(
"cont_sc_stat_browsed")).
'",' 127 .
'"completed":"'.self::encodeURIComponent($lng->txt(
"cont_sc_stat_completed")).
'",' 128 .
'"failed":"'.self::encodeURIComponent($lng->txt(
"cont_sc_stat_failed")).
'",' 129 .
'"incomplete":"'.self::encodeURIComponent($lng->txt(
"cont_sc_stat_incomplete")).
'",' 130 .
'"not_attempted":"'.self::encodeURIComponent($lng->txt(
"cont_sc_stat_not_attempted")).
'",' 131 .
'"passed":"'.self::encodeURIComponent($lng->txt(
"cont_sc_stat_passed")).
'",' 132 .
'"running":"'.self::encodeURIComponent($lng->txt(
"cont_sc_stat_running")).
'"'
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)