$dp = @opendir($dir); while (($filedir = readdir($dp)) !== false) { if ($filedir == '.' or $filedir == '..') { continue; } if (preg_match('/^course_file([0-9]+)$/', $filedir, $matches)) { $ilLog->write('DB Migration 1032: Found file: ' . $filedir . ' with course_id: ' . $matches[1]); $fss_course = new ilFSStorageCourse($matches[1]); $fss_course->initInfoDirectory(); if (@is_dir($info_dir = ilUpdateUtils::getDataDir() . '/course/' . $filedir)) { $dp2 = @opendir($info_dir); while (($file = readdir($dp2)) !== false) { if ($file == '.' or $file == '..') { continue; } $fss_course->rename($from = ilUpdateUtils::getDataDir() . '/course/' . $filedir . '/' . $file, $to = $fss_course->getInfoDirectory() . '/' . $file); $ilLog->write('DB Migration 1032: Renamed: ' . $from . ' to: ' . $to); } } } } } ?> <#1033> CREATE TABLE cmi_comment(`cmi_comment_id` INTEGER PRIMARY KEY AUTO_INCREMENT, `cmi_node_id` INTEGER, `comment` TEXT, `timestamp` VARCHAR(20), `location` VARCHAR(255), `sourceIsLMS` TINYINT ); CREATE INDEX cmi_comment_id ON cmi_comment(cmi_comment_id); CREATE INDEX cmi_id ON cmi_comment(cmi_node_id); CREATE TABLE cmi_correct_response(`cmi_correct_response_id` INTEGER PRIMARY KEY AUTO_INCREMENT, `cmi_interaction_id` INTEGER, `pattern` VARCHAR(255) ); CREATE INDEX cmi_correct_response_id ON cmi_correct_response(cmi_correct_response_id);
/** * Read path info * * @access private */ private function init() { switch ($this->storage_type) { case self::STORAGE_DATA: $this->path = ilUpdateUtils::getDataDir(); break; case self::STORAGE_WEB: $this->path = ilUpdateUtils::getWebspaceDir(); break; } $this->path = ilUpdateUtils::removeTrailingPathSeparators($this->path); $this->path .= '/'; // Append path prefix $this->path .= $this->getPathPrefix() . '/'; if ($this->path_conversion) { if ($path_id = self::_createPathFromId($this->container_id, $this->getPathPostfix())) { $this->path = $this->path . '/' . $path_id; $this->path .= '/'; $this->short_path = $this->path; } else { $this->short_path = $this->path; } $this->path .= $this->getPathPostfix() . '_' . $this->container_id; } else { $this->short_path = $this->path; $this->path .= $this->getPathPostfix() . '_' . $this->container_id; } return true; }