ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilAdvancedSearchGUI Class Reference
+ Inheritance diagram for ilAdvancedSearchGUI:
+ Collaboration diagram for ilAdvancedSearchGUI:

Public Member Functions

 ilAdvancedSearchGUI ()
 Constructor public.
 getRootNode ()
executeCommand ()
 Control public.
 reset ()
 searchInResults ()
 performSearch ()
 showAdvMDSearch ()
 Show advanced meta data search.
 showSearch ()
 prepareOutput ()
 saveResult ()
 showSavedResults ()
__performContentSearch ()
__performTitleSearch ()
__performGeneralSearch ()
__performLifecycleSearch ()
__performLanguageSearch ()
__performContributeSearch ()
__performEntitySearch ()
__performRequirementSearch ()
__performFormatSearch ()
__performEducationalSearch ()
__performTypicalAgeRangeSearch ()
__performRightsSearch ()
__performClassificationSearch ()
__performTaxonSearch ()
__performKeywordSearch ()
 __setSearchOptions (&$post_vars)
 __getFilterSelect ()
 __storeEntries (&$res, &$new_res)
 __showSearchInResults ()
 Show search in results button.
 __getFolderSelect ()
 setSubTabs ()
 set sub tabs
- Public Member Functions inherited from ilSearchBaseGUI
 ilSearchBaseGUI ()
 Constructor public.

Data Fields

const TYPE_LOM = 1
const TYPE_ADV_MD = 2
- Data Fields inherited from ilSearchBaseGUI
 $settings = null
 $ilias = null
 $lng = null
 $tpl = null

Protected Member Functions

 initAdvancedMetaDataForm ()
 protected
 performAdvMDSearch ()
 perform advanced meta data search
- Protected Member Functions inherited from ilSearchBaseGUI
 addPager ($result, $a_session_key)
 Add Pager.

Protected Attributes

 $last_section = 'adv_search'
 $tabs_gui
- Protected Attributes inherited from ilSearchBaseGUI
 $ctrl = null

Private Member Functions

 showSavedAdvMDResults ()
 show advanced meta data results
 searchAdvancedMD ($res)
 Perform advanced meta data search.
 initUserSearchCache ()
 Init user search cache.
 toUnixTime ($date, $time=array())
 convert input array to unix time
 initSearchType ($type)
 init search type (LOM Search or Advanced meta data search)

Private Attributes

 $options = array()
 array of all options select boxes,'and' 'or' and query strings public

Detailed Description

Definition at line 38 of file class.ilAdvancedSearchGUI.php.

Member Function Documentation

ilAdvancedSearchGUI::__getFilterSelect ( )

Definition at line 1274 of file class.ilAdvancedSearchGUI.php.

References $options, and formSelect().

Referenced by showSearch().

{
$options = array('all' => $this->lng->txt('search_any'),
'crs' => $this->lng->txt('objs_crs'),
'lms' => $this->lng->txt('learning_resources'),
'glo' => $this->lng->txt('objs_glo'),
'mep' => $this->lng->txt('objs_mep'),
'tst' => $this->lng->txt('search_tst_svy'),
'file'=> $this->lng->txt('objs_file'),
'webr' => $this->lng->txt('objs_webr'));
return ilUtil::formSelect($this->options['type'],'search_adv[type]',$options,false,true);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAdvancedSearchGUI::__getFolderSelect ( )

Definition at line 1328 of file class.ilAdvancedSearchGUI.php.

References $options, formSelect(), and ilSearchFolder\getSubtree().

Referenced by __showSearchInResults().

{
global $ilUser;
include_once 'Services/Search/classes/class.ilSearchFolder.php';
// INITIATE SEARCH FOLDER OBJECT
$folder_obj =& new ilSearchFolder($ilUser->getId());
$subtree = $folder_obj->getSubtree();
$options[0] = $this->lng->txt("search_select_one_folder_select");
$options[$folder_obj->getRootId()] = $this->lng->txt("search_save_as_select")." ".$this->lng->txt("search_search_results");
foreach($subtree as $node)
{
if($node["obj_id"] == $folder_obj->getRootId())
{
continue;
}
// CREATE PREFIX
$prefix = $this->lng->txt("search_save_as_select");
for($i = 1; $i < $node["depth"];++$i)
{
$prefix .= "&nbsp;&nbsp;";
}
$options[$node["obj_id"]] = $prefix.$node["title"];
}
return ilUtil::formSelect(0,'folder',$options,false,true);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilAdvancedSearchGUI::__performClassificationSearch ( )

Definition at line 1052 of file class.ilAdvancedSearchGUI.php.

References $res, and ilObjectSearchFactory\_getAdvancedSearchInstance().

Referenced by performSearch().

{
// Return if 'any'
if(!$this->options['purpose'])
{
return false;
}
include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
include_once 'Services/Search/classes/class.ilQueryParser.php';
$meta_search->setFilter($this->filter);
$meta_search->setMode('classification');
$meta_search->setOptions($this->options);
$res =& $meta_search->performSearch();
return $res;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilAdvancedSearchGUI::__performContentSearch ( )

Definition at line 775 of file class.ilAdvancedSearchGUI.php.

References $res, ilObjectSearchFactory\_getGlossaryDefinitionSearchInstance(), ilObjectSearchFactory\_getHTLMSearchInstance(), ilObjectSearchFactory\_getLMContentSearchInstance(), ilObjectSearchFactory\_getMediaPoolSearchInstance(), ilObjectSearchFactory\_getTestSearchInstance(), ilObjectSearchFactory\_getWebresourceSearchInstance(), and ilUtil\stripSlashes().

Referenced by performSearch().

{
if(!$this->options['content'])
{
return false;
}
include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
include_once 'Services/Search/classes/class.ilQueryParser.php';
include_once 'Services/Search/classes/class.ilSearchResult.php';
$res =& new ilSearchResult();
$query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['content']));
$query_parser->setCombination($this->options['content_ao']);
$query_parser->parse();
if($this->options['type'] == 'all' or $this->options['type'] == 'lms')
{
// LM content search
$res_cont =& $lm_search->performSearch();
$res->mergeEntries($res_cont);
if($this->settings->enabledLucene())
{
// HTLM content search
$htlm_search =& ilObjectSearchFactory::_getHTLMSearchInstance($query_parser);
$res_htlm =& $htlm_search->performSearch();
$res->mergeEntries($res_htlm);
}
}
if($this->options['type'] == 'all' or $this->options['type'] == 'tst')
{
$tst_search =& ilObjectSearchFactory::_getTestSearchInstance($query_parser);
$res_tes =& $tst_search->performSearch();
$res->mergeEntries($res_tes);
}
if($this->options['type'] == 'all' or $this->options['type'] == 'mep')
{
$res_med =& $med_search->performSearch();
$res->mergeEntries($res_med);
}
if($this->options['type'] == 'all' or $this->options['type'] == 'glo')
{
$res_glo =& $glo_search->performSearch();
$res->mergeEntries($res_glo);
}
if($this->options['type'] == 'all' or $this->options['type'] == 'webr')
{
$res_web =& $web_search->performSearch();
$res->mergeEntries($res_web);
}
return $res;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilAdvancedSearchGUI::__performContributeSearch ( )

Definition at line 935 of file class.ilAdvancedSearchGUI.php.

References $res, and ilObjectSearchFactory\_getAdvancedSearchInstance().

Referenced by performSearch().

{
if(!strlen($this->options['role']))
{
return false;
}
include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
include_once 'Services/Search/classes/class.ilQueryParser.php';
$meta_search->setFilter($this->filter);
$meta_search->setMode('contribute');
$meta_search->setOptions($this->options);
$res =& $meta_search->performSearch();
return $res;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilAdvancedSearchGUI::__performEducationalSearch ( )

Definition at line 1005 of file class.ilAdvancedSearchGUI.php.

References $res, and ilObjectSearchFactory\_getAdvancedSearchInstance().

Referenced by performSearch().

{
include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
include_once 'Services/Search/classes/class.ilQueryParser.php';
$meta_search->setFilter($this->filter);
$meta_search->setMode('educational');
$meta_search->setOptions($this->options);
$res =& $meta_search->performSearch();
return $res;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilAdvancedSearchGUI::__performEntitySearch ( )

Definition at line 953 of file class.ilAdvancedSearchGUI.php.

References $res, ilObjectSearchFactory\_getAdvancedSearchInstance(), and ilUtil\stripSlashes().

Referenced by performSearch().

{
// Return if 'any'
if(!$this->options['entity'])
{
return false;
}
include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
include_once 'Services/Search/classes/class.ilQueryParser.php';
$query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['entity']));
$query_parser->setCombination($this->options['entity_ao']);
$query_parser->parse();
$meta_search =& ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
$meta_search->setFilter($this->filter);
$meta_search->setMode('entity');
$meta_search->setOptions($this->options);
$res =& $meta_search->performSearch();
return $res;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilAdvancedSearchGUI::__performFormatSearch ( )

Definition at line 991 of file class.ilAdvancedSearchGUI.php.

References $res, and ilObjectSearchFactory\_getAdvancedSearchInstance().

Referenced by performSearch().

{
include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
include_once 'Services/Search/classes/class.ilQueryParser.php';
$meta_search->setFilter($this->filter);
$meta_search->setMode('format');
$meta_search->setOptions($this->options);
$res =& $meta_search->performSearch();
return $res;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilAdvancedSearchGUI::__performGeneralSearch ( )

Definition at line 866 of file class.ilAdvancedSearchGUI.php.

References $res, ilObjectSearchFactory\_getAdvancedSearchInstance(), and ilUtil\stripSlashes().

Referenced by performSearch().

{
if(!$this->options['coverage'] and !$this->options['structure'])
{
return false;
}
include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
include_once 'Services/Search/classes/class.ilQueryParser.php';
if($this->options['coverage'])
{
$query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['coverage']));
$query_parser->setCombination($this->options['coverage_ao']);
$query_parser->parse();
}
else
{
$query_parser = new ilQueryParser('');
}
$meta_search =& ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
$meta_search->setFilter($this->filter);
$meta_search->setMode('general');
$meta_search->setOptions($this->options);
$res =& $meta_search->performSearch();
return $res;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilAdvancedSearchGUI::__performKeywordSearch ( )

Definition at line 1164 of file class.ilAdvancedSearchGUI.php.

References $res, ilObjectSearchFactory\_getAdvancedSearchInstance(), and ilUtil\stripSlashes().

Referenced by performSearch().

{
// Return if 'any'
if(!$this->options['keyword'])
{
return false;
}
include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
include_once 'Services/Search/classes/class.ilQueryParser.php';
$query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['keyword']));
$query_parser->setCombination($this->options['keyword_ao']);
$query_parser->parse();
$meta_search =& ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
$meta_search->setFilter($this->filter);
$meta_search->setMode('keyword');
$meta_search->setOptions($this->options);
$res =& $meta_search->performSearch();
return $res;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilAdvancedSearchGUI::__performLanguageSearch ( )

Definition at line 917 of file class.ilAdvancedSearchGUI.php.

References $res, and ilObjectSearchFactory\_getAdvancedSearchInstance().

Referenced by performSearch().

{
if(!$this->options['language'])
{
return false;
}
include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
include_once 'Services/Search/classes/class.ilQueryParser.php';
$meta_search->setFilter($this->filter);
$meta_search->setMode('language');
$meta_search->setOptions($this->options);
$res =& $meta_search->performSearch();
return $res;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilAdvancedSearchGUI::__performLifecycleSearch ( )

Definition at line 895 of file class.ilAdvancedSearchGUI.php.

References $res, ilObjectSearchFactory\_getAdvancedSearchInstance(), and ilUtil\stripSlashes().

Referenced by performSearch().

{
// Return if 'any'
if(!$this->options['status'] and !$this->options['version'])
{
return false;
}
include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
include_once 'Services/Search/classes/class.ilQueryParser.php';
$query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['version']));
$query_parser->setCombination($this->options['version_ao']);
$query_parser->parse();
$meta_search =& ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
$meta_search->setFilter($this->filter);
$meta_search->setMode('lifecycle');
$meta_search->setOptions($this->options);
$res =& $meta_search->performSearch();
return $res;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilAdvancedSearchGUI::__performRequirementSearch ( )

Definition at line 977 of file class.ilAdvancedSearchGUI.php.

References $res, and ilObjectSearchFactory\_getAdvancedSearchInstance().

Referenced by performSearch().

{
include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
include_once 'Services/Search/classes/class.ilQueryParser.php';
$meta_search->setFilter($this->filter);
$meta_search->setMode('requirement');
$meta_search->setOptions($this->options);
$res =& $meta_search->performSearch();
return $res;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilAdvancedSearchGUI::__performRightsSearch ( )

Definition at line 1033 of file class.ilAdvancedSearchGUI.php.

References $res, and ilObjectSearchFactory\_getAdvancedSearchInstance().

Referenced by performSearch().

{
if(!$this->options['copyright'] and !$this->options['costs'])
{
return false;
}
include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
include_once 'Services/Search/classes/class.ilQueryParser.php';
$meta_search->setFilter($this->filter);
$meta_search->setMode('rights');
$meta_search->setOptions($this->options);
$res =& $meta_search->performSearch();
return $res;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilAdvancedSearchGUI::__performTaxonSearch ( )

Definition at line 1072 of file class.ilAdvancedSearchGUI.php.

References $res, ilObjectSearchFactory\_getAdvancedSearchInstance(), and ilUtil\stripSlashes().

Referenced by performSearch().

{
// Return if 'any'
if(!$this->options['taxon'])
{
return false;
}
include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
include_once 'Services/Search/classes/class.ilQueryParser.php';
$query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['taxon']));
$query_parser->setCombination($this->options['taxon_ao']);
$query_parser->parse();
$meta_search =& ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
$meta_search->setFilter($this->filter);
$meta_search->setMode('taxon');
$meta_search->setOptions($this->options);
$res =& $meta_search->performSearch();
return $res;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilAdvancedSearchGUI::__performTitleSearch ( )

Definition at line 837 of file class.ilAdvancedSearchGUI.php.

References ilObjectSearchFactory\_getAdvancedSearchInstance(), and ilUtil\stripSlashes().

Referenced by performAdvMDSearch(), and performSearch().

{
if(!$this->options['title'])
{
return false;
}
include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
include_once 'Services/Search/classes/class.ilQueryParser.php';
$query_parser = new ilQueryParser(ilUtil::stripSlashes($this->options['title']));
$query_parser->setCombination($this->options['title_ao']);
$query_parser->parse();
$meta_search =& ilObjectSearchFactory::_getAdvancedSearchInstance($query_parser);
$meta_search->setFilter($this->filter);
$meta_search->setMode('title_description');
$meta_search->setOptions($this->options);
$res_tit =& $meta_search->performSearch();
$meta_search->setMode('keyword_all');
$res_key =& $meta_search->performSearch();
// merge them
$res_tit->mergeEntries($res_key);
return $res_tit;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilAdvancedSearchGUI::__performTypicalAgeRangeSearch ( )

Definition at line 1019 of file class.ilAdvancedSearchGUI.php.

References $res, and ilObjectSearchFactory\_getAdvancedSearchInstance().

Referenced by performSearch().

{
include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
include_once 'Services/Search/classes/class.ilQueryParser.php';
$meta_search->setFilter($this->filter);
$meta_search->setMode('typical_age_range');
$meta_search->setOptions($this->options);
$res =& $meta_search->performSearch();
return $res;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAdvancedSearchGUI::__setSearchOptions ( $post_vars)

Definition at line 1187 of file class.ilAdvancedSearchGUI.php.

References $_SESSION, and ilAdvancedMDRecord\_getActivatedObjTypes().

Referenced by ilAdvancedSearchGUI().

{
if(isset($_POST['cmd']['performSearch']))
{
$this->options = $_SESSION['search_adv'] = $_POST['search_adv'];
}
elseif(isset($_POST['cmd']['performAdvMDSearch']))
{
$this->options = $_SESSION['search_adv_md'] = $_POST;
}
else
{
$this->options = $_SESSION['search_adv'];
}
$_POST['result'] = $_POST['id'];
$this->filter = array();
switch($this->options['type'])
{
case 'cat':
$this->filter[] = 'cat';
break;
case 'webr':
$this->filter[] = 'webr';
break;
case 'lms':
$this->filter[] = 'lm';
$this->filter[] = 'dbk';
$this->filter[] = 'pg';
$this->filter[] = 'st';
$this->filter[] = 'sahs';
$this->filter[] = 'htlm';
break;
case 'glo':
$this->filter[] = 'glo';
break;
case 'tst':
$this->filter[] = 'tst';
$this->filter[] = 'svy';
$this->filter[] = 'qpl';
$this->filter[] = 'spl';
break;
case 'mep':
$this->filter[] = 'mep';
break;
case 'crs':
$this->filter[] = 'crs';
break;
case 'file':
$this->filter[] = 'file';
break;
case 'adv_all':
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
break;
case 'all':
default:
$this->filter[] = 'webr';
$this->filter[] = 'crs';
$this->filter[] = 'mep';
$this->filter[] = 'tst';
$this->filter[] = 'svy';
$this->filter[] = 'qpl';
$this->filter[] = 'spl';
$this->filter[] = 'glo';
$this->filter[] = 'lm';
$this->filter[] = 'dbk';
$this->filter[] = 'pg';
$this->filter[] = 'st';
$this->filter[] = 'sahs';
$this->filter[] = 'htlm';
$this->filter[] = 'file';
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAdvancedSearchGUI::__showSearchInResults ( )

Show search in results button.

If search was successful

Returns
void public

Definition at line 1314 of file class.ilAdvancedSearchGUI.php.

References __getFolderSelect(), and ilUtil\getImagePath().

Referenced by performAdvMDSearch(), performSearch(), showSavedAdvMDResults(), and showSavedResults().

{
$this->tpl->setCurrentBlock("search_results");
$this->tpl->setVariable("BTN_SEARCHRESULTS",$this->lng->txt('search_in_result'));
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("save_result");
$this->tpl->setVariable("DOWNRIGHT",ilUtil::getImagePath('arrow_downright.gif'));
$this->tpl->setVariable("BTN_SAVE_RESULT",$this->lng->txt('save'));
$this->tpl->setVariable("SELECT_FOLDER",$this->__getFolderSelect());
$this->tpl->parseCurrentBlock();
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAdvancedSearchGUI::__storeEntries ( $res,
$new_res 
)

Definition at line 1290 of file class.ilAdvancedSearchGUI.php.

References $res.

Referenced by performAdvMDSearch(), performSearch(), and searchAdvancedMD().

{
if($this->stored == false)
{
$res->mergeEntries($new_res);
$this->stored = true;
return true;
}
else
{
$res->intersectEntries($new_res);
return true;
}
}

+ Here is the caller graph for this function:

& ilAdvancedSearchGUI::executeCommand ( )

Control public.

Definition at line 82 of file class.ilAdvancedSearchGUI.php.

References $_SESSION, $cmd, initUserSearchCache(), and prepareOutput().

{
global $rbacsystem;
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
switch($next_class)
{
default:
if(!$cmd)
{
switch($_SESSION['search_last_sub_section'])
{
case self::TYPE_ADV_MD:
$cmd = "showSavedAdvMDResults";
break;
default:
$cmd = "showSavedResults";
break;
}
}
$this->prepareOutput();
$this->$cmd();
break;
}
return true;
}

+ Here is the call graph for this function:

ilAdvancedSearchGUI::getRootNode ( )

Definition at line 72 of file class.ilAdvancedSearchGUI.php.

Referenced by performAdvMDSearch(), and performSearch().

{
return ROOT_FOLDER_ID;
}

+ Here is the caller graph for this function:

ilAdvancedSearchGUI::ilAdvancedSearchGUI ( )

Constructor public.

Definition at line 59 of file class.ilAdvancedSearchGUI.php.

References __setSearchOptions(), and ilSearchBaseGUI\ilSearchBaseGUI().

{
global $ilTabs;
$this->tabs_gui = $ilTabs;
$this->lng->loadLanguageModule('meta');
$this->__setSearchOptions($_POST);
}

+ Here is the call graph for this function:

ilAdvancedSearchGUI::initAdvancedMetaDataForm ( )
protected

protected

Definition at line 252 of file class.ilAdvancedSearchGUI.php.

References $options, ilAdvancedMDRecord\_getActivatedObjTypes(), ilRadioOption\addSubItem(), ilAdvancedMDRecordGUI\MODE_SEARCH, ilSelectInputGUI\setOptions(), and ilTextInputGUI\setValue().

Referenced by showAdvMDSearch().

{
if(is_object($this->form))
{
return $this->form;
}
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
$this->form = new ilPropertyFormGUI();
$this->form->setFormAction($this->ctrl->getFormAction($this));
$this->form->setTitle($this->lng->txt('adv_md_search_title'));
$this->form->addCommandButton('performAdvMDSearch',$this->lng->txt('search'));
#$this->form->setSubformMode('right');
$content = new ilTextInputGUI($this->lng->txt('meta_title').'/'.
$this->lng->txt('meta_keyword').'/'.
$this->lng->txt('meta_description'),'title');
$content->setValue($this->options['title']);
$content->setSize(30);
$content->setMaxLength(255);
$content->setSubformMode('right');
$group = new ilRadioGroupInputGUI('','title_ao');
$group->setValue($this->options['title_ao']);
$radio_option = new ilRadioOption($this->lng->txt("search_any_word"),0);
$group->addOption($radio_option);
$radio_option = new ilRadioOption($this->lng->txt("search_all_words"),1);
$group->addOption($radio_option);
$content->addSubItem($group);
$this->form->addItem($content);
$type = new ilSelectInputGUI($this->lng->txt('type'),'type');
$options['adv_all'] = $this->lng->txt('search_any');
{
$options[$obj_type] = $this->lng->txt('objs_'.$obj_type);
}
$type->setOptions($options);
$type->setValue($this->options['type']);
$this->form->addItem($type);
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
$record_gui->setPropertyForm($this->form);
$record_gui->setSearchValues($this->options);
$record_gui->parse();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAdvancedSearchGUI::initSearchType (   $type)
private

init search type (LOM Search or Advanced meta data search)

private

Parameters

Definition at line 1418 of file class.ilAdvancedSearchGUI.php.

References $_SESSION, ilUserSearchCache\ADVANCED_MD_SEARCH, ilUserSearchCache\ADVANCED_SEARCH, TYPE_ADV_MD, and TYPE_LOM.

Referenced by performAdvMDSearch(), performSearch(), reset(), saveResult(), searchInResults(), showSavedAdvMDResults(), and showSavedResults().

{
if($type == self::TYPE_LOM)
{
$_SESSION['search_last_sub_section'] = self::TYPE_LOM;
$this->search_cache->switchSearchType(ilUserSearchCache::ADVANCED_SEARCH);
}
else
{
$_SESSION['search_last_sub_section'] = self::TYPE_ADV_MD;
$this->search_cache->switchSearchType(ilUserSearchCache::ADVANCED_MD_SEARCH);
}
}

+ Here is the caller graph for this function:

ilAdvancedSearchGUI::initUserSearchCache ( )
private

Init user search cache.

private

Definition at line 1366 of file class.ilAdvancedSearchGUI.php.

References $_GET, ilUserSearchCache\_getInstance(), and ilUserSearchCache\ADVANCED_SEARCH.

Referenced by executeCommand().

{
global $ilUser;
include_once('Services/Search/classes/class.ilUserSearchCache.php');
$this->search_cache = ilUserSearchCache::_getInstance($ilUser->getId());
$this->search_cache->switchSearchType(ilUserSearchCache::ADVANCED_SEARCH);
if($_GET['page_number'])
{
$this->search_cache->setResultPageNumber((int) $_GET['page_number']);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAdvancedSearchGUI::performAdvMDSearch ( )
protected

perform advanced meta data search

protected

Definition at line 305 of file class.ilAdvancedSearchGUI.php.

References $_GET, $_SESSION, $res, __performTitleSearch(), __showSearchInResults(), __storeEntries(), ilSearchBaseGUI\addPager(), ADVANCED_MD_SEARCH, getRootNode(), initSearchType(), ilSearchResult\read(), searchAdvancedMD(), ilUtil\sendInfo(), and showAdvMDSearch().

{
global $ilUser;
$this->initSearchType(self::TYPE_ADV_MD);
if(!isset($_GET['page_number']) and $this->search_mode != 'in_results' )
{
unset($_SESSION['adv_max_page']);
$this->search_cache->delete();
}
include_once 'Services/Search/classes/class.ilSearchResult.php';
$res =& new ilSearchResult();
if($res_tit =& $this->__performTitleSearch())
{
$this->__storeEntries($res,$res_tit);
}
if($this->search_mode == 'in_results')
{
include_once 'Services/Search/classes/class.ilSearchResult.php';
$old_result_obj = new ilSearchResult($ilUser->getId());
$old_result_obj->read(ADVANCED_MD_SEARCH);
$res->diffEntriesFromResult($old_result_obj);
}
$res->filter($this->getRootNode(),true);
$res->save();
$this->showAdvMDSearch();
if(!count($res->getResults()))
{
ilUtil::sendInfo($this->lng->txt('search_no_match'));
}
else
{
}
if($res->isLimitReached())
{
$message = sprintf($this->lng->txt('search_limit_reached'),$this->settings->getMaxHits());
ilUtil::sendInfo($message);
}
$this->addPager($res,'adv_max_page');
include_once 'Services/Search/classes/class.ilSearchResultPresentationGUI.php';
$search_result_presentation = new ilSearchResultPresentationGUI($res);
$this->tpl->setVariable("RESULTS",$search_result_presentation->showResults());
return true;
}

+ Here is the call graph for this function:

ilAdvancedSearchGUI::performSearch ( )

Definition at line 132 of file class.ilAdvancedSearchGUI.php.

References $_GET, $_SESSION, $res, __performClassificationSearch(), __performContentSearch(), __performContributeSearch(), __performEducationalSearch(), __performEntitySearch(), __performFormatSearch(), __performGeneralSearch(), __performKeywordSearch(), __performLanguageSearch(), __performLifecycleSearch(), __performRequirementSearch(), __performRightsSearch(), __performTaxonSearch(), __performTitleSearch(), __performTypicalAgeRangeSearch(), __showSearchInResults(), __storeEntries(), ilSearchBaseGUI\addPager(), ADVANCED_MD_SEARCH, getRootNode(), initSearchType(), ilSearchResult\read(), ilUtil\sendInfo(), and showSearch().

Referenced by searchInResults().

{
global $ilUser;
$this->initSearchType(self::TYPE_LOM);
if(!isset($_GET['page_number']) and $this->search_mode != 'in_results' )
{
unset($_SESSION['adv_max_page']);
$this->search_cache->delete();
}
include_once 'Services/Search/classes/class.ilSearchResult.php';
$res =& new ilSearchResult();
if($res_con =& $this->__performContentSearch())
{
$this->__storeEntries($res,$res_con);
}
if($res_tit =& $this->__performTitleSearch())
{
$this->__storeEntries($res,$res_tit);
}
if($res_lan =& $this->__performLanguageSearch())
{
$this->__storeEntries($res,$res_lan);
}
if($res_gen =& $this->__performGeneralSearch())
{
$this->__storeEntries($res,$res_gen);
}
if($res_lif =& $this->__performLifecycleSearch())
{
$this->__storeEntries($res,$res_lif);
}
if($res_con =& $this->__performContributeSearch())
{
$this->__storeEntries($res,$res_con);
}
if($res_ent =& $this->__performEntitySearch())
{
$this->__storeEntries($res,$res_ent);
}
if($res_req =& $this->__performRequirementSearch())
{
$this->__storeEntries($res,$res_req);
}
if($res_for =& $this->__performFormatSearch())
{
$this->__storeEntries($res,$res_for);
}
if($res_edu =& $this->__performEducationalSearch())
{
$this->__storeEntries($res,$res_edu);
}
if($res_typ =& $this->__performTypicalAgeRangeSearch())
{
$this->__storeEntries($res,$res_typ);
}
if($res_rig =& $this->__performRightsSearch())
{
$this->__storeEntries($res,$res_rig);
}
if($res_cla =& $this->__performClassificationSearch())
{
$this->__storeEntries($res,$res_cla);
}
if($res_tax =& $this->__performTaxonSearch())
{
$this->__storeEntries($res,$res_tax);
}
if($res_key =& $this->__performKeywordSearch())
{
$this->__storeEntries($res,$res_key);
}
if($this->search_mode == 'in_results')
{
include_once 'Services/Search/classes/class.ilSearchResult.php';
$old_result_obj = new ilSearchResult($ilUser->getId());
$old_result_obj->read(ADVANCED_MD_SEARCH);
$res->diffEntriesFromResult($old_result_obj);
}
$res->filter($this->getRootNode(),true);
$res->save();
$this->showSearch();
if(!count($res->getResults()))
{
ilUtil::sendInfo($this->lng->txt('search_no_match'));
}
else
{
}
if($res->isLimitReached())
{
$message = sprintf($this->lng->txt('search_limit_reached'),$this->settings->getMaxHits());
ilUtil::sendInfo($message);
}
$this->addPager($res,'adv_max_page');
include_once 'Services/Search/classes/class.ilSearchResultPresentationGUI.php';
$search_result_presentation = new ilSearchResultPresentationGUI($res);
$this->tpl->setVariable("RESULTS",$search_result_presentation->showResults());
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAdvancedSearchGUI::prepareOutput ( )

Reimplemented from ilSearchBaseGUI.

Definition at line 637 of file class.ilAdvancedSearchGUI.php.

References ilUtil\getImagePath().

Referenced by executeCommand().

{
$this->tpl->setCurrentBlock("header_image");
$this->tpl->setVariable("IMG_HEADER", ilUtil::getImagePath("icon_src_b.gif"));
$this->tpl->parseCurrentBlock();
$this->tpl->setVariable("TXT_HEADER",$this->lng->txt('search'));
$this->tpl->addBlockFile("TABS","tabs","tpl.tabs.html");
$this->tpl->setCurrentBlock("tab");
$this->tpl->setVariable("TAB_TYPE","tabinactive");
$this->tpl->setVariable("TAB_LINK",$this->ctrl->getLinkTargetByClass('ilsearchgui'));
$this->tpl->setVariable("TAB_TEXT",$this->lng->txt("search"));
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("tab");
$this->tpl->setVariable("TAB_TYPE","tabactive");
$this->tpl->setVariable("TAB_LINK",$this->ctrl->getLinkTarget($this));
$this->tpl->setVariable("TAB_TEXT",$this->lng->txt("search_advanced"));
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("tab");
$this->tpl->setVariable("TAB_TYPE","tabinactive");
$this->tpl->setVariable("TAB_LINK",$this->ctrl->getLinkTargetByClass('ilsearchresultgui'));
$this->tpl->setVariable("TAB_TEXT",$this->lng->txt("search_search_results"));
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAdvancedSearchGUI::reset ( )

Definition at line 113 of file class.ilAdvancedSearchGUI.php.

References initSearchType(), and showSearch().

{
$this->initSearchType(self::TYPE_LOM);
$this->options = array();
$this->showSearch();
}

+ Here is the call graph for this function:

ilAdvancedSearchGUI::saveResult ( )

Definition at line 668 of file class.ilAdvancedSearchGUI.php.

References $ref_id, $title, ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject\_lookupType(), initSearchType(), ilUtil\sendInfo(), ilUserResult\setTitle(), and showSavedResults().

{
include_once 'Services/Search/classes/class.ilUserResult.php';
include_once 'Services/Search/classes/class.ilSearchFolder.php';
global $ilUser;
$this->initSearchType(self::TYPE_LOM);
if(!$_POST['folder'])
{
ilUtil::sendInfo($this->lng->txt('search_select_one'));
$this->showSavedResults();
return false;
}
if(!count($_POST['result']))
{
ilUtil::sendInfo($this->lng->txt('search_select_one_result'));
$this->showSavedResults();
return false;
}
$folder_obj =& new ilSearchFolder($ilUser->getId(),(int) $_POST['folder']);
foreach($_POST['result'] as $ref_id)
{
$target = addslashes(serialize(array('type' => ilObject::_lookupType(ilObject::_lookupObjId($ref_id)),
'id' => $ref_id)));
$search_res_obj =& new ilUserResult($ilUser->getId());
$search_res_obj->setTitle($title);
$search_res_obj->setTarget($target);
$folder_obj->assignResult($search_res_obj);
unset($search_res_obj);
}
ilUtil::sendInfo($this->lng->txt('search_results_saved'));
$this->showSavedResults();
}

+ Here is the call graph for this function:

ilAdvancedSearchGUI::searchAdvancedMD (   $res)
private

Perform advanced meta data search.

private

Parameters
objresult object

Definition at line 1102 of file class.ilAdvancedSearchGUI.php.

References $options, $res, __storeEntries(), ilObjectSearchFactory\_getAdvancedMDSearchInstance(), ilAdvancedMDFieldDefinition\_getInstanceByFieldId(), ilUtil\stripSlashes(), toUnixTime(), ilAdvancedMDFieldDefinition\TYPE_DATE, ilAdvancedMDFieldDefinition\TYPE_DATETIME, and ilAdvancedMDFieldDefinition\TYPE_SELECT.

Referenced by performAdvMDSearch().

{
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php');
foreach($_POST as $key => $value)
{
if(!is_numeric($key))
{
continue;
}
if(!$value)
{
continue;
}
include_once 'Services/Search/classes/class.ilObjectSearchFactory.php';
include_once 'Services/Search/classes/class.ilQueryParser.php';
if($def->getFieldType() == ilAdvancedMDFieldDefinition::TYPE_SELECT)
{
$value = (int) $value;
$options = $def->getFieldValues();
if(!isset($options[$value - 1]))
{
continue;
}
$value = $options[$value - 1];
}
if($def->getFieldType() == ilAdvancedMDFieldDefinition::TYPE_DATE)
{
$start = $this->toUnixTime($_POST['date_start'][$key]['date']);
$end = $this->toUnixTime($_POST['date_end'][$key]['date']);
}
if($def->getFieldType() == ilAdvancedMDFieldDefinition::TYPE_DATETIME)
{
$start = $this->toUnixTime($_POST['date_start'][$key]['date'],$_POST['date_start'][$key]['time']);
$end = $this->toUnixTime($_POST['date_end'][$key]['date'],$_POST['date_end'][$key]['time']);
}
$query_parser = new ilQueryParser(ilUtil::stripSlashes($value));
if($_POST['boolean'][$key] == 1)
{
$query_parser->setCombination('and');
}
else
{
$query_parser->setCombination('or');
}
$query_parser->parse();
$adv_md_search = ilObjectSearchFactory::_getAdvancedMDSearchInstance($query_parser);
$adv_md_search->setDefinition($def);
$adv_md_search->setTimeRange($start,$end);
$adv_md_search->setFilter($this->filter);
$res_field = $adv_md_search->performSearch();
$this->__storeEntries($res,$res_field);
}
return $res;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAdvancedSearchGUI::searchInResults ( )

Definition at line 120 of file class.ilAdvancedSearchGUI.php.

References $_SESSION, initSearchType(), and performSearch().

{
$this->initSearchType(self::TYPE_LOM);
$this->search_mode = 'in_results';
$this->search_cache->setResultPageNumber(1);
unset($_SESSION['adv_max_page']);
$this->performSearch();
return true;
}

+ Here is the call graph for this function:

ilAdvancedSearchGUI::setSubTabs ( )

set sub tabs

public

Definition at line 1385 of file class.ilAdvancedSearchGUI.php.

References ilAdvancedMDFieldDefinition\_getSearchableDefinitionIds().

Referenced by showAdvMDSearch(), and showSearch().

{
global $ilTabs;
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php');
{
return true;
}
$ilTabs->addSubTabTarget('search_lom',$this->ctrl->getLinkTarget($this,'showSavedResults'));
$ilTabs->addSubTabTarget('search_adv_md',$this->ctrl->getLinkTarget($this,'showSavedAdvMDResults'));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAdvancedSearchGUI::showAdvMDSearch ( )

Show advanced meta data search.

public

Definition at line 371 of file class.ilAdvancedSearchGUI.php.

References $_SESSION, initAdvancedMetaDataForm(), and setSubTabs().

Referenced by performAdvMDSearch(), and showSavedAdvMDResults().

{
if(isset($_SESSION['search_adv_md']))
{
$this->options = $_SESSION['search_adv_md'];
}
$this->setSubTabs();
$this->tabs_gui->setSubTabActive('search_adv_md');
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.advanced_adv_search.html','Services/Search');
$this->tpl->setVariable('SEARCH_FORM',$this->form->getHTML());
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAdvancedSearchGUI::showSavedAdvMDResults ( )
private

show advanced meta data results

private

Definition at line 720 of file class.ilAdvancedSearchGUI.php.

References __showSearchInResults(), ilSearchBaseGUI\addPager(), ADVANCED_MD_SEARCH, initSearchType(), ilSearchResult\read(), and showAdvMDSearch().

{
global $ilUser;
// Read old result sets
include_once 'Services/Search/classes/class.ilSearchResult.php';
$this->initSearchType(self::TYPE_ADV_MD);
$result_obj = new ilSearchResult($ilUser->getId());
$result_obj->read(ADVANCED_MD_SEARCH);
$this->showAdvMDSearch();
// Show them
if(count($result_obj->getResults()))
{
$this->addPager($result_obj,'adv_max_page');
include_once 'Services/Search/classes/class.ilSearchResultPresentationGUI.php';
$search_result_presentation = new ilSearchResultPresentationGUI($result_obj);
$this->tpl->setVariable("RESULTS",$search_result_presentation->showResults());
}
return true;
}

+ Here is the call graph for this function:

ilAdvancedSearchGUI::showSavedResults ( )

Definition at line 748 of file class.ilAdvancedSearchGUI.php.

References __showSearchInResults(), ilSearchBaseGUI\addPager(), ADVANCED_SEARCH, initSearchType(), ilSearchResult\read(), and showSearch().

Referenced by saveResult().

{
global $ilUser;
// Read old result sets
include_once 'Services/Search/classes/class.ilSearchResult.php';
$this->initSearchType(self::TYPE_LOM);
$result_obj = new ilSearchResult($ilUser->getId());
$result_obj->read(ADVANCED_SEARCH);
$this->showSearch();
// Show them
if(count($result_obj->getResults()))
{
$this->addPager($result_obj,'adv_max_page');
include_once 'Services/Search/classes/class.ilSearchResultPresentationGUI.php';
$search_result_presentation = new ilSearchResultPresentationGUI($result_obj);
$this->tpl->setVariable("RESULTS",$search_result_presentation->showResults());
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAdvancedSearchGUI::showSearch ( )

Definition at line 388 of file class.ilAdvancedSearchGUI.php.

References __getFilterSelect(), ilMDUtilSelect\_getBrowserSelect(), ilMDUtilSelect\_getContextSelect(), ilMDUtilSelect\_getCopyrightAndOtherRestrictionsSelect(), ilMDUtilSelect\_getCostsSelect(), ilMDUtilSelect\_getDifficultySelect(), ilMDUtilSelect\_getDurationSelect(), ilMDUtilSelect\_getFormatSelect(), ilMDUtilSelect\_getIntendedEndUserRoleSelect(), ilMDUtilSelect\_getInteractivityLevelSelect(), ilMDUtilSelect\_getInteractivityTypeSelect(), ilMDUtilSelect\_getLanguageSelect(), ilMDUtilSelect\_getLearningResourceTypeSelect(), ilMDUtilSelect\_getOperatingSystemSelect(), ilMDUtilSelect\_getPurposeSelect(), ilMDUtilSelect\_getRoleSelect(), ilMDUtilSelect\_getSemanticDensitySelect(), ilMDUtilSelect\_getStatusSelect(), ilMDUtilSelect\_getStructureSelect(), ilMDUtilSelect\_getTypicalAgeRangeSelect(), ilMDUtilSelect\_getTypicalLearningTimeSelect(), ilUtil\prepareFormOutput(), and setSubTabs().

Referenced by performSearch(), reset(), and showSavedResults().

{
global $ilLocator;
$this->setSubTabs();
$this->tabs_gui->setSubTabActive('search_lom');
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.advanced_search.html','Services/Search');
// Header
$this->tpl->setVariable("SEARCH_ACTION",$this->ctrl->getFormAction($this));
$this->tpl->setVariable("TBL_TITLE",$this->lng->txt('search_advanced'));
// Content
$this->tpl->setVariable("TXT_CONTENT",$this->lng->txt('content'));
$this->tpl->setVariable("TXT_OR",$this->lng->txt('search_any_word'));
$this->tpl->setVariable("TXT_AND",$this->lng->txt('search_all_words'));
if($this->options['content_ao'] == 'and')
{
$this->tpl->setVariable("CONTENT_AND_CHECKED",'checked=checked');
}
else
{
$this->tpl->setVariable("CONTENT_OR_CHECKED",'checked=checked');
}
$this->tpl->setVariable("FRM_CONTENT",ilUtil::prepareFormOutput($this->options['content']));
// Type
$this->tpl->setVariable("TXT_TYPE",$this->lng->txt('type'));
$this->tpl->setVariable("SEL_TYPE",$this->__getFilterSelect());
// General
$this->tpl->setVariable("TXT_GEN",$this->lng->txt('meta_general'));
$this->tpl->setVariable("TXT_LAN",$this->lng->txt('language'));
$this->tpl->setVariable("SEL_LAN",ilMDUtilSelect::_getLanguageSelect($this->options['language'],
'search_adv[language]'
,array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("TXT_TITLE",$this->lng->txt('meta_title').'/'.
$this->lng->txt('meta_keyword').'/'.
$this->lng->txt('meta_description'));
$this->tpl->setVariable("TXT_COV",$this->lng->txt('meta_coverage'));
$this->tpl->setVariable("TXT_STRUCT",$this->lng->txt('meta_structure'));
$this->tpl->setVariable("SEL_STRUCT",ilMDUtilSelect::_getStructureSelect($this->options['structure'],
'search_adv[structure]',
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("FRM_TITLE",ilUtil::prepareFormOutput($this->options['title'],true));
$this->tpl->setVariable("FRM_COVERAGE",ilUtil::prepareFormOutput($this->options['coverage'],true));
if($this->options['title_ao'] == 'and')
{
$this->tpl->setVariable("TITLE_AND_CHECKED",'checked=checked');
}
else
{
$this->tpl->setVariable("TITLE_OR_CHECKED",'checked=checked');
}
if($this->options['coverage_ao'] == 'and')
{
$this->tpl->setVariable("COVERAGE_AND_CHECKED",'checked=checked');
}
else
{
$this->tpl->setVariable("COVERAGE_OR_CHECKED",'checked=checked');
}
// Lifecycle
$this->tpl->setVariable("TXT_LIFECYCLE",$this->lng->txt('meta_lifecycle'));
$this->tpl->setVariable("TXT_STATUS",$this->lng->txt('meta_status'));
$this->tpl->setVariable("SEL_STATUS",
ilMDUtilSelect::_getStatusSelect($this->options['status'],
'search_adv[status]',
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("TXT_VERSION",$this->lng->txt('meta_version'));
$this->tpl->setVariable("FRM_VERSION",ilUtil::prepareFormOutput($this->options['version'],true));
$this->tpl->setVariable("TXT_CONTRIBUTOR",$this->lng->txt('meta_contribute'));
$this->tpl->setVariable("SEL_CONTRIBUTOR",
ilMDUtilSelect::_getRoleSelect($this->options['role'],
'search_adv[role]',
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("FRM_ENTITY",ilUtil::prepareFormOutput($this->options['entity'],true));
if($this->options['entity_ao'] == 'and')
{
$this->tpl->setVariable("ENTITY_AND_CHECKED",'checked=checked');
}
else
{
$this->tpl->setVariable("ENTITY_OR_CHECKED",'checked=checked');
}
if($this->options['version_ao'] == 'and')
{
$this->tpl->setVariable("VERSION_AND_CHECKED",'checked=checked');
}
else
{
$this->tpl->setVariable("VERSION_OR_CHECKED",'checked=checked');
}
// Technical
$this->tpl->setVariable("TXT_TECHNICAL",$this->lng->txt('meta_technical'));
$this->tpl->setVariable("TXT_FORMAT",$this->lng->txt('meta_format'));
$this->tpl->setVariable("TXT_OS",$this->lng->txt('meta_operating_system'));
$this->tpl->setVariable("TXT_BROWSER",$this->lng->txt('meta_browser'));
$this->tpl->setVariable("TXT_DURATION",$this->lng->txt('meta_duration'));
$this->tpl->setVariable("FROM",$this->lng->txt('from'));
$this->tpl->setVariable("TIL",$this->lng->txt('until'));
$this->tpl->setVariable("SEL_FORMAT",
ilMDUtilSelect::_getFormatSelect($this->options['format'],
'search_adv[format]',
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("SEL_OS",
'search_adv[os]',
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("SEL_BROWSER",
ilMDUtilSelect::_getBrowserSelect($this->options['browser'],
'search_adv[browser]',
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("SEL_DURATION_1",
ilMDUtilSelect::_getDurationSelect('','md_lan',array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("SEL_DURATION_2",
ilMDUtilSelect::_getDurationSelect('','md_lan',array(0 => $this->lng->txt('meta_please_select'))));
// Educational
$this->tpl->setVariable("TXT_EDUCATIONAL",$this->lng->txt('meta_education'));
$this->tpl->setVariable("TXT_INTERACTIVITY",$this->lng->txt('meta_interactivity_type'));
$this->tpl->setVariable("TXT_RESOURCE",$this->lng->txt('meta_learning_resource_type'));
$this->tpl->setVariable("TXT_LEVEL",$this->lng->txt('meta_interactivity_level'));
$this->tpl->setVariable("TXT_DENSITY",$this->lng->txt('meta_semantic_density'));
$this->tpl->setVariable("TXT_END_USER",$this->lng->txt('meta_intended_end_user_role'));
$this->tpl->setVariable("TXT_CONTEXT",$this->lng->txt('meta_context'));
$this->tpl->setVariable("TXT_DIFFICULTY",$this->lng->txt('meta_difficulty'));
$this->tpl->setVariable("TXT_AGE_RANGE",$this->lng->txt('meta_typical_age_range'));
$this->tpl->setVariable("TXT_LEARNING_TIME",$this->lng->txt('meta_typical_learning_time'));
$this->tpl->setVariable("SEL_INTERACTIVITY",
ilMDUtilSelect::_getInteractivityTypeSelect($this->options['int_type'],
'search_adv[int_type]',
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("SEL_RESOURCE",
'search_adv[lea_type]',
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("SEL_LEVEL_1",
ilMDUtilSelect::_getInteractivityLevelSelect($this->options['int_level_1'],
'search_adv[int_level_1]',
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("SEL_LEVEL_2",
ilMDUtilSelect::_getInteractivityLevelSelect($this->options['int_level_2'],
'search_adv[int_level_2]',
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("SEL_DENSITY_1",
'search_adv[sem_1]',
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("SEL_DENSITY_2",
'search_adv[sem_2]',
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("SEL_END_USER",
'search_adv[int_role]',
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("SEL_CONTEXT",
ilMDUtilSelect::_getContextSelect($this->options['con'],
'search_adv[con]',
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("SEL_DIFFICULTY_1",
ilMDUtilSelect::_getDifficultySelect($this->options['dif_1'],
'search_adv[dif_1]',
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("SEL_DIFFICULTY_2",
ilMDUtilSelect::_getDifficultySelect($this->options['dif_2'],
'search_adv[dif_2]',
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("SEL_AGE_RANGE_1",
ilMDUtilSelect::_getTypicalAgeRangeSelect($this->options['typ_age_1'],
'search_adv[typ_age_1]',
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("SEL_AGE_RANGE_2",
ilMDUtilSelect::_getTypicalAgeRangeSelect($this->options['typ_age_2'],
'search_adv[typ_age_2]',
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("SEL_LEARNING_TIME_1",
ilMDUtilSelect::_getTypicalLearningTimeSelect($this->options['typ_lea_1'],
'search_adv[typ_lea_1]',
array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("SEL_LEARNING_TIME_2",
ilMDUtilSelect::_getTypicalLearningTimeSelect($this->options['typ_lea_2'],
'search_adv[typ_lea_2]',
array(0 => $this->lng->txt('meta_please_select'))));
// RIGHTS
$this->tpl->setVariable("TXT_RIGHTS",$this->lng->txt('meta_rights'));
$this->tpl->setVariable("TXT_COSTS",$this->lng->txt('meta_cost'));
$this->tpl->setVariable("TXT_COPYRIGHT",$this->lng->txt('meta_copyright_and_other_restrictions'));
$this->tpl->setVariable("SEL_COSTS",
ilMDUtilSelect::_getCostsSelect($this->options['costs'],
'search_adv[costs]',array(0 => $this->lng->txt('meta_please_select'))));
$this->tpl->setVariable("SEL_COPYRIGHT",
'search_adv[copyright]',
array(0 => $this->lng->txt('meta_please_select'))));
// CLASSIFICATION
$this->tpl->setVariable("TXT_CLASSIFICATION",$this->lng->txt('meta_classification'));
$this->tpl->setVariable("TXT_PURPOSE",$this->lng->txt('meta_purpose'));
$this->tpl->setVariable("TXT_TAXON",$this->lng->txt('meta_taxon'));
$this->tpl->setVariable("TXT_KEYWORD",$this->lng->txt('meta_keyword'));
$this->tpl->setVariable("SEL_PURPOSE",
ilMDUtilSelect::_getPurposeSelect($this->options['purpose'],
'search_adv[purpose]',
array(0 => $this->lng->txt('meta_please_select'))));
if($this->options['taxon_ao'] == 'and')
{
$this->tpl->setVariable("TAXON_AND_CHECKED",'checked=checked');
}
else
{
$this->tpl->setVariable("TAXON_OR_CHECKED",'checked=checked');
}
$this->tpl->setVariable("FRM_TAXON",ilUtil::prepareFormOutput($this->options['taxon'],true));
if($this->options['keyword_ao'] == 'and')
{
$this->tpl->setVariable("KEYWORD_AND_CHECKED",'checked=checked');
}
else
{
$this->tpl->setVariable("KEYWORD_OR_CHECKED",'checked=checked');
}
$this->tpl->setVariable("FRM_KEYWORD",ilUtil::prepareFormOutput($this->options['keyword'],true));
$this->tpl->setVariable("BTN_SEARCH",$this->lng->txt('search'));
$this->tpl->setVariable("BTN_RESET",$this->lng->txt('reset'));
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAdvancedSearchGUI::toUnixTime (   $date,
  $time = array() 
)
private

convert input array to unix time

private

Parameters

Definition at line 1406 of file class.ilAdvancedSearchGUI.php.

Referenced by searchAdvancedMD().

{
return mktime($time['h'],$time['m'],0,$date['m'],$date['d'],$date['y']);
}

+ Here is the caller graph for this function:

Field Documentation

ilAdvancedSearchGUI::$last_section = 'adv_search'
protected

Definition at line 43 of file class.ilAdvancedSearchGUI.php.

ilAdvancedSearchGUI::$options = array()
private

array of all options select boxes,'and' 'or' and query strings public

Definition at line 51 of file class.ilAdvancedSearchGUI.php.

Referenced by __getFilterSelect(), __getFolderSelect(), initAdvancedMetaDataForm(), and searchAdvancedMD().

ilAdvancedSearchGUI::$tabs_gui
protected

Definition at line 53 of file class.ilAdvancedSearchGUI.php.

const ilAdvancedSearchGUI::TYPE_ADV_MD = 2

Definition at line 41 of file class.ilAdvancedSearchGUI.php.

Referenced by initSearchType().

const ilAdvancedSearchGUI::TYPE_LOM = 1

Definition at line 40 of file class.ilAdvancedSearchGUI.php.

Referenced by initSearchType().


The documentation for this class was generated from the following file: