35 include_once
'Services/Search/classes/class.ilSearchBaseGUI.php';
36 include_once
'Services/MetaData/classes/class.ilMDUtilSelect.php';
63 $this->tabs_gui = $ilTabs;
67 $this->lng->loadLanguageModule(
'meta');
74 return ROOT_FOLDER_ID;
86 $next_class = $this->ctrl->getNextClass($this);
87 $cmd = $this->ctrl->getCmd();
95 switch(
$_SESSION[
'search_last_sub_section'])
97 case self::TYPE_ADV_MD:
98 $cmd =
"showSavedAdvMDResults";
102 $cmd =
"showSavedResults";
116 $this->options = array();
123 $this->search_mode =
'in_results';
124 $this->search_cache->setResultPageNumber(1);
138 if(!isset(
$_GET[
'page_number']) and $this->search_mode !=
'in_results' )
141 $this->search_cache->delete();
144 include_once
'Services/Search/classes/class.ilSearchResult.php';
208 if($this->search_mode ==
'in_results')
210 include_once
'Services/Search/classes/class.ilSearchResult.php';
215 $res->diffEntriesFromResult($old_result_obj);
223 if(!count(
$res->getResults()))
232 if(
$res->isLimitReached())
234 $message = sprintf($this->lng->txt(
'search_limit_reached'),$this->settings->getMaxHits());
240 include_once
'Services/Search/classes/class.ilSearchResultPresentationGUI.php';
242 $this->tpl->setVariable(
"RESULTS",$search_result_presentation->showResults());
254 if(is_object($this->form))
259 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
260 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
262 $this->form->setFormAction($this->ctrl->getFormAction($this));
263 $this->form->setTitle($this->lng->txt(
'adv_md_search_title'));
264 $this->form->addCommandButton(
'performAdvMDSearch',$this->lng->txt(
'search'));
265 #$this->form->setSubformMode('right');
268 $this->lng->txt(
'meta_keyword').
'/'.
269 $this->lng->txt(
'meta_description'),
'title');
270 $content->
setValue($this->options[
'title']);
271 $content->setSize(30);
272 $content->setMaxLength(255);
273 $content->setSubformMode(
'right');
275 $group->setValue($this->options[
'title_ao']);
276 $radio_option =
new ilRadioOption($this->lng->txt(
"search_any_word"),0);
277 $group->addOption($radio_option);
278 $radio_option =
new ilRadioOption($this->lng->txt(
"search_all_words"),1);
279 $group->addOption($radio_option);
281 $this->form->addItem($content);
284 $options[
'adv_all'] = $this->lng->txt(
'search_any');
287 $options[$obj_type] = $this->lng->txt(
'objs_'.$obj_type);
290 $type->setValue($this->options[
'type']);
291 $this->form->addItem($type);
293 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
295 $record_gui->setPropertyForm($this->form);
296 $record_gui->setSearchValues($this->options);
297 $record_gui->parse();
310 if(!isset(
$_GET[
'page_number']) and $this->search_mode !=
'in_results' )
313 $this->search_cache->delete();
316 include_once
'Services/Search/classes/class.ilSearchResult.php';
325 if($this->search_mode ==
'in_results')
327 include_once
'Services/Search/classes/class.ilSearchResult.php';
332 $res->diffEntriesFromResult($old_result_obj);
340 if(!count(
$res->getResults()))
349 if(
$res->isLimitReached())
351 $message = sprintf($this->lng->txt(
'search_limit_reached'),$this->settings->getMaxHits());
357 include_once
'Services/Search/classes/class.ilSearchResultPresentationGUI.php';
359 $this->tpl->setVariable(
"RESULTS",$search_result_presentation->showResults());
375 $this->options =
$_SESSION[
'search_adv_md'];
378 $this->tabs_gui->setSubTabActive(
'search_adv_md');
380 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.advanced_adv_search.html',
'Services/Search');
383 $this->tpl->setVariable(
'SEARCH_FORM',$this->form->getHTML());
393 $this->tabs_gui->setSubTabActive(
'search_lom');
395 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.advanced_search.html',
'Services/Search');
398 $this->tpl->setVariable(
"SEARCH_ACTION",$this->ctrl->getFormAction($this));
399 $this->tpl->setVariable(
"TBL_TITLE",$this->lng->txt(
'search_advanced'));
402 $this->tpl->setVariable(
"TXT_CONTENT",$this->lng->txt(
'content'));
403 $this->tpl->setVariable(
"TXT_OR",$this->lng->txt(
'search_any_word'));
404 $this->tpl->setVariable(
"TXT_AND",$this->lng->txt(
'search_all_words'));
406 if($this->options[
'content_ao'] ==
'and')
408 $this->tpl->setVariable(
"CONTENT_AND_CHECKED",
'checked=checked');
412 $this->tpl->setVariable(
"CONTENT_OR_CHECKED",
'checked=checked');
417 $this->tpl->setVariable(
"TXT_TYPE",$this->lng->txt(
'type'));
421 $this->tpl->setVariable(
"TXT_GEN",$this->lng->txt(
'meta_general'));
422 $this->tpl->setVariable(
"TXT_LAN",$this->lng->txt(
'language'));
424 'search_adv[language]'
425 ,array(0 => $this->lng->txt(
'meta_please_select'))));
427 $this->tpl->setVariable(
"TXT_TITLE",$this->lng->txt(
'meta_title').
'/'.
428 $this->lng->txt(
'meta_keyword').
'/'.
429 $this->lng->txt(
'meta_description'));
430 $this->tpl->setVariable(
"TXT_COV",$this->lng->txt(
'meta_coverage'));
431 $this->tpl->setVariable(
"TXT_STRUCT",$this->lng->txt(
'meta_structure'));
433 'search_adv[structure]',
434 array(0 => $this->lng->txt(
'meta_please_select'))));
438 if($this->options[
'title_ao'] ==
'and')
440 $this->tpl->setVariable(
"TITLE_AND_CHECKED",
'checked=checked');
444 $this->tpl->setVariable(
"TITLE_OR_CHECKED",
'checked=checked');
446 if($this->options[
'coverage_ao'] ==
'and')
448 $this->tpl->setVariable(
"COVERAGE_AND_CHECKED",
'checked=checked');
452 $this->tpl->setVariable(
"COVERAGE_OR_CHECKED",
'checked=checked');
458 $this->tpl->setVariable(
"TXT_LIFECYCLE",$this->lng->txt(
'meta_lifecycle'));
459 $this->tpl->setVariable(
"TXT_STATUS",$this->lng->txt(
'meta_status'));
460 $this->tpl->setVariable(
"SEL_STATUS",
462 'search_adv[status]',
463 array(0 => $this->lng->txt(
'meta_please_select'))));
464 $this->tpl->setVariable(
"TXT_VERSION",$this->lng->txt(
'meta_version'));
467 $this->tpl->setVariable(
"TXT_CONTRIBUTOR",$this->lng->txt(
'meta_contribute'));
468 $this->tpl->setVariable(
"SEL_CONTRIBUTOR",
471 array(0 => $this->lng->txt(
'meta_please_select'))));
474 if($this->options[
'entity_ao'] ==
'and')
476 $this->tpl->setVariable(
"ENTITY_AND_CHECKED",
'checked=checked');
480 $this->tpl->setVariable(
"ENTITY_OR_CHECKED",
'checked=checked');
482 if($this->options[
'version_ao'] ==
'and')
484 $this->tpl->setVariable(
"VERSION_AND_CHECKED",
'checked=checked');
488 $this->tpl->setVariable(
"VERSION_OR_CHECKED",
'checked=checked');
492 $this->tpl->setVariable(
"TXT_TECHNICAL",$this->lng->txt(
'meta_technical'));
493 $this->tpl->setVariable(
"TXT_FORMAT",$this->lng->txt(
'meta_format'));
494 $this->tpl->setVariable(
"TXT_OS",$this->lng->txt(
'meta_operating_system'));
495 $this->tpl->setVariable(
"TXT_BROWSER",$this->lng->txt(
'meta_browser'));
496 $this->tpl->setVariable(
"TXT_DURATION",$this->lng->txt(
'meta_duration'));
497 $this->tpl->setVariable(
"FROM",$this->lng->txt(
'from'));
498 $this->tpl->setVariable(
"TIL",$this->lng->txt(
'until'));
500 $this->tpl->setVariable(
"SEL_FORMAT",
502 'search_adv[format]',
503 array(0 => $this->lng->txt(
'meta_please_select'))));
504 $this->tpl->setVariable(
"SEL_OS",
507 array(0 => $this->lng->txt(
'meta_please_select'))));
508 $this->tpl->setVariable(
"SEL_BROWSER",
510 'search_adv[browser]',
511 array(0 => $this->lng->txt(
'meta_please_select'))));
512 $this->tpl->setVariable(
"SEL_DURATION_1",
514 $this->tpl->setVariable(
"SEL_DURATION_2",
518 $this->tpl->setVariable(
"TXT_EDUCATIONAL",$this->lng->txt(
'meta_education'));
519 $this->tpl->setVariable(
"TXT_INTERACTIVITY",$this->lng->txt(
'meta_interactivity_type'));
520 $this->tpl->setVariable(
"TXT_RESOURCE",$this->lng->txt(
'meta_learning_resource_type'));
521 $this->tpl->setVariable(
"TXT_LEVEL",$this->lng->txt(
'meta_interactivity_level'));
522 $this->tpl->setVariable(
"TXT_DENSITY",$this->lng->txt(
'meta_semantic_density'));
523 $this->tpl->setVariable(
"TXT_END_USER",$this->lng->txt(
'meta_intended_end_user_role'));
524 $this->tpl->setVariable(
"TXT_CONTEXT",$this->lng->txt(
'meta_context'));
525 $this->tpl->setVariable(
"TXT_DIFFICULTY",$this->lng->txt(
'meta_difficulty'));
526 $this->tpl->setVariable(
"TXT_AGE_RANGE",$this->lng->txt(
'meta_typical_age_range'));
527 $this->tpl->setVariable(
"TXT_LEARNING_TIME",$this->lng->txt(
'meta_typical_learning_time'));
530 $this->tpl->setVariable(
"SEL_INTERACTIVITY",
532 'search_adv[int_type]',
533 array(0 => $this->lng->txt(
'meta_please_select'))));
534 $this->tpl->setVariable(
"SEL_RESOURCE",
536 'search_adv[lea_type]',
537 array(0 => $this->lng->txt(
'meta_please_select'))));
538 $this->tpl->setVariable(
"SEL_LEVEL_1",
540 'search_adv[int_level_1]',
541 array(0 => $this->lng->txt(
'meta_please_select'))));
542 $this->tpl->setVariable(
"SEL_LEVEL_2",
544 'search_adv[int_level_2]',
545 array(0 => $this->lng->txt(
'meta_please_select'))));
546 $this->tpl->setVariable(
"SEL_DENSITY_1",
549 array(0 => $this->lng->txt(
'meta_please_select'))));
550 $this->tpl->setVariable(
"SEL_DENSITY_2",
553 array(0 => $this->lng->txt(
'meta_please_select'))));
554 $this->tpl->setVariable(
"SEL_END_USER",
556 'search_adv[int_role]',
557 array(0 => $this->lng->txt(
'meta_please_select'))));
558 $this->tpl->setVariable(
"SEL_CONTEXT",
561 array(0 => $this->lng->txt(
'meta_please_select'))));
562 $this->tpl->setVariable(
"SEL_DIFFICULTY_1",
565 array(0 => $this->lng->txt(
'meta_please_select'))));
566 $this->tpl->setVariable(
"SEL_DIFFICULTY_2",
569 array(0 => $this->lng->txt(
'meta_please_select'))));
570 $this->tpl->setVariable(
"SEL_AGE_RANGE_1",
572 'search_adv[typ_age_1]',
573 array(0 => $this->lng->txt(
'meta_please_select'))));
574 $this->tpl->setVariable(
"SEL_AGE_RANGE_2",
576 'search_adv[typ_age_2]',
577 array(0 => $this->lng->txt(
'meta_please_select'))));
578 $this->tpl->setVariable(
"SEL_LEARNING_TIME_1",
580 'search_adv[typ_lea_1]',
581 array(0 => $this->lng->txt(
'meta_please_select'))));
582 $this->tpl->setVariable(
"SEL_LEARNING_TIME_2",
584 'search_adv[typ_lea_2]',
585 array(0 => $this->lng->txt(
'meta_please_select'))));
588 $this->tpl->setVariable(
"TXT_RIGHTS",$this->lng->txt(
'meta_rights'));
589 $this->tpl->setVariable(
"TXT_COSTS",$this->lng->txt(
'meta_cost'));
590 $this->tpl->setVariable(
"TXT_COPYRIGHT",$this->lng->txt(
'meta_copyright_and_other_restrictions'));
592 $this->tpl->setVariable(
"SEL_COSTS",
594 'search_adv[costs]',array(0 => $this->lng->txt(
'meta_please_select'))));
595 $this->tpl->setVariable(
"SEL_COPYRIGHT",
597 'search_adv[copyright]',
598 array(0 => $this->lng->txt(
'meta_please_select'))));
601 $this->tpl->setVariable(
"TXT_CLASSIFICATION",$this->lng->txt(
'meta_classification'));
602 $this->tpl->setVariable(
"TXT_PURPOSE",$this->lng->txt(
'meta_purpose'));
603 $this->tpl->setVariable(
"TXT_TAXON",$this->lng->txt(
'meta_taxon'));
604 $this->tpl->setVariable(
"TXT_KEYWORD",$this->lng->txt(
'meta_keyword'));
606 $this->tpl->setVariable(
"SEL_PURPOSE",
608 'search_adv[purpose]',
609 array(0 => $this->lng->txt(
'meta_please_select'))));
611 if($this->options[
'taxon_ao'] ==
'and')
613 $this->tpl->setVariable(
"TAXON_AND_CHECKED",
'checked=checked');
617 $this->tpl->setVariable(
"TAXON_OR_CHECKED",
'checked=checked');
621 if($this->options[
'keyword_ao'] ==
'and')
623 $this->tpl->setVariable(
"KEYWORD_AND_CHECKED",
'checked=checked');
627 $this->tpl->setVariable(
"KEYWORD_OR_CHECKED",
'checked=checked');
631 $this->tpl->setVariable(
"BTN_SEARCH",$this->lng->txt(
'search'));
632 $this->tpl->setVariable(
"BTN_RESET",$this->lng->txt(
'reset'));
641 $this->tpl->setCurrentBlock(
"header_image");
643 $this->tpl->parseCurrentBlock();
645 $this->tpl->setVariable(
"TXT_HEADER",$this->lng->txt(
'search'));
647 $this->tpl->addBlockFile(
"TABS",
"tabs",
"tpl.tabs.html");
649 $this->tpl->setCurrentBlock(
"tab");
650 $this->tpl->setVariable(
"TAB_TYPE",
"tabinactive");
651 $this->tpl->setVariable(
"TAB_LINK",$this->ctrl->getLinkTargetByClass(
'ilsearchgui'));
652 $this->tpl->setVariable(
"TAB_TEXT",$this->lng->txt(
"search"));
653 $this->tpl->parseCurrentBlock();
655 $this->tpl->setCurrentBlock(
"tab");
656 $this->tpl->setVariable(
"TAB_TYPE",
"tabactive");
657 $this->tpl->setVariable(
"TAB_LINK",$this->ctrl->getLinkTarget($this));
658 $this->tpl->setVariable(
"TAB_TEXT",$this->lng->txt(
"search_advanced"));
659 $this->tpl->parseCurrentBlock();
661 $this->tpl->setCurrentBlock(
"tab");
662 $this->tpl->setVariable(
"TAB_TYPE",
"tabinactive");
663 $this->tpl->setVariable(
"TAB_LINK",$this->ctrl->getLinkTargetByClass(
'ilsearchresultgui'));
664 $this->tpl->setVariable(
"TAB_TEXT",$this->lng->txt(
"search_search_results"));
665 $this->tpl->parseCurrentBlock();
670 include_once
'Services/Search/classes/class.ilUserResult.php';
671 include_once
'Services/Search/classes/class.ilSearchFolder.php';
676 if(!$_POST[
'folder'])
683 if(!count($_POST[
'result']))
691 $folder_obj =&
new ilSearchFolder($ilUser->getId(),(int) $_POST[
'folder']);
693 foreach($_POST[
'result'] as
$ref_id)
702 $search_res_obj->setTarget($target);
704 $folder_obj->assignResult($search_res_obj);
705 unset($search_res_obj);
725 include_once
'Services/Search/classes/class.ilSearchResult.php';
734 if(count($result_obj->getResults()))
737 $this->
addPager($result_obj,
'adv_max_page');
739 include_once
'Services/Search/classes/class.ilSearchResultPresentationGUI.php';
741 $this->tpl->setVariable(
"RESULTS",$search_result_presentation->showResults());
753 include_once
'Services/Search/classes/class.ilSearchResult.php';
762 if(count($result_obj->getResults()))
765 $this->
addPager($result_obj,
'adv_max_page');
767 include_once
'Services/Search/classes/class.ilSearchResultPresentationGUI.php';
769 $this->tpl->setVariable(
"RESULTS",$search_result_presentation->showResults());
777 if(!$this->options[
'content'])
781 include_once
'Services/Search/classes/class.ilObjectSearchFactory.php';
782 include_once
'Services/Search/classes/class.ilQueryParser.php';
783 include_once
'Services/Search/classes/class.ilSearchResult.php';
789 $query_parser->setCombination($this->options[
'content_ao']);
790 $query_parser->parse();
792 if($this->options[
'type'] ==
'all' or $this->options[
'type'] ==
'lms')
796 $res_cont =& $lm_search->performSearch();
797 $res->mergeEntries($res_cont);
799 if($this->settings->enabledLucene())
804 $res_htlm =& $htlm_search->performSearch();
805 $res->mergeEntries($res_htlm);
808 if($this->options[
'type'] ==
'all' or $this->options[
'type'] ==
'tst')
811 $res_tes =& $tst_search->performSearch();
812 $res->mergeEntries($res_tes);
814 if($this->options[
'type'] ==
'all' or $this->options[
'type'] ==
'mep')
817 $res_med =& $med_search->performSearch();
818 $res->mergeEntries($res_med);
820 if($this->options[
'type'] ==
'all' or $this->options[
'type'] ==
'glo')
823 $res_glo =& $glo_search->performSearch();
824 $res->mergeEntries($res_glo);
826 if($this->options[
'type'] ==
'all' or $this->options[
'type'] ==
'webr')
829 $res_web =& $web_search->performSearch();
830 $res->mergeEntries($res_web);
839 if(!$this->options[
'title'])
843 include_once
'Services/Search/classes/class.ilObjectSearchFactory.php';
844 include_once
'Services/Search/classes/class.ilQueryParser.php';
847 $query_parser->setCombination($this->options[
'title_ao']);
848 $query_parser->parse();
850 $meta_search->setFilter($this->filter);
851 $meta_search->setMode(
'title_description');
852 $meta_search->setOptions($this->options);
853 $res_tit =& $meta_search->performSearch();
855 $meta_search->setMode(
'keyword_all');
856 $res_key =& $meta_search->performSearch();
859 $res_tit->mergeEntries($res_key);
868 if(!$this->options[
'coverage'] and !$this->options[
'structure'])
873 include_once
'Services/Search/classes/class.ilObjectSearchFactory.php';
874 include_once
'Services/Search/classes/class.ilQueryParser.php';
876 if($this->options[
'coverage'])
879 $query_parser->setCombination($this->options[
'coverage_ao']);
880 $query_parser->parse();
887 $meta_search->setFilter($this->filter);
888 $meta_search->setMode(
'general');
889 $meta_search->setOptions($this->options);
890 $res =& $meta_search->performSearch();
898 if(!$this->options[
'status'] and !$this->options[
'version'])
902 include_once
'Services/Search/classes/class.ilObjectSearchFactory.php';
903 include_once
'Services/Search/classes/class.ilQueryParser.php';
906 $query_parser->setCombination($this->options[
'version_ao']);
907 $query_parser->parse();
910 $meta_search->setFilter($this->filter);
911 $meta_search->setMode(
'lifecycle');
912 $meta_search->setOptions($this->options);
913 $res =& $meta_search->performSearch();
919 if(!$this->options[
'language'])
923 include_once
'Services/Search/classes/class.ilObjectSearchFactory.php';
924 include_once
'Services/Search/classes/class.ilQueryParser.php';
928 $meta_search->setFilter($this->filter);
929 $meta_search->setMode(
'language');
930 $meta_search->setOptions($this->options);
931 $res =& $meta_search->performSearch();
937 if(!strlen($this->options[
'role']))
941 include_once
'Services/Search/classes/class.ilObjectSearchFactory.php';
942 include_once
'Services/Search/classes/class.ilQueryParser.php';
946 $meta_search->setFilter($this->filter);
947 $meta_search->setMode(
'contribute');
948 $meta_search->setOptions($this->options);
949 $res =& $meta_search->performSearch();
956 if(!$this->options[
'entity'])
960 include_once
'Services/Search/classes/class.ilObjectSearchFactory.php';
961 include_once
'Services/Search/classes/class.ilQueryParser.php';
964 $query_parser->setCombination($this->options[
'entity_ao']);
965 $query_parser->parse();
968 $meta_search->setFilter($this->filter);
969 $meta_search->setMode(
'entity');
970 $meta_search->setOptions($this->options);
971 $res =& $meta_search->performSearch();
979 include_once
'Services/Search/classes/class.ilObjectSearchFactory.php';
980 include_once
'Services/Search/classes/class.ilQueryParser.php';
984 $meta_search->setFilter($this->filter);
985 $meta_search->setMode(
'requirement');
986 $meta_search->setOptions($this->options);
987 $res =& $meta_search->performSearch();
993 include_once
'Services/Search/classes/class.ilObjectSearchFactory.php';
994 include_once
'Services/Search/classes/class.ilQueryParser.php';
998 $meta_search->setFilter($this->filter);
999 $meta_search->setMode(
'format');
1000 $meta_search->setOptions($this->options);
1001 $res =& $meta_search->performSearch();
1007 include_once
'Services/Search/classes/class.ilObjectSearchFactory.php';
1008 include_once
'Services/Search/classes/class.ilQueryParser.php';
1012 $meta_search->setFilter($this->filter);
1013 $meta_search->setMode(
'educational');
1014 $meta_search->setOptions($this->options);
1015 $res =& $meta_search->performSearch();
1021 include_once
'Services/Search/classes/class.ilObjectSearchFactory.php';
1022 include_once
'Services/Search/classes/class.ilQueryParser.php';
1026 $meta_search->setFilter($this->filter);
1027 $meta_search->setMode(
'typical_age_range');
1028 $meta_search->setOptions($this->options);
1029 $res =& $meta_search->performSearch();
1035 if(!$this->options[
'copyright'] and !$this->options[
'costs'])
1039 include_once
'Services/Search/classes/class.ilObjectSearchFactory.php';
1040 include_once
'Services/Search/classes/class.ilQueryParser.php';
1044 $meta_search->setFilter($this->filter);
1045 $meta_search->setMode(
'rights');
1046 $meta_search->setOptions($this->options);
1047 $res =& $meta_search->performSearch();
1055 if(!$this->options[
'purpose'])
1059 include_once
'Services/Search/classes/class.ilObjectSearchFactory.php';
1060 include_once
'Services/Search/classes/class.ilQueryParser.php';
1064 $meta_search->setFilter($this->filter);
1065 $meta_search->setMode(
'classification');
1066 $meta_search->setOptions($this->options);
1067 $res =& $meta_search->performSearch();
1075 if(!$this->options[
'taxon'])
1079 include_once
'Services/Search/classes/class.ilObjectSearchFactory.php';
1080 include_once
'Services/Search/classes/class.ilQueryParser.php';
1083 $query_parser->setCombination($this->options[
'taxon_ao']);
1084 $query_parser->parse();
1087 $meta_search->setFilter($this->filter);
1088 $meta_search->setMode(
'taxon');
1089 $meta_search->setOptions($this->options);
1090 $res =& $meta_search->performSearch();
1104 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php');
1105 foreach($_POST as $key => $value)
1107 if(!is_numeric($key))
1117 include_once
'Services/Search/classes/class.ilObjectSearchFactory.php';
1118 include_once
'Services/Search/classes/class.ilQueryParser.php';
1122 $value = (int) $value;
1132 $start = $this->
toUnixTime($_POST[
'date_start'][$key][
'date']);
1133 $end = $this->
toUnixTime($_POST[
'date_end'][$key][
'date']);
1138 $start = $this->
toUnixTime($_POST[
'date_start'][$key][
'date'],$_POST[
'date_start'][$key][
'time']);
1139 $end = $this->
toUnixTime($_POST[
'date_end'][$key][
'date'],$_POST[
'date_end'][$key][
'time']);
1143 if($_POST[
'boolean'][$key] == 1)
1145 $query_parser->setCombination(
'and');
1149 $query_parser->setCombination(
'or');
1151 $query_parser->parse();
1154 $adv_md_search->setDefinition($def);
1155 $adv_md_search->setTimeRange($start,$end);
1156 $adv_md_search->setFilter($this->filter);
1157 $res_field = $adv_md_search->performSearch();
1167 if(!$this->options[
'keyword'])
1171 include_once
'Services/Search/classes/class.ilObjectSearchFactory.php';
1172 include_once
'Services/Search/classes/class.ilQueryParser.php';
1175 $query_parser->setCombination($this->options[
'keyword_ao']);
1176 $query_parser->parse();
1179 $meta_search->setFilter($this->filter);
1180 $meta_search->setMode(
'keyword');
1181 $meta_search->setOptions($this->options);
1182 $res =& $meta_search->performSearch();
1189 if(isset($_POST[
'cmd'][
'performSearch']))
1191 $this->options =
$_SESSION[
'search_adv'] = $_POST[
'search_adv'];
1193 elseif(isset($_POST[
'cmd'][
'performAdvMDSearch']))
1195 $this->options =
$_SESSION[
'search_adv_md'] = $_POST;
1199 $this->options =
$_SESSION[
'search_adv'];
1202 $_POST[
'result'] = $_POST[
'id'];
1204 $this->filter = array();
1206 switch($this->options[
'type'])
1209 $this->filter[] =
'cat';
1213 $this->filter[] =
'webr';
1217 $this->filter[] =
'lm';
1218 $this->filter[] =
'dbk';
1219 $this->filter[] =
'pg';
1220 $this->filter[] =
'st';
1221 $this->filter[] =
'sahs';
1222 $this->filter[] =
'htlm';
1226 $this->filter[] =
'glo';
1230 $this->filter[] =
'tst';
1231 $this->filter[] =
'svy';
1232 $this->filter[] =
'qpl';
1233 $this->filter[] =
'spl';
1237 $this->filter[] =
'mep';
1241 $this->filter[] =
'crs';
1245 $this->filter[] =
'file';
1249 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
1255 $this->filter[] =
'webr';
1256 $this->filter[] =
'crs';
1257 $this->filter[] =
'mep';
1258 $this->filter[] =
'tst';
1259 $this->filter[] =
'svy';
1260 $this->filter[] =
'qpl';
1261 $this->filter[] =
'spl';
1262 $this->filter[] =
'glo';
1263 $this->filter[] =
'lm';
1264 $this->filter[] =
'dbk';
1265 $this->filter[] =
'pg';
1266 $this->filter[] =
'st';
1267 $this->filter[] =
'sahs';
1268 $this->filter[] =
'htlm';
1269 $this->filter[] =
'file';
1276 $options = array(
'all' => $this->lng->txt(
'search_any'),
1277 'crs' => $this->lng->txt(
'objs_crs'),
1278 'lms' => $this->lng->txt(
'learning_resources'),
1279 'glo' => $this->lng->txt(
'objs_glo'),
1280 'mep' => $this->lng->txt(
'objs_mep'),
1281 'tst' => $this->lng->txt(
'search_tst_svy'),
1282 'file'=> $this->lng->txt(
'objs_file'),
1283 'webr' => $this->lng->txt(
'objs_webr'));
1293 if($this->stored ==
false)
1297 $res->mergeEntries($new_res);
1298 $this->stored =
true;
1304 $res->intersectEntries($new_res);
1316 $this->tpl->setCurrentBlock(
"search_results");
1317 $this->tpl->setVariable(
"BTN_SEARCHRESULTS",$this->lng->txt(
'search_in_result'));
1318 $this->tpl->parseCurrentBlock();
1320 $this->tpl->setCurrentBlock(
"save_result");
1322 $this->tpl->setVariable(
"BTN_SAVE_RESULT",$this->lng->txt(
'save'));
1324 $this->tpl->parseCurrentBlock();
1332 include_once
'Services/Search/classes/class.ilSearchFolder.php';
1340 $options[0] = $this->lng->txt(
"search_select_one_folder_select");
1341 $options[$folder_obj->getRootId()] = $this->lng->txt(
"search_save_as_select").
" ".$this->lng->txt(
"search_search_results");
1343 foreach($subtree as $node)
1345 if($node[
"obj_id"] == $folder_obj->getRootId())
1350 $prefix = $this->lng->txt(
"search_save_as_select");
1351 for($i = 1; $i < $node[
"depth"];++$i)
1353 $prefix .=
" ";
1355 $options[$node[
"obj_id"]] = $prefix.$node[
"title"];
1370 include_once(
'Services/Search/classes/class.ilUserSearchCache.php');
1373 if(
$_GET[
'page_number'])
1375 $this->search_cache->setResultPageNumber((
int)
$_GET[
'page_number']);
1389 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php');
1394 $ilTabs->addSubTabTarget(
'search_lom',$this->ctrl->getLinkTarget($this,
'showSavedResults'));
1395 $ilTabs->addSubTabTarget(
'search_adv_md',$this->ctrl->getLinkTarget($this,
'showSavedAdvMDResults'));
1408 return mktime($time[
'h'],$time[
'm'],0,$date[
'm'],$date[
'd'],$date[
'y']);
1420 if($type == self::TYPE_LOM)