-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* reformated code * fixed fatal errors * new code styling * fixed content page errors * new code style Co-authored-by: root <[email protected]> Co-authored-by: Martin Studer <[email protected]>
- Loading branch information
1 parent
c0e3942
commit d7d3900
Showing
155 changed files
with
1,302 additions
and
2,793 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ObjectDefinition xmlns:xi="http://www.w3.org/2001/XInclude" type="dcl" indexType="incremental"> | ||
<Document type="default"> | ||
<xi:include href="../../Services/Object/LuceneDataSource.xml" /> | ||
<xi:include href="../../Services/Tagging/LuceneDataSource.xml" /> | ||
<xi:include href="../../Modules/LearningModule/LucenePageEditorDataSource.xml" /> | ||
<DataSource type="JDBC" action="append"> | ||
<Query> | ||
SELECT 1 as offline FROM il_dcl_data | ||
WHERE is_online = 0 | ||
AND id IN(?) | ||
</Query> | ||
<Param format="list" type="int" value="objId" /> | ||
<Field store="YES" index="NOT_ANALYZED" column="offline" type="text" name="offline" /> | ||
</DataSource> | ||
</Document> | ||
<Document type="default"> | ||
<xi:include href="../../Services/Object/LuceneDataSource.xml"/> | ||
<xi:include href="../../Services/Tagging/LuceneDataSource.xml"/> | ||
<xi:include href="../../Modules/LearningModule/LucenePageEditorDataSource.xml"/> | ||
<DataSource type="JDBC" action="append"> | ||
<Query> | ||
SELECT 1 as offline FROM il_dcl_data | ||
WHERE is_online = 0 | ||
AND id IN(?) | ||
</Query> | ||
<Param format="list" type="int" value="objId"/> | ||
<Field store="YES" index="NOT_ANALYZED" column="offline" type="text" name="offline"/> | ||
</DataSource> | ||
</Document> | ||
</ObjectDefinition> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
/** | ||
* Hook-Class for exporting data-collections (used in SOAP-Class) | ||
* This Class avoids duplicated code by routing the request to the right place | ||
* | ||
* @author Michael Herren <[email protected]> | ||
* @ingroup ModulesDataCollection | ||
*/ | ||
|
@@ -40,7 +39,6 @@ class ilDclContentExporter | |
protected $table; | ||
private \ilGlobalTemplateInterface $main_tpl; | ||
|
||
|
||
public function __construct($ref_id, $table_id = null, $filter = array()) | ||
{ | ||
global $DIC; | ||
|
@@ -58,13 +56,10 @@ public function __construct($ref_id, $table_id = null, $filter = array()) | |
$this->lng = $lng; | ||
} | ||
|
||
|
||
/** | ||
* Sanitize the given filename | ||
* The ilUtil::_sanitizeFilemame() does not clean enough | ||
* | ||
* @param $filename | ||
* | ||
* @return string | ||
*/ | ||
public function sanitizeFilename($filename) | ||
|
@@ -74,23 +69,18 @@ public function sanitizeFilename($filename) | |
return str_replace($dangerous_filename_characters, "_", iconv("utf-8", "ascii//TRANSLIT", $filename)); | ||
} | ||
|
||
|
||
/** | ||
* Return export path | ||
* | ||
* @param $format | ||
* | ||
* @return string | ||
*/ | ||
public function getExportContentPath($format) | ||
{ | ||
return ilExport::_getExportDirectory($this->dcl->getId(), $format, 'dcl') . '/'; | ||
} | ||
|
||
|
||
/** | ||
* Fill a excel row | ||
* | ||
* @param ilDclTable $table | ||
* @param ilExcel $worksheet | ||
* @param ilDclBaseRecordModel $record | ||
|
@@ -106,10 +96,8 @@ protected function fillRowExcel(ilDclTable $table, ilExcel $worksheet, ilDclBase | |
} | ||
} | ||
|
||
|
||
/** | ||
* Fill Excel header | ||
* | ||
* @param ilDclTable $table | ||
* @param ilExcel $worksheet | ||
* @param $row | ||
|
@@ -125,10 +113,8 @@ protected function fillHeaderExcel(ilDclTable $table, ilExcel $worksheet, $row) | |
} | ||
} | ||
|
||
|
||
/** | ||
* Fill Excel meta-data | ||
* | ||
* @param $table | ||
* @param $worksheet | ||
* @param $row | ||
|
@@ -137,14 +123,11 @@ protected function fillMetaExcel($table, $worksheet, $row) | |
{ | ||
} | ||
|
||
|
||
/** | ||
* Creates an export of a specific datacollection table | ||
* | ||
* @param string $format | ||
* @param null $filepath | ||
* @param bool|false $send | ||
* | ||
* @return null|string|void | ||
*/ | ||
public function export($format = self::EXPORT_EXCEL, $filepath = null, $send = false) | ||
|
@@ -221,7 +204,6 @@ public function export($format = self::EXPORT_EXCEL, $filepath = null, $send = f | |
$this->lng->txt('dcl_no_export_fields_available'), | ||
$ilCtrl->getLinkTargetByClass(array('ilDclTableListGUI', 'ilDclTableEditGUI', 'ilDclFieldListGUI'), 'listFields') | ||
)); | ||
|
||
return false; | ||
} | ||
|
||
|
@@ -233,13 +215,10 @@ public function export($format = self::EXPORT_EXCEL, $filepath = null, $send = f | |
} | ||
} | ||
|
||
|
||
/** | ||
* Start Export async | ||
* | ||
* @param string $format | ||
* @param null $filepath | ||
* | ||
* @return mixed | ||
* @throws ilDclException | ||
*/ | ||
|
@@ -272,7 +251,8 @@ public function exportAsync($format = self::EXPORT_EXCEL, $filepath = null) | |
$ilLog->warning('SOAP clone call failed. Calling clone method manually'); | ||
require_once('./webservice/soap/include/inc.soap_functions.php'); | ||
if (method_exists('ilSoapFunctions', $method)) { | ||
$res = ilSoapFunctions::$method($new_session_id . '::' . $client_id, $this->dcl->getRefId(), $this->table_id, $format, $filepath); | ||
$res = ilSoapFunctions::$method($new_session_id . '::' . $client_id, $this->dcl->getRefId(), | ||
$this->table_id, $format, $filepath); | ||
} else { | ||
throw new ilDclException("SOAP call " . $method . " does not exists!"); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
/** | ||
* Hook-Class for exporting data-collections (used in SOAP-Class) | ||
* This Class avoids duplicated code by routing the request to the right place | ||
* | ||
* @author Michael Herren <[email protected]> | ||
* @ingroup ModulesDataCollection | ||
*/ | ||
|
@@ -55,7 +54,6 @@ class ilDclContentImporter | |
*/ | ||
protected $lng; | ||
|
||
|
||
public function __construct($ref_id, $table_id = null) | ||
{ | ||
global $DIC; | ||
|
@@ -70,7 +68,6 @@ public function __construct($ref_id, $table_id = null) | |
$this->tables = ($table_id) ? array($this->dcl->getTableById($table_id)) : $this->dcl->getTables(); | ||
} | ||
|
||
|
||
public function import($file, $simulate = false) | ||
{ | ||
global $DIC; | ||
|
@@ -172,10 +169,8 @@ public function import($file, $simulate = false) | |
return array('line' => ($i - 2 < 0 ? 0 : $i - 2), 'warnings' => $this->warnings); | ||
} | ||
|
||
|
||
/** | ||
* @param ilDclBaseFieldModel $field | ||
* | ||
* @return bool | ||
*/ | ||
protected function checkImportType($field) | ||
|
@@ -189,11 +184,9 @@ protected function checkImportType($field) | |
} | ||
} | ||
|
||
|
||
/** | ||
* @param ilDclTable $table | ||
* @param $titles string[] | ||
* | ||
* @return ilDclBaseFieldModel[] | ||
*/ | ||
protected function getImportFieldsFromTitles($table, $titles) | ||
|
Oops, something went wrong.