ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilTestSearch Class Reference
+ Inheritance diagram for ilTestSearch:
+ Collaboration diagram for ilTestSearch:

Public Member Functions

__searchTestIntroduction ()
 
__searchTestTitle ()
 
__searchSurveyIntroduction ()
 
__searchSurveyTitle ()
 
performSearch ()
 
- Public Member Functions inherited from ilAbstractSearch
 __construct ($qp_obj)
 Constructor public. More...
 
 setFields ($a_fields)
 Set fields to search. More...
 
 getFields ()
 Get fields to search. More...
 
 setFilter ($a_filter)
 set object type to search in More...
 
 setIdFilter ($a_id_filter)
 Set id filter Filters search by given object id. More...
 
 getIdFilter ()
 Get Id filter. More...
 
 appendToFilter ($a_type)
 Append object type to filter. More...
 
 getFilter ()
 get object type to search in More...
 
 __createLocateString ()
 build locate string in case of AND search More...
 
 __prepareFound (&$row)
 
performSearch ()
 

Additional Inherited Members

- Data Fields inherited from ilAbstractSearch
 $db = null
 
 $query_parser = null
 
 $search_result = null
 
 $object_types
 

Detailed Description

Definition at line 37 of file class.ilTestSearch.php.

Member Function Documentation

◆ __searchSurveyIntroduction()

& ilTestSearch::__searchSurveyIntroduction ( )

Definition at line 77 of file class.ilTestSearch.php.

References $query, $res, $row, ilAbstractSearch\$search_result, ilAbstractSearch\__createLocateString(), array, ilDBConstants\FETCHMODE_OBJECT, ilAbstractSearch\getFields(), and ilAbstractSearch\setFields().

Referenced by performSearch().

78  {
79  $this->setFields(array('introduction'));
80 
81  $where = $this->__createWhereCondition(implode(',',$this->getFields()));
82  $locate = $this->__createLocateString();
83 
84  $query = "SELECT obj_fi ".
85  $locate.
86  "FROM svy_svy ".
87  $where;
88 
89  $res = $this->db->query($query);
90  while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
91  {
92  $this->search_result->addEntry($row->obj_fi,'svy',$this->__prepareFound($row));
93  }
94  return $this->search_result;
95  }
getFields()
Get fields to search.
__createLocateString()
build locate string in case of AND search
setFields($a_fields)
Set fields to search.
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __searchSurveyTitle()

& ilTestSearch::__searchSurveyTitle ( )

Definition at line 96 of file class.ilTestSearch.php.

References $query, $res, $row, ilAbstractSearch\$search_result, ilAbstractSearch\__createLocateString(), array, ilDBConstants\FETCHMODE_OBJECT, ilAbstractSearch\getFields(), and ilAbstractSearch\setFields().

Referenced by performSearch().

97  {
98  $this->setFields(array('title','description'));
99 
100  $where = $this->__createWhereCondition(implode(',',$this->getFields()));
101  $locate = $this->__createLocateString();
102 
103  $query = "SELECT obj_fi ".
104  $locate.
105  "FROM svy_question ".
106  $where;
107 
108  $res = $this->db->query($query);
109  while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
110  {
111  $this->search_result->addEntry($row->obj_fi,'spl',$this->__prepareFound($row));
112  }
113  return $this->search_result;
114  }
getFields()
Get fields to search.
__createLocateString()
build locate string in case of AND search
setFields($a_fields)
Set fields to search.
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __searchTestIntroduction()

& ilTestSearch::__searchTestIntroduction ( )

Definition at line 39 of file class.ilTestSearch.php.

References $query, $res, $row, ilAbstractSearch\$search_result, ilAbstractSearch\__createLocateString(), array, ilDBConstants\FETCHMODE_OBJECT, ilAbstractSearch\getFields(), and ilAbstractSearch\setFields().

Referenced by performSearch().

40  {
41  $this->setFields(array('introduction'));
42 
43  $where = $this->__createWhereCondition(implode(',',$this->getFields()));
44  $locate = $this->__createLocateString();
45 
46  $query = "SELECT obj_fi ".
47  $locate.
48  "FROM tst_tests ".
49  $where;
50 
51  $res = $this->db->query($query);
52  while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
53  {
54  $this->search_result->addEntry($row->obj_fi,'tst',$this->__prepareFound($row));
55  }
56  return $this->search_result;
57  }
getFields()
Get fields to search.
__createLocateString()
build locate string in case of AND search
setFields($a_fields)
Set fields to search.
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __searchTestTitle()

& ilTestSearch::__searchTestTitle ( )

Definition at line 58 of file class.ilTestSearch.php.

References $query, $res, $row, ilAbstractSearch\$search_result, ilAbstractSearch\__createLocateString(), array, ilDBConstants\FETCHMODE_OBJECT, ilAbstractSearch\getFields(), and ilAbstractSearch\setFields().

Referenced by performSearch().

59  {
60  $this->setFields(array('title','description'));
61 
62  $where = $this->__createWhereCondition(implode(',',$this->getFields()));
63  $locate = $this->__createLocateString();
64 
65  $query = "SELECT obj_fi ".
66  $locate.
67  "FROM qpl_questions ".
68  $where;
69 
70  $res = $this->db->query($query);
71  while($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT))
72  {
73  $this->search_result->addEntry($row->obj_fi,'qpl',$this->__prepareFound($row));
74  }
75  return $this->search_result;
76  }
getFields()
Get fields to search.
__createLocateString()
build locate string in case of AND search
setFields($a_fields)
Set fields to search.
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ performSearch()

& ilTestSearch::performSearch ( )

Definition at line 117 of file class.ilTestSearch.php.

References ilAbstractSearch\$search_result, __searchSurveyIntroduction(), __searchSurveyTitle(), __searchTestIntroduction(), and __searchTestTitle().

118  {
119  $this->__searchTestTitle();
120  $this->__searchTestIntroduction();
121  $this->__searchSurveyTitle();
123 
124  return $this->search_result;
125  }
+ Here is the call graph for this function:

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