4include_once 
'./Modules/ScormAicc/classes/class.ilObjSCORMLearningModule.php';
 
   21        $query = 
'SELECT obj_id, title  
   23                                WHERE slm_id = %s AND c_type = %s';
 
   26            array(
'integer', 
'text'),
 
   30            $scoTitles[$row[
'obj_id']] = $row[
'title'];
 
   40        include_once 
'Services/Object/classes/class.ilObjectLP.php';
 
   42        $collection = $olp->getCollectionInstance();
 
   44        foreach ($a_scos as $sco_id => $value) {
 
   45            if ($collection && $collection->isAssignedEntry($sco_id)) {
 
   46                $a_scos[$sco_id] = 
$lng->txt(
'yes');
 
   48                $a_scos[$sco_id] = 
$lng->txt(
'no');
 
   57        if ($b_allowExportPrivacy == 
false) {
 
   58            $userArray[
"user"] = $user;
 
   62            $userArray[
"login"] = 
"";
 
   63            $userArray[
"user"] = 
"";
 
   64            $userArray[
"email"] = 
"";
 
   65            $userArray[
"department"] = 
"";
 
   68                $userArray[
"login"] = $e_user->getLogin();
 
   69                $userArray[
"user"] = $e_user->getLastname() . 
', ' . $e_user->getFirstname();
 
   70                $userArray[
"email"] = 
"" . $e_user->getEmail();
 
   71                $userArray[
"department"] = 
"" . $e_user->getDepartment();
 
   78    public function getScormTrackingValue($obj_id, $a_user = array(), $a_sco = array(), $a_empty = array(), $lvalue)
 
   83        $query = 
'SELECT user_id, sco_id, rvalue ' 
   84            . 
'FROM scorm_tracking ' 
   85            . 
'WHERE obj_id = %s ' 
   86            . 
'AND ' . 
$ilDB->in(
'user_id', $a_user, 
false, 
'integer') . 
' ' 
   87            . 
'AND ' . 
$ilDB->in(
'sco_id', $a_sco, 
false, 
'integer') . 
' ' 
   91            array(
'integer',
'text'),
 
   92            array($obj_id,$lvalue)
 
   95            if (!is_null(
$data[
'rvalue'])) {
 
  107        $query = 
'SELECT user_id, sco_id, rvalue ' 
  108            . 
'FROM scorm_tracking ' 
  109            . 
'WHERE obj_id = %s ' 
  110            . 
'AND ' . 
$ilDB->in(
'user_id', $a_user, 
false, 
'integer') . 
' ' 
  111            . 
'AND ' . 
$ilDB->in(
'sco_id', $a_sco, 
false, 
'integer') . 
' ' 
  115            array(
'integer',
'text'),
 
  116            array($obj_id,
'cmi.' . $topic . 
'.' . $counter . 
'.' . $lvalue)
 
  119            if (!is_null(
$data[
'rvalue'])) {
 
  120                $a_return[
'' . 
$data[
'user_id'] . 
'-' . 
$data[
'sco_id'] . 
'-' . $counter] = 
$data[
'rvalue'];
 
  130        $lng->loadLanguageModule(
"scormtrac");
 
  136            'lm_id,lm_title,identifierref,sco_id,sco_marked_for_learning_progress,sco_title,' . $udh[
"cols"]
 
  137            . 
',c_timestamp,lvalue,rvalue' 
  139        $a_true = explode(
',', $udh[
"default"] . 
",identifierref,c_timestamp,lvalue,rvalue");
 
  140        for (
$i = 0;
$i < count($a_cols);
$i++) {
 
  141            $cols[$a_cols[
$i]] = array(
"txt" => 
$lng->txt($a_cols[
$i]),
"default" => 
false);
 
  143        for (
$i = 0;
$i < count($a_true);
$i++) {
 
  144            $cols[$a_true[
$i]][
"default"] = 
true;
 
  149    public function exportSelectedRaw($a_user = array(), $a_sco = array(), $b_orderBySCO = 
false, $allowExportPrivacy = 
false, $obj_id, $lmTitle)
 
  154        $lng->loadLanguageModule(
"scormtrac");
 
  156        $returnData = array();
 
  162        $query = 
'SELECT user_id, st.obj_id, sco_id, identifierref, c_timestamp, lvalue, rvalue ' 
  163            . 
'FROM scorm_tracking st ' 
  164            . 
'JOIN sc_item si ON st.sco_id = si.obj_id ' 
  165            . 
'WHERE ' . 
$ilDB->in(
'sco_id', $a_sco, 
false, 
'integer') . 
' ' 
  166            . 
'AND ' . 
$ilDB->in(
'user_id', $a_user, 
false, 
'integer') . 
' ' 
  170            $query .= 
'sco_id, user_id';
 
  172            $query .= 
'user_id, sco_id';
 
  176            $data[
"lm_id"] = $obj_id;
 
  177            $data[
"lm_title"] = $lmTitle;
 
  178            $data = array_merge(
$data, self::userDataArrayForExport(
$data[
"user_id"], $allowExportPrivacy));
 
  179            $data[
"sco_marked_for_learning_progress"] = $scoProgress[
$data[
"sco_id"]];
 
  180            $data[
"sco_title"] = $scoTitles[
$data[
"sco_id"]];
 
  183            $returnData[] = 
$data;
 
  193        $lng->loadLanguageModule(
"scormtrac");
 
  199            'lm_id,lm_title,sco_id,sco_marked_for_learning_progress,sco_title,' . $udh[
"cols"]
 
  200            . 
',lesson_status,credit,c_entry,c_exit,c_max,c_min,c_raw,session_time,total_time,c_timestamp,suspend_data,launch_data' 
  202        $a_true = explode(
',', $udh[
"default"] . 
",sco_title,lesson_status");
 
  203        for (
$i = 0;
$i < count($a_cols);
$i++) {
 
  204            $cols[$a_cols[
$i]] = array(
"txt" => 
$lng->txt($a_cols[
$i]),
"default" => 
false);
 
  206        for (
$i = 0;
$i < count($a_true);
$i++) {
 
  207            $cols[$a_true[
$i]][
"default"] = 
true;
 
  212    public function exportSelectedCore($a_user = array(), $a_sco = array(), $b_orderBySCO = 
false, $allowExportPrivacy = 
false, $obj_id, $lmTitle)
 
  217        $lng->loadLanguageModule(
"scormtrac");
 
  219        $returnData = array();
 
  227        for (
$i = 0; 
$i < count($a_user); 
$i++) {
 
  228            $a_empty[$a_user[
$i]] = array();
 
  232        $query = 
'SELECT user_id, sco_id, max(c_timestamp) as c_timestamp ' 
  233            . 
'FROM scorm_tracking ' 
  234            . 
'WHERE ' . 
$ilDB->in(
'sco_id', $a_sco, 
false, 
'integer') . 
' ' 
  235            . 
'AND ' . 
$ilDB->in(
'user_id', $a_user, 
false, 
'integer') . 
' ' 
  236            . 
'GROUP BY user_id, sco_id ' 
  239            $query .= 
'sco_id, user_id';
 
  241            $query .= 
'user_id, sco_id';
 
  246            $a_empty[$row[
"user_id"]][$row[
"sco_id"]] = 
"";
 
  261        foreach ($dbdata as 
$data) {
 
  262            $data[
"lm_id"] = $obj_id;
 
  263            $data[
"lm_title"] = $lmTitle;
 
  265            $data = array_merge(
$data, self::userDataArrayForExport(
$data[
"user_id"], $allowExportPrivacy));
 
  267            $data[
"sco_marked_for_learning_progress"] = $scoProgress[
$data[
"sco_id"]];
 
  268            $data[
"sco_title"] = $scoTitles[
$data[
"sco_id"]];
 
  272            $data[
"lesson_status"] = $a_lesson_status[
$data[
'user_id']][
$data[
'sco_id']];
 
  283            $data[
"session_time"] = $a_session_time[
$data[
'user_id']][
$data[
'sco_id']];
 
  286            $data[
"total_time"] = $a_total_time[
$data[
'user_id']][
$data[
'sco_id']];
 
  290            $data[
"suspend_data"] = $a_suspend_data[
$data[
'user_id']][
$data[
'sco_id']];
 
  291            $data[
"launch_data"] = $a_launch_data[
$data[
'user_id']][
$data[
'sco_id']];
 
  292            $returnData[] = 
$data;
 
  302        $lng->loadLanguageModule(
"scormtrac");
 
  307            'lm_id,lm_title,sco_id,sco_marked_for_learning_progress,sco_title,' . $udh[
"cols"]
 
  308            . 
',counter,id,weighting,type,result,student_response,latency,time,c_timestamp' 
  310        $a_true = explode(
',', $udh[
"default"] . 
",sco_title,id,result,student_response");
 
  311        for (
$i = 0;
$i < count($a_cols);
$i++) {
 
  312            $cols[$a_cols[
$i]] = array(
"txt" => 
$lng->txt($a_cols[
$i]),
"default" => 
false);
 
  314        for (
$i = 0;
$i < count($a_true);
$i++) {
 
  315            $cols[$a_true[
$i]][
"default"] = 
true;
 
  320    public function exportSelectedInteractions($a_user = array(), $a_sco = array(), $b_orderBySCO = 
false, $allowExportPrivacy = 
false, $obj_id, $lmTitle)
 
  325        $returnData = array();
 
  333        $interactionsCounter = array();
 
  336        $query = 
'SELECT user_id, sco_id, lvalue, c_timestamp ' 
  337            . 
'FROM scorm_tracking ' 
  338            . 
'WHERE obj_id = %s AND ' . 
$ilDB->in(
'sco_id', $a_sco, 
false, 
'integer') . 
' ' 
  339            . 
'AND ' . 
$ilDB->in(
'user_id', $a_user, 
false, 
'integer') . 
' ' 
  340            . 
'AND left(lvalue,17) = %s ' 
  343            $query .= 
'sco_id, user_id, lvalue';
 
  345            $query .= 
'user_id, sco_id, lvalue';
 
  349            array(
'integer',
'text'),
 
  350            array($obj_id,
'cmi.interactions.')
 
  354            $tmpar = explode(
'.', $row[
"lvalue"]);
 
  355            $tmpcounter = $tmpar[2];
 
  356            if (in_array($tmpcounter, $interactionsCounter) == 
false) {
 
  357                $interactionsCounter[] = $tmpcounter;
 
  359            if ($tmpcounter != $prevcounter) {
 
  361                $tmpar[
"user_id"] = $row[
"user_id"];
 
  362                $tmpar[
"sco_id"] = $row[
"sco_id"];
 
  363                $tmpar[
"counter"] = $tmpcounter;
 
  365                $tmpar[
"weighting"] = 
"";
 
  367                $tmpar[
"result"] = 
"";
 
  368                $tmpar[
"student_response"] = 
"";
 
  369                $tmpar[
"latency"] = 
"";
 
  371                $tmpar[
"c_timestamp"] = $row[
"c_timestamp"];
 
  373                $prevcounter = $tmpcounter;
 
  379        $a_weighting = array();
 
  382        $a_student_response = array();
 
  383        $a_latency = array();
 
  385        for (
$i = 0;
$i < count($interactionsCounter);
$i++) {
 
  386            $a_id = array_merge($a_id, self::getScormTrackingValueForInteractionsOrObjectives($obj_id, $a_user, $a_sco, 
'id', $interactionsCounter[
$i], 
'interactions'));
 
  387            $a_weighting = array_merge($a_weighting, self::getScormTrackingValueForInteractionsOrObjectives($obj_id, $a_user, $a_sco, 
'weighting', $interactionsCounter[
$i], 
'interactions'));
 
  388            $a_type = array_merge(
$a_type, self::getScormTrackingValueForInteractionsOrObjectives($obj_id, $a_user, $a_sco, 
'type', $interactionsCounter[
$i], 
'interactions'));
 
  389            $a_result = array_merge($a_result, self::getScormTrackingValueForInteractionsOrObjectives($obj_id, $a_user, $a_sco, 
'result', $interactionsCounter[
$i], 
'interactions'));
 
  390            $a_student_response = array_merge($a_student_response, self::getScormTrackingValueForInteractionsOrObjectives($obj_id, $a_user, $a_sco, 
'student_response', $interactionsCounter[
$i], 
'interactions'));
 
  391            $a_latency = array_merge($a_latency, self::getScormTrackingValueForInteractionsOrObjectives($obj_id, $a_user, $a_sco, 
'latency', $interactionsCounter[
$i], 
'interactions'));
 
  392            $a_time = array_merge($a_time, self::getScormTrackingValueForInteractionsOrObjectives($obj_id, $a_user, $a_sco, 
'time', $interactionsCounter[
$i], 
'interactions'));
 
  394        foreach ($dbdata as 
$data) {
 
  395            $data[
"lm_id"] = $obj_id;
 
  396            $data[
"lm_title"] = $lmTitle;
 
  398            $data = array_merge(
$data, self::userDataArrayForExport(
$data[
"user_id"], $allowExportPrivacy));
 
  400            $data[
"sco_marked_for_learning_progress"] = $scoProgress[
$data[
"sco_id"]];
 
  401            $data[
"sco_title"] = $scoTitles[
$data[
"sco_id"]];
 
  403            $combinedId = 
'' . 
$data[
"user_id"] . 
'-' . 
$data[
"sco_id"] . 
'-' . 
$data[
"counter"];
 
  404            if (array_key_exists($combinedId, $a_id)) {
 
  405                $data[
"id"] = $a_id[$combinedId];
 
  407            if (array_key_exists($combinedId, $a_weighting)) {
 
  408                $data[
"weighting"] = $a_weighting[$combinedId];
 
  410            if (array_key_exists($combinedId, 
$a_type)) {
 
  413            if (array_key_exists($combinedId, $a_result)) {
 
  414                $data[
"result"] = $a_result[$combinedId];
 
  416            if (array_key_exists($combinedId, $a_student_response)) {
 
  417                $data[
"student_response"] = $a_student_response[$combinedId];
 
  419            if (array_key_exists($combinedId, $a_latency)) {
 
  420                $data[
"latency"] = $a_latency[$combinedId];
 
  422            if (array_key_exists($combinedId, $a_time)) {
 
  423                $data[
"time"] = $a_time[$combinedId];
 
  427            $returnData[] = 
$data;
 
  439        $lng->loadLanguageModule(
"scormtrac");
 
  444            'lm_id,lm_title,sco_id,sco_marked_for_learning_progress,sco_title,' . $udh[
"cols"]
 
  445            . 
',counter,id,c_max,c_min,c_raw,ostatus,c_timestamp' 
  447        $a_true = explode(
',', $udh[
"default"] . 
",sco_title,id,c_raw,ostatus");
 
  448        for (
$i = 0;
$i < count($a_cols);
$i++) {
 
  449            $cols[$a_cols[
$i]] = array(
"txt" => 
$lng->txt($a_cols[
$i]),
"default" => 
false);
 
  451        for (
$i = 0;
$i < count($a_true);
$i++) {
 
  452            $cols[$a_true[
$i]][
"default"] = 
true;
 
  457    public function exportSelectedObjectives($a_user = array(), $a_sco = array(), $b_orderBySCO = 
false, $allowExportPrivacy = 
false, $obj_id, $lmTitle)
 
  462        $returnData = array();
 
  470        $objectivesCounter = array();
 
  473        $query = 
'SELECT user_id, sco_id, lvalue, c_timestamp ' 
  474            . 
'FROM scorm_tracking ' 
  475            . 
'WHERE obj_id = %s AND ' . 
$ilDB->in(
'sco_id', $a_sco, 
false, 
'integer') . 
' ' 
  476            . 
'AND ' . 
$ilDB->in(
'user_id', $a_user, 
false, 
'integer') . 
' ' 
  477            . 
'AND left(lvalue,15) = %s ' 
  480            $query .= 
'sco_id, user_id, lvalue';
 
  482            $query .= 
'user_id, sco_id, lvalue';
 
  486            array(
'integer',
'text'),
 
  487            array($obj_id,
'cmi.objectives.')
 
  491            $tmpar = explode(
'.', $row[
"lvalue"]);
 
  492            $tmpcounter = $tmpar[2];
 
  493            if (in_array($tmpcounter, $objectivesCounter) == 
false) {
 
  494                $objectivesCounter[] = $tmpcounter;
 
  496            if ($tmpcounter != $prevcounter) {
 
  498                $tmpar[
"user_id"] = $row[
"user_id"];
 
  499                $tmpar[
"sco_id"] = $row[
"sco_id"];
 
  500                $tmpar[
"counter"] = $tmpcounter;
 
  502                $tmpar[
"c_max"] = 
"";
 
  503                $tmpar[
"c_min"] = 
"";
 
  504                $tmpar[
"c_raw"] = 
"";
 
  505                $tmpar[
"ostatus"] = 
"";
 
  506                $tmpar[
"c_timestamp"] = $row[
"c_timestamp"];
 
  508                $prevcounter = $tmpcounter;
 
  516        for (
$i = 0;
$i < count($objectivesCounter);
$i++) {
 
  517            $a_id = array_merge($a_id, self::getScormTrackingValueForInteractionsOrObjectives($obj_id, $a_user, $a_sco, 
'id', $objectivesCounter[
$i], 
'objectives'));
 
  518            $a_c_max = array_merge($a_c_max, self::getScormTrackingValueForInteractionsOrObjectives($obj_id, $a_user, $a_sco, 
'score.max', $objectivesCounter[
$i], 
'objectives'));
 
  519            $a_c_min = array_merge($a_c_min, self::getScormTrackingValueForInteractionsOrObjectives($obj_id, $a_user, $a_sco, 
'score.min', $objectivesCounter[
$i], 
'objectives'));
 
  520            $a_c_raw = array_merge($a_c_raw, self::getScormTrackingValueForInteractionsOrObjectives($obj_id, $a_user, $a_sco, 
'score.raw', $objectivesCounter[
$i], 
'objectives'));
 
  521            $a_status = array_merge($a_status, self::getScormTrackingValueForInteractionsOrObjectives($obj_id, $a_user, $a_sco, 
'status', $objectivesCounter[
$i], 
'objectives'));
 
  523        foreach ($dbdata as 
$data) {
 
  524            $data[
"lm_id"] = $obj_id;
 
  525            $data[
"lm_title"] = $lmTitle;
 
  527            $data = array_merge(
$data, self::userDataArrayForExport(
$data[
"user_id"], $allowExportPrivacy));
 
  529            $data[
"sco_marked_for_learning_progress"] = $scoProgress[
$data[
"sco_id"]];
 
  530            $data[
"sco_title"] = $scoTitles[
$data[
"sco_id"]];
 
  532            $combinedId = 
'' . 
$data[
"user_id"] . 
'-' . 
$data[
"sco_id"] . 
'-' . 
$data[
"counter"];
 
  533            if (array_key_exists($combinedId, $a_id)) {
 
  534                $data[
"id"] = $a_id[$combinedId];
 
  536            if (array_key_exists($combinedId, $a_c_max)) {
 
  537                $data[
"c_max"] = $a_c_max[$combinedId];
 
  539            if (array_key_exists($combinedId, $a_c_min)) {
 
  540                $data[
"c_min"] = $a_c_min[$combinedId];
 
  542            if (array_key_exists($combinedId, $a_c_raw)) {
 
  543                $data[
"c_raw"] = $a_c_raw[$combinedId];
 
  545            if (array_key_exists($combinedId, $a_status)) {
 
  546                $data[
"ostatus"] = $a_status[$combinedId];
 
  550            $returnData[] = 
$data;
 
  561        $lng->loadLanguageModule(
"scormtrac");
 
  566        $a_cols = explode(
',', 
'LearningModuleId,LearningModuleTitle,LearningModuleVersion,' . $udh[
"cols"]
 
  567            . 
',status,Percentage,Attempts,existingSCOs,startedSCOs,completedSCOs,passedSCOs,roundedTotal_timeSeconds,offline_mode,last_access');
 
  568        $a_true = explode(
',', $udh[
"default"] . 
",LearningModuleTitle,status,Percentage,Attempts");
 
  570        for (
$i = 0;
$i < count($a_cols);
$i++) {
 
  571            $cols[$a_cols[
$i]] = array(
"txt" => 
$lng->txt($a_cols[
$i]),
"default" => 
false);
 
  573        for (
$i = 0;
$i < count($a_true);
$i++) {
 
  574            $cols[$a_true[
$i]][
"default"] = 
true;
 
  579    public function exportSelectedSuccessRows($a_user = array(), $allowExportPrivacy = 
false, $dbdata = array(), $scoCounter, $u_startedSCO, $u_completedSCO, $u_passedSCO, $obj_id, $lmTitle)
 
  581        $returnData = array();
 
  582        foreach ($dbdata as 
$data) {
 
  584            $dat[
"LearningModuleId"] = $obj_id;
 
  585            $dat[
"LearningModuleTitle"] = 
"" . $lmTitle;
 
  586            $dat[
"LearningModuleVersion"] = 
"" . 
$data[
"module_version"];
 
  588            $dat = array_merge($dat, self::userDataArrayForExport(
$data[
"user_id"], $allowExportPrivacy));
 
  590            $dat[
"status"] = 
"" . 
$data[
"status"];
 
  591            $dat[
"Percentage"] = 
"" . 
$data[
"percentage_completed"];
 
  592            $dat[
"Attempts"] = 
"" . 
$data[
"package_attempts"];
 
  593            $dat[
"existingSCOs"] = 
"" . $scoCounter;
 
  594            $dat[
"startedSCOs"] = 
"" . $u_startedSCO[
$data[
"user_id"]];
 
  595            $dat[
"completedSCOs"] = 
"" . $u_completedSCO[
$data[
"user_id"]];
 
  596            $dat[
"passedSCOs"] = 
"" . $u_passedSCO[
$data[
"user_id"]];
 
  597            $dat[
"roundedTotal_timeSeconds"] = 
"" . 
$data[
"sco_total_time_sec"];
 
  598            if (is_null(
$data[
"offline_mode"])) {
 
  599                $dat[
"offline_mode"] = 
"";
 
  601                $dat[
"offline_mode"] = 
$data[
"offline_mode"];
 
  603            $dat[
"last_access"] = 
"" . 
$data[
"last_access"];
 
  604            $returnData[] = $dat;
 
  615        $query = 
'SELECT count(distinct(scorm_object.obj_id)) counter ' 
  616                . 
'FROM scorm_object, sc_item, sc_resource ' 
  617                . 
'WHERE scorm_object.slm_id = %s ' 
  618                . 
'AND scorm_object.obj_id = sc_item.obj_id ' 
  619                . 
'AND sc_item.identifierref = sc_resource.import_id ' 
  620                . 
'AND (sc_resource.scormtype = %s OR sc_resource.scormtype is null)';
 
  623            array(
'integer', 
'text'),
 
  627            $scoCounter = $row[
'counter'];
 
  631        $u_startedSCO = array();
 
  632        $u_completedSCO = array();
 
  633        $u_passedSCO = array();
 
  634        for (
$i = 0; 
$i < count($a_user); 
$i++) {
 
  635            $u_startedSCO[$a_user[
$i]] = 0;
 
  636            $u_completedSCO[$a_user[
$i]] = 0;
 
  637            $u_passedSCO[$a_user[
$i]] = 0;
 
  640        $query = 
'SELECT user_id, count(distinct(SCO_ID)) counter ' 
  641            . 
'FROM scorm_tracking ' 
  642            . 
'WHERE obj_id = %s ' 
  644            . 
'AND ' . 
$ilDB->in(
'user_id', $a_user, 
false, 
'integer') . 
' ' 
  645            . 
'GROUP BY user_id';
 
  652            $u_startedSCO[
$data[
'user_id']] = 
$data[
'counter'];
 
  655        $query = 
'SELECT user_id, count(*) counter ' 
  656                . 
'FROM scorm_tracking ' 
  657                . 
'WHERE obj_id = %s AND lvalue = %s AND rvalue like %s ' 
  658                . 
'AND ' . 
$ilDB->in(
'user_id', $a_user, 
false, 
'integer') . 
' ' 
  659                . 
'GROUP BY user_id';
 
  662            array(
'integer',
'text',
'text'),
 
  663            array($obj_id,
'cmi.core.lesson_status',
'completed')
 
  666            $u_completedSCO[
$data[
'user_id']] = 
$data[
'counter'];
 
  671            array(
'integer',
'text',
'text'),
 
  672            array($obj_id,
'cmi.core.lesson_status',
'passed')
 
  675            $u_passedSCO[
$data[
'user_id']] = 
$data[
'counter'];
 
  680        $query = 
'SELECT * FROM sahs_user WHERE obj_id = ' . 
$ilDB->quote($obj_id, 
'integer')
 
  681            . 
' AND ' . 
$ilDB->in(
'user_id', $a_user, 
false, 
'integer')
 
  682            . 
' ORDER BY user_id';
 
  687        return $this->
exportSelectedSuccessRows($a_user, $allowExportPrivacy, $dbdata, $scoCounter, $u_startedSCO, $u_completedSCO, $u_passedSCO, $obj_id, $lmTitle);
 
  692        include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
 
  694        $allowExportPrivacy = $privacy->enabledExportSCORM();
 
  695        $returnData = array();
 
  696        if ($allowExportPrivacy == 
true) {
 
  697            $returnData[
"cols"] = 
'login,user,email,department';
 
  699            $returnData[
"cols"] = 
'user';
 
  701        $returnData[
"default"] = 
'user';
 
  711        $tarr = explode(
":", $a_time);
 
  713        if (count($tarr) != 3 || is_nan($tarr[0]) || is_nan($tarr[1]) || is_nan($tarr[2])) {
 
  716        $csec = (int) $tarr[0] * 360000 + (
int) $tarr[1] * 6000 + $tarr[2] * 100;
 
  717        return round($csec / 100);
 
An exception for terminatinating execution or to throw for unit testing.
static getInstance($a_obj_id)
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data@access public
static _getInstance()
Get instance of ilPrivacySettings.
Class ilSCORMTrackingItems.
exportSelectedObjectives($a_user=array(), $a_sco=array(), $b_orderBySCO=false, $allowExportPrivacy=false, $obj_id, $lmTitle)
exportSelectedSuccess($a_user=array(), $allowExportPrivacy=false, $obj_id, $lmTitle)
exportSelectedSuccessRows($a_user=array(), $allowExportPrivacy=false, $dbdata=array(), $scoCounter, $u_startedSCO, $u_completedSCO, $u_passedSCO, $obj_id, $lmTitle)
static exportSelectedSuccessColumns()
scoTitlesForExportSelected($obj_id)
static exportSelectedObjectivesColumns()
getScormTrackingValueForInteractionsOrObjectives($obj_id, $a_user=array(), $a_sco=array(), $lvalue, $counter, $topic)
exportSelectedCore($a_user=array(), $a_sco=array(), $b_orderBySCO=false, $allowExportPrivacy=false, $obj_id, $lmTitle)
static exportSelectedRawColumns()
exportSelectedRaw($a_user=array(), $a_sco=array(), $b_orderBySCO=false, $allowExportPrivacy=false, $obj_id, $lmTitle)
SCORMTimeToSeconds($a_time)
static userDataHeaderForExport()
static exportSelectedCoreColumns($b_orderBySCO, $b_allowExportPrivacy)
static exportSelectedInteractionsColumns()
static userDataArrayForExport($user, $b_allowExportPrivacy=false)
markedLearningStatusForExportSelected($a_scos, $obj_id)
getScormTrackingValue($obj_id, $a_user=array(), $a_sco=array(), $a_empty=array(), $lvalue)
exportSelectedInteractions($a_user=array(), $a_sco=array(), $b_orderBySCO=false, $allowExportPrivacy=false, $obj_id, $lmTitle)
foreach($_POST as $key=> $value) $res