| Línea 179... | 
            Línea 179... | 
          
          
            | 179 | 
                                    } else {
  | 
            179 | 
                                    } else {
  | 
          
          
            | 180 | 
                                        echo 'Time='.'00:00:00'."\r\n";
  | 
            180 | 
                                        echo 'Time='.'00:00:00'."\r\n";
  | 
          
          
            | 181 | 
                                    }
  | 
            181 | 
                                    }
  | 
          
          
            | 182 | 
                                    echo 'Lesson_Mode='.$userdata->mode."\r\n";
  | 
            182 | 
                                    echo 'Lesson_Mode='.$userdata->mode."\r\n";
  | 
          
          
            | 183 | 
                                    if (isset($userdata->{'cmi.suspend_data'})) {
  | 
            183 | 
                                    if (isset($userdata->{'cmi.suspend_data'})) {
  | 
          
          
            | 184 | 
                                        echo "[Core_Lesson]\r\n".rawurldecode($userdata->{'cmi.suspend_data'})."\r\n";
  | 
            184 | 
                                        $decoded = rawurldecode($userdata->{'cmi.suspend_data'});
  | 
          
          
            | - | 
               | 
            185 | 
                                        $header = "[Core_Lesson]\r\n";
  | 
          
          
            | - | 
               | 
            186 | 
                                        if (stripos($decoded, $header) === 0) {
  | 
          
          
            | - | 
               | 
            187 | 
                                            // The header may have been stored with the content. If it was, trim it off the front.
  | 
          
          
            | - | 
               | 
            188 | 
                                            $decoded = core_text::substr($decoded, core_text::strlen($header));
  | 
          
          
            | - | 
               | 
            189 | 
                                        }
  | 
          
          
            | - | 
               | 
            190 | 
                                        echo "[Core_Lesson]\r\n".$decoded."\r\n";
  | 
          
          
            | 185 | 
                                    } else {
  | 
            191 | 
                                    } else {
  | 
          
          
            | 186 | 
                                        echo "[Core_Lesson]\r\n";
  | 
            192 | 
                                        echo "[Core_Lesson]\r\n";
  | 
          
          
            | 187 | 
                                    }
  | 
            193 | 
                                    }
  | 
          
          
            | 188 | 
                                    echo "[Core_Vendor]\r\n".$userdata->datafromlms."\r\n";
  | 
            194 | 
                                    echo "[Core_Vendor]\r\n".$userdata->datafromlms."\r\n";
  | 
          
          
            | 189 | 
                                    echo "[Evaluation]\r\nCourse_ID = {".$userdata->course_id."}\r\n";
  | 
            195 | 
                                    echo "[Evaluation]\r\nCourse_ID = {".$userdata->course_id."}\r\n";
  | 
          
          
            | Línea 227... | 
            Línea 233... | 
          
          
            | 227 | 
                                                    $multirowelement = $datamodel[strtolower(trim($datarow))];
  | 
            233 | 
                                                    $multirowelement = $datamodel[strtolower(trim($datarow))];
  | 
          
          
            | 228 | 
                                                } else {
  | 
            234 | 
                                                } else {
  | 
          
          
            | 229 | 
                                                    // An element was passed by the external AICC package is not one we care about.
  | 
            235 | 
                                                    // An element was passed by the external AICC package is not one we care about.
  | 
          
          
            | 230 | 
                                                    continue;
  | 
            236 | 
                                                    continue;
  | 
          
          
            | 231 | 
                                                }
  | 
            237 | 
                                                }
  | 
          
          
            | - | 
               | 
            238 | 
                                            } else {
  | 
          
          
            | - | 
               | 
            239 | 
                                                $multirowvalue .= $datarow . "\r\n";
  | 
          
          
            | 232 | 
                                            }
  | 
            240 | 
                                            }
  | 
          
          
            | 233 | 
                                            $multirowvalue .= $datarow."\r\n";
  | 
            - | 
               | 
          
          
            | 234 | 
                                            if (isset($datarows[$did + 1]) && substr($datarows[$did + 1], 0, 1) != '[') {
  | 
            241 | 
                                            if (isset($datarows[$did + 1]) && substr($datarows[$did + 1], 0, 1) != '[') {
  | 
          
          
            | 235 | 
                                                // This is a multiline row, we haven't found the end yet.
  | 
            242 | 
                                                // This is a multiline row, we haven't found the end yet.
  | 
          
          
            | 236 | 
                                                continue;
  | 
            243 | 
                                                continue;
  | 
          
          
            | 237 | 
                                            }
  | 
            244 | 
                                            }
  | 
          
          
            | 238 | 
                                            $value = rawurlencode($multirowvalue);
  | 
            245 | 
                                            $value = rawurlencode($multirowvalue);
  | 
          
          
            | Línea 411... | 
            Línea 418... | 
          
          
            | 411 | 
                                        $v->timemodified = time();
  | 
            418 | 
                                        $v->timemodified = time();
  | 
          
          
            | 412 | 
                                        $DB->update_record('scorm_scoes_value', $v);
  | 
            419 | 
                                        $DB->update_record('scorm_scoes_value', $v);
  | 
          
          
            | 413 | 
                                    } else {
  | 
            420 | 
                                    } else {
  | 
          
          
            | 414 | 
                                        $track = new stdClass();
  | 
            421 | 
                                        $track = new stdClass();
  | 
          
          
            | 415 | 
                                        $track->scoid = $sco->id;
  | 
            422 | 
                                        $track->scoid = $sco->id;
  | 
          
          
            | 416 | 
                                        $track->element = scorm_get_elementid('cmi.core.total_time');
  | 
            423 | 
                                        $track->elementid = scorm_get_elementid('cmi.core.total_time');
  | 
          
          
            | 417 | 
                                        $track->value = $scormsession->sessiontime;
  | 
            424 | 
                                        $track->value = $scormsession->sessiontime;
  | 
          
          
            | 418 | 
                                        $atobject = scorm_get_attempt($aiccuser->id, $scormsession->scormid, $attempt);
  | 
            425 | 
                                        $atobject = scorm_get_attempt($aiccuser->id, $scormsession->scormid, $attempt);
  | 
          
          
            | 419 | 
                                        $track->attempt = $atobject->id;
  | 
            426 | 
                                        $track->attemptid = $atobject->id;
  | 
          
          
            | 420 | 
                                        $track->timemodified = time();
  | 
            427 | 
                                        $track->timemodified = time();
  | 
          
          
            | 421 | 
                                        $id = $DB->insert_record('scorm_scoes_value', $track);
  | 
            428 | 
                                        $id = $DB->insert_record('scorm_scoes_value', $track);
  | 
          
          
            | 422 | 
                                    }
  | 
            429 | 
                                    }
  | 
          
          
            | 423 | 
                                    scorm_update_grades($scorm, $aiccuser->id);
  | 
            430 | 
                                    scorm_update_grades($scorm, $aiccuser->id);
  | 
          
          
            | 424 | 
                                }
  | 
            431 | 
                                }
  |