Definition at line 33 of file class.ilAdvancedSearch.php.
◆ __createClassificationWhere()
ilAdvancedSearch::__createClassificationWhere |
( |
| ) |
|
◆ __createEducationalWhere()
ilAdvancedSearch::__createEducationalWhere |
( |
| ) |
|
Definition at line 587 of file class.ilAdvancedSearch.php.
References ilAbstractSearch\$fields, __getDifference(), __getInStatement(), and null.
Referenced by __searchEducational().
593 if ($this->options[
'lom_interactivity'] ??
null) {
594 $and = $counter++ ?
'AND ' :
' ';
595 $where .= ($and .
"interactivity_type = " . $this->db->quote($this->options[
'lom_interactivity'],
'text') .
" ");
598 ($this->options[
'lom_level_start'] ?? null) or
599 ($this->options[
'lom_level_end'] ?? null)) {
600 $and = $counter++ ?
'AND ' :
' ';
603 (
int) $this->options[
'lom_level_start'],
604 (
int) $this->options[
'lom_level_end'],
605 array(
'VeryLow',
'Low',
'Medium',
'High',
'VeryHigh')
611 ($this->options[
'lom_density_start'] ?? null) or
612 ($this->options[
'lom_density_end'] ?? null)
614 $and = $counter++ ?
'AND ' :
' ';
617 (
int) $this->options[
'lom_density_start'],
618 (
int) $this->options[
'lom_density_end'],
619 array(
'VeryLow',
'Low',
'Medium',
'High',
'VeryHigh')
625 ($this->options[
'lom_difficulty_start'] ?? null) or
626 ($this->options[
'lom_difficulty_end'] ?? null)
628 $and = $counter++ ?
'AND ' :
' ';
631 (
int) $this->options[
'lom_difficulty_start'],
632 (
int) $this->options[
'lom_difficulty_end'],
633 array(
'VeryEasy',
'Easy',
'Medium',
'Difficult',
'VeryDifficult')
639 return $counter ? $where :
'';
__getInStatement(array $a_fields)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
__getDifference(int $a_val1, int $a_val2, array $options)
◆ __createRightsWhere()
ilAdvancedSearch::__createRightsWhere |
( |
| ) |
|
Definition at line 559 of file class.ilAdvancedSearch.php.
References null.
Referenced by __searchRights().
565 if ($this->options[
'lom_costs'] ??
null) {
566 $and = $counter++ ?
'AND ' :
' ';
567 $where .= ($and .
"costs = " . $this->db->quote($this->options[
'lom_costs'],
'text') .
" ");
569 if ($this->options[
'lom_copyright'] ?? null) {
570 $and = $counter++ ?
'AND ' :
' ';
571 $where .= ($and .
"cpr_and_or = " . $this->db->quote($this->options[
'lom_copyright'],
'text') .
" ");
573 return $counter ? $where :
'';
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
◆ __getDifference()
ilAdvancedSearch::__getDifference |
( |
int |
$a_val1, |
|
|
int |
$a_val2, |
|
|
array |
$options |
|
) |
| |
◆ __getInStatement()
ilAdvancedSearch::__getInStatement |
( |
array |
$a_fields | ) |
|
Definition at line 667 of file class.ilAdvancedSearch.php.
Referenced by __createEducationalWhere(), __searchClassification(), __searchContribute(), __searchEducational(), __searchEntity(), __searchFormat(), __searchGeneral(), __searchKeyword(), __searchLanguage(), __searchLifecycle(), __searchRequirement(), __searchRights(), __searchTaxon(), and searchObjectProperties().
673 $in .= implode(
"','", $a_fields);
◆ __searchClassification()
ilAdvancedSearch::__searchClassification |
( |
| ) |
|
Definition at line 415 of file class.ilAdvancedSearch.php.
References $res, ilAbstractSearch\$search_result, __createClassificationWhere(), __getInStatement(), ilDBConstants\FETCHMODE_OBJECT, ilAbstractSearch\getFilter(), and null.
Referenced by performSearch().
417 $query =
"SELECT rbac_id,obj_id,obj_type FROM il_meta_classification ";
423 $query = $query . $where . $and;
424 $res = $this->db->query($query);
425 #var_dump("<pre>",$query,"<pre>"); 427 $this->search_result->addEntry(
429 (
string) $row->obj_type,
__getInStatement(array $a_fields)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
__createClassificationWhere()
ilSearchResult $search_result
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ __searchContribute()
ilAdvancedSearch::__searchContribute |
( |
| ) |
|
Definition at line 235 of file class.ilAdvancedSearch.php.
References $res, ilAbstractSearch\$search_result, __getInStatement(), ilDBConstants\FETCHMODE_OBJECT, ilAbstractSearch\getFilter(), and null.
Referenced by performSearch().
237 if (!($this->options[
'lom_role'] ??
null)) {
241 $query =
"SELECT rbac_id,obj_id,obj_type FROM il_meta_contribute " .
242 "WHERE role = " . $this->db->quote($this->options[
'lom_role'],
'text') .
" " .
245 $res = $this->db->query($query);
246 #var_dump("<pre>",$query,"<pre>"); 248 $this->search_result->addEntry(
250 (
string) $row->obj_type,
__getInStatement(array $a_fields)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
ilSearchResult $search_result
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ __searchDescription()
ilAdvancedSearch::__searchDescription |
( |
| ) |
|
◆ __searchEducational()
ilAdvancedSearch::__searchEducational |
( |
| ) |
|
Definition at line 322 of file class.ilAdvancedSearch.php.
References $res, ilAbstractSearch\$search_result, __createEducationalWhere(), __getInStatement(), ilDBConstants\FETCHMODE_OBJECT, ilAbstractSearch\getFilter(), joinOnRessourceIDs(), and null.
Referenced by performSearch().
324 $query_start =
"SELECT rbac_id,obj_id,obj_type ";
327 $ed_query = $lr_type_query = $end_user_query = $context_query =
'';
329 $ed_query = $query_start .
'FROM il_meta_educational ' . $where . $and;
331 if ($this->options[
'lom_resource'] ??
null) {
332 $where =
" WHERE learning_resource_type = " . $this->db->quote($this->options[
'lom_resource'],
'text');
333 $lr_type_query = $query_start .
'FROM il_meta_lr_type ' . $where . $and;
335 if ($this->options[
'lom_user_role'] ?? null) {
336 $where =
" WHERE intended_end_user_role = " . $this->db->quote($this->options[
'lom_user_role'],
'text');
337 $end_user_query = $query_start .
'FROM il_meta_end_usr_role ' . $where . $and;
339 if ($this->options[
'lom_context'] ?? null) {
340 $where =
" WHERE context = " . $this->db->quote($this->options[
'lom_context'],
'text');
341 $context_query = $query_start .
'FROM il_meta_context ' . $where . $and;
354 $res = $this->db->query($query);
356 $this->search_result->addEntry(
358 (
string) $row->obj_type,
__getInStatement(array $a_fields)
joinOnRessourceIDs(string ... $individual_queries)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
__createEducationalWhere()
ilSearchResult $search_result
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ __searchEntity()
ilAdvancedSearch::__searchEntity |
( |
| ) |
|
Definition at line 258 of file class.ilAdvancedSearch.php.
References $res, ilAbstractSearch\$search_result, ilAbstractSearch\__createLocateString(), __getInStatement(), ilAbstractSearch\__prepareFound(), ilDBConstants\FETCHMODE_OBJECT, ilAbstractSearch\getFilter(), and ilAbstractSearch\setFields().
Referenced by performSearch().
263 $where = $this->__createEntityWhereCondition();
266 $query =
"SELECT rbac_id,obj_id,obj_type " .
268 "FROM il_meta_entity " .
269 $where .
" " . $and .
' ';
271 $res = $this->db->query($query);
274 if (!in_array(0, $found)) {
275 $this->search_result->addEntry(
277 (
string) $row->obj_type,
__getInStatement(array $a_fields)
__prepareFound(object $row)
setFields(array $a_fields)
ilSearchResult $search_result
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ __searchFormat()
ilAdvancedSearch::__searchFormat |
( |
| ) |
|
Definition at line 535 of file class.ilAdvancedSearch.php.
References $res, ilAbstractSearch\$search_result, __getInStatement(), ilDBConstants\FETCHMODE_OBJECT, ilAbstractSearch\getFilter(), null, and ilDBConstants\T_TEXT.
Referenced by performSearch().
537 if (!($this->options[
'lom_format'] ??
null)) {
541 $query =
"SELECT rbac_id,obj_id,obj_type FROM il_meta_format " .
542 "WHERE format LIKE(" . $this->db->quote($this->options[
'lom_format'],
ilDBConstants::T_TEXT) .
") " .
545 $res = $this->db->query($query);
546 #var_dump("<pre>",$query,"<pre>"); 548 $this->search_result->addEntry(
550 (
string) $row->obj_type,
__getInStatement(array $a_fields)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
ilSearchResult $search_result
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ __searchGeneral()
ilAdvancedSearch::__searchGeneral |
( |
| ) |
|
Definition at line 156 of file class.ilAdvancedSearch.php.
References $DIC, $ilDB, $res, ilAbstractSearch\$search_result, ilAbstractSearch\__createLocateString(), __getInStatement(), ilAbstractSearch\__prepareFound(), ilDBConstants\FETCHMODE_OBJECT, ilAbstractSearch\getFilter(), joinOnRessourceIDs(), null, ilAbstractSearch\setFields(), and ilDBConstants\T_TEXT.
Referenced by performSearch().
160 $ilDB = $DIC->database();
162 $coverage_query = $general_query =
'';
163 if ($this->options[
'lom_coverage'] ??
null) {
165 $and = $this->__createCoverageAndCondition();
167 $coverage_query =
"SELECT rbac_id,obj_type,obj_id " .
169 "FROM il_meta_coverage " .
173 if ($this->options[
'lom_structure'] ?? null) {
175 $general_query =
"SELECT rbac_id,obj_type,obj_id " .
176 "FROM il_meta_general " .
186 $res = $this->db->query($query);
188 if ($this->options[
'lom_coverage'] ?? null) {
190 if (!in_array(0, $found)) {
191 $this->search_result->addEntry(
193 (
string) $row->obj_type,
199 $this->search_result->addEntry(
201 (
string) $row->obj_type,
__getInStatement(array $a_fields)
__prepareFound(object $row)
joinOnRessourceIDs(string ... $individual_queries)
setFields(array $a_fields)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
ilSearchResult $search_result
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ __searchKeyword()
ilAdvancedSearch::__searchKeyword |
( |
bool |
$a_in_classification = false | ) |
|
Definition at line 466 of file class.ilAdvancedSearch.php.
References $res, ilAbstractSearch\$search_result, ilAbstractSearch\__createLocateString(), __getInStatement(), ilAbstractSearch\__prepareFound(), ilDBConstants\FETCHMODE_OBJECT, ilAbstractSearch\getFilter(), and ilAbstractSearch\setFields().
Referenced by performSearch().
471 if ($a_in_classification) {
472 $and .=
" AND parent_type = 'meta_classification' ";
474 $where = $this->__createKeywordWhereCondition();
477 $query =
"SELECT rbac_id,obj_id,obj_type " .
479 "FROM il_meta_keyword " .
480 $where .
" " . $and .
' ';
482 $res = $this->db->query($query);
485 if (!in_array(0, $found) or !$a_in_classification) {
486 $this->search_result->addEntry(
488 (
string) $row->obj_type,
__getInStatement(array $a_fields)
__prepareFound(object $row)
setFields(array $a_fields)
ilSearchResult $search_result
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ __searchLanguage()
ilAdvancedSearch::__searchLanguage |
( |
| ) |
|
Definition at line 211 of file class.ilAdvancedSearch.php.
References $res, ilAbstractSearch\$search_result, __getInStatement(), ilDBConstants\FETCHMODE_OBJECT, ilAbstractSearch\getFilter(), and null.
Referenced by performSearch().
213 if (!($this->options[
'lom_language'] ??
null)) {
217 $query =
"SELECT rbac_id,obj_id,obj_type FROM il_meta_language " .
218 "WHERE language = " . $this->db->quote($this->options[
'lom_language'],
'text') .
" " .
220 "AND parent_type = 'meta_general'";
222 $res = $this->db->query($query);
223 #var_dump("<pre>",$query,"<pre>"); 225 $this->search_result->addEntry(
227 (
string) $row->obj_type,
__getInStatement(array $a_fields)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
ilSearchResult $search_result
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ __searchLifecycle()
ilAdvancedSearch::__searchLifecycle |
( |
| ) |
|
Definition at line 497 of file class.ilAdvancedSearch.php.
References $res, ilAbstractSearch\$search_result, ilAbstractSearch\__createLocateString(), __getInStatement(), ilAbstractSearch\__prepareFound(), ilDBConstants\FETCHMODE_OBJECT, ilAbstractSearch\getFilter(), null, and ilAbstractSearch\setFields().
Referenced by performSearch().
502 if ($this->options[
'lom_version'] ??
null) {
503 $where = $this->__createLifecycleWhereCondition();
506 $where =
"WHERE 1 = 1 ";
510 if ($this->options[
'lom_status'] ?? null) {
511 $and .= (
" AND lifecycle_status = " . $this->db->quote($this->options[
'lom_status'],
'text') .
"");
514 $query =
"SELECT rbac_id,obj_id,obj_type " .
516 "FROM il_meta_lifecycle " .
517 $where .
" " . $and .
' ';
519 $res = $this->db->query($query);
522 if (!in_array(0, $found)) {
523 $this->search_result->addEntry(
525 (
string) $row->obj_type,
__getInStatement(array $a_fields)
__prepareFound(object $row)
setFields(array $a_fields)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
ilSearchResult $search_result
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ __searchRequirement()
ilAdvancedSearch::__searchRequirement |
( |
| ) |
|
Definition at line 289 of file class.ilAdvancedSearch.php.
References $res, ilAbstractSearch\$search_result, __getInStatement(), ilDBConstants\FETCHMODE_OBJECT, ilAbstractSearch\getFilter(), joinOnRessourceIDs(), null, and ilDBConstants\T_TEXT.
Referenced by performSearch().
291 $query =
"SELECT rbac_id,obj_id,obj_type FROM il_meta_or_composite " .
294 $os_query = $browser_query =
'';
295 if ($this->options[
'lom_operating_system'] ??
null) {
296 $os_query = $query .
" AND type = 'operating system' AND " .
299 if ($this->options[
'lom_browser'] ?? null) {
300 $browser_query = $query .
" AND type = 'browser' AND " .
309 $res = $this->db->query($query);
310 #var_dump("<pre>",$query,"<pre>"); 312 $this->search_result->addEntry(
314 (
string) $row->obj_type,
__getInStatement(array $a_fields)
joinOnRessourceIDs(string ... $individual_queries)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
ilSearchResult $search_result
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ __searchRights()
ilAdvancedSearch::__searchRights |
( |
| ) |
|
Definition at line 393 of file class.ilAdvancedSearch.php.
References $res, ilAbstractSearch\$search_result, __createRightsWhere(), __getInStatement(), ilDBConstants\FETCHMODE_OBJECT, ilAbstractSearch\getFilter(), and null.
Referenced by performSearch().
395 $query =
"SELECT rbac_id,obj_id,obj_type FROM il_meta_rights ";
401 $query = $query . $where . $and;
402 $res = $this->db->query($query);
403 #var_dump("<pre>",$query,"<pre>"); 405 $this->search_result->addEntry(
407 (
string) $row->obj_type,
__getInStatement(array $a_fields)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
ilSearchResult $search_result
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ __searchTaxon()
ilAdvancedSearch::__searchTaxon |
( |
| ) |
|
Definition at line 437 of file class.ilAdvancedSearch.php.
References $res, ilAbstractSearch\$search_result, ilAbstractSearch\__createLocateString(), __getInStatement(), ilAbstractSearch\__prepareFound(), ilDBConstants\FETCHMODE_OBJECT, ilAbstractSearch\getFilter(), and ilAbstractSearch\setFields().
Referenced by performSearch().
442 $where = $this->__createTaxonWhereCondition();
445 $query =
"SELECT rbac_id,obj_id,obj_type " .
447 "FROM il_meta_taxon " .
448 $where .
" " . $and .
' ';
450 $res = $this->db->query($query);
453 if (!in_array(0, $found)) {
454 $this->search_result->addEntry(
456 (
string) $row->obj_type,
__getInStatement(array $a_fields)
__prepareFound(object $row)
setFields(array $a_fields)
ilSearchResult $search_result
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ __searchTitle()
ilAdvancedSearch::__searchTitle |
( |
| ) |
|
◆ __searchTitleDescription()
& ilAdvancedSearch::__searchTitleDescription |
( |
| ) |
|
◆ __searchTypicalAgeRange()
ilAdvancedSearch::__searchTypicalAgeRange |
( |
| ) |
|
Definition at line 366 of file class.ilAdvancedSearch.php.
References $res, ilAbstractSearch\$search_result, ilDBConstants\FETCHMODE_OBJECT, ILIAS\Repository\int(), and null.
Referenced by performSearch().
369 !($this->options[
'typ_age_1'] ??
null) or
370 !($this->options[
'typ_age_2'] ?? null)
375 $query =
"SELECT rbac_id,obj_id,obj_type FROM il_meta_typical_age_range " .
376 "WHERE typical_age_range_min >= '" . (
int) $this->options[
'typ_age_1'] .
"' " .
377 "AND typical_age_range_max <= '" . (
int) $this->options[
'typ_age_2'] .
"'";
380 $res = $this->db->query($query);
381 #var_dump("<pre>",$query,"<pre>"); 383 $this->search_result->addEntry(
385 (
string) $row->obj_type,
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
ilSearchResult $search_result
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ getMode()
ilAdvancedSearch::getMode |
( |
| ) |
|
◆ joinOnRessourceIDs()
ilAdvancedSearch::joinOnRessourceIDs |
( |
string ... |
$individual_queries | ) |
|
|
protected |
Definition at line 679 of file class.ilAdvancedSearch.php.
Referenced by __searchEducational(), __searchGeneral(), and __searchRequirement().
681 $non_empty_queries = [];
682 foreach ($individual_queries as $query) {
684 $non_empty_queries[] = $query;
688 if (count($non_empty_queries) < 2) {
689 return $non_empty_queries[0] ??
'';
693 foreach ($non_empty_queries as $query) {
694 if ($total_query ===
'') {
695 $total_query = $query;
698 $total_query =
"SELECT t1.rbac_id, t1.obj_type, t1.obj_id " .
699 "FROM (" . $total_query .
") AS t1 JOIN (" . $query .
700 ") AS t2 ON t1.rbac_id = t2.rbac_id AND t1.obj_type = t2.obj_type AND t1.obj_id = t2.obj_id";
◆ performSearch()
ilAdvancedSearch::performSearch |
( |
| ) |
|
Definition at line 55 of file class.ilAdvancedSearch.php.
References __searchClassification(), __searchContribute(), __searchDescription(), __searchEducational(), __searchEntity(), __searchFormat(), __searchGeneral(), __searchKeyword(), __searchLanguage(), __searchLifecycle(), __searchRequirement(), __searchRights(), __searchTaxon(), __searchTitle(), __searchTitleDescription(), __searchTypicalAgeRange(), and getMode().
64 case 'typical_age_range':
70 case 'classification':
97 case 'title_description':
& __searchTitleDescription()
__searchKeyword(bool $a_in_classification=false)
__searchTypicalAgeRange()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ searchObjectProperties()
ilAdvancedSearch::searchObjectProperties |
( |
string ... |
$fields | ) |
|
|
protected |
Definition at line 130 of file class.ilAdvancedSearch.php.
References $res, ilAbstractSearch\$search_result, ilAbstractSearch\__createLocateString(), __getInStatement(), ilDBConstants\FETCHMODE_OBJECT, ilAbstractSearch\getFilter(), and ilAbstractSearch\setFields().
Referenced by __searchDescription(), __searchTitle(), and __searchTitleDescription().
135 $where = $this->__createObjectPropertiesWhereCondition(...
$fields);
138 $query =
"SELECT obj_id,type " .
140 "FROM object_data " .
141 $where .
" " . $and .
' ' .
142 "ORDER BY obj_id DESC";
144 $res = $this->db->query($query);
146 $this->search_result->addEntry(
149 $this->__prepareFound($row)
__getInStatement(array $a_fields)
setFields(array $a_fields)
ilSearchResult $search_result
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ setMode()
ilAdvancedSearch::setMode |
( |
string |
$a_mode | ) |
|
◆ setOptions()
ilAdvancedSearch::setOptions |
( |
array & |
$options | ) |
|
◆ $mode
string ilAdvancedSearch::$mode = '' |
|
private |
◆ $options
array ilAdvancedSearch::$options = [] |
|
protected |
The documentation for this class was generated from the following file: