ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilTestSearch.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
31{
33 {
34 $this->setFields(array('introduction'));
35
36 $where = $this->__createWhereCondition();
37 $locate = $this->__createLocateString();
38
39 $query = "SELECT obj_fi " .
40 $locate .
41 "FROM tst_tests " .
42 $where;
43
44 $res = $this->db->query($query);
45 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
46 $this->search_result->addEntry(
47 (int) $row->obj_fi,
48 'tst',
49 $this->__prepareFound($row)
50 );
51 }
53 }
54
56 {
57 $this->setFields(array('title','description'));
58
59 $where = $this->__createWhereCondition();
60 $locate = $this->__createLocateString();
61
62 $query = "SELECT obj_fi " .
63 $locate .
64 "FROM qpl_questions " .
65 $where;
66
67 $res = $this->db->query($query);
68 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
69 $this->search_result->addEntry(
70 (int) $row->obj_fi,
71 'qpl',
72 $this->__prepareFound($row)
73 );
74 }
76 }
78 {
79 $this->setFields(array('introduction'));
80
81 $where = $this->__createWhereCondition();
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 $this->search_result->addEntry(
92 (int) $row->obj_fi,
93 'svy',
94 $this->__prepareFound($row)
95 );
96 }
98 }
100 {
101 $this->setFields(array('title','description'));
102
103 $where = $this->__createWhereCondition();
104 $locate = $this->__createLocateString();
105
106 $query = "SELECT obj_fi " .
107 $locate .
108 "FROM svy_question " .
109 $where;
110
111 $res = $this->db->query($query);
112 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
113 $this->search_result->addEntry(
114 (int) $row->obj_fi,
115 'spl',
116 $this->__prepareFound($row)
117 );
118 }
120 }
121
122
123 public function performSearch(): ilSearchResult
124 {
125 $this->__searchTestTitle();
127 $this->__searchSurveyTitle();
130 }
131}
setFields(array $a_fields)
ilSearchResult $search_result
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$res
Definition: ltiservices.php:69