4include_once(
"./Services/Object/classes/class.ilObject.php");
 
   25    public function __construct($a_id, $a_call_by_reference = 
true)
 
   28        parent::__construct($a_id, $a_call_by_reference);
 
   31    public function delete()
 
   44        $pos = 
$ilDB->query(
"SELECT max(pos) mpos FROM il_new_item_grp");
 
   45        $pos = 
$ilDB->fetchAssoc($pos);
 
   46        $pos = (int) $pos[
"mpos"];
 
   49        $seq = 
$ilDB->nextID(
"il_new_item_grp");
 
   51        $ilDB->manipulate(
"INSERT INTO il_new_item_grp" .
 
   52            " (id, pos, type) VALUES (" .
 
   53            $ilDB->quote($seq, 
"integer") .
 
   54            ", " . 
$ilDB->quote($pos, 
"integer") .
 
   55            ", " . 
$ilDB->quote(self::NEW_ITEM_GROUP_TYPE_SEPARATOR, 
"integer") .
 
   67        $pos = 
$ilDB->query(
"SELECT max(pos) mpos FROM il_new_item_grp");
 
   68        $pos = 
$ilDB->fetchAssoc($pos);
 
   69        $pos = (int) $pos[
"mpos"];
 
   72        $seq = 
$ilDB->nextID(
"il_new_item_grp");
 
   74        $ilDB->manipulate(
"INSERT INTO il_new_item_grp" .
 
   75            " (id, titles, pos, type) VALUES (" .
 
   76            $ilDB->quote($seq, 
"integer") .
 
   77            ", " . 
$ilDB->quote(serialize($a_titles), 
"text") .
 
   78            ", " . 
$ilDB->quote($pos, 
"integer") .
 
   79            ", " . 
$ilDB->quote(self::NEW_ITEM_GROUP_TYPE_GROUP, 
"integer") .
 
   90        $ilDB->manipulate(
"UPDATE il_new_item_grp" .
 
   91            " SET titles = " . 
$ilDB->quote(serialize($a_titles), 
"text") .
 
   92            " WHERE id = " . 
$ilDB->quote($a_id, 
"integer"));
 
  105        $sub_items = $sub_items[$a_id];
 
  107            foreach ($sub_items as $obj_type) {
 
  108                $old_pos = 
$ilSetting->get(
"obj_add_new_pos_" . $obj_type);
 
  109                if (strlen($old_pos) == 8) {
 
  110                    $new_pos = 
"9999" . substr($old_pos, 4);
 
  111                    $ilSetting->set(
"obj_add_new_pos_" . $obj_type, $new_pos);
 
  112                    $ilSetting->set(
"obj_add_new_pos_grp_" . $obj_type, 0);
 
  117        $ilDB->manipulate(
"DELETE FROM il_new_item_grp" .
 
  118            " WHERE id = " . 
$ilDB->quote($a_id, 
"integer"));
 
  130        $def_lng = 
$lng->getDefaultLanguage();
 
  131        $usr_lng = 
$ilUser->getLanguage();
 
  135        $set = 
$ilDB->query(
"SELECT * FROM il_new_item_grp ORDER BY pos");
 
  137            if (
$row[
"type"] == self::NEW_ITEM_GROUP_TYPE_GROUP) {
 
  138                $row[
"titles"] = unserialize(
$row[
"titles"]);
 
  149                $row[
"title"] = 
$lng->txt(
"rep_new_item_group_separator");
 
  166        foreach (array_keys($a_order) as 
$id) {
 
  169            $ilDB->manipulate(
"UPDATE il_new_item_grp" .
 
  170                " SET pos = " . 
$ilDB->quote($pos, 
"integer") .
 
  171                " WHERE id = " . 
$ilDB->quote(
$id, 
"integer"));
 
  179        $ilPluginAdmin = 
$DIC[
"ilPluginAdmin"];
 
  185        include_once(
"./Services/Component/classes/class.ilModule.php");
 
  189            if (
sizeof($rep_types) > 0) {
 
  190                foreach ($rep_types as $ridx => $rt) {
 
  192                    if ($rt[
"repository"]) {
 
  195                        unset($rep_types[$ridx]);
 
  200                foreach ($rep_types as $rt) {
 
  207        include_once(
"./Services/Component/classes/class.ilPlugin.php");
 
  208        $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE, 
"Repository", 
"robj");
 
  209        foreach ($pl_names as $pl_name) {
 
  227        foreach (self::getAllObjTypes() as 
$type) {
 
  244            "organisation" => array(
"fold", 
"sess", 
"cat", 
"catr", 
"crs", 
"crsr", 
"grp", 
"grpr", 
"itgr", 
"book", 
"prg"),
 
  245            "communication" => array(
"frm", 
"chtr"),
 
  247            "content" => array(
"file", 
"webr", 
"feed", 
"copa", 
"wiki", 
"blog", 
"lm", 
"htlm", 
"sahs", 
"lso", 
"glo", 
"dcl", 
"bibl", 
"mcst", 
"mep"),
 
  249            "assessment" => array(
"exc", 
"tst", 
"qpl", 
"iass"),
 
  250            "feedback" => array(
"poll", 
"svy", 
"spl"),
 
  251            "templates" => array(
"prtt")
 
  255        foreach ($groups as $group => $items) {
 
  259            if (is_array($items)) {
 
  260                $title = 
$lng->txt(
"rep_add_new_def_grp_" . $group);
 
  262                $res[
"groups"][$grp_id] = array(
"id" => $grp_id,
 
  263                    "titles" => array(
$lng->getUserLanguage() => 
$title),
 
  265                    "type" => self::NEW_ITEM_GROUP_TYPE_GROUP,
 
  268                foreach ($items as $idx => $item) {
 
  269                    $res[
"items"][$item] = $grp_id;
 
  270                    $res[
"sort"][$item] = str_pad($pos, 4, 
"0", STR_PAD_LEFT) .
 
  271                        str_pad($idx + 1, 4, 
"0", STR_PAD_LEFT);
 
  276                $res[
"groups"][$grp_id] = array(
"id" => $grp_id,
 
  277                    "titles" => array(
$lng->getUserLanguage() => 
$title),
 
  279                    "type" => self::NEW_ITEM_GROUP_TYPE_SEPARATOR,
 
An exception for terminatinating execution or to throw for unit testing.
static getAvailableCoreModules()
Get all available core modules.
Class ilObjRepositorySettings.
const NEW_ITEM_GROUP_TYPE_GROUP
static addNewItemGroupSeparator()
static getNewItemGroups()
__construct($a_id, $a_call_by_reference=true)
Constructor @access public.
static deleteObjectType($a_type)
static updateNewItemGroupOrder(array $a_order)
static updateNewItemGroup($a_id, array $a_titles)
const NEW_ITEM_GROUP_TYPE_SEPARATOR
static getDefaultNewItemGrouping()
static getNewItemGroupSubItems()
static deleteNewItemGroup($a_id)
static addNewItemGroup(array $a_titles)
Class ilObject Basic functions for all objects.
static lookupIdForName(string $a_ctype, string $a_cname, string $a_slot_id, string $a_plugin_name)
foreach($_POST as $key=> $value) $res