ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilExerciseSearch Class Reference
+ Inheritance diagram for ilExerciseSearch:
+ Collaboration diagram for ilExerciseSearch:

Public Member Functions

 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.ilExerciseSearch.php.

Member Function Documentation

◆ performSearch()

ilExerciseSearch::performSearch ( )

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

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

40  {
41  $this->setFields(array('instruction','title'));
42 
43  $where = $this->__createWhereCondition();
44  $locate = $this->__createLocateString();
45 
46  $query = "SELECT exc_id, id " .
47  $locate .
48  "FROM exc_assignment " .
49  $where;
50 
51  $res = $this->db->query($query);
52  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
53  $this->search_result->addEntry($row->exc_id, 'exc', $this->__prepareFound($row), $row->id);
54  }
55  return $this->search_result;
56  }
__createLocateString()
build locate string in case of AND search
setFields($a_fields)
Set fields to search.
foreach($_POST as $key=> $value) $res
$query
$row
+ Here is the call graph for this function:

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