Example #1
0
<?php 
$ilDB->manipulateF("UPDATE adm_set_templ_value SET setting = %s, value = %s\n\t\t\t\tWHERE setting = %s AND value = %s", array('text', 'text', 'text', 'text'), array('question_set_type', 'FIXED_QUEST_SET', 'random_test', '0'));
$ilDB->manipulateF("UPDATE adm_set_templ_value SET setting = %s, value = %s\n\t\t\t\tWHERE setting = %s AND value = %s", array('text', 'text', 'text', 'text'), array('question_set_type', 'RANDOM_QUEST_SET', 'random_test', '1'));
?>
<#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));
    $ilDB->addTableColumn('tst_tests', 'autosave_ival', array('type' => 'integer', 'length' => 4, 'notnull' => true, 'default' => 0));
    $ilDB->manipulate('UPDATE tst_tests SET autosave_ival = ' . $ilDB->quote(30000, 'integer'));
}
?>
<#3722>
<?php 
if (!$ilDB->tableExists('rtst_settings')) {
    $fields = array('obj_id' => array('type' => 'integer', 'length' => 4, 'notnull' => true), 'mid' => array('type' => 'integer', 'length' => 4, 'notnull' => true), 'organization' => array('type' => 'text', 'length' => 400, 'notnull' => false), 'local_information' => array('type' => 'text', 'length' => 4000, 'notnull' => false), 'remote_link' => array('type' => 'text', 'length' => 400, 'notnull' => false), 'availability_type' => array('type' => 'integer', 'length' => 1, 'notnull' => true, 'default' => 0), 'availability_start' => array('type' => 'integer', 'length' => 4, 'notnull' => false), 'availability_end' => array('type' => 'integer', 'length' => 4, 'notnull' => false));
    $ilDB->createTable('rtst_settings', $fields);
    $ilDB->addPrimaryKey('rtst_settings', array('obj_id'));
}
?>
<#3723>
<?php 
include_once './Services/Migration/DBUpdate_3560/classes/class.ilDBUpdateNewObjectType.php';
$rtst_type_id = ilDBUpdateNewObjectType::addNewType('rtst', 'Remote Test Object');
$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::addRBACOperations($rtst_type_id, $rbac_ops);
?>
<#3724>
<?php 
$ilCtrlStructureReader->getStructure();
?>
<#3725>
<?php 
include_once './Services/Migration/DBUpdate_3560/classes/class.ilDBUpdateNewObjectType.php';
$blog_type_id = ilDBUpdateNewObjectType::getObjectTypeId('blog');
$ops_id = ilDBUpdateNewObjectType::addCustomRBACOperation('contribute', 'Contribute', 'object', 3205);
if ($ops_id && $blog_type_id) {
    ilDBUpdateNewObjectType::addRBACOperation($blog_type_id, $ops_id);
}