Example #1
0
<#4028>
<?php 
$ilCtrlStructureReader->getStructure();
?>
<#4029>
<?php 
$ilDB->manipulateF("UPDATE qpl_questions SET add_cont_edit_mode = %s WHERE add_cont_edit_mode IS NULL", array('text'), array('default'));
?>
<#4030>
<?php 
include_once './Services/Migration/DBUpdate_3560/classes/class.ilDBUpdateNewObjectType.php';
$orgu_type_id = ilDBUpdateNewObjectType::addNewType('orgu', 'Organisational Unit');
$rbac_ops = array(ilDBUpdateNewObjectType::RBAC_OP_EDIT_PERMISSIONS, ilDBUpdateNewObjectType::RBAC_OP_VISIBLE, ilDBUpdateNewObjectType::RBAC_OP_READ, ilDBUpdateNewObjectType::RBAC_OP_WRITE, ilDBUpdateNewObjectType::RBAC_OP_DELETE, ilDBUpdateNewObjectType::RBAC_OP_COPY);
ilDBUpdateNewObjectType::addRBACOperations($orgu_type_id, $rbac_ops);
$parent_types = array('root', 'orgu');
ilDBUpdateNewObjectType::addRBACCreate('create_orgu', 'Create OrgUnit', $parent_types);
$ilCtrlStructureReader->getStructure();
?>

<#4031>
<?php 
// create object data entry
$id = $ilDB->nextId("object_data");
$ilDB->manipulateF("INSERT INTO object_data (obj_id, type, title, description, owner, create_date, last_update) " . "VALUES (%s, %s, %s, %s, %s, %s, %s)", array("integer", "text", "text", "text", "integer", "timestamp", "timestamp"), array($id, "orgu", "__OrgUnitAdministration", "Organisationsal Units", -1, ilUtil::now(), ilUtil::now()));
// create object reference entry
$ref_id = $ilDB->nextId('object_reference');
$res = $ilDB->manipulateF("INSERT INTO object_reference (ref_id, obj_id) VALUES (%s, %s)", array("integer", "integer"), array($ref_id, $id));
// put in tree
$tree = new ilTree(ROOT_FOLDER_ID);
$tree->insertNode($ref_id, SYSTEM_FOLDER_ID);
?>
<#3687>
<?php 
$ilCtrlStructureReader->getStructure();
?>
<#3688>
<?php 
$ilDB->manipulateF('UPDATE rbac_operations SET operation = %s WHERE operation = %s', array('text', 'text'), array('internal_mail', 'mail_visible'));
?>
<#3689>
<?php 
include_once './Services/Migration/DBUpdate_3560/classes/class.ilDBUpdateNewObjectType.php';
$itgr_type_id = ilDBUpdateNewObjectType::addNewType('itgr', 'Item Group');
$rbac_ops = array(ilDBUpdateNewObjectType::RBAC_OP_EDIT_PERMISSIONS, ilDBUpdateNewObjectType::RBAC_OP_VISIBLE, ilDBUpdateNewObjectType::RBAC_OP_READ, ilDBUpdateNewObjectType::RBAC_OP_WRITE, ilDBUpdateNewObjectType::RBAC_OP_DELETE, ilDBUpdateNewObjectType::RBAC_OP_COPY);
ilDBUpdateNewObjectType::addRBACOperations($itgr_type_id, $rbac_ops);
$parent_types = array('root', 'cat', 'crs', 'fold', 'grp');
ilDBUpdateNewObjectType::addRBACCreate('create_itgr', 'Create Item Group', $parent_types);
?>
<#3690>
<?php 
$ilCtrlStructureReader->getStructure();
?>

<#3691>
<?php 
// table fields used by tst's obligate test questions (elba steps 21, 22, 23 and 24)
if (!$ilDB->tableColumnExists('tst_test_question', 'obligatory')) {
    $ilDB->addTableColumn("tst_test_question", "obligatory", array("type" => "integer", "length" => 1, "notnull" => true, "default" => 0));
}
if (!$ilDB->tableColumnExists('tst_test_result', 'answered')) {
    $ilDB->addTableColumn("tst_test_result", "answered", array("type" => "integer", "length" => 1, "notnull" => true, "default" => 1));
}