Definition at line 37 of file class.ilAdvancedSearch.php.
◆ __createClassificationWhere()
ilAdvancedSearch::__createClassificationWhere |
( |
| ) |
|
◆ __createEducationalWhere()
ilAdvancedSearch::__createEducationalWhere |
( |
| ) |
|
Definition at line 500 of file class.ilAdvancedSearch.php.
References $DIC, $ilDB, __getDifference(), and __getInStatement().
Referenced by __searchEducational().
504 $ilDB = $DIC[
'ilDB'];
510 if ($this->options[
'lom_interactivity']) {
511 $and = $counter++ ?
'AND ' :
' ';
512 $where .= ($and .
"interactivity_type = " .
$ilDB->quote($this->options[
'lom_interactivity'],
'text') .
" ");
514 if ($this->options[
'lom_resource']) {
515 $and = $counter++ ?
'AND ' :
' ';
516 $where .= ($and .
"learning_resource_type = " .
$ilDB->quote($this->options[
'lom_resource'],
'text') .
" ");
518 if ($this->options[
'lom_user_role']) {
519 $and = $counter++ ?
'AND ' :
' ';
520 $where .= ($and .
"intended_end_user_role = " .
$ilDB->quote($this->options[
'lom_user_role'],
'text') .
" ");
522 if ($this->options[
'lom_context']) {
523 $and = $counter++ ?
'AND ' :
' ';
524 $where .= ($and .
"context = " .
$ilDB->quote($this->options[
'lom_context'],
'text') .
" ");
526 if ($this->options[
'lom_level_start'] or $this->options[
'lom_level_end']) {
527 $and = $counter++ ?
'AND ' :
' ';
530 $this->options[
'lom_level_start'],
531 $this->options[
'lom_level_end'],
532 array(
'VeryLow',
'Low',
'Medium',
'High',
'VeryHigh')
535 $where .= ($and .
"interactivity_level " . $this->
__getInStatement($fields));
537 if ($this->options[
'lom_density_start'] or $this->options[
'lom_density_end']) {
538 $and = $counter++ ?
'AND ' :
' ';
541 $this->options[
'lom_density_start'],
542 $this->options[
'lom_density_end'],
543 array(
'VeryLow',
'Low',
'Medium',
'High',
'VeryHigh')
548 if ($this->options[
'lom_difficulty_start'] or $this->options[
'lom_difficulty_end']) {
549 $and = $counter++ ?
'AND ' :
' ';
552 $this->options[
'lom_difficulty_start'],
553 $this->options[
'lom_difficulty_end'],
554 array(
'VeryEasy',
'Easy',
'Medium',
'Difficult',
'VeryDifficult')
560 return $counter ? $where :
'';
__getDifference($a_val1, $a_val2, $options)
__getInStatement($a_fields)
◆ __createRequirementWhere()
ilAdvancedSearch::__createRequirementWhere |
( |
| ) |
|
Definition at line 562 of file class.ilAdvancedSearch.php.
References $DIC, and $ilDB.
Referenced by __searchRequirement().
566 $ilDB = $DIC[
'ilDB'];
572 if ($this->options[
'lom_operating_system']) {
573 $and = $counter++ ?
'AND ' :
' ';
574 $where .= ($and .
"operating_system_name = " .
$ilDB->quote($this->options[
'lom_operating_system']) .
" ");
576 if ($this->options[
'lom_browser']) {
577 $and = $counter++ ?
'AND ' :
' ';
578 $where .= ($and .
"browser_name = " .
$ilDB->quote($this->options[
'lom_browser']) .
" ");
580 return $counter ? $where :
'';
◆ __createRightsWhere()
ilAdvancedSearch::__createRightsWhere |
( |
| ) |
|
Definition at line 464 of file class.ilAdvancedSearch.php.
References $DIC, and $ilDB.
Referenced by __searchRights().
468 $ilDB = $DIC[
'ilDB'];
474 if ($this->options[
'lom_costs']) {
475 $and = $counter++ ?
'AND ' :
' ';
476 $where .= ($and .
"costs = " .
$ilDB->quote($this->options[
'lom_costs'],
'text') .
" ");
478 if ($this->options[
'lom_copyright']) {
479 $and = $counter++ ?
'AND ' :
' ';
480 $where .= ($and .
"cpr_and_or = " .
$ilDB->quote($this->options[
'lom_copyright'],
'text') .
" ");
482 return $counter ? $where :
'';
◆ __getDifference()
ilAdvancedSearch::__getDifference |
( |
|
$a_val1, |
|
|
|
$a_val2, |
|
|
|
$options |
|
) |
| |
Definition at line 583 of file class.ilAdvancedSearch.php.
Referenced by __createEducationalWhere().
585 $a_val2 = $a_val2 ? $a_val2 : count($options);
587 if ($a_val1 > $a_val2) {
592 foreach ($options as $option) {
593 if ($a_val1 > ++$counter) {
596 if ($a_val2 < $counter) {
601 return $fields ? $fields : array();
__getDifference($a_val1, $a_val2, $options)
◆ __getInStatement()
ilAdvancedSearch::__getInStatement |
( |
|
$a_fields | ) |
|
Definition at line 604 of file class.ilAdvancedSearch.php.
References $in.
Referenced by __createEducationalWhere(), __searchClassification(), __searchContribute(), __searchEducational(), __searchEntity(), __searchFormat(), __searchGeneral(), __searchKeyword(), __searchLanguage(), __searchLifecycle(), __searchRequirement(), __searchRights(), __searchTaxon(), and __searchTitleDescription().
610 $in .= implode(
"','", $a_fields);
if(php_sapi_name() !='cli') $in
◆ __searchClassification()
& ilAdvancedSearch::__searchClassification |
( |
| ) |
|
Definition at line 338 of file class.ilAdvancedSearch.php.
References $query, $res, ilAbstractSearch\$search_result, __createClassificationWhere(), __getInStatement(), ilDBConstants\FETCHMODE_OBJECT, and ilAbstractSearch\getFilter().
Referenced by performSearch().
340 $query =
"SELECT rbac_id,obj_id,obj_type FROM il_meta_classification ";
348 #var_dump("<pre>",$query,"<pre>"); 350 $this->search_result->addEntry($row->rbac_id, $row->obj_type, array(), $row->obj_id);
getFilter()
get object type to search in
foreach($_POST as $key=> $value) $res
__createClassificationWhere()
__getInStatement($a_fields)
◆ __searchContribute()
& ilAdvancedSearch::__searchContribute |
( |
| ) |
|
Definition at line 221 of file class.ilAdvancedSearch.php.
References $DIC, $ilDB, $query, $res, ilAbstractSearch\$search_result, __getInStatement(), ilDBConstants\FETCHMODE_OBJECT, and ilAbstractSearch\getFilter().
Referenced by performSearch().
225 $ilDB = $DIC[
'ilDB'];
227 if (!$this->options[
'lom_role']) {
231 $query =
"SELECT rbac_id,obj_id,obj_type FROM il_meta_contribute " .
232 "WHERE role = " .
$ilDB->quote($this->options[
'lom_role'],
'text') .
" " .
236 #var_dump("<pre>",$query,"<pre>"); 238 $this->search_result->addEntry($row->rbac_id, $row->obj_type, array(), $row->obj_id);
getFilter()
get object type to search in
foreach($_POST as $key=> $value) $res
__getInStatement($a_fields)
◆ __searchEducational()
& ilAdvancedSearch::__searchEducational |
( |
| ) |
|
Definition at line 286 of file class.ilAdvancedSearch.php.
References $query, $res, ilAbstractSearch\$search_result, __createEducationalWhere(), __getInStatement(), ilDBConstants\FETCHMODE_OBJECT, and ilAbstractSearch\getFilter().
Referenced by performSearch().
288 $query =
"SELECT rbac_id,obj_id,obj_type FROM il_meta_educational ";
297 $this->search_result->addEntry($row->rbac_id, $row->obj_type, array(), $row->obj_id);
getFilter()
get object type to search in
__createEducationalWhere()
foreach($_POST as $key=> $value) $res
__getInStatement($a_fields)
◆ __searchEntity()
& ilAdvancedSearch::__searchEntity |
( |
| ) |
|
Definition at line 243 of file class.ilAdvancedSearch.php.
References $query, $res, ilAbstractSearch\$search_result, ilAbstractSearch\__createLocateString(), __getInStatement(), ilAbstractSearch\__prepareFound(), ilDBConstants\FETCHMODE_OBJECT, ilAbstractSearch\getFilter(), and ilAbstractSearch\setFields().
Referenced by performSearch().
248 $where = $this->__createEntityWhereCondition();
251 $query =
"SELECT rbac_id,obj_id,obj_type " .
253 "FROM il_meta_entity " .
254 $where .
" " . $and .
' ';
259 if (!in_array(0, $found)) {
260 $this->search_result->addEntry($row->rbac_id, $row->obj_type, $found, $row->obj_id);
__createLocateString()
build locate string in case of AND search
setFields($a_fields)
Set fields to search.
getFilter()
get object type to search in
foreach($_POST as $key=> $value) $res
__getInStatement($a_fields)
◆ __searchFormat()
& ilAdvancedSearch::__searchFormat |
( |
| ) |
|
Definition at line 441 of file class.ilAdvancedSearch.php.
References $DIC, $ilDB, $query, $res, ilAbstractSearch\$search_result, __getInStatement(), ilDBConstants\FETCHMODE_OBJECT, and ilAbstractSearch\getFilter().
Referenced by performSearch().
445 $ilDB = $DIC[
'ilDB'];
447 if (!$this->options[
'lom_format']) {
451 $query =
"SELECT rbac_id,obj_id,obj_type FROM il_meta_format " .
452 "WHERE format LIKE(" .
$ilDB->quote($this->options[
'lom_format']) .
") " .
456 #var_dump("<pre>",$query,"<pre>"); 458 $this->search_result->addEntry($row->rbac_id, $row->obj_type, array(), $row->obj_id);
getFilter()
get object type to search in
foreach($_POST as $key=> $value) $res
__getInStatement($a_fields)
◆ __searchGeneral()
& ilAdvancedSearch::__searchGeneral |
( |
| ) |
|
Definition at line 159 of file class.ilAdvancedSearch.php.
References $DIC, $ilDB, $query, $res, ilAbstractSearch\$search_result, ilAbstractSearch\__createLocateString(), __getInStatement(), ilAbstractSearch\__prepareFound(), ilDBConstants\FETCHMODE_OBJECT, ilAbstractSearch\getFilter(), and ilAbstractSearch\setFields().
Referenced by performSearch().
163 $ilDB = $DIC[
'ilDB'];
165 if (!$this->options[
'lom_coverage'] and !$this->options[
'lom_structure']) {
168 if ($this->options[
'lom_coverage']) {
170 $and = $this->__createCoverageAndCondition();
173 if ($this->options[
'lom_structure']) {
174 $and .= (
"AND general_structure = " .
$ilDB->quote($this->options[
'lom_structure'],
'text') .
" ");
177 $query =
"SELECT rbac_id,obj_type,obj_id " .
179 "FROM il_meta_general " .
185 if ($this->options[
'lom_coverage']) {
187 if (!in_array(0, $found)) {
188 $this->search_result->addEntry($row->rbac_id, $row->obj_type, $found, $row->obj_id);
191 $this->search_result->addEntry($row->rbac_id, $row->obj_type, array(), $row->obj_id);
__createLocateString()
build locate string in case of AND search
setFields($a_fields)
Set fields to search.
getFilter()
get object type to search in
foreach($_POST as $key=> $value) $res
__getInStatement($a_fields)
◆ __searchKeyword()
& ilAdvancedSearch::__searchKeyword |
( |
|
$a_in_classification = false | ) |
|
Definition at line 379 of file class.ilAdvancedSearch.php.
References $query, $res, ilAbstractSearch\$search_result, ilAbstractSearch\__createLocateString(), __getInStatement(), ilAbstractSearch\__prepareFound(), ilDBConstants\FETCHMODE_OBJECT, ilAbstractSearch\getFilter(), and ilAbstractSearch\setFields().
Referenced by performSearch().
384 if ($a_in_classification) {
385 $and .=
" AND parent_type = 'meta_classification' ";
387 $where = $this->__createKeywordWhereCondition();
390 $query =
"SELECT rbac_id,obj_id,obj_type " .
392 "FROM il_meta_keyword " .
393 $where .
" " . $and .
' ';
398 if (!in_array(0, $found) or !$a_in_classification) {
399 $this->search_result->addEntry($row->rbac_id, $row->obj_type, $found, $row->obj_id);
__createLocateString()
build locate string in case of AND search
setFields($a_fields)
Set fields to search.
getFilter()
get object type to search in
foreach($_POST as $key=> $value) $res
__getInStatement($a_fields)
◆ __searchLanguage()
& ilAdvancedSearch::__searchLanguage |
( |
| ) |
|
Definition at line 198 of file class.ilAdvancedSearch.php.
References $DIC, $ilDB, $query, $res, ilAbstractSearch\$search_result, __getInStatement(), ilDBConstants\FETCHMODE_OBJECT, and ilAbstractSearch\getFilter().
Referenced by performSearch().
202 $ilDB = $DIC[
'ilDB'];
204 if (!$this->options[
'lom_language']) {
208 $query =
"SELECT rbac_id,obj_id,obj_type FROM il_meta_language " .
209 "WHERE language = " .
$ilDB->quote($this->options[
'lom_language'],
'text') .
" " .
211 "AND parent_type = 'meta_general'";
214 #var_dump("<pre>",$query,"<pre>"); 216 $this->search_result->addEntry($row->rbac_id, $row->obj_type, array(), $row->obj_id);
getFilter()
get object type to search in
foreach($_POST as $key=> $value) $res
__getInStatement($a_fields)
◆ __searchLifecycle()
& ilAdvancedSearch::__searchLifecycle |
( |
| ) |
|
Definition at line 405 of file class.ilAdvancedSearch.php.
References $DIC, $ilDB, $query, $res, ilAbstractSearch\$search_result, ilAbstractSearch\__createLocateString(), __getInStatement(), ilAbstractSearch\__prepareFound(), ilDBConstants\FETCHMODE_OBJECT, ilAbstractSearch\getFilter(), and ilAbstractSearch\setFields().
Referenced by performSearch().
409 $ilDB = $DIC[
'ilDB'];
413 if ($this->options[
'lom_version']) {
414 $where = $this->__createLifecycleWhereCondition();
417 $where =
"WHERE 1 = 1 ";
421 if ($this->options[
'lom_status']) {
422 $and .= (
" AND lifecycle_status = " .
$ilDB->quote($this->options[
'lom_status'],
'text') .
"");
425 $query =
"SELECT rbac_id,obj_id,obj_type " .
427 "FROM il_meta_lifecycle " .
428 $where .
" " . $and .
' ';
433 if (!in_array(0, $found)) {
434 $this->search_result->addEntry($row->rbac_id, $row->obj_type, $found, $row->obj_id);
__createLocateString()
build locate string in case of AND search
setFields($a_fields)
Set fields to search.
getFilter()
get object type to search in
foreach($_POST as $key=> $value) $res
__getInStatement($a_fields)
◆ __searchRequirement()
& ilAdvancedSearch::__searchRequirement |
( |
| ) |
|
Definition at line 269 of file class.ilAdvancedSearch.php.
References $query, $res, ilAbstractSearch\$search_result, __createRequirementWhere(), __getInStatement(), ilDBConstants\FETCHMODE_OBJECT, and ilAbstractSearch\getFilter().
Referenced by performSearch().
271 $query =
"SELECT rbac_id,obj_id,obj_type FROM il_meta_requirement ";
279 #var_dump("<pre>",$query,"<pre>"); 281 $this->search_result->addEntry($row->rbac_id, $row->obj_type, array(), $row->obj_id);
getFilter()
get object type to search in
foreach($_POST as $key=> $value) $res
__getInStatement($a_fields)
__createRequirementWhere()
◆ __searchRights()
& ilAdvancedSearch::__searchRights |
( |
| ) |
|
Definition at line 321 of file class.ilAdvancedSearch.php.
References $query, $res, ilAbstractSearch\$search_result, __createRightsWhere(), __getInStatement(), ilDBConstants\FETCHMODE_OBJECT, and ilAbstractSearch\getFilter().
Referenced by performSearch().
323 $query =
"SELECT rbac_id,obj_id,obj_type FROM il_meta_rights ";
331 #var_dump("<pre>",$query,"<pre>"); 333 $this->search_result->addEntry($row->rbac_id, $row->obj_type, array(), $row->obj_id);
getFilter()
get object type to search in
foreach($_POST as $key=> $value) $res
__getInStatement($a_fields)
◆ __searchTaxon()
& ilAdvancedSearch::__searchTaxon |
( |
| ) |
|
Definition at line 355 of file class.ilAdvancedSearch.php.
References $query, $res, ilAbstractSearch\$search_result, ilAbstractSearch\__createLocateString(), __getInStatement(), ilAbstractSearch\__prepareFound(), ilDBConstants\FETCHMODE_OBJECT, ilAbstractSearch\getFilter(), and ilAbstractSearch\setFields().
Referenced by performSearch().
360 $where = $this->__createTaxonWhereCondition();
363 $query =
"SELECT rbac_id,obj_id,obj_type " .
365 "FROM il_meta_taxon " .
366 $where .
" " . $and .
' ';
371 if (!in_array(0, $found)) {
372 $this->search_result->addEntry($row->rbac_id, $row->obj_type, $found, $row->obj_id);
__createLocateString()
build locate string in case of AND search
setFields($a_fields)
Set fields to search.
getFilter()
get object type to search in
foreach($_POST as $key=> $value) $res
__getInStatement($a_fields)
◆ __searchTitleDescription()
& ilAdvancedSearch::__searchTitleDescription |
( |
| ) |
|
Definition at line 137 of file class.ilAdvancedSearch.php.
References $query, $res, ilAbstractSearch\$search_result, ilAbstractSearch\__createLocateString(), __getInStatement(), ilDBConstants\FETCHMODE_OBJECT, ilAbstractSearch\getFilter(), and ilAbstractSearch\setFields().
Referenced by performSearch().
139 $this->
setFields(array(
'title',
'description'));
142 $where = $this->__createTitleDescriptionWhereCondition();
145 $query =
"SELECT obj_id,type " .
147 "FROM object_data " .
148 $where .
" " . $and .
' ' .
149 "ORDER BY obj_id DESC";
153 $this->search_result->addEntry($row->obj_id, $row->type, $this->__prepareFound($row));
__createLocateString()
build locate string in case of AND search
setFields($a_fields)
Set fields to search.
getFilter()
get object type to search in
foreach($_POST as $key=> $value) $res
__getInStatement($a_fields)
◆ __searchTypicalAgeRange()
& ilAdvancedSearch::__searchTypicalAgeRange |
( |
| ) |
|
Definition at line 302 of file class.ilAdvancedSearch.php.
References $query, $res, ilAbstractSearch\$search_result, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by performSearch().
304 if (!$this->options[
'typ_age_1'] or !$this->options[
'typ_age_2']) {
308 $query =
"SELECT rbac_id,obj_id,obj_type FROM il_meta_typical_age_range " .
309 "WHERE typical_age_range_min >= '" . (int) $this->options[
'typ_age_1'] .
"' " .
310 "AND typical_age_range_max <= '" . (
int) $this->options[
'typ_age_2'] .
"'";
314 #var_dump("<pre>",$query,"<pre>"); 316 $this->search_result->addEntry($row->rbac_id, $row->obj_type, array(), $row->obj_id);
foreach($_POST as $key=> $value) $res
◆ getMode()
ilAdvancedSearch::getMode |
( |
| ) |
|
◆ performSearch()
ilAdvancedSearch::performSearch |
( |
| ) |
|
Definition at line 68 of file class.ilAdvancedSearch.php.
References __searchClassification(), __searchContribute(), __searchEducational(), __searchEntity(), __searchFormat(), __searchGeneral(), __searchKeyword(), __searchLanguage(), __searchLifecycle(), __searchRequirement(), __searchRights(), __searchTaxon(), __searchTitleDescription(), __searchTypicalAgeRange(), and getMode().
79 case 'typical_age_range':
87 case 'classification':
123 case 'title_description':
132 echo
"ilMDSearch::performSearch() no mode given";
& __searchTypicalAgeRange()
& __searchTitleDescription()
& __searchClassification()
& __searchKeyword($a_in_classification=false)
◆ setMode()
ilAdvancedSearch::setMode |
( |
|
$a_mode | ) |
|
Define meta elements to search.
- Parameters
-
array | elements to search in. E.G array('keyword','contribute') public |
Definition at line 54 of file class.ilAdvancedSearch.php.
56 $this->mode = $a_mode;
◆ setOptions()
ilAdvancedSearch::setOptions |
( |
& |
$options | ) |
|
◆ $db
ilAdvancedSearch::$db = null |
◆ $mode
ilAdvancedSearch::$mode = '' |
◆ $query_parser
ilAdvancedSearch::$query_parser = null |
The documentation for this class was generated from the following file: