|
| | __construct (\ilDBInterface $db) |
| |
| | getUserEntriesForBox (int $box_nr, int $user_id, int $glo_id) |
| |
| | getAllUserEntries (int $user_id, int $glo_id) |
| |
| | getBoxNr (int $term_id, int $user_id, int $glo_id) |
| |
| | createEntry (int $term_id, int $user_id, int $glo_id, int $box_nr, string $date) |
| |
| | updateEntry (int $term_id, int $user_id, int $glo_id, int $box_nr, string $date) |
| |
| | deleteEntries (int $glo_id, int $user_id) |
| |
| | deleteAllUserEntries (int $user_id) |
| |
| | deleteAllGlossaryEntries (int $glo_id) |
| |
| | deleteAllTermEntries (int $term_id) |
| |
◆ __construct()
| ILIAS\Glossary\Flashcard\FlashcardTermDBRepository::__construct |
( |
\ilDBInterface |
$db | ) |
|
◆ createEntry()
| ILIAS\Glossary\Flashcard\FlashcardTermDBRepository::createEntry |
( |
int |
$term_id, |
|
|
int |
$user_id, |
|
|
int |
$glo_id, |
|
|
int |
$box_nr, |
|
|
string |
$date |
|
) |
| |
Definition at line 108 of file class.FlashcardTermDBRepository.php.
115 $this->db->insert(
"glo_flashcard_term", [
116 "term_id" => [
"integer", $term_id],
117 "user_id" => [
"integer", $user_id],
118 "glo_id" => [
"integer", $glo_id],
119 "last_access" => [
"date", $date],
120 "box_nr" => [
"integer", $box_nr]
◆ deleteAllGlossaryEntries()
| ILIAS\Glossary\Flashcard\FlashcardTermDBRepository::deleteAllGlossaryEntries |
( |
int |
$glo_id | ) |
|
Definition at line 159 of file class.FlashcardTermDBRepository.php.
References $q.
162 $q =
"DELETE FROM glo_flashcard_term " .
163 " WHERE glo_id = " . $this->db->quote($glo_id,
"integer");
164 $this->db->manipulate(
$q);
◆ deleteAllTermEntries()
| ILIAS\Glossary\Flashcard\FlashcardTermDBRepository::deleteAllTermEntries |
( |
int |
$term_id | ) |
|
Definition at line 167 of file class.FlashcardTermDBRepository.php.
References $q.
170 $q =
"DELETE FROM glo_flashcard_term " .
171 " WHERE term_id = " . $this->db->quote($term_id,
"integer");
172 $this->db->manipulate(
$q);
◆ deleteAllUserEntries()
| ILIAS\Glossary\Flashcard\FlashcardTermDBRepository::deleteAllUserEntries |
( |
int |
$user_id | ) |
|
Definition at line 151 of file class.FlashcardTermDBRepository.php.
References $q.
154 $q =
"DELETE FROM glo_flashcard_term " .
155 " WHERE user_id = " . $this->db->quote($user_id,
"integer");
156 $this->db->manipulate(
$q);
◆ deleteEntries()
| ILIAS\Glossary\Flashcard\FlashcardTermDBRepository::deleteEntries |
( |
int |
$glo_id, |
|
|
int |
$user_id |
|
) |
| |
Definition at line 141 of file class.FlashcardTermDBRepository.php.
References $q.
145 $q =
"DELETE FROM glo_flashcard_term " .
146 " WHERE glo_id = " . $this->db->quote($glo_id,
"integer") .
147 " AND user_id = " . $this->db->quote($user_id,
"integer");
148 $this->db->manipulate(
$q);
◆ getAllUserEntries()
| ILIAS\Glossary\Flashcard\FlashcardTermDBRepository::getAllUserEntries |
( |
int |
$user_id, |
|
|
int |
$glo_id |
|
) |
| |
Definition at line 63 of file class.FlashcardTermDBRepository.php.
67 $set = $this->db->queryF(
68 "SELECT * FROM glo_flashcard_term " .
69 " WHERE user_id = %s AND glo_id = %s " .
70 " ORDER BY last_access ASC ",
71 [
"integer",
"integer"],
76 while ($rec = $this->db->fetchAssoc($set)) {
78 "term_id" => $rec[
"term_id"],
79 "user_id" => $rec[
"user_id"],
80 "glo_id" => $rec[
"glo_id"],
81 "last_access" => $rec[
"last_access"],
82 "box_nr" => $rec[
"box_nr"]
◆ getBoxNr()
| ILIAS\Glossary\Flashcard\FlashcardTermDBRepository::getBoxNr |
( |
int |
$term_id, |
|
|
int |
$user_id, |
|
|
int |
$glo_id |
|
) |
| |
Definition at line 89 of file class.FlashcardTermDBRepository.php.
94 $set = $this->db->queryF(
95 "SELECT box_nr FROM glo_flashcard_term " .
96 " WHERE term_id = %s AND user_id = %s AND glo_id = %s ",
97 [
"integer",
"integer",
"integer"],
98 [$term_id, $user_id, $glo_id]
101 if ($rec = $this->db->fetchAssoc($set)) {
102 return (
int) $rec[
"box_nr"];
◆ getUserEntriesForBox()
| ILIAS\Glossary\Flashcard\FlashcardTermDBRepository::getUserEntriesForBox |
( |
int |
$box_nr, |
|
|
int |
$user_id, |
|
|
int |
$glo_id |
|
) |
| |
Definition at line 36 of file class.FlashcardTermDBRepository.php.
41 $set = $this->db->queryF(
42 "SELECT * FROM glo_flashcard_term " .
43 " WHERE box_nr = %s AND user_id = %s AND glo_id = %s " .
44 " ORDER BY last_access ASC ",
45 [
"integer",
"integer",
"integer"],
46 [$box_nr, $user_id, $glo_id]
50 while ($rec = $this->db->fetchAssoc($set)) {
52 "term_id" => $rec[
"term_id"],
53 "user_id" => $rec[
"user_id"],
54 "glo_id" => $rec[
"glo_id"],
55 "last_access" => $rec[
"last_access"],
56 "box_nr" => $rec[
"box_nr"]
◆ updateEntry()
| ILIAS\Glossary\Flashcard\FlashcardTermDBRepository::updateEntry |
( |
int |
$term_id, |
|
|
int |
$user_id, |
|
|
int |
$glo_id, |
|
|
int |
$box_nr, |
|
|
string |
$date |
|
) |
| |
Definition at line 124 of file class.FlashcardTermDBRepository.php.
131 $this->db->update(
"glo_flashcard_term", [
132 "last_access" => [
"date", $date],
133 "box_nr" => [
"integer", $box_nr]
135 "term_id" => [
"integer", $term_id],
136 "user_id" => [
"integer", $user_id],
137 "glo_id" => [
"integer", $glo_id]
◆ $db
| ilDBInterface ILIAS\Glossary\Flashcard\FlashcardTermDBRepository::$db |
|
protected |
The documentation for this class was generated from the following file: