3 declare(strict_types=1);
    28     private const TABLE = 
'prg_auto_content';
    48     public function getFor(
int $prg_obj_id): array
    51             . self::FIELD_PRG_OBJ_ID . 
','    52             . self::FIELD_CAT_REF_ID . 
','    53             . self::FIELD_EDITOR_ID . 
','    54             . self::FIELD_LAST_EDITED
    55             . PHP_EOL . 
'FROM ' . self::TABLE
    56             . PHP_EOL . 
'WHERE ' . self::FIELD_PRG_OBJ_ID . 
' = '    57             . $this->db->quote($prg_obj_id, 
'integer');
    59         $res = $this->db->query($query);
    61         while ($rec = $this->db->fetchAssoc(
$res)) {
    63                 (
int) $rec[self::FIELD_PRG_OBJ_ID],
    64                 (
int) $rec[self::FIELD_CAT_REF_ID],
    65                 (
int) $rec[self::FIELD_EDITOR_ID],
    78         int $last_edited_usr_id = null,
    81         if (is_null($last_edited_usr_id)) {
    84         if (is_null($last_edited)) {
   101         $ilAtomQuery = $this->db->buildAtomQuery();
   102         $ilAtomQuery->addTableLock(self::TABLE);
   105         $ilAtomQuery->addQueryCallable(
   108                       'DELETE FROM ' . self::TABLE . PHP_EOL
   109                      . 
'WHERE prg_obj_id = ' . $ac->
getPrgObjId() . PHP_EOL
   116                 $now = $now->format(
'Y-m-d H:i:s');
   120                         self::FIELD_PRG_OBJ_ID => [
'integer', $ac->
getPrgObjId()],
   123                         self::FIELD_LAST_EDITED => [
'timestamp', $now]
   134     public function delete(
int $prg_obj_id, array $cat_ref_ids): 
void   138                 return $this->db->quote(
$id, 
'integer');
   142         $ids = implode(
',', $ids);
   145              'DELETE FROM ' . self::TABLE . PHP_EOL
   146             . 
'WHERE prg_obj_id = ' . $this->db->quote($prg_obj_id, 
'integer') . PHP_EOL
   147             . 
'AND cat_ref_id IN (' . $ids . 
')'   149         $this->db->manipulate($query);
   158              'DELETE FROM ' . self::TABLE . PHP_EOL
   159             . 
'WHERE prg_obj_id = ' . $this->db->quote($prg_obj_id, 
'integer')
   161         $this->db->manipulate($query);
   171         $query = 
'SELECT ' . self::FIELD_PRG_OBJ_ID
   172             . PHP_EOL . 
'FROM ' . self::TABLE . 
' prgs'   173             . PHP_EOL . 
'INNER JOIN object_reference oref ON '   174             . 
'prgs.' . self::FIELD_PRG_OBJ_ID . 
' =  oref.obj_id'   175             . PHP_EOL . 
'WHERE ' . self::FIELD_CAT_REF_ID . 
' = ' . $ilDB->quote($cat_ref_id, 
'integer')
   176             . PHP_EOL . 
'AND oref.deleted IS NULL';
   178         $res = $ilDB->query($query);
   179         return $ilDB->fetchAll(
$res);
 
insert(string $table_name, array $values)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
deleteFor(int $prg_obj_id)
Delete all category-surveillance settings for a StudyProgramme. 
 
static getProgrammesFor(int $cat_ref_id)
Get all programmes' ref_ids monitoring the given category.int[] 
 
getFor(int $prg_obj_id)
Read category-surveillance settings of programme.ilStudyProgrammeAutoCategory[] 
 
update(ilStudyProgrammeAutoCategory $ac)
Store a category-surveillance setting. 
 
create(int $prg_obj_id, int $category_ref_id, int $last_edited_usr_id=null, DateTimeImmutable $last_edited=null)
Build an auto-category object. 
 
__construct(ilDBInterface $db, int $current_usr_id)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
manipulate(string $query)
Run a (write) Query on the database. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...