00001 <#1>
00002 CREATE TABLE glossary_term
00003 (
00004 id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
00005 glo_id INT NOT NULL,
00006 term VARCHAR(200),
00007 language CHAR(2),
00008 INDEX glo_id (glo_id)
00009 );
00010
00011 <#2>
00012 CREATE TABLE glossary_definition
00013 (
00014 id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
00015 term_id INT NOT NULL,
00016 page_id INT NOT NULL
00017 );
00018
00019 <#3>
00020 CREATE TABLE desktop_item
00021 (
00022 user_id INT NOT NULL,
00023 item_id INT NOT NULL,
00024 type CHAR(4) NOT NULL,
00025 INDEX user_id (user_id)
00026 );
00027
00028 <#4>
00029 UPDATE object_data SET title = 'ILIAS' WHERE title = 'ILIAS open source';
00030
00031 <#5>
00032 REPLACE INTO lm_data (obj_id, title, type, lm_id) VALUES (1, 'dummy', 'du', 0);
00033
00034 <#6>
00035 UPDATE role_data SET allow_register = 1 WHERE role_id = 5;
00036
00037 <#7>
00038 REPLACE INTO settings (keyword, value) VALUES ('enable_registration', 1);
00039
00040 <#8>
00041 REPLACE INTO settings (keyword, value) VALUES ('system_role_id', '2');
00042
00043 <#9>
00044 DELETE FROM rbac_pa WHERE rol_id = 2;
00045 DELETE FROM rbac_templates WHERE rol_id = 2;
00046 DELETE FROM rbac_fa WHERE rol_id = 2 AND parent != 8;
00047
00048 <#10>
00049 RENAME TABLE lm_page_object TO page_object;
00050 ALTER TABLE page_object DROP PRIMARY KEY;
00051 ALTER TABLE page_object MODIFY parent_type VARCHAR(4) NOT NULL DEFAULT 'lm';
00052 ALTER TABLE page_object ADD PRIMARY KEY (page_id, parent_type);
00053
00054 <#11>
00055 ALTER TABLE glossary_definition DROP COLUMN page_id;
00056 ALTER TABLE glossary_definition ADD COLUMN short_text VARCHAR(200) NOT NULL DEFAULT '';
00057
00058 <#12>
00059 UPDATE settings SET value = '3.0.0_alpha5' WHERE keyword = 'ilias_version' LIMIT 1;
00060
00061 <#13>
00062 DROP TABLE IF EXISTS object_translation;
00063 CREATE TABLE object_translation (
00064 obj_id int(11) NOT NULL default '0',
00065 title char(70) NOT NULL default '',
00066 description char(128) default NULL,
00067 lang_code char(2) NOT NULL default '',
00068 lang_default tinyint(1) NOT NULL default '0',
00069 PRIMARY KEY (obj_id,lang_code)
00070 ) TYPE=MyISAM;
00071
00072 <#14>
00073 CREATE TABLE cal_appointment (
00074 appointmentId int(11) NOT NULL auto_increment,
00075 appointmentUnionId int(11) NOT NULL default '0',
00076 categoryId int(11) NOT NULL default '0',
00077 priorityId int(11) NOT NULL default '0',
00078 access varchar(15) NOT NULL default '',
00079 description text,
00080 duration int(11) NOT NULL default '0',
00081 startTimestamp bigint(14) NOT NULL default '0',
00082 term varchar(128) NOT NULL default '',
00083 location varchar(80) default NULL,
00084 serial tinyint(1) unsigned NOT NULL default '0',
00085 ownerId int(11) unsigned NOT NULL default '0',
00086 userId int(11) unsigned NOT NULL default '0',
00087 PRIMARY KEY (appointmentId)
00088 ) TYPE=MyISAM;
00089
00090 <#15>
00091 CREATE TABLE cal_appointmentrepeats (
00092 appointmentRepeatsId int(11) NOT NULL auto_increment,
00093 appointmentId int(11) NOT NULL default '0',
00094 endTimestamp int(14) default NULL,
00095 type varchar(15) NOT NULL default '',
00096 weekdays varchar(7) NOT NULL default 'nnnnnnn',
00097 PRIMARY KEY (appointmentRepeatsId)
00098 ) TYPE=MyISAM;
00099
00100
00101 <#16>
00102 CREATE TABLE cal_appointmentrepeatsnot (
00103 appointmentRepeatsNotId int(11) NOT NULL auto_increment,
00104 appointmentRepeatsId int(11) NOT NULL default '0',
00105 leaveOutTimestamp int(14) default NULL,
00106 PRIMARY KEY (appointmentRepeatsNotId)
00107 ) TYPE=MyISAM;
00108
00109 <#17>
00110 CREATE TABLE cal_category (
00111 categoryId int(11) NOT NULL auto_increment,
00112 description text,
00113 term varchar(20) NOT NULL default '',
00114 PRIMARY KEY (categoryId)
00115 ) TYPE=MyISAM;
00116
00117
00118 <#18>
00119 CREATE TABLE cal_priority (
00120 priorityId int(11) NOT NULL auto_increment,
00121 description text,
00122 term varchar(20) NOT NULL default '',
00123 PRIMARY KEY (priorityId)
00124 ) TYPE=MyISAM;
00125
00126
00127 <#19>
00128 CREATE TABLE cal_user_group (
00129 groupId int(11) NOT NULL default '0',
00130 userId int(11) NOT NULL default '0',
00131 description text,
00132 PRIMARY KEY (groupId,userId)
00133 ) TYPE=MyISAM;
00134
00135 <#20>
00136 CREATE TABLE dummy_groups (
00137 groupId int(11) NOT NULL auto_increment,
00138 description text,
00139 owner varchar(20) NOT NULL default '',
00140 term varchar(20) NOT NULL default '',
00141 PRIMARY KEY (groupId)
00142 ) TYPE=MyISAM;
00143
00144 <#21>
00145 DELETE FROM glossary_definition;
00146 DELETE FROM meta_data WHERE obj_type='gdf';
00147 DELETE FROM page_object WHERE parent_type='gdf';
00148 ALTER TABLE glossary_definition ADD COLUMN nr INT NOT NULL;
00149
00150 <#22>
00151 CREATE TABLE usr_search (
00152 usr_id INT NOT NULL ,
00153 search_result TEXT,
00154 PRIMARY KEY ( usr_id )
00155 );
00156
00157 <#23>
00158 ALTER TABLE lm_data ADD COLUMN import_id CHAR(50) NOT NULL DEFAULT '';
00159
00160 <#24>
00161 ALTER TABLE object_data ADD COLUMN import_id CHAR(50) NOT NULL DEFAULT '';
00162
00163 <#25>
00164 ALTER TABLE glossary_term ADD COLUMN import_id CHAR(50) NOT NULL DEFAULT '';
00165
00166 <#26>
00167 ALTER TABLE desktop_item ADD COLUMN parameters VARCHAR(200);
00168
00169 <#27>
00170 CREATE TABLE personal_clipboard
00171 (
00172 user_id INT NOT NULL,
00173 item_id INT NOT NULL,
00174 type CHAR(4) NOT NULL,
00175 title CHAR(70) NOT NULL DEFAULT '',
00176 PRIMARY KEY (user_id, item_id, type)
00177 );
00178
00179 <#28>
00180 INSERT INTO cal_priority (priorityId, description, term) VALUES ('1','high','high');
00181 INSERT INTO cal_priority (priorityId, description, term) VALUES ('2','middle','middle');
00182 INSERT INTO cal_priority (priorityId, description, term) VALUES ('3','low','low');
00183 INSERT INTO cal_category (categoryId, description, term) VALUES ('1','test','test');
00184
00185 <#29>
00186 ALTER TABLE page_object CHANGE content content TEXT NOT NULL;
00187 ALTER TABLE page_object ADD FULLTEXT ( content );
00188
00189 <#30>
00190 CREATE TABLE dbk_translations
00191 (
00192 id int(11) NOT NULL,
00193 tr_id int(11) NOT NULL,
00194 PRIMARY KEY (id,tr_id)
00195 );
00196
00197 <#31>
00198 <?php
00199
00200 $q = "SELECT * FROM grp_tree WHERE ref_id = '-1'";
00201 $res = $this->db->query($q);
00202
00203 $grp_data = array();
00204
00205 while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC))
00206 {
00207 $grp_data[] = $row;
00208 }
00209
00210 if (count($grp_data) > 0)
00211 {
00212 foreach ($grp_data as $entry)
00213 {
00214 $q = "INSERT INTO object_reference ".
00215 "(ref_id,obj_id) VALUES (0,'".$entry["child"]."')";
00216 $this->db->query($q);
00217
00218 $q = "SELECT LAST_INSERT_ID()";
00219 $res = $this->db->query($q);
00220 $row = $res->fetchRow();
00221 $entry["ref_id"] = $row[0];
00222
00223 $q = "UPDATE grp_data SET ref_id='".$entry["ref_id"]."' WHERE child='".$entry["child"]."'";
00224 $this->db->query($q);
00225 }
00226 }
00227
00228 unset($grp_data);
00229 $grp_data = array();
00230
00231
00232 $q = "SELECT * FROM grp_tree";
00233 $res = $this->db->query($q);
00234
00235 while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC))
00236 {
00237 $grp_data[] = $row;
00238 }
00239
00240 $q = "DELETE FROM grp_tree";
00241 $this->db->query($q);
00242
00243 if (count($grp_data) > 0)
00244 {
00245 foreach ($grp_data as $key => $entry)
00246 {
00247 $q = "SELECT ref_id FROM object_reference WHERE obj_id='".$entry["parent"]."'";
00248 $res = $this->db->query($q);
00249 $row = $res->fetchRow(DB_FETCHMODE_ASSOC);
00250 $entry["parent"] = $row["ref_id"];
00251
00252 $q = "INSERT INTO grp_tree (tree,child,parent,lft,rgt,depth,perm,ref_id) VALUES ".
00253 "('".$entry["tree"]."',".
00254 "'".$entry["ref_id"]."',".
00255 "'".$entry["parent"]."',".
00256 "'".$entry["lft"]."',".
00257 "'".$entry["rgt"]."',".
00258 "'".$entry["depth"]."',".
00259 "'".$entry["perm"]."',".
00260 "'".$entry["child"]."')";
00261 $this->db->query($q);
00262 }
00263 }
00264
00265 unset($grp_data);
00266 ?>
00267
00268 <#32>
00269 ALTER TABLE grp_tree CHANGE ref_id obj_id INT(11);
00270
00271 <#33>
00272 CREATE TABLE file_data
00273 (
00274 file_id INT NOT NULL,
00275 file_type CHAR(64) NOT NULL,
00276 PRIMARY KEY (file_id)
00277 );
00278
00279 <#34>
00280 CREATE TABLE lo_access
00281 (
00282 timestamp DATETIME DEFAULT '0000-00-00 00:00:00' NOT NULL,
00283 usr_id INT(11) DEFAULT '0' NOT NULL,
00284 lm_id INT(11) DEFAULT '0' NOT NULL,
00285 obj_id INT(11) DEFAULT '0' NOT NULL,
00286 lm_title VARCHAR(200) DEFAULT '' NOT NULL
00287 );
00288
00289 <#35>
00290 ALTER TABLE file_data ADD file_name CHAR(128) NOT NULL AFTER file_id;
00291
00292 <#36>
00293 DELETE FROM rbac_templates WHERE rol_id='83' AND type='grp' AND ops_id=3 AND parent=8;
00294
00295 <#37>
00296 ALTER TABLE media_item ADD COLUMN param TEXT;
00297
00298 <#38>
00299 INSERT INTO object_data (type, title, description, owner, create_date, last_update)
00300 VALUES ('typ', 'exc', 'Exercise object', -1, now(), now());
00301
00302 <#39>
00303 CREATE TABLE exc_data
00304 (
00305 obj_id INT NOT NULL,
00306 instruction TEXT,
00307 time_stamp INT(10),
00308 PRIMARY KEY (obj_id)
00309 );
00310 CREATE TABLE exc_members
00311 (
00312 obj_id INT(11) NOT NULL,
00313 usr_id INT(11) NOT NULL,
00314 solved TINYINT(1) NULL,
00315 sent TINYINT(1) NULL,
00316 PRIMARY KEY(obj_id,usr_id)
00317 );
00318
00319 <#40>
00320 INSERT INTO rbac_templates VALUES(81,"frm",4,8);
00321 INSERT INTO rbac_templates VALUES(80,"frm",9,8);
00322 INSERT INTO rbac_templates VALUES(80,"frm",10,8);
00323
00324 <#41>
00325 ALTER TABLE learning_module RENAME content_object;
00326
00327 <#42>
00328 ALTER TABLE content_object ADD COLUMN online ENUM('y','n') DEFAULT 'n';
00329
00330 <#43>
00331 DELETE FROM rbac_templates where rol_id=82;
00332
00333 CREATE TABLE grp_registration (
00334 `grp_id` INT NOT NULL ,
00335 `user_id` INT NOT NULL ,
00336 `subject` VARCHAR( 255 ) NOT NULL ,
00337 `application_date` DATETIME NOT NULL
00338 );
00339
00340 <#44>
00341 DELETE FROM settings WHERE keyword='crs_enable';
00342 DELETE FROM settings WHERE keyword='group_file_sharing';
00343 DELETE FROM settings WHERE keyword='babylon_path';
00344 DELETE FROM settings WHERE keyword='news';
00345 DELETE FROM settings WHERE keyword='payment_system';
00346
00347 <#45>
00348 ALTER TABLE grp_data CHANGE status register INTEGER DEFAULT '1';
00349
00350 <#46>
00351 <?php
00352
00353
00354
00355 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
00356 "VALUES ('typ', 'ldap', 'LDAP settings object', -1, now(), now())";
00357 $this->db->query($query);
00358
00359
00360 $query = "SELECT LAST_INSERT_ID()";
00361 $res = $this->db->query($query);
00362 $row = $res->fetchRow();
00363 $typ_id = $row[0];
00364
00365
00366 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','1')";
00367 $this->db->query($query);
00368 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','2')";
00369 $this->db->query($query);
00370 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','3')";
00371 $this->db->query($query);
00372 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','4')";
00373 $this->db->query($query);
00374
00375
00376 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
00377 "VALUES ('ldap','LDAP settings','Folder contains all LDAP settings','-1',now(),now())";
00378 $this->db->query($query);
00379
00380
00381 $query = "SELECT LAST_INSERT_ID()";
00382 $res = $this->db->query($query);
00383 $row = $res->fetchRow();
00384 $obj_id = $row[0];
00385
00386
00387 $query = "INSERT INTO object_reference (obj_id) VALUES ('".$obj_id."')";
00388 $this->db->query($query);
00389
00390
00391 $query = "SELECT LAST_INSERT_ID()";
00392 $res = $this->db->query($query);
00393 $row = $res->fetchRow();
00394 $ref_id = $row[0];
00395
00396
00397 $query = "SELECT * FROM tree".
00398 "WHERE child = '9' ".
00399 "AND tree = '1'";
00400 $res = $this->db->getRow($query);
00401
00402 $left = $res->lft;
00403 $lft = $left + 1;
00404 $rgt = $left + 2;
00405
00406
00407 $query = "UPDATE tree SET ".
00408 "lft = CASE ".
00409 "WHEN lft > ".$left." ".
00410 "THEN lft + 2 ".
00411 "ELSE lft ".
00412 "END, ".
00413 "rgt = CASE ".
00414 "WHEN rgt > ".$left." ".
00415 "THEN rgt + 2 ".
00416 "ELSE rgt ".
00417 "END ".
00418 "WHERE tree = '1'";
00419 $this->db->query($query);
00420
00421
00422 $query = "INSERT INTO tree (tree,child,parent,lft,rgt,depth) ".
00423 "VALUES ".
00424 "('1','".$ref_id."','9','".$lft."','".$rgt."','2')";
00425 $this->db->query($query);
00426 ?>
00427
00428 <#47>
00429 INSERT INTO settings (keyword, value) VALUES ('anonymous_role_id','14');
00430
00431 <#48>
00432 ALTER TABLE grp_data ADD COLUMN password VARCHAR(255) DEFAULT NULL;
00433 ALTER TABLE grp_data ADD COLUMN expiration DATETIME DEFAULT '0000-00-00 00:00:00';
00434
00435 <#49>
00436 ALTER TABLE usr_data ADD COLUMN department VARCHAR(80) NOT NULL DEFAULT '';
00437 ALTER TABLE usr_data CHANGE phone phone_office VARCHAR(40) NOT NULL DEFAULT '';
00438 ALTER TABLE usr_data ADD COLUMN phone_home VARCHAR(40) NOT NULL DEFAULT '';
00439 ALTER TABLE usr_data ADD COLUMN phone_mobile VARCHAR(40) NOT NULL DEFAULT '';
00440 ALTER TABLE usr_data ADD COLUMN fax VARCHAR(40) NOT NULL DEFAULT '';
00441
00442 <#50>
00443 <?php
00444
00445
00446
00447 $query = "SELECT ref_id FROM object_reference ".
00448 "LEFT JOIN object_data ON object_reference.obj_id=object_data.obj_id ".
00449 "WHERE object_data.type='ldap'";
00450 $res = $this->db->query($query);
00451
00452 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
00453 {
00454 $ref_id = $row->ref_id;
00455 }
00456
00457
00458 $query = "DELETE FROM tree WHERE child = '".$ref_id."'";
00459 $this->db->query($query);
00460
00461
00462 $query = "SELECT * FROM tree ".
00463 "WHERE child = '9' ".
00464 "AND tree = '1'";
00465 $res = $this->db->query($query);
00466
00467 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
00468 {
00469 $left = $row->lft;
00470 $lft = $left + 1;
00471 $rgt = $left + 2;
00472 }
00473
00474
00475 $query = "UPDATE tree SET ".
00476 "lft = CASE ".
00477 "WHEN lft > ".$left." ".
00478 "THEN lft + 2 ".
00479 "ELSE lft ".
00480 "END, ".
00481 "rgt = CASE ".
00482 "WHEN rgt > ".$left." ".
00483 "THEN rgt + 2 ".
00484 "ELSE rgt ".
00485 "END ".
00486 "WHERE tree = '1'";
00487 $this->db->query($query);
00488
00489
00490 $query = "INSERT INTO tree (tree,child,parent,lft,rgt,depth) ".
00491 "VALUES ".
00492 "('1','".$ref_id."','9','".$lft."','".$rgt."','2')";
00493 $this->db->query($query);
00494 ?>
00495
00496 <#51>
00497 ALTER TABLE rbac_ua DROP COLUMN default_role;
00498
00499 <#52>
00500 <?php
00501
00502
00503 $query = "SELECT usr_id FROM rbac_ua WHERE rol_id='3'";
00504 $res = $this->db->query($query);
00505
00506 $users = array();
00507
00508 while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
00509 {
00510 $users[] = $row->usr_id;
00511 }
00512
00513 foreach ($users as $key => $id)
00514 {
00515 $query = "SELECT * FROM rbac_ua WHERE usr_id='".$id."' AND rol_id='5'";
00516 $res = $this->db->query($query);
00517
00518 if (!$res->numRows())
00519 {
00520 $query = "INSERT INTO rbac_ua (usr_id,rol_id) ".
00521 "VALUES ".
00522 "('".$id."','5')";
00523 $this->db->query($query);
00524 }
00525 }
00526
00527
00528 $query = "UPDATE object_data SET type='rolt', description='Role template for authors with write & create permissions.' WHERE obj_id='3'";
00529 $this->db->query($query);
00530
00531
00532 $query = "UPDATE rbac_fa SET assign='n' WHERE rol_id='3' AND parent='8'";
00533 $this->db->query($query);
00534
00535
00536 $query = "DELETE FROM rbac_fa WHERE rol_id='3' AND parent!='8'";
00537 $this->db->query($query);
00538
00539 $query = "DELETE FROM rbac_templates WHERE rol_id='3' AND parent!='8'";
00540 $this->db->query($query);
00541
00542 $query = "DELETE FROM rbac_ua WHERE rol_id='3'";
00543 $this->db->query($query);
00544 ?>
00545
00546 <#53>
00547 UPDATE object_data SET title='User', description='Standard role for registered users. Grants read access to most objects.' WHERE obj_id='4';
00548
00549 <#54>
00550 CREATE TABLE mob_usage
00551 (
00552 id INT NOT NULL,
00553 usage_type CHAR(4) NOT NULL,
00554 usage_id INT NOT NULL,
00555 PRIMARY KEY (id, usage_type, usage_id)
00556 );
00557
00558 <#55>
00559 INSERT INTO settings (keyword,value) VALUES ('system_user_id','6');
00560
00561 <#56>
00562 ALTER TABLE `exc_members` ADD `notice` TEXT AFTER `usr_id` ,
00563 ADD `returned` TINYINT( 1 ) AFTER `notice` ;
00564
00565 <#57>
00566 <?php
00567
00568
00569 $query = "SELECT DISTINCT(ops_id) AS id FROM rbac_operations ".
00570 "WHERE operation IN('visible','read','write','create','delete','edit permission')";
00571
00572 $res = $this->db->query($query);
00573 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
00574 {
00575 $ops_ids[] = $row->id;
00576 }
00577
00578 $query = "SELECT obj_id FROM object_data ".
00579 "WHERE type = 'typ' ".
00580 "AND title = 'exc'";
00581
00582 $res = $this->db->query($query);
00583 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
00584 {
00585 $type_id = $row->obj_id;
00586 }
00587
00588 foreach($ops_ids as $id)
00589 {
00590 $query = "INSERT INTO rbac_ta ".
00591 "SET typ_id = '".$type_id."', ".
00592 "ops_id = '".$id."'";
00593 $this->db->query($query);
00594 }
00595 ?>
00596
00597 <#58>
00598 <?php
00599
00600
00601 $query1 = "SELECT obj_id FROM object_data WHERE title = 'il_grp_member' ";
00602 $res = $this->db->query($query1);
00603 $tpl = $res->fetchRow(DB_FETCHMODE_ASSOC);
00604
00605
00606 $query2 = "SELECT parent FROM rbac_templates WHERE rol_id = ".$tpl["obj_id"];
00607 $res = $this->db->query($query2);
00608 $rol_fold = $res->fetchRow(DB_FETCHMODE_ASSOC);
00609
00610
00611
00612 $query3 = "DELETE FROM rbac_templates WHERE rol_id = '".$tpl["obj_id"]."' AND type = 'crs'";
00613 $this->db->query($query3);
00614
00615
00616 $query4 = "DELETE FROM rbac_templates WHERE rol_id = '".$tpl["obj_id"]."' AND type = 'frm' AND ops_id = 5 ";
00617 $this->db->query($query4);
00618 $query5 = "DELETE FROM rbac_templates WHERE rol_id = '".$tpl["obj_id"]."' AND type = 'frm' AND ops_id = 6 ";
00619 $this->db->query($query5);
00620 $query6 = "INSERT INTO rbac_templates (rol_id,type,ops_id,parent) VALUES ('".$tpl["obj_id"]."','frm','9','".$rol_fold["parent"]."')";
00621 $this->db->query($query6);
00622
00623
00624 $query7 = "INSERT INTO rbac_templates (rol_id,type,ops_id,parent) VALUES ('".$tpl["obj_id"]."','glo','2','".$rol_fold["parent"]."')";
00625 $this->db->query($query7);
00626 $query8 = "INSERT INTO rbac_templates (rol_id,type,ops_id,parent) VALUES ('".$tpl["obj_id"]."','glo','3','".$rol_fold["parent"]."')";
00627 $this->db->query($query8);
00628
00629
00630 $query9 = "INSERT INTO rbac_templates (rol_id,type,ops_id,parent) VALUES ('".$tpl["obj_id"]."','grp','5','".$rol_fold["parent"]."')";
00631 $this->db->query($query9);
00632 $query10 = "DELETE FROM rbac_templates WHERE rol_id = '".$tpl["obj_id"]."' AND type = 'grp' AND ops_id = 4 ";
00633 $this->db->query($query10);
00634
00635
00636 $query11 = "INSERT INTO rbac_templates (rol_id,type,ops_id,parent) VALUES ('".$tpl["obj_id"]."','lm','2','".$rol_fold["parent"]."')";
00637 $this->db->query($query11);
00638 $query12 = "INSERT INTO rbac_templates (rol_id,type,ops_id,parent) VALUES ('".$tpl["obj_id"]."','lm','3','".$rol_fold["parent"]."')";
00639 $this->db->query($query12);
00640
00641
00642 $query13 = "DELETE FROM rbac_templates WHERE rol_id = '".$tpl["obj_id"]."' AND type = 'slm' AND ops_id = 5 ";
00643 $this->db->query($query13);
00644 $query14 = "DELETE FROM rbac_templates WHERE rol_id = '".$tpl["obj_id"]."' AND type = 'slm' AND ops_id = 6 ";
00645 $this->db->query($query14);
00646 ?>
00647
00648 <#59>
00649 <?php
00650
00651
00652 $query1 = "SELECT obj_id FROM object_data WHERE title = 'il_grp_admin' ";
00653 $res = $this->db->query($query1);
00654 $tpl = $res->fetchRow(DB_FETCHMODE_ASSOC);
00655
00656
00657 $query2 = "SELECT parent FROM rbac_templates WHERE rol_id = ".$tpl["obj_id"];
00658 $res = $this->db->query($query2);
00659 $rol_fold = $res->fetchRow(DB_FETCHMODE_ASSOC);
00660
00661
00662 $query3 = "INSERT INTO rbac_templates (rol_id,type,ops_id,parent) VALUES ('".$tpl["obj_id"]."','grp','5','".$rol_fold["parent"]."')";
00663 $this->db->query($query3);
00664
00665
00666 $query4 = "DELETE FROM rbac_templates WHERE rol_id = '".$tpl["obj_id"]."' AND type = 'crs'";
00667 $this->db->query($query4);
00668
00669
00670 $query5 = "INSERT INTO rbac_templates (rol_id,type,ops_id,parent) VALUES ('".$tpl["obj_id"]."','frm','1','".$rol_fold["parent"]."')";
00671 $this->db->query($query5);
00672 $query6 = "INSERT INTO rbac_templates (rol_id,type,ops_id,parent) VALUES ('".$tpl["obj_id"]."','frm','4','".$rol_fold["parent"]."')";
00673 $this->db->query($query6);
00674
00675
00676 $query7 = "INSERT INTO rbac_templates (rol_id,type,ops_id,parent) VALUES ('".$tpl["obj_id"]."','glo','1','".$rol_fold["parent"]."')";
00677 $this->db->query($query7);
00678 $query8 = "INSERT INTO rbac_templates (rol_id,type,ops_id,parent) VALUES ('".$tpl["obj_id"]."','glo','4','".$rol_fold["parent"]."')";
00679 $this->db->query($query8);
00680 $query9 = "INSERT INTO rbac_templates (rol_id,type,ops_id,parent) VALUES ('".$tpl["obj_id"]."','glo','7','".$rol_fold["parent"]."')";
00681 $this->db->query($query9);
00682 $query10 = "INSERT INTO rbac_templates (rol_id,type,ops_id,parent) VALUES ('".$tpl["obj_id"]."','glo','8','".$rol_fold["parent"]."')";
00683 $this->db->query($query10);
00684
00685
00686 $query11 = "INSERT INTO rbac_templates (rol_id,type,ops_id,parent) VALUES ('".$tpl["obj_id"]."','rolf','1','".$rol_fold["parent"]."')";
00687 $this->db->query($query11);
00688 $query12 = "INSERT INTO rbac_templates (rol_id,type,ops_id,parent) VALUES ('".$tpl["obj_id"]."','rolf','5','".$rol_fold["parent"]."')";
00689 $this->db->query($query12);
00690 $query13 = "INSERT INTO rbac_templates (rol_id,type,ops_id,parent) VALUES ('".$tpl["obj_id"]."','rolf','6','".$rol_fold["parent"]."')";
00691 $this->db->query($query13);
00692 ?>
00693
00694 <#60>
00695 <?php
00696 $query1 = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
00697 "VALUES ('typ', 'fold', 'Folder object', -1, now(), now())";
00698 $this->db->query($query1);
00699 $query2 = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
00700 "VALUES ('typ', 'file', 'File object', -1, now(), now())";
00701 $this->db->query($query2);
00702 ?>
00703 <#61>
00704 <?php
00705
00706 $ini = new ilIniFile(ILIAS_ABSOLUTE_PATH."/ilias.ini.php");
00707 $res = $ini->read();
00708
00709 $migrate = true;
00710
00711 if ($res)
00712 {
00713 if ($ini->readVariable("clients","path") !== false)
00714 {
00715 $migrate = false;
00716 }
00717 }
00718
00719 unset($ini);
00720
00721 if ($migrate)
00722 {
00723 $query = "SELECT * FROM settings";
00724 $res = $this->db->query($query);
00725
00726 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
00727 {
00728 $settings[$row->keyword] = $row->value;
00729 }
00730
00731 $client_id = "default";
00732
00733 rename(ILIAS_ABSOLUTE_PATH."/ilias.ini.php",ILIAS_ABSOLUTE_PATH."/ilias.ini_copied.php");
00734
00735 $ini_old = new ilIniFile(ILIAS_ABSOLUTE_PATH."/ilias.ini_copied.php");
00736 $res = $ini_old->read();
00737
00738 $datadir = $ini_old->readVariable("server","data_dir");
00739 $datadir_client = $datadir."/".$client_id;
00740 $webdir = $ini_old->readVariable("server","absolute_path")."/data";
00741 $webdir_client = $webdir."/".$client_id;
00742
00743 ilUtil::makeDir($datadir_client);
00744 ilUtil::makeDir($datadir_client."/forum");
00745 ilUtil::makeDir($datadir_client."/files");
00746 ilUtil::makeDir($datadir_client."/lm_data");
00747 ilUtil::makeDir($datadir_client."/mail");
00748
00749 ilUtil::makeDir($webdir_client);
00750 ilUtil::makeDir($webdir_client."/css");
00751 ilUtil::makeDir($webdir_client."/mobs");
00752 ilUtil::makeDir($webdir_client."/lm_data");
00753 ilUtil::makeDir($webdir_client."/usr_images");
00754
00755
00756 ilUtil::rcopy($datadir."/forum",$datadir_client."/forum");
00757 ilUtil::rcopy($datadir."/files",$datadir_client."/files");
00758 ilUtil::rcopy($datadir."/lm_data",$datadir_client."/lm_data");
00759 ilUtil::rcopy($datadir."/mail",$datadir_client."/mail");
00760
00761 ilUtil::rcopy($webdir."/css",$webdir_client."/css");
00762 ilUtil::rcopy($webdir."/mobs",$webdir_client."/mobs");
00763 ilUtil::rcopy($webdir."/lm_data",$webdir_client."/lm_data");
00764 ilUtil::rcopy($webdir."/usr_images",$webdir_client."/usr_images");
00765
00766 $client_master = ILIAS_ABSOLUTE_PATH."/setup/client.master.ini.php";
00767 $ini_new = new ilIniFile($webdir_client."/client.ini.php");
00768 $ini_new->GROUPS = parse_ini_file($client_master,true);
00769
00770 $ini_new->setVariable("client","name",$settings["inst_name"]);
00771 $ini_new->setVariable("client","description",$settings["inst_info"]);
00772 $ini_new->setVariable("client","access",1);
00773 $ini_new->setVariable("db","host",$ini_old->readVariable("db","host"));
00774 $ini_new->setVariable("db","user",$ini_old->readVariable("db","user"));
00775 $ini_new->setVariable("db","pass",$ini_old->readVariable("db","pass"));
00776 $ini_new->setVariable("db","name",$ini_old->readVariable("db","name"));
00777 $ini_new->setVariable("language","default",$ini_old->readVariable("language","default"));
00778 $ini_new->setVariable("layout","skin",$ini_old->readVariable("layout","skin"));
00779 $ini_new->setVariable("layout","style",$ini_old->readVariable("layout","style"));
00780
00781 $ilias_master = ILIAS_ABSOLUTE_PATH."/setup/ilias.master.ini.php";
00782 $ini_il = new ilIniFile($ini_old->readVariable("server","absolute_path")."/ilias.ini.php");
00783 $ini_il->GROUPS = parse_ini_file($ilias_master,true);
00784
00785 $ini_il->setVariable("server","http_path",$ini_old->readVariable("server","http_path"));
00786 $ini_il->setVariable("server","absolute_path",$ini_old->readVariable("server","absolute_path"));
00787 $ini_il->setVariable("clients","datadir",$ini_old->readVariable("server","data_dir"));
00788 $ini_il->setVariable("tools", "convert", $settings["convert_path"]);
00789 $ini_il->setVariable("tools", "zip", $settings["zip_path"]);
00790 $ini_il->setVariable("tools", "unzip", $settings["unzip_path"]);
00791 $ini_il->setVariable("tools", "java", $settings["java_path"]);
00792 $ini_il->setVariable("tools", "htmldoc", $settings["htmldoc"]);
00793
00794 $setup_pass = ($settings["setup_passwd"]) ? $settings["setup_passwd"] : md5("homer");
00795 $ini_il->setVariable("setup", "pass", $setup_pass);
00796 $ini_il->setVariable("clients","default",$client_id);
00797
00798 $ini_new->write();
00799 $ini_il->write();
00800
00801 if (!$settings["setup_ok"])
00802 {
00803 $query = "INSERT INTO settings VALUES ('setup_ok','1')";
00804 $this->db->query($query);
00805 }
00806
00807 if (!isset($settings["nic_enabled"]))
00808 {
00809 $query = "INSERT INTO settings VALUES ('nic_enabled','0')";
00810 $this->db->query($query);
00811 }
00812 }
00813 ?>
00814
00815 <#62>
00816
00817 CREATE TABLE int_link
00818 (
00819 source_type CHAR(4) NOT NULL DEFAULT '',
00820 source_id INT NOT NULL,
00821 target_type CHAR(4) NOT NULL DEFAULT '',
00822 target_id INT NOT NULL,
00823 target_inst INT NOT NULL DEFAULT '0',
00824 PRIMARY KEY (source_type, source_id, target_type, target_id, target_inst)
00825 );
00826
00827 <#63>
00828 <?php
00829
00830
00831
00832
00833
00834
00835
00836
00837
00838
00839
00840
00841
00842
00843
00844
00845
00846
00847
00848
00849
00850
00851
00852
00853
00854
00855
00856 ?>
00857
00858 <#64>
00859 ALTER TABLE page_object MODIFY content MEDIUMTEXT;
00860
00861 <#65>
00862 ALTER TABLE mob_usage MODIFY usage_type VARCHAR(10) NOT NULL;
00863
00864
00865 <#66>
00866 UPDATE settings SET value = '3.0.0_beta1' WHERE keyword = 'ilias_version' LIMIT 1;
00867
00868 <#67>
00869 ALTER TABLE int_link MODIFY source_type VARCHAR(10) NOT NULL;
00870
00871 <#68>
00872 #
00873 # Tabellenstruktur für Tabelle `search_data`
00874 #
00875
00876 CREATE TABLE search_data (
00877 obj_id int(11) NOT NULL auto_increment,
00878 user_id int(11) NOT NULL default '0',
00879 title varchar(200) NOT NULL default '',
00880 target text NOT NULL default '',
00881 type varchar(4) NOT NULL default '',
00882 PRIMARY KEY (obj_id,user_id)
00883 ) TYPE=MyISAM;
00884
00885 #
00886 # Tabellenstruktur für Tabelle `search_tree`
00887 #
00888
00889 CREATE TABLE search_tree (
00890 tree int(11) NOT NULL default '0',
00891 child int(11) unsigned NOT NULL default '0',
00892 parent int(11) unsigned default NULL,
00893 lft int(11) unsigned NOT NULL default '0',
00894 rgt int(11) unsigned NOT NULL default '0',
00895 depth smallint(5) unsigned NOT NULL default '0',
00896 KEY child (child),
00897 KEY parent (parent)
00898 ) TYPE=MyISAM;
00899
00900 DELETE FROM usr_search;
00901
00902 <#69>
00903 DELETE FROM usr_search;
00904 DELETE FROM search_data;
00905 DELETE FROM search_tree;
00906
00907 <#70>
00908 UPDATE settings SET value = '3.0.0_beta2' WHERE keyword = 'ilias_version' LIMIT 1;
00909
00910 <#71>
00911 #
00912 # Tabellenstruktur für Tabelle `dp_changed_dates`
00913 #
00914
00915 CREATE TABLE dp_changed_dates (
00916 ID int(15) NOT NULL auto_increment,
00917 user_ID int(15) NOT NULL default '0',
00918 date_ID int(15) NOT NULL default '0',
00919 status int(15) NOT NULL default '0',
00920 timestamp int(10) NOT NULL default '0',
00921 PRIMARY KEY (ID)
00922 ) TYPE=MyISAM COMMENT='Tabelle für Anzeige von Geänderten Termindaten';
00923 # --------------------------------------------------------
00924
00925 <#72>
00926 #
00927 # Tabellenstruktur für Tabelle `dp_dates`
00928 #
00929
00930 CREATE TABLE dp_dates (
00931 ID int(15) NOT NULL auto_increment,
00932 begin int(10) NOT NULL default '0',
00933 end int(10) NOT NULL default '0',
00934 group_ID int(15) NOT NULL default '0',
00935 user_ID int(15) NOT NULL default '0',
00936 created int(10) NOT NULL default '0',
00937 changed int(10) NOT NULL default '0',
00938 rotation int(15) NOT NULL default '0',
00939 shorttext varchar(50) NOT NULL default '',
00940 text text,
00941 end_rotation int(10) NOT NULL default '0',
00942 PRIMARY KEY (ID)
00943 ) TYPE=MyISAM COMMENT='Termin Tabelle';
00944 # --------------------------------------------------------
00945
00946 <#73>
00947 #
00948 # Tabellenstruktur für Tabelle `dp_keyword`
00949 #
00950
00951 CREATE TABLE dp_keyword (
00952 ID int(15) NOT NULL auto_increment,
00953 user_ID int(15) NOT NULL default '0',
00954 keyword varchar(20) NOT NULL default '',
00955 PRIMARY KEY (ID)
00956 ) TYPE=MyISAM COMMENT='Tabelle für Schlagwörter';
00957 # --------------------------------------------------------
00958
00959 <#74>
00960 #
00961 # Tabellenstruktur für Tabelle `dp_keywords`
00962 #
00963
00964 CREATE TABLE dp_keywords (
00965 ID int(15) NOT NULL auto_increment,
00966 date_ID int(15) NOT NULL default '0',
00967 keyword_ID int(15) NOT NULL default '0',
00968 PRIMARY KEY (ID)
00969 ) TYPE=MyISAM COMMENT='Tabelle für die Zuordnung der Schlagwörter';
00970 # --------------------------------------------------------
00971
00972 <#75>
00973 #
00974 # Tabellenstruktur für Tabelle `dp_neg_dates`
00975 #
00976
00977 CREATE TABLE dp_neg_dates (
00978 ID int(15) NOT NULL auto_increment,
00979 date_ID int(15) NOT NULL default '0',
00980 user_ID int(15) NOT NULL default '0',
00981 timestamp int(14) default NULL,
00982 PRIMARY KEY (ID)
00983 ) TYPE=MyISAM COMMENT='Tabelle für die negativen Termine';
00984 # --------------------------------------------------------
00985
00986 <#76>
00987 #
00988 # Tabellenstruktur für Tabelle `dp_properties`
00989 #
00990
00991 CREATE TABLE dp_properties (
00992 ID int(15) NOT NULL auto_increment,
00993 user_ID int(15) NOT NULL default '0',
00994 dv_starttime time NOT NULL default '00:00:00',
00995 dv_endtime time NOT NULL default '00:00:00',
00996 PRIMARY KEY (ID)
00997 ) TYPE=MyISAM COMMENT='Tabelle für UserEinstellungen';
00998
00999 <#77>
01000 ALTER TABLE xmlvalue ADD FULLTEXT ( tag_value );
01001
01002 <#78>
01003 UPDATE usr_pref SET value='default' WHERE keyword='skin';
01004 UPDATE usr_pref SET value='blueshadow' WHERE keyword='style';
01005
01006 <#79>
01007 <?php
01008
01009 $q = "SELECT * FROM page_object WHERE content LIKE '%flit%'";
01010 $page_set = $this->db->query($q);
01011
01012 while ($page_rec = $page_set->fetchRow(DB_FETCHMODE_ASSOC))
01013 {
01014 $content = $page_rec["content"];
01015
01016 while (ereg("flit\_([0-9]*)", $content, $found))
01017 {
01018 $new = "il__file_".$found[1];
01019 $content = ereg_replace($found[0], $new, $content);
01020
01021 }
01022 $q = "UPDATE page_object SET content = '".addslashes($content)."'".
01023 " WHERE page_id = '".$page_rec["page_id"]."'".
01024 " AND parent_type='".$page_rec["parent_type"]."'";
01025 $this->db->query($q);
01026 }
01027
01028 ?>
01029
01030 <#80>
01031 ALTER TABLE glossary_term ADD COLUMN
01032 create_date DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00';
01033
01034 ALTER TABLE glossary_term ADD COLUMN
01035 last_update DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00';
01036
01037 <#81>
01038 ALTER TABLE lm_data ADD COLUMN
01039 create_date DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00';
01040
01041 ALTER TABLE lm_data ADD COLUMN
01042 last_update DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00';
01043
01044 <#82>
01045 UPDATE rbac_operations SET operation='edit_permission' WHERE ops_id='1';
01046 UPDATE rbac_operations SET operation='edit_post' WHERE ops_id='9';
01047 UPDATE rbac_operations SET operation='delete_post' WHERE ops_id='10';
01048 UPDATE rbac_operations SET operation='smtp_mail' WHERE ops_id='11';
01049 UPDATE rbac_operations SET operation='system_message' WHERE ops_id='12';
01050
01051 INSERT INTO rbac_operations (ops_id,operation,description) VALUES ('13', 'create_user', 'create new user account');
01052 INSERT INTO rbac_ta (typ_id,ops_id) VALUES ('22', '13');
01053 DELETE FROM rbac_ta WHERE typ_id='25' AND ops_id='5';
01054
01055 # remove useless write-operation for lngf-object
01056 DELETE FROM rbac_ta WHERE typ_id='28' AND ops_id='4';
01057
01058 # remove mob-object completely from RBAC system
01059 DELETE FROM rbac_ta WHERE typ_id='18';
01060
01061 # remove useless create-operation for adm-object
01062 DELETE FROM rbac_ta WHERE typ_id='21' AND ops_id='5';
01063
01064 # add operations 'create_role' and 'create_rolt'
01065 INSERT INTO rbac_operations (ops_id,operation,description) VALUES ('14', 'create_role', 'create new role definition');
01066 INSERT INTO rbac_operations (ops_id,operation,description) VALUES ('15', 'create_rolt', 'create new role definition template');
01067 INSERT INTO rbac_ta (typ_id,ops_id) VALUES ('23', '14');
01068 INSERT INTO rbac_ta (typ_id,ops_id) VALUES ('23', '15');
01069 DELETE FROM rbac_ta WHERE typ_id='27';
01070 DELETE FROM rbac_ta WHERE typ_id='30';
01071 DELETE FROM rbac_ta WHERE typ_id='23' AND ops_id='5';
01072
01073 <#83>
01074 # add create operations for most object types
01075 INSERT INTO rbac_operations (ops_id,operation,description) VALUES ('16', 'create_cat', 'create new category');
01076 INSERT INTO rbac_operations (ops_id,operation,description) VALUES ('17', 'create_grp', 'create new group');
01077 INSERT INTO rbac_operations (ops_id,operation,description) VALUES ('18', 'create_frm', 'create new forum');
01078 INSERT INTO rbac_operations (ops_id,operation,description) VALUES ('19', 'create_crs', 'create new course');
01079 INSERT INTO rbac_operations (ops_id,operation,description) VALUES ('20', 'create_lm', 'create new learning module');
01080 INSERT INTO rbac_operations (ops_id,operation,description) VALUES ('21', 'create_slm', 'create new SCORM learning module');
01081 INSERT INTO rbac_operations (ops_id,operation,description) VALUES ('22', 'create_glo', 'create new glossary');
01082 INSERT INTO rbac_operations (ops_id,operation,description) VALUES ('23', 'create_dbk', 'create new digibook');
01083 INSERT INTO rbac_operations (ops_id,operation,description) VALUES ('24', 'create_exc', 'create new exercise');
01084 INSERT INTO rbac_operations (ops_id,operation,description) VALUES ('25', 'create_file', 'upload new file');
01085 INSERT INTO rbac_operations (ops_id,operation,description) VALUES ('26', 'create_fold', 'create new folder');
01086
01087 # assign create-operations to different object types according to defined rules in objects.xml
01088 # create_cat
01089 INSERT INTO rbac_ta (typ_id,ops_id) VALUES ('33', '16');
01090 INSERT INTO rbac_ta (typ_id,ops_id) VALUES ('16', '16');
01091 # create grp
01092 INSERT INTO rbac_ta (typ_id,ops_id) VALUES ('16', '17');
01093 # create_frm
01094 INSERT INTO rbac_ta (typ_id,ops_id) VALUES ('16', '18');
01095 INSERT INTO rbac_ta (typ_id,ops_id) VALUES ('15', '18');
01096 INSERT INTO rbac_ta (typ_id,ops_id) VALUES ('17', '18');
01097 # create_crs
01098 INSERT INTO rbac_ta (typ_id,ops_id) VALUES ('16', '19');
01099 # create_lm
01100 INSERT INTO rbac_ta (typ_id,ops_id) VALUES ('16', '20');
01101 INSERT INTO rbac_ta (typ_id,ops_id) VALUES ('17', '20');
01102 INSERT INTO rbac_ta (typ_id,ops_id) VALUES ('15', '20');
01103 # create_slm
01104 INSERT INTO rbac_ta (typ_id,ops_id) VALUES ('16', '21');
01105 INSERT INTO rbac_ta (typ_id,ops_id) VALUES ('17', '21');
01106 INSERT INTO rbac_ta (typ_id,ops_id) VALUES ('15', '21');
01107 # create_glo
01108 INSERT INTO rbac_ta (typ_id,ops_id) VALUES ('16', '22');
01109 INSERT INTO rbac_ta (typ_id,ops_id) VALUES ('17', '22');
01110 # create_dbk
01111 INSERT INTO rbac_ta (typ_id,ops_id) VALUES ('16', '23');
01112 # create_exc
01113 INSERT INTO rbac_ta (typ_id,ops_id) VALUES ('16', '24');
01114 # create_file
01115 INSERT INTO rbac_ta (typ_id,ops_id) VALUES ('15', '25');
01116 # create_fold
01117 INSERT INTO rbac_ta (typ_id,ops_id) VALUES ('15', '26');
01118
01119 <#84>
01120 CREATE TABLE map_area (
01121 item_id int(11) NOT NULL default '0',
01122 nr int(11) NOT NULL default '0',
01123 shape VARCHAR(20),
01124 coords VARCHAR(200),
01125 link_type CHAR(3),
01126 title VARCHAR(200),
01127 href VARCHAR(200),
01128 target VARCHAR(50),
01129 type VARCHAR(20),
01130 target_frame VARCHAR(50),
01131 PRIMARY KEY (item_id, nr)
01132 ) TYPE=MyISAM;
01133
01134 <#85>
01135 DROP TABLE IF EXISTS lo_attribute_idx;
01136 DROP TABLE IF EXISTS lo_attribute_name;
01137 DROP TABLE IF EXISTS lo_attribute_namespace;
01138 DROP TABLE IF EXISTS lo_attribute_value;
01139 DROP TABLE IF EXISTS lo_cdata;
01140 DROP TABLE IF EXISTS lo_comment;
01141 DROP TABLE IF EXISTS lo_element_idx;
01142 DROP TABLE IF EXISTS lo_element_namespace;
01143 DROP TABLE IF EXISTS lo_element_name;
01144 DROP TABLE IF EXISTS lo_entity_reference;
01145 DROP TABLE IF EXISTS lo_node_type;
01146 DROP TABLE IF EXISTS lo_pi_data;
01147 DROP TABLE IF EXISTS lo_pi_target;
01148 DROP TABLE IF EXISTS lo_text;
01149 DROP TABLE IF EXISTS lo_tree;
01150
01151 <#86>
01152 <?php
01153
01154
01155
01156 $query = "SELECT ref_id FROM object_reference ".
01157 "LEFT JOIN object_data ON object_reference.obj_id=object_data.obj_id ".
01158 "WHERE object_data.type = 'ldap'";
01159 $res = $this->db->query($query);
01160 $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
01161
01162
01163 if ($row->ref_id > 0)
01164 {
01165
01166 $tree = new ilTree(ROOT_FOLDER_ID);
01167
01168 $ldap_node = $tree->getNodeData($row->ref_id);
01169
01170
01171 if ($ldap_node["tree"] > 0)
01172 {
01173
01174 $tree->deleteTree($ldap_node);
01175 }
01176 }
01177 ?>
01178
01179 <#87>
01180 <?php
01181
01182 $query = "SELECT obj_id FROM object_data ".
01183 "WHERE type='typ' AND title='file'";
01184 $res = $this->db->query($query);
01185 $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
01186
01187 $query = "DELETE FROM rbac_ta WHERE typ_id='".$row->obj_id."'";
01188 $this->db->query($query);
01189
01190
01191 $rbacadmin = new ilRbacAdmin();
01192 $rbacreview = new ilRbacReview();
01193
01194 $tree = new ilTree(ROOT_FOLDER_ID);
01195
01196 $ilObjDef = new ilObjectDefinition();
01197 $ilObjDef->startParsing();
01198
01199
01200
01201
01202 $query = "DELETE FROM rbac_pa WHERE ops_id='a:0:{}'";
01203 $this->db->query($query);
01204
01205
01206 $query = "SELECT rbac_pa.ops_id, rbac_pa.rol_id, rbac_pa.obj_id as ref_id, object_data.type FROM rbac_pa ".
01207 "LEFT JOIN object_reference ON rbac_pa.obj_id=object_reference.ref_id ".
01208 "LEFT JOIN object_data ON object_reference.obj_id=object_data.obj_id";
01209 $res = $this->db->query($query);
01210
01211 while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
01212 {
01213 $arr_pa_entries[] = array(
01214 "ref_id" => $row->ref_id,
01215 "rol_id" => $row->rol_id,
01216 "type" => $row->type,
01217 "operations"=> unserialize($row->ops_id)
01218 );
01219 }
01220
01221 foreach ($arr_pa_entries as $key => $pa_entry)
01222 {
01223
01224 $pa_entry["create"] = array_search("5",$pa_entry["operations"]);
01225
01226
01227 if ($pa_entry["create"] !== false)
01228 {
01229 unset($pa_entry["operations"][$pa_entry["create"]]);
01230 }
01231
01232 switch ($pa_entry)
01233 {
01234 case "usrf":
01235 if (in_array("4",$pa_entry["operations"]))
01236 {
01237 $pa_entry["operations"][] = "13";
01238 }
01239 break;
01240
01241 case "grp":
01242 if ($pa_entry["create"] !== false)
01243 {
01244 $pa_entry["operations"][] = "18";
01245 $pa_entry["operations"][] = "20";
01246 $pa_entry["operations"][] = "21";
01247 }
01248
01249 if (in_array("2",$pa_entry["operations"]) and in_array("3",$pa_entry["operations"]))
01250 {
01251 $pa_entry["operations"][] = "25";
01252 $pa_entry["operations"][] = "26";
01253 }
01254 break;
01255
01256 case "cat":
01257 if ($pa_entry["create"] !== false)
01258 {
01259 $pa_entry["operations"][] = "16";
01260 $pa_entry["operations"][] = "17";
01261 $pa_entry["operations"][] = "18";
01262 $pa_entry["operations"][] = "19";
01263 $pa_entry["operations"][] = "20";
01264 $pa_entry["operations"][] = "21";
01265 $pa_entry["operations"][] = "22";
01266 $pa_entry["operations"][] = "23";
01267 $pa_entry["operations"][] = "24";
01268 }
01269 break;
01270
01271 case "crs":
01272 if ($pa_entry["create"] !== false)
01273 {
01274 $pa_entry["operations"][] = "18";
01275 $pa_entry["operations"][] = "20";
01276 $pa_entry["operations"][] = "21";
01277 $pa_entry["operations"][] = "22";
01278 }
01279 break;
01280 }
01281
01282
01283 $pa_entry["operations"] = array_unique($pa_entry["operations"]);
01284
01285 $rbacadmin->revokePermission($pa_entry["ref_id"],$pa_entry["rol_id"]);
01286 $rbacadmin->grantPermission($pa_entry["rol_id"],$pa_entry["operations"],$pa_entry["ref_id"]);
01287 }
01288
01289
01290
01291
01292 $query = "SELECT ta.typ_id,obj.title,ops.ops_id,ops.operation FROM rbac_ta AS ta ".
01293 "LEFT JOIN object_data AS obj ON obj.obj_id=ta.typ_id ".
01294 "LEFT JOIN rbac_operations AS ops ON ops.ops_id=ta.ops_id";
01295 $res = $this->db->query($query);
01296
01297 while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
01298 {
01299 $rbac_objects[$row->typ_id] = array("obj_id" => $row->typ_id,
01300 "type" => $row->title
01301 );
01302
01303 $rbac_operations[$row->typ_id][$row->ops_id] = $row->ops_id;
01304 }
01305
01306 foreach ($rbac_objects as $key => $obj_data)
01307 {
01308 $rbac_objects[$key]["ops"] = $rbac_operations[$key];
01309 }
01310
01311
01312 $query = "SELECT * FROM rbac_fa";
01313 $res = $this->db->query($query);
01314
01315 while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
01316 {
01317 $arr_roles[] = array(
01318 "rol_id" => $row->rol_id,
01319 "rolf_id" => $row->parent,
01320 "assign" => $row->assign
01321 );
01322 }
01323
01324 foreach ($arr_roles as $role)
01325 {
01326
01327 $rbac_objects_temp = $rbac_objects;
01328
01329
01330 if ($role["rolf_id"] != ROLE_FOLDER_ID)
01331 {
01332
01333 $parent_data = $tree->getParentNodeData($role["rolf_id"]);
01334
01335 $subobj_data = $ilObjDef->getSubObjects($parent_data["type"]);
01336
01337
01338 foreach ($rbac_objects_temp as $key => $obj_data)
01339 {
01340 if (!$subobj_data[$obj_data["type"]] and $parent_data["type"] != $obj_data["type"])
01341 {
01342 unset($rbac_objects_temp[$key]);
01343 }
01344 }
01345 }
01346
01347 foreach ($rbac_objects_temp as $key => $obj_data)
01348 {
01349 $arr_selected = $rbacreview->getOperationsOfRole($role["rol_id"], $obj_data["type"], $role["rolf_id"]);
01350
01351
01352 $obj_data["create"] = array_search("5",$arr_selected);
01353
01354
01355 if ($obj_data["create"] !== false)
01356 {
01357 unset($arr_selected[$obj_data["create"]]);
01358 }
01359
01360 if ($obj_data["create"] !== false)
01361 {
01362 switch ($obj_data["type"])
01363 {
01364 case "usrf":
01365 $arr_selected[] = "13";
01366 break;
01367
01368 case "grp":
01369 $arr_selected[] = "18";
01370 $arr_selected[] = "20";
01371 $arr_selected[] = "21";
01372 $arr_selected[] = "25";
01373 $arr_selected[] = "26";
01374
01375 break;
01376
01377 case "cat":
01378 $arr_selected[] = "16";
01379 $arr_selected[] = "17";
01380 $arr_selected[] = "18";
01381 $arr_selected[] = "19";
01382 $arr_selected[] = "20";
01383 $arr_selected[] = "21";
01384 $arr_selected[] = "22";
01385 $arr_selected[] = "23";
01386 $arr_selected[] = "24";
01387 break;
01388
01389 case "crs":
01390 $arr_selected[] = "18";
01391 $arr_selected[] = "20";
01392 $arr_selected[] = "21";
01393 $arr_selected[] = "22";
01394 break;
01395 }
01396 }
01397
01398
01399 $arr_selected = array_unique($arr_selected);
01400
01401
01402 if (!empty($arr_selected))
01403 {
01404
01405 $rbacadmin->deleteRolePermission($role["rol_id"], $role["rolf_id"],$obj_data["type"]);
01406 $rbacadmin->setRolePermission($role["rol_id"], $obj_data["type"], $arr_selected, $role["rolf_id"]);
01407 }
01408 }
01409 }
01410
01411
01412 $query = "DELETE FROM rbac_ta WHERE ops_id=5";
01413 $this->db->query($query);
01414 $query = "DELETE FROM rbac_operations WHERE ops_id=5";
01415 $this->db->query($query);
01416
01417 $query = "DELETE FROM tree WHERE parent=0 AND tree <> 1";
01418 $this->db->query($query);
01419 ?>
01420
01421 <#88>
01422 DELETE FROM usr_session;
01423
01424 <#89>
01425 ALTER TABLE rbac_pa CHANGE obj_id ref_id INT(11) DEFAULT '0' NOT NULL;
01426 DELETE FROM usr_session;
01427
01428 <#90>
01429 UPDATE settings SET value = '3.0.0_beta3' WHERE keyword = 'ilias_version' LIMIT 1;
01430
01431 <#91>
01432 DROP TABLE IF EXISTS cal_appointment;
01433 DROP TABLE IF EXISTS cal_appointmentrepeats;
01434 DROP TABLE IF EXISTS cal_appointmentrepeatsnot;
01435 DROP TABLE IF EXISTS cal_category;
01436 DROP TABLE IF EXISTS cal_priority;
01437 DROP TABLE IF EXISTS cal_user_group;
01438 DROP TABLE IF EXISTS dummy_groups;
01439
01440 <#92>
01441 # add operations 'assign_user' and 'assign_role'
01442 INSERT INTO rbac_operations (ops_id,operation,description) VALUES ('40', 'edit_userassignment', 'change userassignment of roles');
01443 INSERT INTO rbac_operations (ops_id,operation,description) VALUES ('41', 'edit_roleassignment', 'change roleassignments of user accounts');
01444 INSERT INTO rbac_ta (typ_id,ops_id) VALUES ('23', '40');
01445 INSERT INTO rbac_ta (typ_id,ops_id) VALUES ('22', '41');
01446
01447 <#93>
01448 ALTER TABLE mail_options ADD incoming_type TINYINT( 3 );
01449
01450 <#94>
01451 # add operations 'create_tst' and 'create_qpl' for test objects and question pools
01452 INSERT INTO rbac_operations (ops_id,operation,description) VALUES ('27', 'create_tst', 'create new test');
01453 INSERT INTO rbac_operations (ops_id,operation,description) VALUES ('28', 'create_qpl', 'create new question pool');
01454
01455 <#95>
01456 <?php
01457
01458
01459 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
01460 "VALUES ('typ', 'tst', 'Test object', -1, now(), now())";
01461 $this->db->query($query);
01462
01463
01464 $query = "SELECT LAST_INSERT_ID()";
01465 $res = $this->db->query($query);
01466 $row = $res->fetchRow();
01467 $typ_id = $row[0];
01468
01469
01470
01471 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','1')";
01472 $this->db->query($query);
01473 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','2')";
01474 $this->db->query($query);
01475 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','3')";
01476 $this->db->query($query);
01477 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','4')";
01478 $this->db->query($query);
01479 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','6')";
01480 $this->db->query($query);
01481 ?>
01482
01483 <#96>
01484 <?php
01485
01486
01487 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
01488 "VALUES ('typ', 'qpl', 'Question pool object', -1, now(), now())";
01489 $this->db->query($query);
01490
01491
01492 $query = "SELECT LAST_INSERT_ID()";
01493 $res = $this->db->query($query);
01494 $row = $res->fetchRow();
01495 $typ_id = $row[0];
01496
01497
01498
01499 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','1')";
01500 $this->db->query($query);
01501 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','2')";
01502 $this->db->query($query);
01503 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','3')";
01504 $this->db->query($query);
01505 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','4')";
01506 $this->db->query($query);
01507 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','6')";
01508 $this->db->query($query);
01509 ?>
01510
01511 <#97>
01512 <?php
01513
01514
01515 $query = "SELECT obj_id FROM object_data WHERE type='typ' and title='cat'";
01516 $res = $this->db->query($query);
01517 $row = $res->fetchRow();
01518 $typ_id = $row[0];
01519
01520
01521 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','27')";
01522 $this->db->query($query);
01523 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','28')";
01524 $this->db->query($query);
01525 ?>
01526
01527 <#98>
01528
01529 #
01530 # Table structure for table 'qpl_answers'
01531 #
01532
01533 DROP TABLE IF EXISTS `qpl_answers`;
01534 CREATE TABLE `qpl_answers` (
01535 `answer_id` int(10) unsigned NOT NULL auto_increment,
01536 `question_fi` int(10) unsigned NOT NULL default '0',
01537 `answertext` char(100) NOT NULL default '',
01538 `points` double NOT NULL default '0',
01539 `order` int(10) unsigned NOT NULL default '0',
01540 `correctness` enum('0','1') NOT NULL default '0',
01541 `solution_order` int(10) unsigned NOT NULL default '0',
01542 `matchingtext` char(100) default NULL,
01543 `matching_order` int(10) unsigned default NULL,
01544 `gap_id` int(10) unsigned NOT NULL default '0',
01545 `TIMESTAMP` timestamp(14) NOT NULL,
01546 PRIMARY KEY (`answer_id`),
01547 UNIQUE KEY `answer_id` (`answer_id`),
01548 KEY `answer_id_2` (`answer_id`)
01549 ) TYPE=MyISAM;
01550
01551 <#99>
01552
01553 #
01554 # Table structure for table 'qpl_question_type'
01555 #
01556
01557 DROP TABLE IF EXISTS `qpl_question_type`;
01558 CREATE TABLE `qpl_question_type` (
01559 `question_type_id` int(3) unsigned NOT NULL auto_increment,
01560 `type_tag` char(25) NOT NULL default '',
01561 PRIMARY KEY (`question_type_id`),
01562 UNIQUE KEY `question_type_id` (`question_type_id`),
01563 KEY `question_type_id_2` (`question_type_id`)
01564 ) TYPE=MyISAM;
01565
01566 INSERT INTO `qpl_question_type` (`question_type_id`, `type_tag`) VALUES("1", "qt_multiple_choice_sr");
01567 INSERT INTO `qpl_question_type` (`question_type_id`, `type_tag`) VALUES("2", "qt_multiple_choice_mr");
01568 INSERT INTO `qpl_question_type` (`question_type_id`, `type_tag`) VALUES("3", "qt_cloze");
01569 INSERT INTO `qpl_question_type` (`question_type_id`, `type_tag`) VALUES("4", "qt_matching");
01570 INSERT INTO `qpl_question_type` (`question_type_id`, `type_tag`) VALUES("5", "qt_ordering");
01571
01572 <#100>
01573
01574 #
01575 # Table structure for table 'qpl_questions'
01576 #
01577
01578 DROP TABLE IF EXISTS `qpl_questions`;
01579 CREATE TABLE `qpl_questions` (
01580 `question_id` int(11) NOT NULL default '0',
01581 `question_type_fi` int(10) unsigned NOT NULL default '0',
01582 `ref_fi` int(10) unsigned NOT NULL default '0',
01583 `title` varchar(100) NOT NULL default '',
01584 `comment` text,
01585 `author` varchar(50) NOT NULL default '',
01586 `owner` int(11) NOT NULL default '0',
01587 `question_text` text NOT NULL,
01588 `points` double default NULL,
01589 `start_tag` varchar(5) default NULL,
01590 `end_tag` varchar(5) default NULL,
01591 `cloze_type` enum('0','1') default NULL,
01592 `choice_response` enum('0','1') default NULL,
01593 `materials` text,
01594 `created` varchar(14) NOT NULL default '',
01595 `TIMESTAMP` timestamp(14) NOT NULL,
01596 PRIMARY KEY (`question_id`)
01597 ) TYPE=MyISAM;
01598
01599 <#101>
01600 <?php
01601
01602 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
01603 "VALUES ('typ', 'chat', 'Chat object', -1, now(), now())";
01604 $this->db->query($query);
01605
01606 $query = "SELECT LAST_INSERT_ID() as id";
01607 $res = $this->db->query($query);
01608 $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
01609
01610
01611 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$row->id."','1')";
01612 $this->db->query($query);
01613 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$row->id."','2')";
01614 $this->db->query($query);
01615 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$row->id."','3')";
01616 $this->db->query($query);
01617 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$row->id."','4')";
01618 $this->db->query($query);
01619 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$row->id."','6')";
01620 $this->db->query($query);
01621
01622
01623
01624 $query = "INSERT INTO rbac_operations VALUES('29','create_chat','create chat object')";
01625 $this->db->query($query);
01626
01627
01628 $query = "SELECT obj_id FROM object_data WHERE type = 'typ' AND ( title = 'cat' OR title = 'grp') ";
01629 $res = $this->db->query($query);
01630 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
01631 {
01632 $query = "INSERT INTO rbac_ta VALUES('".$row->obj_id."','29')";
01633 $this->db->query($query);
01634 }
01635 ?>
01636 <#102>
01637 <?php
01638
01639 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
01640 "VALUES ('typ', 'chac', 'Chat server config object', -1, now(), now())";
01641 $this->db->query($query);
01642
01643 $query = "SELECT LAST_INSERT_ID() as id";
01644 $res = $this->db->query($query);
01645 $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
01646
01647
01648 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$row->id."','1')";
01649 $this->db->query($query);
01650 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$row->id."','2')";
01651 $this->db->query($query);
01652 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$row->id."','3')";
01653 $this->db->query($query);
01654 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$row->id."','4')";
01655 $this->db->query($query);
01656
01657
01658
01659 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
01660 "VALUES ('chac', 'Chat server settings', 'Configure chat server settings here', -1, now(), now())";
01661 $this->db->query($query);
01662
01663 $query = "SELECT LAST_INSERT_ID() as id";
01664 $res = $this->db->query($query);
01665 $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
01666
01667
01668 $query = "INSERT INTO object_reference (obj_id) VALUES('".$row->id."')";
01669 $res = $this->db->query($query);
01670
01671 $query = "SELECT LAST_INSERT_ID() as id";
01672 $res = $this->db->query($query);
01673 $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
01674
01675
01676 $tree = new ilTree(ROOT_FOLDER_ID);
01677 $tree->insertNode($row->id,SYSTEM_FOLDER_ID);
01678 ?>
01679
01680 <#103>
01681 CREATE TABLE chat_rooms (
01682 room_id INT( 11 ) NOT NULL AUTO_INCREMENT ,
01683 chat_id INT( 11 ) NOT NULL ,
01684 title VARCHAR( 64 ) ,
01685 owner INT( 11 ) NOT NULL ,
01686 PRIMARY KEY ( room_id )
01687 );
01688 CREATE TABLE chat_invitations (
01689 room_id INT( 11 ) NOT NULL ,
01690 guest_id INT( 11 ) NOT NULL ,
01691 PRIMARY KEY ( room_id , guest_id )
01692 );
01693 CREATE TABLE chat_user (
01694 usr_id INT( 11 ) NOT NULL ,
01695 room_id INT( 11 ) NOT NULL ,
01696 last_conn_timestamp TIMESTAMP NOT NULL ,
01697 PRIMARY KEY ( usr_id , room_id )
01698 );
01699 <#104>
01700 ALTER TABLE frm_posts ADD notify TINYINT( 1 ) NOT NULL ;
01701 <#105>
01702 UPDATE settings SET value = '3.0.0_beta4 2004-02-18' WHERE keyword = 'ilias_version' LIMIT 1;
01703 <#106>
01704 CREATE TABLE `tst_mark` (
01705 `mark_id` int(10) unsigned NOT NULL auto_increment,
01706 `test_fi` int(10) unsigned NOT NULL default '0',
01707 `short_name` varchar(15) NOT NULL default '',
01708 `official_name` varchar(50) NOT NULL default '',
01709 `minimum_level` double NOT NULL default '0',
01710 `TIMESTAMP` timestamp(14) NOT NULL,
01711 PRIMARY KEY (`mark_id`),
01712 UNIQUE KEY `mark_id` (`mark_id`),
01713 KEY `mark_id_2` (`mark_id`)
01714 ) TYPE=MyISAM COMMENT='Mark steps of mark schemas';
01715 <#107>
01716 CREATE TABLE `tst_test_question` (
01717 `test_question_id` int(11) NOT NULL auto_increment,
01718 `test_fi` int(11) NOT NULL default '0',
01719 `question_fi` int(11) NOT NULL default '0',
01720 `sequence` int(10) unsigned NOT NULL default '0',
01721 `TIMESTAMP` timestamp(14) NOT NULL,
01722 PRIMARY KEY (`test_question_id`)
01723 ) TYPE=MyISAM COMMENT='Relation table for questions in tests';
01724 <#108>
01725 CREATE TABLE `tst_test_type` (
01726 `test_type_id` int(10) unsigned NOT NULL auto_increment,
01727 `type_tag` varchar(50) NOT NULL default '',
01728 PRIMARY KEY (`test_type_id`),
01729 UNIQUE KEY `test_type_id` (`test_type_id`),
01730 KEY `test_type_id_2` (`test_type_id`)
01731 ) TYPE=MyISAM COMMENT='ILIAS 3 Assessment Test types';
01732
01733 INSERT INTO `tst_test_type` (`test_type_id`, `type_tag`) VALUES (1, 'tt_assessment');
01734 INSERT INTO `tst_test_type` (`test_type_id`, `type_tag`) VALUES (2, 'tt_self_assessment');
01735 INSERT INTO `tst_test_type` (`test_type_id`, `type_tag`) VALUES (3, 'tt_navigation_controlling');
01736 <#109>
01737 CREATE TABLE `tst_tests` (
01738 `test_id` int(10) unsigned NOT NULL auto_increment,
01739 `ref_fi` int(11) NOT NULL default '0',
01740 `author` varchar(50) NOT NULL default '',
01741 `test_type_fi` int(10) unsigned NOT NULL default '0',
01742 `introduction` text,
01743 `sequence_settings` tinyint(3) unsigned NOT NULL default '0',
01744 `score_reporting` tinyint(3) unsigned NOT NULL default '0',
01745 `nr_of_tries` tinyint(3) unsigned NOT NULL default '0',
01746 `processing_time` int(10) unsigned NOT NULL default '0',
01747 `starting_time` varchar(14) default NULL,
01748 `created` varchar(14) default NULL,
01749 `TIMESTAMP` timestamp(14) NOT NULL,
01750 PRIMARY KEY (`test_id`),
01751 UNIQUE KEY `test_id` (`test_id`),
01752 KEY `test_id_2` (`test_id`)
01753 ) TYPE=MyISAM COMMENT='Tests in ILIAS Assessment';
01754
01755 <#110>
01756 ALTER TABLE `tst_mark` ADD `passed` ENUM( '0', '1' ) DEFAULT '0' NOT NULL AFTER `minimum_level` ;
01757
01758 <#111>
01759 ALTER TABLE `qpl_questions` ADD `matching_type` ENUM( '0', '1' ) AFTER `end_tag` ;
01760
01761 <#112>
01762 INSERT INTO `qpl_question_type` (`question_type_id`, `type_tag`) VALUES("6", "qt_imagemap");
01763
01764 <#113>
01765 ALTER TABLE `qpl_questions` ADD `imagemap_file` VARCHAR( 100 ) AFTER `materials` , ADD `image_file` VARCHAR( 100 ) AFTER `imagemap_file` ;
01766
01767 <#114>
01768
01769 <#115>
01770 #
01771 # Table structure for table 'qpl_answers'
01772 #
01773
01774 DROP TABLE IF EXISTS `qpl_answers`;
01775 CREATE TABLE `qpl_answers` (
01776 `answer_id` int(10) unsigned NOT NULL auto_increment,
01777 `question_fi` int(10) unsigned NOT NULL default '0',
01778 `answertext` char(100) NOT NULL default '',
01779 `points` double NOT NULL default '0',
01780 `aorder` int(10) unsigned NOT NULL default '0',
01781 `correctness` enum('0','1') NOT NULL default '0',
01782 `solution_order` int(10) unsigned NOT NULL default '0',
01783 `matchingtext` char(100) default NULL,
01784 `matching_order` int(10) unsigned default NULL,
01785 `gap_id` int(10) unsigned NOT NULL default '0',
01786 `TIMESTAMP` timestamp(14) NOT NULL,
01787 PRIMARY KEY (`answer_id`),
01788 UNIQUE KEY `answer_id` (`answer_id`),
01789 KEY `answer_id_2` (`answer_id`)
01790 ) TYPE=MyISAM;
01791
01792 <#116>
01793 ALTER TABLE `qpl_answers` ADD `coords` TEXT AFTER `gap_id` , ADD `area` VARCHAR( 20 ) AFTER `coords` ;
01794
01795 <#117>
01796 CREATE TABLE `chat_room_messages` (
01797 `entry_id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
01798 `chat_id` INT( 11 ) NOT NULL ,
01799 `room_id` INT( 11 ) NOT NULL ,
01800 `message` TEXT,
01801 `commit_timestamp` TIMESTAMP NOT NULL ,
01802 PRIMARY KEY ( `entry_id` )
01803 );
01804 <#118>
01805 ALTER TABLE chat_user ADD chat_id INT( 11 ) NOT NULL AFTER usr_id ;
01806
01807 <#119>
01808 ALTER TABLE usr_data ADD i2passwd VARCHAR(32) NOT NULL DEFAULT '';
01809
01810 <#120>
01811 CREATE TABLE `xml_attribute_idx` (
01812 `node_id` int(10) unsigned NOT NULL default '0',
01813 `attribute_id` smallint(5) unsigned NOT NULL default '0',
01814 `value_id` smallint(5) unsigned NOT NULL default '0',
01815 KEY `node_id` (`node_id`)
01816 ) TYPE=MyISAM;
01817
01818 # --------------------------------------------------------
01819
01820 CREATE TABLE `xml_attribute_name` (
01821 `attribute_id` smallint(5) unsigned NOT NULL auto_increment,
01822 `attribute` char(32) NOT NULL default '',
01823 PRIMARY KEY (`attribute_id`),
01824 UNIQUE KEY `attribute` (`attribute`)
01825 ) TYPE=MyISAM ;
01826
01827 # --------------------------------------------------------
01828
01829 CREATE TABLE `xml_attribute_namespace` (
01830 `attribute_id` smallint(5) unsigned NOT NULL auto_increment,
01831 `node_id` int(10) unsigned NOT NULL default '0',
01832 `namespace` char(64) NOT NULL default '',
01833 PRIMARY KEY (`attribute_id`)
01834 ) TYPE=MyISAM;
01835
01836 # --------------------------------------------------------
01837
01838 CREATE TABLE `xml_attribute_value` (
01839 `value_id` smallint(5) unsigned NOT NULL auto_increment,
01840 `value` char(32) NOT NULL default '0',
01841 PRIMARY KEY (`value_id`)
01842 ) TYPE=MyISAM ;
01843
01844 # --------------------------------------------------------
01845
01846 CREATE TABLE `xml_cdata` (
01847 `node_id` int(10) unsigned NOT NULL auto_increment,
01848 `cdata` text NOT NULL,
01849 PRIMARY KEY (`node_id`)
01850 ) TYPE=MyISAM ;
01851
01852 # --------------------------------------------------------
01853
01854 CREATE TABLE `xml_comment` (
01855 `node_id` int(10) unsigned NOT NULL auto_increment,
01856 `comment` text NOT NULL,
01857 PRIMARY KEY (`node_id`)
01858 ) TYPE=MyISAM ;
01859
01860 # --------------------------------------------------------
01861
01862 CREATE TABLE `xml_element_idx` (
01863 `node_id` int(10) unsigned NOT NULL default '0',
01864 `element_id` smallint(5) unsigned NOT NULL default '0',
01865 PRIMARY KEY (`node_id`)
01866 ) TYPE=MyISAM;
01867
01868 # --------------------------------------------------------
01869
01870 CREATE TABLE `xml_element_name` (
01871 `element_id` smallint(5) unsigned NOT NULL auto_increment,
01872 `element` char(32) NOT NULL default '',
01873 PRIMARY KEY (`element_id`),
01874 UNIQUE KEY `element` (`element`)
01875 ) TYPE=MyISAM ;
01876
01877 # --------------------------------------------------------
01878
01879 CREATE TABLE `xml_element_namespace` (
01880 `element_id` smallint(5) unsigned NOT NULL auto_increment,
01881 `node_id` int(10) unsigned NOT NULL default '0',
01882 `namespace` char(64) NOT NULL default '',
01883 PRIMARY KEY (`element_id`)
01884 ) TYPE=MyISAM ;
01885
01886 # --------------------------------------------------------
01887
01888 CREATE TABLE `xml_entity_reference` (
01889 `element_id` smallint(5) unsigned NOT NULL auto_increment,
01890 `node_id` int(10) unsigned NOT NULL default '0',
01891 `entity_reference` char(128) NOT NULL default '',
01892 PRIMARY KEY (`element_id`)
01893 ) TYPE=MyISAM;
01894
01895 # --------------------------------------------------------
01896
01897 CREATE TABLE `xml_node_type` (
01898 `node_type_id` int(11) NOT NULL auto_increment,
01899 `description` varchar(50) default NULL,
01900 `lft_delimiter` varchar(10) default NULL,
01901 `rgt_delimiter` varchar(10) default NULL,
01902 PRIMARY KEY (`node_type_id`)
01903 ) TYPE=MyISAM;
01904
01905 INSERT INTO `xml_node_type` (`node_type_id`, `description`, `lft_delimiter`, `rgt_delimiter`) VALUES (1, 'ELEMENT_NODE', '<', '>'),
01906 (2, 'ATTRIBUTE_NODE(not used)', '"', '"'),
01907 (3, 'TEXT_NODE', NULL, NULL),
01908 (5, 'ENTITY_REF_NODE', '&', ';'),
01909 (4, 'CDATA_SECTION_NODE', '<![CDATA[', ']]>'),
01910 (8, 'COMMENT_NODE', '<!--', '-->'),
01911 (9, 'DOCUMENT_NODE', NULL, NULL),
01912 (10, 'DOCUMENT_TYPE_NODE', NULL, NULL),
01913 (6, 'ENTITY_NODE', '&', ';');
01914
01915 # --------------------------------------------------------
01916
01917 CREATE TABLE `xml_object` (
01918 `ID` int(11) NOT NULL auto_increment,
01919 `version` varchar(5) NOT NULL default '',
01920 `encoding` varchar(40) default NULL,
01921 `charset` varchar(40) default NULL,
01922 `TIMESTAMP` timestamp(14) NOT NULL,
01923 PRIMARY KEY (`ID`)
01924 ) TYPE=MyISAM COMMENT='Master Table for XML objects';
01925
01926 # --------------------------------------------------------
01927
01928 CREATE TABLE `xml_pi_data` (
01929 `leaf_id` int(10) unsigned NOT NULL auto_increment,
01930 `node_id` int(10) unsigned NOT NULL default '0',
01931 `leaf_text` text NOT NULL,
01932 PRIMARY KEY (`leaf_id`)
01933 ) TYPE=MyISAM ;
01934
01935 # --------------------------------------------------------
01936
01937 CREATE TABLE `xml_pi_target` (
01938 `leaf_id` int(10) unsigned NOT NULL auto_increment,
01939 `node_id` int(10) unsigned NOT NULL default '0',
01940 `leaf_text` text NOT NULL,
01941 PRIMARY KEY (`leaf_id`)
01942 ) TYPE=MyISAM;
01943
01944 # --------------------------------------------------------
01945
01946 CREATE TABLE `xml_text` (
01947 `node_id` int(10) unsigned NOT NULL default '0',
01948 `textnode` text NOT NULL,
01949 PRIMARY KEY (`node_id`),
01950 FULLTEXT KEY `textnode` (`textnode`)
01951 ) TYPE=MyISAM;
01952
01953 # --------------------------------------------------------
01954
01955 CREATE TABLE `xml_tree` (
01956 `node_id` int(10) unsigned NOT NULL auto_increment,
01957 `xml_id` mediumint(8) unsigned NOT NULL default '0',
01958 `parent_node_id` int(10) unsigned NOT NULL default '0',
01959 `lft` smallint(5) unsigned NOT NULL default '0',
01960 `rgt` smallint(5) unsigned NOT NULL default '0',
01961 `node_type_id` tinyint(3) unsigned NOT NULL default '0',
01962 `depth` smallint(5) unsigned NOT NULL default '0',
01963 `prev_sibling_node_id` int(10) unsigned NOT NULL default '0',
01964 `next_sibling_node_id` int(10) unsigned NOT NULL default '0',
01965 `first_child_node_id` int(10) unsigned NOT NULL default '0',
01966 `struct` tinyint(3) unsigned NOT NULL default '0',
01967 PRIMARY KEY (`node_id`),
01968 KEY `xml_id` (`xml_id`)
01969 ) TYPE=MyISAM;
01970
01971 <#121>
01972 ALTER TABLE chat_user DROP PRIMARY KEY;
01973 ALTER TABLE chat_user ADD PRIMARY KEY(usr_id,chat_id,room_id);
01974
01975 <#122>
01976 <?php
01977
01978 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
01979 "VALUES ('typ', 'recf', 'RecoveryFolder object', -1, now(), now())";
01980 $this->db->query($query);
01981
01982
01983
01984 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
01985 "VALUES ('recf', '__Restored Objects', 'Contains objects restored by recovery tool', -1, now(), now())";
01986 $this->db->query($query);
01987
01988 $query = "SELECT LAST_INSERT_ID() as id";
01989 $res = $this->db->query($query);
01990 $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
01991
01992
01993 $query = "INSERT INTO object_reference (obj_id) VALUES('".$row->id."')";
01994 $res = $this->db->query($query);
01995
01996 $query = "SELECT LAST_INSERT_ID() as id";
01997 $res = $this->db->query($query);
01998 $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
01999
02000
02001 $tree = new ilTree(ROOT_FOLDER_ID);
02002 $tree->insertNode($row->id,SYSTEM_FOLDER_ID);
02003
02004
02005 $query = "INSERT INTO settings (keyword,value) VALUES('recovery_folder_id','".$row->id."')";
02006 $res = $this->db->query($query);
02007 ?>
02008
02009 <#123>
02010 CREATE TABLE `tst_solutions` (
02011 `solution_id` int(10) unsigned NOT NULL auto_increment,
02012 `user_fi` int(10) unsigned NOT NULL default '0',
02013 `test_fi` int(10) unsigned NOT NULL default '0',
02014 `question_fi` int(10) unsigned NOT NULL default '0',
02015 `value1` varchar(50) default NULL,
02016 `value2` varchar(50) default NULL,
02017 `TIMESTAMP` timestamp(14) NOT NULL,
02018 PRIMARY KEY (`solution_id`),
02019 UNIQUE KEY `solution_id` (`solution_id`),
02020 KEY `solution_id_2` (`solution_id`)
02021 ) TYPE=MyISAM COMMENT='Test and Assessment solutions';
02022
02023 <#124>
02024 ALTER TABLE `tst_solutions` ADD `postponed` ENUM( '0', '1' ) DEFAULT '0' NOT NULL AFTER `value2` ;
02025
02026 <#125>
02027 CREATE TABLE `tst_active` (
02028 `active_id` int(10) unsigned NOT NULL auto_increment,
02029 `user_fi` int(10) unsigned NOT NULL default '0',
02030 `test_fi` int(10) unsigned NOT NULL default '0',
02031 `sequence` text NOT NULL,
02032 `lastindex` tinyint(4) NOT NULL default '1',
02033 `tries` int(11) NOT NULL default '0',
02034 `TIMESTAMP` timestamp(14) NOT NULL,
02035 PRIMARY KEY (`active_id`),
02036 UNIQUE KEY `active_id` (`active_id`),
02037 KEY `active_id_2` (`active_id`)
02038 ) TYPE=MyISAM ;
02039
02040 <#126>
02041 ALTER TABLE `tst_solutions` DROP `postponed` ;
02042
02043 <#127>
02044 ALTER TABLE `tst_active` ADD `postponed` text AFTER `sequence` ;
02045
02046 <#128>
02047 UPDATE settings SET value = '3.0.0_beta5 2004-03-09' WHERE keyword = 'ilias_version' LIMIT 1;
02048
02049 <#129>
02050 CREATE TABLE `qpl_question_material` (
02051 `material_id` int(11) NOT NULL auto_increment,
02052 `question_id` int(11) NOT NULL default '0',
02053 `materials` text,
02054 UNIQUE KEY `material_id` (`material_id`)
02055 ) TYPE=MyISAM;
02056
02057 <#130>
02058 CREATE TABLE `tst_times` (
02059 `times_id` INT NOT NULL AUTO_INCREMENT ,
02060 `active_fi` INT NOT NULL ,
02061 `started` DATETIME NOT NULL ,
02062 `finished` DATETIME NOT NULL ,
02063 `TIMESTAMP` TIMESTAMP NOT NULL ,
02064 PRIMARY KEY ( `times_id` )
02065 ) COMMENT = 'Editing times of an assessment test';
02066
02067 <#131>
02068 CREATE TABLE benchmark
02069 (
02070 cdate DATETIME,
02071 module VARCHAR(200),
02072 benchmark VARCHAR(200),
02073 duration DOUBLE(14,5),
02074 INDEX (module, benchmark)
02075 );
02076
02077 <#132>
02078 REPLACE INTO settings (keyword, value) VALUES ('bench_max_records', 10000);
02079 REPLACE INTO settings (keyword, value) VALUES ('enable_bench', 0);
02080 <#133>
02081 ALTER TABLE `tst_tests` ADD `reporting_date` VARCHAR( 14 ) AFTER `processing_time` ;
02082 <#134>
02083 ALTER TABLE `qpl_questions` ADD `complete` ENUM( '0', '1' ) DEFAULT '1' NOT NULL AFTER `image_file` ;
02084 <#135>
02085 ALTER TABLE `tst_tests` ADD `complete` ENUM( '0', '1' ) DEFAULT '1' NOT NULL AFTER `starting_time` ;
02086
02087 <#136>
02088 <?php
02089
02090 $query = "INSERT INTO rbac_operations VALUES('30','mail_visible','users can use mail system')";
02091 $this->db->query($query);
02092
02093
02094 $query = "INSERT INTO rbac_ta VALUES('19','30')";
02095 $this->db->query($query);
02096
02097 ?>
02098 <#137>
02099 <?php
02100
02101 $query = "SELECT * FROM object_data NATURAL JOIN object_reference ".
02102 "WHERE type = 'mail'";
02103
02104 $res = $this->db->query($query);
02105 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
02106 {
02107 $ref_id = $row->ref_id;
02108 }
02109
02110 $query = "SELECT DISTINCT(rol_id) FROM rbac_pa";
02111 $res = $this->db->query($query);
02112 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
02113 {
02114 $role_ids[] = $row->rol_id;
02115 }
02116
02117 $rbacsystem =& new ilRbacSystem();
02118 $rbacadmin =& new ilRbacAdmin();
02119 $rbacreview =& new ilRbacReview();
02120
02121 foreach($role_ids as $id)
02122 {
02123 if($rbacsystem->checkPermission($ref_id,$id,"visible") and $rbacsystem->checkPermission($ref_id,$id,"read"))
02124 {
02125 $ops = $rbacreview->getRoleOperationsOnObject($id,$ref_id);
02126 $ops[] = 30;
02127 $rbacadmin->revokePermission($ref_id,$id);
02128 $rbacadmin->grantPermission($id,$ops,$ref_id);
02129 }
02130 }
02131 ?>
02132 <#138>
02133 CREATE TABLE `tst_eval_settings` (
02134 `eval_settings_id` int(11) NOT NULL auto_increment,
02135 `user_fi` int(11) NOT NULL default '0',
02136 `qworkedthrough` enum('0','1') NOT NULL default '1',
02137 `pworkedthrough` enum('0','1') NOT NULL default '1',
02138 `timeofwork` enum('0','1') NOT NULL default '1',
02139 `atimeofwork` enum('0','1') NOT NULL default '1',
02140 `firstvisit` enum('0','1') NOT NULL default '1',
02141 `lastvisit` enum('0','1') NOT NULL default '1',
02142 `resultspoints` enum('0','1') NOT NULL default '1',
02143 `resultsmarks` enum('0','1') NOT NULL default '1',
02144 `distancemean` enum('0','1') NOT NULL default '1',
02145 `distancequintile` enum('0','1') NOT NULL default '1',
02146 `TIMESTAMP` timestamp(14) NOT NULL,
02147 PRIMARY KEY (`eval_settings_id`)
02148 ) TYPE=MyISAM COMMENT='User settings for statistical evaluation tool';
02149
02150 <#139>
02151 INSERT INTO rbac_operations (ops_id,operation,description) VALUES ('31', 'create_mep', 'create new media pool');
02152
02153 <#140>
02154 <?php
02155
02156
02157 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
02158 "VALUES ('typ', 'mep', 'Media pool object', -1, now(), now())";
02159 $this->db->query($query);
02160
02161
02162 $query = "SELECT LAST_INSERT_ID()";
02163 $res = $this->db->query($query);
02164 $row = $res->fetchRow();
02165 $typ_id = $row[0];
02166
02167
02168
02169 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','1')";
02170 $this->db->query($query);
02171 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','2')";
02172 $this->db->query($query);
02173 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','3')";
02174 $this->db->query($query);
02175 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','4')";
02176 $this->db->query($query);
02177 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','6')";
02178 $this->db->query($query);
02179 ?>
02180
02181 <#141>
02182 <?php
02183
02184
02185 $query = "SELECT obj_id FROM object_data WHERE type='typ' AND title='cat'";
02186 $res = $this->db->query($query);
02187 $row = $res->fetchRow(DB_FETCHMODE_ASSOC);
02188 $typ_id = $row["obj_id"];
02189
02190 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','31')";
02191 $this->db->query($query);
02192 ?>
02193
02194 <#142>
02195
02196 CREATE TABLE mep_tree
02197 (
02198 mep_id INT NOT NULL,
02199 child INT NOT NULL,
02200 parent INT NOT NULL,
02201 lft INT NOT NULL,
02202 rgt INT NOT NULL,
02203 depth SMALLINT NOT NULL
02204 );
02205
02206 <#143>
02207 ALTER TABLE `qpl_questions` ADD `ordering_type` enum('0','1') default NULL AFTER `matching_type` ;
02208
02209 <#144>
02210 UPDATE content_object SET default_layout = '1window' WHERE default_layout='no_menu';
02211
02212 <#145>
02213 ALTER TABLE mail DROP COLUMN timest;
02214
02215 <#146>
02216 ALTER TABLE mail CHANGE m_type m_type VARCHAR( 255 ) DEFAULT NULL;
02217
02218 <#147>
02219 INSERT INTO rbac_operations (ops_id,operation,description) VALUES ('32', 'create_htlm', 'create new html learning module');
02220
02221 <#148>
02222 <?php
02223
02224
02225 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
02226 "VALUES ('typ', 'htlm', 'HTML LM object', -1, now(), now())";
02227 $this->db->query($query);
02228
02229
02230 $query = "SELECT LAST_INSERT_ID()";
02231 $res = $this->db->query($query);
02232 $row = $res->fetchRow();
02233 $typ_id = $row[0];
02234
02235
02236
02237 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','1')";
02238 $this->db->query($query);
02239 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','2')";
02240 $this->db->query($query);
02241 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','3')";
02242 $this->db->query($query);
02243 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','4')";
02244 $this->db->query($query);
02245 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','6')";
02246 $this->db->query($query);
02247 ?>
02248
02249 <#149>
02250 <?php
02251
02252
02253 $query = "SELECT obj_id FROM object_data WHERE type='typ' AND title='cat'";
02254 $res = $this->db->query($query);
02255 $row = $res->fetchRow(DB_FETCHMODE_ASSOC);
02256 $typ_id = $row["obj_id"];
02257
02258 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','32')";
02259 $this->db->query($query);
02260 ?>
02261 <#150>
02262 ALTER TABLE `qpl_questions` ADD `working_time` TIME DEFAULT '00:00:00' NOT NULL AFTER `question_text` ;
02263 <#151>
02264 ALTER TABLE `qpl_questions` ADD `shuffle` ENUM( '0', '1' ) DEFAULT '1' NOT NULL AFTER `working_time` ;
02265 <#152>
02266 ALTER TABLE `frm_posts` ADD `pos_subject` TEXT NOT NULL AFTER `pos_message` ;
02267 <#153>
02268 ALTER TABLE content_object ADD COLUMN toc_active ENUM('y','n') DEFAULT 'y';
02269 ALTER TABLE content_object ADD COLUMN lm_menu_active ENUM('y','n') DEFAULT 'y';
02270
02271 <#154>
02272 CREATE TABLE file_based_lm
02273 (
02274 id INT NOT NULL PRIMARY KEY,
02275 online ENUM('y','n') DEFAULT 'n',
02276 startfile VARCHAR(200)
02277 );
02278
02279 <#155>
02280 <?php
02281
02282
02283 $query = "SELECT * FROM object_data WHERE type='htlm'";
02284 $res = $this->db->query($query);
02285 while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC))
02286 {
02287 $obj_id = $row["obj_id"];
02288 $query = "INSERT INTO file_based_lm (id, online) VALUES ('".
02289 $row["obj_id"]."', 'n')";
02290 $this->db->query($query);
02291 }
02292 ?>
02293 <#156>
02294 ALTER TABLE `qpl_answers` ADD `cloze_type` ENUM( '0', '1' ) AFTER `gap_id` ;
02295
02296 <#157>
02297 <?php
02298
02299 $query = "SELECT * FROM qpl_questions WHERE cloze_type >= 0";
02300 $res = $this->db->query($query);
02301 while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
02302 {
02303 $update_query = sprintf("UPDATE qpl_answers SET cloze_type = %s WHERE question_fi = %s",
02304 $this->db->quote("$row->cloze_type"),
02305 $this->db->quote("$row->question_id")
02306 );
02307 $update_res = $this->db->query($update_query);
02308 }
02309 ?>
02310 <#158>
02311 <?php
02312
02313 $query = "SELECT * FROM object_data AS obj ".
02314 "LEFT JOIN object_reference AS ref ON obj.obj_id = ref.obj_id ".
02315 "LEFT JOIN grp_tree AS grp ON grp.child = ref.ref_id ".
02316 "WHERE obj.type = 'file'";
02317 $res = $this->db->query($query);
02318
02319 $tree = new ilTree(ROOT_FOLDER_ID);
02320
02321 while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
02322 {
02323 if ($row->tree > 0)
02324 {
02325 $query = "SELECT * FROM tree WHERE child='".$row->tree."' AND tree='1'";
02326 $res2 = $this->db->query($query);
02327
02328 if ($res2->numRows() > 0)
02329 {
02330 $tree->insertNode($row->child,$row->tree);
02331 }
02332 }
02333 }
02334
02335
02336 $query = "DROP TABLE IF EXISTS grp_tree";
02337 $this->db->query($query);
02338 ?>
02339 <#159>
02340 <?php
02341 $query = "SELECT * FROM `qpl_questions` WHERE NOT isnull(start_tag)";
02342 $res = $this->db->query($query);
02343 while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
02344 {
02345 $new_text = preg_replace("/" . preg_quote($row->start_tag) . "(.*?)" . preg_quote($row->end_tag) . "/", "<gap>$1</gap>", $row->question_text);
02346 $update_query = sprintf("UPDATE qpl_questions SET question_text = %s WHERE question_id = %s",
02347 $this->db->quote($new_text),
02348 $this->db->quote("$row->question_id")
02349 );
02350 $update_res = $this->db->query($update_query);
02351 }
02352 ?>
02353 <#160>
02354 <?php
02355
02356 $query = "SELECT obj_id FROM object_data WHERE type='typ' AND title='file'";
02357 $res = $this->db->query($query);
02358 $row = $res->fetchRow();
02359 $typ_id = $row[0];
02360
02361
02362 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','1')";
02363 $this->db->query($query);
02364 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','2')";
02365 $this->db->query($query);
02366 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','3')";
02367 $this->db->query($query);
02368 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','4')";
02369 $this->db->query($query);
02370 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','6')";
02371 $this->db->query($query);
02372
02373
02374 $query = "SELECT obj_id FROM object_data WHERE type='typ' AND title='fold'";
02375 $res = $this->db->query($query);
02376 $row = $res->fetchRow();
02377 $typ_id = $row[0];
02378
02379
02380
02381
02382 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','1')";
02383 $this->db->query($query);
02384 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','2')";
02385 $this->db->query($query);
02386 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','3')";
02387 $this->db->query($query);
02388 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','4')";
02389 $this->db->query($query);
02390 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','6')";
02391 $this->db->query($query);
02392 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','18')";
02393 $this->db->query($query);
02394 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','20')";
02395 $this->db->query($query);
02396 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','21')";
02397 $this->db->query($query);
02398 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','22')";
02399 $this->db->query($query);
02400 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','25')";
02401 $this->db->query($query);
02402 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','26')";
02403 $this->db->query($query);
02404
02405
02406 $query = "SELECT obj_id FROM object_data WHERE type='typ' AND title='grp'";
02407 $res = $this->db->query($query);
02408 $row = $res->fetchRow();
02409 $typ_id = $row[0];
02410
02411
02412 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','22')";
02413 $this->db->query($query);
02414
02415
02416 $rbacadmin = new ilRbacAdmin();
02417 $rbacreview = new ilRbacReview();
02418
02419
02420 $tree = new ilTree(ROOT_FOLDER_ID);
02421
02422
02423 $query = "SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_member'";
02424 $res = $this->db->query($query);
02425 $row = $res->fetchRow();
02426 $mem_role_id = $row[0];
02427
02428
02429
02430 $ops_data["chat"] = array(2,3);
02431 $ops_data["file"] = array(2,3);
02432 $ops_data["frm"] = array(2,3,4,9);
02433 $ops_data["glo"] = array(2,3,7,8);
02434 $ops_data["grp"] = array(2,3,7,8,18,25,26);
02435 $ops_data["lm"] = array(2,3,7,8);
02436 $ops_data["slm"] = array(2,3,7,8);
02437 $ops_data["fold"] = array(2,3,18,25,26);
02438
02439
02440 foreach ($ops_data as $type => $ops)
02441 {
02442
02443 $rbacadmin->deleteRolePermission($mem_role_id, ROLE_FOLDER_ID,$type);
02444 $rbacadmin->setRolePermission($mem_role_id, $type, $ops, ROLE_FOLDER_ID);
02445 }
02446
02447
02448 $query = "SELECT obj_id FROM object_data WHERE type='role' AND title LIKE 'il_grp_member%'";
02449 $res = $this->db->query($query);
02450
02451 while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
02452 {
02453 $dest_role_id = $row->obj_id;
02454 $rolf_arr = $rbacreview->getFoldersAssignedToRole($dest_role_id,true);
02455 $dest_rolf_id = $rolf_arr[0];
02456 $rbacadmin->deleteRolePermission($dest_role_id,$dest_rolf_id,false);
02457 $rbacadmin->copyRolePermission($mem_role_id,ROLE_FOLDER_ID,$dest_rolf_id,$dest_role_id);
02458
02459
02460 $node_id = $tree->getParentId($dest_rolf_id);
02461
02462 if (empty($node_id))
02463 {
02464 continue;
02465 }
02466
02467
02468 $node_data = $tree->getNodeData($node_id);
02469 $subtree_nodes = $tree->getSubTree($node_data);
02470
02471
02472 $all_parent_obj_of_rolf = $rbacreview->getObjectsWithStopedInheritance($dest_role_id);
02473
02474
02475 $key = array_keys($all_parent_obj_of_rolf,$node_id);
02476
02477 unset($all_parent_obj_of_rolf[$key[0]]);
02478
02479 $check = false;
02480
02481 foreach ($subtree_nodes as $node)
02482 {
02483 if (!$check)
02484 {
02485 if (in_array($node["child"],$all_parent_obj_of_rolf))
02486 {
02487 $lft = $node["lft"];
02488 $rgt = $node["rgt"];
02489 $check = true;
02490 continue;
02491 }
02492
02493 $valid_nodes[] = $node;
02494 }
02495 else
02496 {
02497 if (($node["lft"] > $lft) && ($node["rgt"] < $rgt))
02498 {
02499 continue;
02500 }
02501 else
02502 {
02503 $check = false;
02504 $valid_nodes[] = $node;
02505 }
02506 }
02507 }
02508
02509
02510 foreach ($valid_nodes as $key => $node)
02511 {
02512 $node_ids[] = $node["child"];
02513 $valid_nodes[$key]["perms"] = $rbacreview->getOperationsOfRole($mem_role_id,$node["type"],ROLE_FOLDER_ID);
02514 }
02515
02516
02517 $rbacadmin->revokePermissionList($node_ids,$dest_role_id);
02518
02519
02520 foreach ($valid_nodes as $node)
02521 {
02522 if (is_array($node["perms"]))
02523 {
02524 $rbacadmin->grantPermission($dest_role_id,$node["perms"],$node["child"]);
02525 }
02526 }
02527 }
02528
02529
02530
02531 $query = "SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_admin'";
02532 $res = $this->db->query($query);
02533 $row = $res->fetchRow();
02534 $adm_role_id = $row[0];
02535
02536
02537
02538 unset($ops_data);
02539 unset($rolf_arr);
02540 unset($node_data);
02541 unset($node_ids);
02542 unset($valid_nodes);
02543
02544 $ops_data["chat"] = array(1,2,3,4,6);
02545 $ops_data["file"] = array(1,2,3,4,6);
02546 $ops_data["frm"] = array(1,2,3,4,6,9,10);
02547 $ops_data["glo"] = array(1,2,3,4,6,7,8);
02548 $ops_data["grp"] = array(1,2,3,4,6,7,8,18,20,21,22,25,26,29);
02549 $ops_data["lm"] = array(1,2,3,4,6,7,8);
02550 $ops_data["slm"] = array(1,2,3,4,6,7,8);
02551 $ops_data["fold"] = array(1,2,3,4,6,18,20,21,22,25,26);
02552
02553
02554 foreach ($ops_data as $type => $ops)
02555 {
02556
02557 $rbacadmin->deleteRolePermission($adm_role_id, ROLE_FOLDER_ID,$type);
02558 $rbacadmin->setRolePermission($adm_role_id, $type, $ops, ROLE_FOLDER_ID);
02559 }
02560
02561
02562 $query = "SELECT obj_id FROM object_data WHERE type='role' AND title LIKE 'il_grp_admin%'";
02563 $res = $this->db->query($query);
02564
02565 while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
02566 {
02567 $dest_role_id = $row->obj_id;
02568 $rolf_arr = $rbacreview->getFoldersAssignedToRole($dest_role_id,true);
02569 $dest_rolf_id = $rolf_arr[0];
02570 $rbacadmin->deleteRolePermission($dest_role_id,$dest_rolf_id,false);
02571 $rbacadmin->copyRolePermission($adm_role_id,ROLE_FOLDER_ID,$dest_rolf_id,$dest_role_id);
02572
02573
02574 $node_id = $tree->getParentId($dest_rolf_id);
02575
02576 if (empty($node_id))
02577 {
02578 continue;
02579 }
02580
02581
02582 $node_data = $tree->getNodeData($node_id);
02583 $subtree_nodes = $tree->getSubTree($node_data);
02584
02585
02586 $all_parent_obj_of_rolf = $rbacreview->getObjectsWithStopedInheritance($dest_role_id);
02587
02588
02589 $key = array_keys($all_parent_obj_of_rolf,$node_id);
02590
02591 unset($all_parent_obj_of_rolf[$key[0]]);
02592
02593 $check = false;
02594
02595 foreach ($subtree_nodes as $node)
02596 {
02597 if (!$check)
02598 {
02599 if (in_array($node["child"],$all_parent_obj_of_rolf))
02600 {
02601 $lft = $node["lft"];
02602 $rgt = $node["rgt"];
02603 $check = true;
02604 continue;
02605 }
02606
02607 $valid_nodes[] = $node;
02608 }
02609 else
02610 {
02611 if (($node["lft"] > $lft) && ($node["rgt"] < $rgt))
02612 {
02613 continue;
02614 }
02615 else
02616 {
02617 $check = false;
02618 $valid_nodes[] = $node;
02619 }
02620 }
02621 }
02622
02623
02624 foreach ($valid_nodes as $key => $node)
02625 {
02626 $node_ids[] = $node["child"];
02627 $valid_nodes[$key]["perms"] = $rbacreview->getOperationsOfRole($adm_role_id,$node["type"],ROLE_FOLDER_ID);
02628 }
02629
02630
02631 $rbacadmin->revokePermissionList($node_ids,$dest_role_id);
02632
02633
02634 foreach ($valid_nodes as $node)
02635 {
02636 if (is_array($node["perms"]))
02637 {
02638 $rbacadmin->grantPermission($dest_role_id,$node["perms"],$node["child"]);
02639 }
02640 }
02641 }
02642 ?>
02643 <#161>
02644 ALTER TABLE `qpl_answers` ADD `name` VARCHAR( 50 ) NOT NULL AFTER `question_fi` ;
02645 <#162>
02646 ALTER TABLE `qpl_answers` ADD `shuffle` ENUM('0','1') NOT NULL DEFAULT '1' AFTER `name` ;
02647
02648 <#163>
02649 UPDATE settings SET value = '3.0.0RC1 2004-04-18' WHERE keyword = 'ilias_version' LIMIT 1;
02650
02651 <#164>
02652 ALTER TABLE `scorm_tracking` ADD `student_name` VARCHAR( 255 ) NOT NULL ;
02653
02654 <#165>
02655 CREATE TABLE scorm_lm
02656 (
02657 id INT NOT NULL PRIMARY KEY,
02658 online ENUM('y','n') DEFAULT 'n',
02659 api_adapter VARCHAR(80) DEFAULT 'API'
02660 );
02661
02662 <#166>
02663 ALTER TABLE scorm_lm ADD COLUMN api_func_prefix VARCHAR(20) DEFAULT 'LMS';
02664
02665 <#167>
02666 DELETE FROM style_parameter WHERE tag='div' AND class='Page' and parameter='border-spacing';
02667 DELETE FROM style_parameter WHERE tag='div' AND class='Page' and parameter='border-style';
02668 DELETE FROM style_parameter WHERE tag='div' AND class='Page' and parameter='border-color';
02669 DELETE FROM style_parameter WHERE tag='div' AND class='Page' and parameter='border-width';
02670 UPDATE style_parameter SET value='0px' WHERE tag='div' AND class='Page' and parameter='padding';
02671 DELETE FROM style_parameter WHERE tag='div' AND class='LMNavigation' and parameter='padding';
02672 DELETE FROM style_parameter WHERE tag='div' AND class='LMNavigation' and parameter='border-spacing';
02673
02674 <#168>
02675 UPDATE usr_pref SET value='blueshadow' WHERE value='blueshadow_ie' AND keyword='style';
02676
02677 <#169>
02678 ALTER TABLE frm_posts ADD import_name TEXT;
02679 ALTER TABLE frm_threads ADD import_name TEXT;
02680
02681 <#170>
02682 ALTER TABLE content_object ADD COLUMN toc_mode ENUM('chapters','pages') DEFAULT 'chapters';
02683
02684 <#171>
02685 <?php
02686
02687
02688 $query = "SELECT obj_id FROM object_data WHERE type='adm'";
02689 $res = $this->db->query($query);
02690 $row = $res->fetchRow(DB_FETCHMODE_ASSOC);
02691 $adm_id = $row["obj_id"];
02692
02693 $query = "INSERT INTO object_translation (obj_id, title, description, ".
02694 "lang_code, lang_default) VALUES ('".$adm_id."','Open Source eLearning'".
02695 ",'','en','1')";
02696 $this->db->query($query);
02697 ?>
02698
02699 <#172>
02700 ALTER TABLE mail ADD import_name TEXT;
02701
02702 <#173>
02703 # add operations 'create_svy' and 'create_spl' for survey objects and survey question pools
02704 INSERT INTO rbac_operations (ops_id,operation,description) VALUES ('42', 'create_svy', 'create new survey');
02705 INSERT INTO rbac_operations (ops_id,operation,description) VALUES ('43', 'create_spl', 'create new question pool (Survey)');
02706
02707 <#174>
02708 <?php
02709
02710
02711 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
02712 "VALUES ('typ', 'svy', 'Survey object', -1, now(), now())";
02713 $this->db->query($query);
02714
02715
02716 $query = "SELECT LAST_INSERT_ID()";
02717 $res = $this->db->query($query);
02718 $row = $res->fetchRow();
02719 $typ_id = $row[0];
02720
02721
02722
02723 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','1')";
02724 $this->db->query($query);
02725 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','2')";
02726 $this->db->query($query);
02727 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','3')";
02728 $this->db->query($query);
02729 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','4')";
02730 $this->db->query($query);
02731 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','6')";
02732 $this->db->query($query);
02733 ?>
02734
02735 <#175>
02736 <?php
02737
02738
02739 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
02740 "VALUES ('typ', 'spl', 'Question pool object (Survey)', -1, now(), now())";
02741 $this->db->query($query);
02742
02743
02744 $query = "SELECT LAST_INSERT_ID()";
02745 $res = $this->db->query($query);
02746 $row = $res->fetchRow();
02747 $typ_id = $row[0];
02748
02749
02750
02751 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','1')";
02752 $this->db->query($query);
02753 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','2')";
02754 $this->db->query($query);
02755 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','3')";
02756 $this->db->query($query);
02757 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','4')";
02758 $this->db->query($query);
02759 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','6')";
02760 $this->db->query($query);
02761 ?>
02762
02763 <#176>
02764 <?php
02765
02766
02767 $query = "SELECT obj_id FROM object_data WHERE type='typ' and title='cat'";
02768 $res = $this->db->query($query);
02769 $row = $res->fetchRow();
02770 $typ_id = $row[0];
02771
02772
02773 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','42')";
02774 $this->db->query($query);
02775 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','43')";
02776 $this->db->query($query);
02777 ?>
02778 <#177>
02779 ALTER TABLE `usr_data` CHANGE `login` `login` VARCHAR (80) NOT NULL;
02780 ALTER TABLE `usr_data` CHANGE `email` `email` VARCHAR (80) NOT NULL;
02781
02782 <#178>
02783 CREATE TABLE file_usage
02784 (
02785 id INT NOT NULL,
02786 usage_type VARCHAR(10) NOT NULL,
02787 usage_id INT NOT NULL,
02788 PRIMARY KEY (id, usage_type, usage_id)
02789 );
02790
02791 <#179>
02792 <?php
02793
02794
02795 umask(0117);
02796
02797
02798 $ini = new ilIniFile(CLIENT_WEB_DIR."/client.ini.php");
02799 $ini->read();
02800 $ini->setVariable("layout", "skin", "default");
02801 $ini->setVariable("layout", "style", "blueshadow");
02802 $ini->write();
02803
02804 ?>
02805
02806 <#180>
02807 UPDATE usr_pref SET value='blueshadow' WHERE value='blueshadow_ie' AND keyword='style';
02808
02809 <#181>
02810 ALTER TABLE `tst_tests` CHANGE `processing_time` `processing_time` TIME;
02811 ALTER TABLE `tst_tests` ADD `enable_processing_time` ENUM( '0', '1' ) DEFAULT '0' NOT NULL AFTER `processing_time` ;
02812
02813 <#182>
02814 CREATE TABLE glossary
02815 (
02816 id INT NOT NULL PRIMARY KEY,
02817 online ENUM('y','n') DEFAULT 'n'
02818 );
02819
02820 <#183>
02821 <?php
02822 $query = "SELECT obj_id FROM object_data WHERE type='glo'";
02823 $gl_set = $this->db->query($query);
02824
02825 while ($gl_rec = $gl_set->fetchRow(DB_FETCHMODE_ASSOC))
02826 {
02827 $query = "INSERT INTO glossary (id, online) VALUES ('".$gl_rec["obj_id"]."','y')";
02828 $this->db->query($query);
02829 }
02830 ?>
02831
02832 <#184>
02833 CREATE TABLE scorm_tracking2
02834 (
02835 user_id INT NOT NULL,
02836 sco_id INT NOT NULL,
02837 lvalue VARCHAR(64),
02838 rvalue TEXT,
02839 PRIMARY KEY(user_id, sco_id)
02840 );
02841
02842 <#185>
02843 <?php
02844
02845
02846 $query = "SELECT obj_id FROM object_data WHERE type='typ' AND title='grp'";
02847 $res = $this->db->query($query);
02848 $row = $res->fetchRow(DB_FETCHMODE_ASSOC);
02849 $typ_id = $row["obj_id"];
02850
02851 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','32')";
02852 $this->db->query($query);
02853 ?>
02854
02855 <#186>
02856 <?php
02857
02858
02859 $query = "SELECT obj_id FROM object_data WHERE type='typ' AND title='grp'";
02860 $res = $this->db->query($query);
02861 $row = $res->fetchRow(DB_FETCHMODE_ASSOC);
02862 $typ_id = $row["obj_id"];
02863
02864 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','23')";
02865 $this->db->query($query);
02866 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','24')";
02867 $this->db->query($query);
02868 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','31')";
02869 $this->db->query($query);
02870 ?>
02871
02872 <#187>
02873 <?php
02874
02875
02876 $query1 = "SELECT obj_id FROM object_data WHERE title = 'il_grp_admin' ";
02877 $res = $this->db->query($query1);
02878 $tpl = $res->fetchRow(DB_FETCHMODE_ASSOC);
02879
02880
02881 $query2 = "SELECT parent FROM rbac_templates WHERE rol_id = ".$tpl["obj_id"];
02882 $res = $this->db->query($query2);
02883 $rol_fold = $res->fetchRow(DB_FETCHMODE_ASSOC);
02884
02885 $perms = array( array("type" => "dbk", "ops_id" => 1),
02886 array("type" => "dbk", "ops_id" => 2),
02887 array("type" => "dbk", "ops_id" => 3),
02888 array("type" => "dbk", "ops_id" => 4),
02889 array("type" => "dbk", "ops_id" => 6));
02890
02891 foreach($perms as $perm)
02892 {
02893 $q = "REPLACE INTO rbac_templates (rol_id,type,ops_id,parent) VALUES ('".$tpl["obj_id"]."','".$perm["type"]."','".$perm["ops_id"]."','".$rol_fold["parent"]."')";
02894 $this->db->query($q);
02895 }
02896
02897 ?>
02898
02899 <#188>
02900 <?php
02901
02902
02903 $query1 = "SELECT obj_id FROM object_data WHERE title = 'il_grp_admin' ";
02904 $res = $this->db->query($query1);
02905 $tpl = $res->fetchRow(DB_FETCHMODE_ASSOC);
02906
02907
02908 $query2 = "SELECT parent FROM rbac_templates WHERE rol_id = ".$tpl["obj_id"];
02909 $res = $this->db->query($query2);
02910 $rol_fold = $res->fetchRow(DB_FETCHMODE_ASSOC);
02911
02912 $perms = array( array("type" => "exc", "ops_id" => 1),
02913 array("type" => "exc", "ops_id" => 2),
02914 array("type" => "exc", "ops_id" => 3),
02915 array("type" => "exc", "ops_id" => 4),
02916 array("type" => "exc", "ops_id" => 6),
02917
02918 array("type" => "grp", "ops_id" => 23),
02919 array("type" => "grp", "ops_id" => 24),
02920 array("type" => "grp", "ops_id" => 31),
02921 array("type" => "grp", "ops_id" => 32),
02922
02923 array("type" => "htlm", "ops_id" => 1),
02924 array("type" => "htlm", "ops_id" => 2),
02925 array("type" => "htlm", "ops_id" => 3),
02926 array("type" => "htlm", "ops_id" => 4),
02927 array("type" => "htlm", "ops_id" => 6),
02928
02929 array("type" => "mep", "ops_id" => 1),
02930 array("type" => "mep", "ops_id" => 2),
02931 array("type" => "mep", "ops_id" => 3),
02932 array("type" => "mep", "ops_id" => 4),
02933 array("type" => "mep", "ops_id" => 6),
02934
02935 );
02936
02937 foreach($perms as $perm)
02938 {
02939 $q = "REPLACE INTO rbac_templates (rol_id,type,ops_id,parent) VALUES ('".$tpl["obj_id"]."','".$perm["type"]."','".$perm["ops_id"]."','".$rol_fold["parent"]."')";
02940 $this->db->query($q);
02941 }
02942
02943 ?>
02944
02945 <#189>
02946 UPDATE settings SET value = '3.0.0 2004-05-15' WHERE keyword = 'ilias_version' LIMIT 1;
02947 <#190>
02948 INSERT INTO `qpl_question_type` ( `question_type_id` , `type_tag` ) VALUES ('7', 'qt_javaapplet');
02949 <#191>
02950 ALTER TABLE `tst_solutions` ADD `points` DOUBLE AFTER `value2` ;
02951 <#192>
02952 ALTER TABLE `qpl_questions` ADD `params` TEXT AFTER `image_file` ;
02953 <#193>
02954 <?php
02955
02956 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
02957 "VALUES ('typ', 'tax', 'Taxonomy object', -1, now(), now())";
02958 $this->db->query($query);
02959
02960 $query = "SELECT LAST_INSERT_ID() as id";
02961 $res = $this->db->query($query);
02962 $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
02963
02964
02965 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$row->id."','1')";
02966 $this->db->query($query);
02967 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$row->id."','2')";
02968 $this->db->query($query);
02969 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$row->id."','3')";
02970 $this->db->query($query);
02971 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$row->id."','4')";
02972 $this->db->query($query);
02973 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$row->id."','6')";
02974 $this->db->query($query);
02975
02976
02977
02978 $query = "INSERT INTO rbac_operations VALUES('44','create_tax','create taxonomy object')";
02979 $this->db->query($query);
02980
02981
02982 $query = "SELECT obj_id FROM object_data WHERE type = 'typ' AND title = 'adm' ";
02983 $res = $this->db->query($query);
02984 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
02985 {
02986 $query = "INSERT INTO rbac_ta VALUES('".$row->obj_id."','44')";
02987 $this->db->query($query);
02988 }
02989
02990
02991 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
02992 "VALUES ('typ', 'taxf', 'Taxonomy folder object', -1, now(), now())";
02993 $this->db->query($query);
02994
02995 $query = "SELECT LAST_INSERT_ID() as id";
02996 $res = $this->db->query($query);
02997 $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
02998
02999
03000 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$row->id."','1')";
03001 $this->db->query($query);
03002 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$row->id."','2')";
03003 $this->db->query($query);
03004 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$row->id."','3')";
03005 $this->db->query($query);
03006 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$row->id."','4')";
03007 $this->db->query($query);
03008
03009
03010
03011 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
03012 "VALUES ('taxf', 'Taxonomy folder', 'Configure taxonomy settings here', -1, now(), now())";
03013 $this->db->query($query);
03014
03015 $query = "SELECT LAST_INSERT_ID() as id";
03016 $res = $this->db->query($query);
03017 $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
03018
03019
03020 $query = "INSERT INTO object_reference (obj_id) VALUES('".$row->id."')";
03021 $res = $this->db->query($query);
03022
03023 $query = "SELECT LAST_INSERT_ID() as id";
03024 $res = $this->db->query($query);
03025 $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
03026
03027
03028 $tree = new ilTree(ROOT_FOLDER_ID);
03029 $tree->insertNode($row->id,SYSTEM_FOLDER_ID);
03030 ?>
03031
03032 <#194>
03033 DROP TABLE IF EXISTS aicc_lm;
03034 CREATE TABLE aicc_lm (
03035 `id` int(11) NOT NULL default '0',
03036 `online` enum('y','n') default 'n',
03037 `api_adapter` varchar(80) default 'API',
03038 `api_func_prefix` varchar(20) default 'LMS',
03039 PRIMARY KEY (`id`)
03040 ) TYPE=MyISAM;
03041
03042
03043 <#195>
03044 ALTER TABLE scorm_tracking2 DROP PRIMARY KEY;
03045 ALTER TABLE scorm_tracking2 MODIFY lvalue VARCHAR(64) NOT NULL;
03046 ALTER TABLE scorm_tracking2 ADD PRIMARY KEY (user_id, sco_id, lvalue);
03047
03048 <#196>
03049 # add operations 'invite' and 'participate' for survey objects
03050 INSERT INTO rbac_operations (ops_id,operation,description) VALUES ('45', 'invite', 'invite');
03051 INSERT INTO rbac_operations (ops_id,operation,description) VALUES ('46', 'participate', 'participate');
03052
03053 <#197>
03054 <?php
03055
03056
03057 $query = "SELECT obj_id FROM object_data WHERE type='typ' AND title='svy'";
03058 $result = $this->db->query($query);
03059 $row = $result->fetchRow(DB_FETCHMODE_OBJECT);
03060 $typ_id = $row->obj_id;
03061
03062
03063
03064 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','45')";
03065 $this->db->query($query);
03066 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','46')";
03067 $this->db->query($query);
03068 ?>
03069
03070 <#198>
03071 DROP TABLE IF EXISTS aicc_lm;
03072 CREATE TABLE aicc_lm (
03073 `id` int(11) NOT NULL default '0',
03074 `online` enum('y','n') default 'n',
03075 `api_adapter` varchar(80) default 'API',
03076 `api_func_prefix` varchar(20) default 'LMS',
03077 PRIMARY KEY (`id`)
03078 ) TYPE=MyISAM;
03079
03080
03081 <#199>
03082 ALTER TABLE scorm_tracking2 DROP PRIMARY KEY;
03083 ALTER TABLE scorm_tracking2 MODIFY lvalue VARCHAR(64) NOT NULL;
03084 ALTER TABLE scorm_tracking2 ADD PRIMARY KEY (user_id, sco_id, lvalue);
03085
03086 <#200>
03087 CREATE TABLE `ut_access` (
03088 `obj_id` int(10) NOT NULL auto_increment,
03089 `user_id` int(10) unsigned NOT NULL default '0',
03090 `action_type` char(10) default NULL,
03091 `php_script` char(10) default NULL,
03092 `client_ip` char(15) default NULL,
03093 `acc_obj_type` char(10) NOT NULL default '',
03094 `acc_obj_id` int(10) NOT NULL default '0',
03095 `sub_type` char(10) NOT NULL default '',
03096 `sub_id` int(10) NOT NULL default '0',
03097 `language` char(15) default NULL,
03098 `browser` char(10) default NULL,
03099 `session_id` char(40) default NULL,
03100 `acctime` datetime default NULL,
03101 PRIMARY KEY (`obj_id`)
03102 ) TYPE=MyISAM AUTO_INCREMENT=1;
03103
03104 <#201>
03105 ALTER TABLE ut_access CHANGE obj_id id int(10) NOT NULL auto_increment;
03106 ALTER TABLE ut_access CHANGE acctime acc_time datetime default NULL;
03107 ALTER TABLE ut_access CHANGE sub_type acc_sub_type char(10) NOT NULL default '';
03108 ALTER TABLE ut_access CHANGE sub_id acc_sub_id int(10) NOT NULL default '0';
03109
03110 <#202>
03111 ALTER TABLE ut_access CHANGE browser browser char(60) NOT NULL default '';
03112
03113 <#203>
03114 ALTER TABLE ut_access CHANGE php_script php_script char(100) NOT NULL default '';
03115
03116 <#204>
03117 # Create all tables for survey tool
03118
03119 DROP TABLE IF EXISTS `survey_answer`;
03120 CREATE TABLE `survey_answer` (
03121 `answer_id` int(11) NOT NULL auto_increment,
03122 `survey_fi` int(11) NOT NULL default '0',
03123 `question_fi` int(11) NOT NULL default '0',
03124 `user_fi` int(11) NOT NULL default '0',
03125 `value` double default NULL,
03126 `textanswer` text,
03127 `TIMESTAMP` timestamp(14) NOT NULL,
03128 PRIMARY KEY (`answer_id`)
03129 ) TYPE=MyISAM ;
03130
03131 DROP TABLE IF EXISTS `survey_category`;
03132 CREATE TABLE `survey_category` (
03133 `category_id` int(11) NOT NULL auto_increment,
03134 `title` varchar(100) NOT NULL default '',
03135 `defaultvalue` enum('0','1') NOT NULL default '0',
03136 `owner_fi` int(11) NOT NULL default '0',
03137 `TIMESTAMP` timestamp(14) NOT NULL,
03138 PRIMARY KEY (`category_id`)
03139 ) TYPE=MyISAM AUTO_INCREMENT=36 ;
03140
03141 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (1, 'dc_desired', '1', 0, 20040522134301);
03142 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (2, 'dc_undesired', '1', 0, 20040522134301);
03143 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (3, 'dc_agree', '1', 0, 20040522134301);
03144 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (4, 'dc_disagree', '1', 0, 20040522134301);
03145 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (5, 'dc_good', '1', 0, 20040522134301);
03146 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (6, 'dc_notacceptable', '1', 0, 20040522134301);
03147 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (7, 'dc_should', '1', 0, 20040522134301);
03148 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (8, 'dc_shouldnot', '1', 0, 20040522134301);
03149 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (9, 'dc_true', '1', 0, 20040522134301);
03150 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (10, 'dc_false', '1', 0, 20040522134301);
03151 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (11, 'dc_always', '1', 0, 20040522134301);
03152 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (12, 'dc_never', '1', 0, 20040522134301);
03153 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (13, 'dc_yes', '1', 0, 20040522134301);
03154 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (14, 'dc_no', '1', 0, 20040522134301);
03155 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (15, 'dc_neutral', '1', 0, 20040522134301);
03156 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (16, 'dc_undecided', '1', 0, 20040522134301);
03157 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (17, 'dc_fair', '1', 0, 20040522134301);
03158 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (18, 'dc_sometimes', '1', 0, 20040522134301);
03159 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (19, 'dc_stronglydesired', '1', 0, 20040522134301);
03160 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (20, 'dc_stronglyundesired', '1', 0, 20040522134301);
03161 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (21, 'dc_stronglyagree', '1', 0, 20040522134301);
03162 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (22, 'dc_stronglydisagree', '1', 0, 20040522134301);
03163 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (23, 'dc_verygood', '1', 0, 20040522134301);
03164 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (24, 'dc_poor', '1', 0, 20040522134301);
03165 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (25, 'dc_must', '1', 0, 20040522134301);
03166 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (26, 'dc_mustnot', '1', 0, 20040522134301);
03167 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (27, 'dc_definitelytrue', '1', 0, 20040522134301);
03168 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (28, 'dc_definitelyfalse', '1', 0, 20040522134301);
03169 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (29, 'dc_manytimes', '1', 0, 20040522134301);
03170 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (30, 'dc_varying', '1', 0, 20040522134301);
03171 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (31, 'dc_rarely', '1', 0, 20040522134301);
03172 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (32, 'dc_mostcertainly', '1', 0, 20040522134301);
03173 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (33, 'dc_morepositive', '1', 0, 20040522134301);
03174 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (34, 'dc_morenegative', '1', 0, 20040522134301);
03175 INSERT INTO `survey_category` (`category_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (35, 'dc_mostcertainlynot', '1', 0, 20040522134301);
03176
03177 DROP TABLE IF EXISTS `survey_constraint`;
03178 CREATE TABLE `survey_constraint` (
03179 `constraint_id` int(11) NOT NULL auto_increment,
03180 `question_fi` int(11) NOT NULL default '0',
03181 `relation_fi` int(11) NOT NULL default '0',
03182 `value` double NOT NULL default '0',
03183 PRIMARY KEY (`constraint_id`)
03184 ) TYPE=MyISAM ;
03185
03186 DROP TABLE IF EXISTS `survey_finished`;
03187 CREATE TABLE `survey_finished` (
03188 `finished_id` int(11) NOT NULL auto_increment,
03189 `survey_fi` int(11) NOT NULL default '0',
03190 `user_fi` int(11) NOT NULL default '0',
03191 `state` enum('0','1') NOT NULL default '0',
03192 `TIMESTAMP` timestamp(14) NOT NULL,
03193 PRIMARY KEY (`finished_id`)
03194 ) TYPE=MyISAM ;
03195
03196 DROP TABLE IF EXISTS `survey_invited_group`;
03197 CREATE TABLE `survey_invited_group` (
03198 `invited_group_id` int(11) NOT NULL auto_increment,
03199 `survey_fi` int(11) NOT NULL default '0',
03200 `group_fi` int(11) NOT NULL default '0',
03201 `TIMESTAMP` timestamp(14) NOT NULL,
03202 PRIMARY KEY (`invited_group_id`)
03203 ) TYPE=MyISAM ;
03204
03205 DROP TABLE IF EXISTS `survey_invited_user`;
03206 CREATE TABLE `survey_invited_user` (
03207 `invited_user_id` int(11) NOT NULL auto_increment,
03208 `survey_fi` int(11) NOT NULL default '0',
03209 `user_fi` int(11) NOT NULL default '0',
03210 `TIMESTAMP` timestamp(14) NOT NULL,
03211 PRIMARY KEY (`invited_user_id`)
03212 ) TYPE=MyISAM ;
03213
03214 DROP TABLE IF EXISTS `survey_phrase`;
03215 CREATE TABLE `survey_phrase` (
03216 `phrase_id` int(11) NOT NULL auto_increment,
03217 `title` varchar(100) NOT NULL default '',
03218 `defaultvalue` enum('0','1','2') NOT NULL default '0',
03219 `owner_fi` int(11) NOT NULL default '0',
03220 `TIMESTAMP` timestamp(14) NOT NULL,
03221 PRIMARY KEY (`phrase_id`)
03222 ) TYPE=MyISAM AUTO_INCREMENT=22 ;
03223
03224 INSERT INTO `survey_phrase` (`phrase_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (1, 'dp_standard_attitude_desired_undesired', '1', 0, 20040522135431);
03225 INSERT INTO `survey_phrase` (`phrase_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (2, 'dp_standard_attitude_agree_disagree', '1', 0, 20040522135458);
03226 INSERT INTO `survey_phrase` (`phrase_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (3, 'dp_standard_attitude_good_notacceptable', '1', 0, 20040522135518);
03227 INSERT INTO `survey_phrase` (`phrase_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (4, 'dp_standard_attitude_shold_shouldnot', '1', 0, 20040522135546);
03228 INSERT INTO `survey_phrase` (`phrase_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (5, 'dp_standard_beliefs_true_false', '1', 0, 20040522135613);
03229 INSERT INTO `survey_phrase` (`phrase_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (6, 'dp_standard_beliefs_always_never', '1', 0, 20040522140547);
03230 INSERT INTO `survey_phrase` (`phrase_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (7, 'dp_standard_behaviour_yes_no', '1', 0, 20040522140547);
03231 INSERT INTO `survey_phrase` (`phrase_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (8, 'dp_standard_attitude_desired_neutral_undesired', '1', 0, 20040522140547);
03232 INSERT INTO `survey_phrase` (`phrase_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (9, 'dp_standard_attitude_agree_undecided_disagree', '1', 0, 20040522140547);
03233 INSERT INTO `survey_phrase` (`phrase_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (10, 'dp_standard_attitude_good_fair_notacceptable', '1', 0, 20040522140547);
03234 INSERT INTO `survey_phrase` (`phrase_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (11, 'dp_standard_attitude_should_undecided_shouldnot', '1', 0, 20040522140547);
03235 INSERT INTO `survey_phrase` (`phrase_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (12, 'dp_standard_beliefs_true_undecided_false', '1', 0, 20040522140547);
03236 INSERT INTO `survey_phrase` (`phrase_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (13, 'dp_standard_beliefs_always_sometimes_never', '1', 0, 20040522140547);
03237 INSERT INTO `survey_phrase` (`phrase_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (14, 'dp_standard_behaviour_yes_undecided_no', '1', 0, 20040522140547);
03238 INSERT INTO `survey_phrase` (`phrase_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (15, 'dp_standard_attitude_desired5', '1', 0, 20040522150702);
03239 INSERT INTO `survey_phrase` (`phrase_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (16, 'dp_standard_attitude_agree5', '1', 0, 20040522150717);
03240 INSERT INTO `survey_phrase` (`phrase_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (17, 'dp_standard_attitude_good5', '1', 0, 20040522150729);
03241 INSERT INTO `survey_phrase` (`phrase_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (18, 'dp_standard_attitude_must5', '1', 0, 20040522150744);
03242 INSERT INTO `survey_phrase` (`phrase_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (19, 'dp_standard_beliefs_true5', '1', 0, 20040522150754);
03243 INSERT INTO `survey_phrase` (`phrase_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (20, 'dp_standard_beliefs_always5', '1', 0, 20040522150812);
03244 INSERT INTO `survey_phrase` (`phrase_id`, `title`, `defaultvalue`, `owner_fi`, `TIMESTAMP`) VALUES (21, 'dp_standard_behaviour_certainly5', '1', 0, 20040522150828);
03245
03246 DROP TABLE IF EXISTS `survey_phrase_category`;
03247 CREATE TABLE `survey_phrase_category` (
03248 `phrase_category_id` int(11) NOT NULL auto_increment,
03249 `phrase_fi` int(11) NOT NULL default '0',
03250 `category_fi` int(11) NOT NULL default '0',
03251 `sequence` int(11) NOT NULL default '0',
03252 PRIMARY KEY (`phrase_category_id`)
03253 ) TYPE=MyISAM ;
03254
03255 DROP TABLE IF EXISTS `survey_question`;
03256 CREATE TABLE `survey_question` (
03257 `question_id` int(11) NOT NULL auto_increment,
03258 `subtype` enum('0','1','2','3','4','5') NOT NULL default '0',
03259 `questiontype_fi` int(11) NOT NULL default '0',
03260 `ref_fi` int(11) NOT NULL default '0',
03261 `owner_fi` int(11) NOT NULL default '0',
03262 `title` varchar(100) NOT NULL default '',
03263 `description` varchar(200) NOT NULL default '',
03264 `author` varchar(100) NOT NULL default '',
03265 `questiontext` text NOT NULL,
03266 `obligatory` enum('0','1') NOT NULL default '1',
03267 `complete` enum('0','1') NOT NULL default '0',
03268 `created` varchar(14) NOT NULL default '',
03269 `TIMESTAMP` timestamp(14) NOT NULL,
03270 PRIMARY KEY (`question_id`)
03271 ) TYPE=MyISAM ;
03272
03273 DROP TABLE IF EXISTS `survey_question_constraint`;
03274 CREATE TABLE `survey_question_constraint` (
03275 `question_constraint_id` int(11) NOT NULL auto_increment,
03276 `survey_fi` int(11) NOT NULL default '0',
03277 `question_fi` int(11) NOT NULL default '0',
03278 `constraint_fi` int(11) NOT NULL default '0',
03279 PRIMARY KEY (`question_constraint_id`)
03280 ) TYPE=MyISAM ;
03281
03282 DROP TABLE IF EXISTS `survey_question_material`;
03283 CREATE TABLE `survey_question_material` (
03284 `material_id` int(11) NOT NULL auto_increment,
03285 `question_fi` int(11) NOT NULL default '0',
03286 `materials` text,
03287 `materials_file` varchar(200) NOT NULL default '',
03288 UNIQUE KEY `material_id` (`material_id`)
03289 ) TYPE=MyISAM ;
03290
03291 DROP TABLE IF EXISTS `survey_questionblock`;
03292 CREATE TABLE `survey_questionblock` (
03293 `questionblock_id` int(11) NOT NULL auto_increment,
03294 `title` varchar(100) default NULL,
03295 `obligatory` enum('0','1') NOT NULL default '0',
03296 `owner_fi` int(11) NOT NULL default '0',
03297 `TIMESTAMP` timestamp(14) NOT NULL,
03298 PRIMARY KEY (`questionblock_id`)
03299 ) TYPE=MyISAM ;
03300
03301 DROP TABLE IF EXISTS `survey_questionblock_question`;
03302 CREATE TABLE `survey_questionblock_question` (
03303 `questionblock_question_id` int(11) NOT NULL auto_increment,
03304 `questionblock_fi` int(11) NOT NULL default '0',
03305 `question_fi` int(11) NOT NULL default '0',
03306 PRIMARY KEY (`questionblock_question_id`)
03307 ) TYPE=MyISAM ;
03308
03309 DROP TABLE IF EXISTS `survey_questiontype`;
03310 CREATE TABLE `survey_questiontype` (
03311 `questiontype_id` int(11) NOT NULL auto_increment,
03312 `type_tag` varchar(30) NOT NULL default '',
03313 `TIMESTAMP` timestamp(14) NOT NULL,
03314 PRIMARY KEY (`questiontype_id`)
03315 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
03316
03317 INSERT INTO `survey_questiontype` (`questiontype_id`, `type_tag`, `TIMESTAMP`) VALUES (1, 'qt_nominal', 20040518222841);
03318 INSERT INTO `survey_questiontype` (`questiontype_id`, `type_tag`, `TIMESTAMP`) VALUES (2, 'qt_ordinal', 20040518222848);
03319 INSERT INTO `survey_questiontype` (`questiontype_id`, `type_tag`, `TIMESTAMP`) VALUES (3, 'qt_metric', 20040518222859);
03320 INSERT INTO `survey_questiontype` (`questiontype_id`, `type_tag`, `TIMESTAMP`) VALUES (4, 'qt_text', 20040518222904);
03321
03322 DROP TABLE IF EXISTS `survey_relation`;
03323 CREATE TABLE `survey_relation` (
03324 `relation_id` int(11) NOT NULL auto_increment,
03325 `long` varchar(20) NOT NULL default '',
03326 `short` char(2) NOT NULL default '',
03327 `TIMESTAMP` timestamp(14) NOT NULL,
03328 PRIMARY KEY (`relation_id`)
03329 ) TYPE=MyISAM AUTO_INCREMENT=7 ;
03330
03331 INSERT INTO `survey_relation` (`relation_id`, `long`, `short`, `TIMESTAMP`) VALUES (1, 'less', '<', 20040518195753);
03332 INSERT INTO `survey_relation` (`relation_id`, `long`, `short`, `TIMESTAMP`) VALUES (2, 'less or equal', '<=', 20040518195808);
03333 INSERT INTO `survey_relation` (`relation_id`, `long`, `short`, `TIMESTAMP`) VALUES (3, 'equal', '=', 20040518195816);
03334 INSERT INTO `survey_relation` (`relation_id`, `long`, `short`, `TIMESTAMP`) VALUES (4, 'not equal', '<>', 20040518195839);
03335 INSERT INTO `survey_relation` (`relation_id`, `long`, `short`, `TIMESTAMP`) VALUES (5, 'more or equal', '>=', 20040518195852);
03336 INSERT INTO `survey_relation` (`relation_id`, `long`, `short`, `TIMESTAMP`) VALUES (6, 'more', '>', 20040518195903);
03337
03338 DROP TABLE IF EXISTS `survey_survey`;
03339 CREATE TABLE `survey_survey` (
03340 `survey_id` int(11) NOT NULL auto_increment,
03341 `ref_fi` int(11) NOT NULL default '0',
03342 `author` varchar(50) NOT NULL default '',
03343 `introduction` text,
03344 `status` enum('0','1') NOT NULL default '1',
03345 `startdate` date default NULL,
03346 `enddate` date default NULL,
03347 `evaluation_access` enum('0','1') NOT NULL default '0',
03348 `invitation` enum('0','1') NOT NULL default '0',
03349 `invitation_mode` enum('0','1') NOT NULL default '1',
03350 `complete` enum('0','1') NOT NULL default '0',
03351 `created` varchar(14) NOT NULL default '',
03352 `TIMESTAMP` timestamp(14) NOT NULL,
03353 PRIMARY KEY (`survey_id`)
03354 ) TYPE=MyISAM ;
03355
03356 DROP TABLE IF EXISTS `survey_survey_question`;
03357 CREATE TABLE `survey_survey_question` (
03358 `survey_question_id` int(11) NOT NULL auto_increment,
03359 `survey_fi` int(11) NOT NULL default '0',
03360 `question_fi` int(11) NOT NULL default '0',
03361 `sequence` int(11) NOT NULL default '0',
03362 `TIMESTAMP` timestamp(14) NOT NULL,
03363 PRIMARY KEY (`survey_question_id`)
03364 ) TYPE=MyISAM ;
03365
03366 DROP TABLE IF EXISTS `survey_variable`;
03367 CREATE TABLE `survey_variable` (
03368 `variable_id` int(11) NOT NULL auto_increment,
03369 `category_fi` int(11) NOT NULL default '0',
03370 `question_fi` int(11) NOT NULL default '0',
03371 `value1` double default NULL,
03372 `value2` double default NULL,
03373 `sequence` int(11) NOT NULL default '0',
03374 `TIMESTAMP` timestamp(14) NOT NULL,
03375 PRIMARY KEY (`variable_id`)
03376 ) TYPE=MyISAM ;
03377
03378 <#205>
03379
03380 ALTER TABLE `survey_questionblock_question` ADD `survey_fi` INT NOT NULL AFTER `questionblock_question_id` ;
03381
03382 <#206>
03383 DROP TABLE IF EXISTS `aicc_course`;
03384 CREATE TABLE `aicc_course` (
03385 `obj_id` int(11) NOT NULL default '0',
03386 `course_creator` varchar(255) default NULL,
03387 `course_id` varchar(50) default NULL,
03388 `course_system` varchar(50) default NULL,
03389 `course_title` varchar(255) default NULL,
03390 `level` varchar(5) default NULL,
03391 `max_fields_cst` smallint(6) default NULL,
03392 `max_fields_ort` smallint(6) default NULL,
03393 `total_aus` smallint(6) default NULL,
03394 `total_blocks` smallint(6) default NULL,
03395 `total_complex_obj` smallint(6) default NULL,
03396 `total_objectives` smallint(6) default NULL,
03397 `version` varchar(10) default NULL,
03398 `max_normal` tinyint(4) default NULL,
03399 `description` text,
03400 PRIMARY KEY (`obj_id`)
03401 ) TYPE=MyISAM;
03402
03403 DROP TABLE IF EXISTS `aicc_object`;
03404 CREATE TABLE `aicc_object` (
03405 `obj_id` int(11) NOT NULL auto_increment,
03406 `alm_id` int(11) NOT NULL default '0',
03407 `system_id` varchar(50) NOT NULL default '',
03408 `title` text NOT NULL,
03409 `description` text,
03410 `developer_id` varchar(50) default NULL,
03411 `type` char(3) NOT NULL default '',
03412 PRIMARY KEY (`obj_id`),
03413 KEY `alm_id` (`alm_id`)
03414 ) TYPE=MyISAM;
03415
03416 DROP TABLE IF EXISTS `aicc_tree`;
03417 CREATE TABLE `aicc_tree` (
03418 `alm_id` int(11) NOT NULL default '0',
03419 `child` int(11) unsigned NOT NULL default '0',
03420 `parent` int(11) unsigned default NULL,
03421 `lft` int(11) unsigned NOT NULL default '0',
03422 `rgt` int(11) unsigned NOT NULL default '0',
03423 `depth` smallint(5) unsigned NOT NULL default '0',
03424 KEY `child` (`child`),
03425 KEY `parent` (`parent`)
03426 ) TYPE=MyISAM;
03427
03428 DROP TABLE IF EXISTS `aicc_units`;
03429 CREATE TABLE `aicc_units` (
03430 `obj_id` int(11) NOT NULL auto_increment,
03431 `type` varchar(50) default NULL,
03432 `command_line` varchar(255) default NULL,
03433 `max_time_allowed` time default NULL,
03434 `time_limit_action` varchar(50) default NULL,
03435 `max_score` decimal(10,0) default NULL,
03436 `core_vendor` text,
03437 `system_vendor` text,
03438 `file_name` varchar(255) default NULL,
03439 `mastery_score` smallint(6) default NULL,
03440 `web_launch` varchar(255) default NULL,
03441 `au_password` varchar(50) default NULL,
03442 PRIMARY KEY (`obj_id`)
03443 ) TYPE=MyISAM;
03444
03445 <#207>
03446 INSERT INTO `survey_phrase` (`phrase_id` , `title` , `defaultvalue` , `owner_fi` , `TIMESTAMP`) VALUES (NULL, 'dp_standard_numbers', '1', '0', NOW());
03447
03448 <#208>
03449 ALTER TABLE scorm_tracking2 ADD COLUMN ref_id INT NOT NULL DEFAULT '0';
03450 <#209>
03451 ALTER TABLE `survey_question` ADD `original_id` INT DEFAULT '0' NOT NULL AFTER `created` ;
03452 <#210>
03453
03454 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'1','1','1');
03455 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'1','2','2');
03456 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'2','3','1');
03457 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'2','4','2');
03458 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'3','5','1');
03459 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'3','6','2');
03460 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'4','7','1');
03461 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'4','8','2');
03462 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'5','9','1');
03463 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'5','10','2');
03464 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'6','11','1');
03465 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'6','12','2');
03466 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'7','13','1');
03467 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'7','14','2');
03468 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'8','1','1');
03469 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'8','15','2');
03470 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'8','2','3');
03471 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'9','3','1');
03472 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'9','16','2');
03473 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'9','4','3');
03474 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'10','5','1');
03475 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'10','17','2');
03476 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'10','6','3');
03477 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'11','7','1');
03478 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'11','16','2');
03479 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'11','8','3');
03480 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'12','9','1');
03481 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'12','16','2');
03482 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'12','10','3');
03483 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'13','11','1');
03484 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'13','18','2');
03485 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'13','12','3');
03486 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'14','13','1');
03487 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'14','16','2');
03488 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'14','14','3');
03489 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'15','19','1');
03490 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'15','1','2');
03491 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'15','15','3');
03492 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'15','2','4');
03493 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'15','20','5');
03494 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'16','21','1');
03495 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'16','3','2');
03496 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'16','16','3');
03497 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'16','4','4');
03498 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'16','22','5');
03499 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'17','23','1');
03500 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'17','5','2');
03501 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'17','17','3');
03502 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'17','24','4');
03503 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'17','6','5');
03504 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'18','25','1');
03505 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'18','7','2');
03506 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'18','16','3');
03507 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'18','8','4');
03508 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'18','26','5');
03509 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'19','27','1');
03510 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'19','9','2');
03511 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'19','16','3');
03512 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'19','10','4');
03513 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'19','28','5');
03514 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'20','11','1');
03515 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'20','29','2');
03516 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'20','30','3');
03517 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'20','31','4');
03518 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'20','12','5');
03519 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'21','32','1');
03520 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'21','33','2');
03521 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'21','16','3');
03522 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'21','34','4');
03523 INSERT INTO `survey_phrase_category` (`phrase_category_id`,`phrase_fi`,`category_fi`,`sequence`) VALUES (NULL,'21','35','5');
03524 <#211>
03525 ALTER TABLE `qpl_questions` CHANGE `question_id` `question_id` INT( 11 ) DEFAULT '0' NOT NULL AUTO_INCREMENT;
03526
03527 <#212>
03528 DROP TABLE IF EXISTS scorm_tracking;
03529 RENAME TABLE scorm_tracking2 TO scorm_tracking;
03530
03531 <#213>
03532 ALTER TABLE scorm_lm ADD COLUMN credit ENUM('credit','no_credit') NOT NULL DEFAULT 'credit';
03533
03534 <#214>
03535 ALTER TABLE scorm_lm ADD COLUMN default_lesson_mode ENUM('normal','browse') NOT NULL DEFAULT 'normal';
03536 ALTER TABLE scorm_lm ADD COLUMN auto_review ENUM('y','n') NOT NULL DEFAULT 'n';
03537
03538 <#215>
03539 ALTER TABLE content_object ADD COLUMN clean_frames ENUM('y','n') NOT NULL DEFAULT 'n';
03540
03541 <#216>
03542 <?php
03543
03544 $q = "SELECT usr_id FROM usr_data";
03545 $user_set = $this->db->query($q);
03546
03547 while ($user_rec = $user_set->fetchRow(DB_FETCHMODE_ASSOC))
03548 {
03549 $q = "REPLACE INTO usr_pref (usr_id, keyword, value) VALUES ".
03550 " ('".$user_rec["usr_id"]."','show_users_online','y')";
03551 $this->db->query($q);
03552 }
03553 ?>
03554
03555 <#217>
03556 ALTER TABLE `qpl_question_material` ADD `materials_file` TEXT;
03557 ALTER TABLE `qpl_question_material` ADD `TIMESTAMP` TIMESTAMP NOT NULL ;
03558
03559 <#218>
03560 ALTER TABLE `qpl_questions` DROP `imagemap_file`;
03561
03562 <#219>
03563 ALTER TABLE `qpl_questions` ADD `original_id` INT AFTER `created` ;
03564
03565 <#220>
03566 <?php
03567
03568 $query = "SELECT test_question_id, question_fi, test_fi FROM tst_test_question";
03569 $search_result = $this->db->query($query);
03570 while ($result_row = $search_result->fetchRow(DB_FETCHMODE_OBJECT))
03571 {
03572 $question_id = $result_row->question_fi;
03573 $query = sprintf("SELECT * FROM qpl_questions WHERE question_id = %s",
03574 $this->db->quote($question_id)
03575 );
03576 $result = $this->db->query($query);
03577 if (strcmp(get_class($result), db_result) == 0) {
03578 if ($result->numRows() == 1)
03579 {
03580 $row = $result->fetchRow(DB_FETCHMODE_OBJECT);
03581 $query = sprintf("INSERT INTO qpl_questions (question_id, question_type_fi, ref_fi, title, comment, author, owner, question_text, working_time, shuffle, points, start_tag, end_tag, matching_type, ordering_type, cloze_type, choice_response, materials, image_file, params, complete, created, original_id, TIMESTAMP) VALUES (NULL, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, NULL)",
03582 $this->db->quote("$row->question_type_fi"),
03583 $this->db->quote("$row->ref_fi"),
03584 $this->db->quote("$row->title"),
03585 $this->db->quote("$row->comment"),
03586 $this->db->quote("$row->author"),
03587 $this->db->quote("$row->owner"),
03588 $this->db->quote("$row->question_text"),
03589 $this->db->quote("$row->working_time"),
03590 $this->db->quote("$row->shuffle"),
03591 $this->db->quote("$row->points"),
03592 $this->db->quote("$row->start_tag"),
03593 $this->db->quote("$row->end_tag"),
03594 $this->db->quote("$row->matching_type"),
03595 $this->db->quote("$row->ordering_type"),
03596 $this->db->quote("$row->cloze_type"),
03597 $this->db->quote("$row->choice_response"),
03598 $this->db->quote("$row->materials"),
03599 $this->db->quote("$row->image_file"),
03600 $this->db->quote("$row->params"),
03601 $this->db->quote("$row->complete"),
03602 $this->db->quote("$row->created"),
03603 $this->db->quote("$row->question_id")
03604 );
03605 $result = $this->db->query($query);
03606 $duplicate_id = $this->db->getLastInsertId();
03607 $query = sprintf("SELECT * FROM qpl_answers WHERE question_fi = %s",
03608 $this->db->quote($question_id)
03609 );
03610 $result = $this->db->query($query);
03611 while ($row = $result->fetchRow(DB_FETCHMODE_OBJECT))
03612 {
03613 $insertquery = sprintf("INSERT INTO qpl_answers (answer_id, question_fi, name, shuffle, answertext, points, aorder, correctness, solution_order, matchingtext, matching_order, gap_id, cloze_type, coords, area, TIMESTAMP) VALUES (NULL, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, NULL)",
03614 $this->db->quote("$duplicate_id"),
03615 $this->db->quote("$row->name"),
03616 $this->db->quote("$row->shuffle"),
03617 $this->db->quote("$row->answertext"),
03618 $this->db->quote("$row->points"),
03619 $this->db->quote("$row->aorder"),
03620 $this->db->quote("$row->correctness"),
03621 $this->db->quote("$row->solution_order"),
03622 $this->db->quote("$row->matchingtext"),
03623 $this->db->quote("$row->matching_order"),
03624 $this->db->quote("$row->gap_id"),
03625 $this->db->quote("$row->cloze_type"),
03626 $this->db->quote("$row->coords"),
03627 $this->db->quote("$row->area")
03628 );
03629 $insertresult = $this->db->query($insertquery);
03630 }
03631
03632
03633 $query = sprintf("SELECT * FROM qpl_question_material WHERE question_id = %s",
03634 $this->db->quote($question_id)
03635 );
03636 $result = $this->db->query($query);
03637 while ($row = $result->fetchRow(DB_FETCHMODE_OBJECT))
03638 {
03639 $insertquery = sprintf("INSERT INTO qpl_question_material (material_id, question_id, materials, materials_file, TIMESTAMP) VALUES (NULL, %s, %s, %s, NULL)",
03640 $this->db->quote("$duplicate_id"),
03641 $this->db->quote("$row->materials"),
03642 $this->db->quote("$row->materials_file")
03643 );
03644 $insertresult = $this->db->query($insertquery);
03645 }
03646
03647 $query = sprintf("UPDATE tst_test_question SET question_fi = %s WHERE test_question_id = %s",
03648 $this->db->quote($duplicate_id),
03649 $this->db->quote($result_row->test_question_id)
03650 );
03651 $result = $this->db->query($query);
03652
03653 $query = sprintf("UPDATE tst_solutions SET question_fi = %s WHERE test_fi = %s AND question_fi = %s",
03654 $this->db->quote($duplicate_id),
03655 $this->db->quote($result_row->test_fi),
03656 $this->db->quote($result_row->question_fi)
03657 );
03658 $result = $this->db->query($query);
03659 }
03660 }
03661 }
03662 ?>
03663
03664 <#221>
03665 UPDATE settings SET value = '3.0.1 2004-06-21' WHERE keyword = 'ilias_version' LIMIT 1;
03666
03667 <#222>
03668 ALTER TABLE `tst_tests` ADD `ending_time` varchar(14) default NULL AFTER `starting_time` ;
03669 <#223>
03670
03671 ALTER TABLE `survey_question` CHANGE `original_id` `original_id` INT( 11 ) ;
03672 UPDATE `survey_question` SET `original_id` = NULL WHERE `original_id` = 0;
03673
03674 <#224>
03675
03676 CREATE TABLE ctrl_classfile
03677 (
03678 class VARCHAR(100) NOT NULL PRIMARY KEY,
03679 file VARCHAR(250)
03680 );
03681
03682 CREATE TABLE ctrl_calls
03683 (
03684 parent VARCHAR(100) NOT NULL,
03685 child VARCHAR(100)
03686 );
03687
03688 <#225>
03689 DROP TABLE IF EXISTS `aicc_lm`;
03690 DROP TABLE IF EXISTS `aicc_tree`;
03691
03692 <#226>
03693 DROP TABLE IF EXISTS `ut_access`;
03694 CREATE TABLE `ut_access` (
03695 `id` int(10) NOT NULL auto_increment,
03696 `user_id` int(10) unsigned NOT NULL default '0',
03697 `action_type` char(10) default NULL,
03698 `php_script` char(100) NOT NULL default '',
03699 `client_ip` char(15) default NULL,
03700 `acc_obj_type` char(10) NOT NULL default '',
03701 `acc_obj_id` int(10) NOT NULL default '0',
03702 `acc_sub_type` char(10) NOT NULL default '',
03703 `acc_sub_id` int(10) NOT NULL default '0',
03704 `language` char(15) default NULL,
03705 `browser` char(60) NOT NULL default '',
03706 `session_id` char(40) default NULL,
03707 `acc_time` datetime default NULL,
03708 PRIMARY KEY (`id`)
03709 ) TYPE=MyISAM;
03710
03711 <#227>
03712 <?php
03713
03714
03715 $query = "SELECT * FROM rbac_operations WHERE operation='visible'";
03716 $result = $this->db->query($query);
03717 $visible_id = "";
03718 if ($result->numRows() == 1)
03719 {
03720 $row = $result->fetchRow(DB_FETCHMODE_ASSOC);
03721 $visible_id = $row["ops_id"];
03722 }
03723
03724
03725 $query = "SELECT * FROM rbac_operations WHERE operation='participate'";
03726 $result = $this->db->query($query);
03727 $participate_id = "";
03728 if ($result->numRows() == 1)
03729 {
03730 $row = $result->fetchRow(DB_FETCHMODE_ASSOC);
03731 $participate_id = $row["ops_id"];
03732 }
03733
03734
03735 $query = "SELECT * FROM object_data WHERE type='role' AND title='User'";
03736 $result = $this->db->query($query);
03737 $user_id = "";
03738 if ($result->numRows() == 1)
03739 {
03740 $row = $result->fetchRow(DB_FETCHMODE_ASSOC);
03741 $user_id = $row["obj_id"];
03742 }
03743
03744
03745 $query = "SELECT * FROM object_data WHERE type='role' AND title='Guest'";
03746 $result = $this->db->query($query);
03747 $guest_id = "";
03748 if ($result->numRows() == 1)
03749 {
03750 $row = $result->fetchRow(DB_FETCHMODE_ASSOC);
03751 $guest_id = $row["obj_id"];
03752 }
03753
03754
03755
03756 if ($user_id and $visible_id)
03757 {
03758
03759 $query = sprintf("INSERT INTO rbac_templates (rol_id, type, ops_id, parent) VALUES (%s, %s, %s, %s)",
03760 $this->db->quote($user_id),
03761 $this->db->quote("tst"),
03762 $this->db->quote($visible_id),
03763 ROLE_FOLDER_ID
03764 );
03765 $result = $this->db->query($query);
03766 }
03767
03768 if ($guest_id and $visible_id)
03769 {
03770
03771 $query = sprintf("INSERT INTO rbac_templates (rol_id, type, ops_id, parent) VALUES (%s, %s, %s, %s)",
03772 $this->db->quote($guest_id),
03773 $this->db->quote("tst"),
03774 $this->db->quote($visible_id),
03775 ROLE_FOLDER_ID
03776 );
03777 $result = $this->db->query($query);
03778 }
03779
03780
03781
03782 if ($user_id and $visible_id)
03783 {
03784
03785 $query = sprintf("INSERT INTO rbac_templates (rol_id, type, ops_id, parent) VALUES (%s, %s, %s, %s)",
03786 $this->db->quote($user_id),
03787 $this->db->quote("svy"),
03788 $this->db->quote($visible_id),
03789 ROLE_FOLDER_ID
03790 );
03791 $result = $this->db->query($query);
03792 }
03793
03794 if ($guest_id and $visible_id)
03795 {
03796
03797 $query = sprintf("INSERT INTO rbac_templates (rol_id, type, ops_id, parent) VALUES (%s, %s, %s, %s)",
03798 $this->db->quote($guest_id),
03799 $this->db->quote("svy"),
03800 $this->db->quote($visible_id),
03801 ROLE_FOLDER_ID
03802 );
03803 $result = $this->db->query($query);
03804 }
03805
03806 if ($user_id and $participate_id)
03807 {
03808
03809 $query = sprintf("INSERT INTO rbac_templates (rol_id, type, ops_id, parent) VALUES (%s, %s, %s, %s)",
03810 $this->db->quote($user_id),
03811 $this->db->quote("svy"),
03812 $this->db->quote($participate_id),
03813 ROLE_FOLDER_ID
03814 );
03815 $result = $this->db->query($query);
03816 }
03817
03818 if ($guest_id and $participate_id)
03819 {
03820
03821 $query = sprintf("INSERT INTO rbac_templates (rol_id, type, ops_id, parent) VALUES (%s, %s, %s, %s)",
03822 $this->db->quote($guest_id),
03823 $this->db->quote("svy"),
03824 $this->db->quote($participate_id),
03825 ROLE_FOLDER_ID
03826 );
03827 $result = $this->db->query($query);
03828 }
03829
03830 ?>
03831
03832 <#228>
03833 <?php
03834
03835
03836 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
03837 "VALUES ('typ', 'trac', 'UserTracking object', -1, now(), now())";
03838 $this->db->query($query);
03839
03840
03841
03842 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
03843 "VALUES ('trac', '__User Tracking', 'System user tracking', -1, now(), now())";
03844 $this->db->query($query);
03845
03846 $query = "SELECT LAST_INSERT_ID() as id";
03847 $res = $this->db->query($query);
03848 $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
03849
03850
03851 $query = "INSERT INTO object_reference (obj_id) VALUES('".$row->id."')";
03852 $res = $this->db->query($query);
03853
03854 $query = "SELECT LAST_INSERT_ID() as id";
03855 $res = $this->db->query($query);
03856 $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
03857
03858
03859 $tree = new ilTree(ROOT_FOLDER_ID);
03860 $tree->insertNode($row->id,SYSTEM_FOLDER_ID);
03861
03862
03863 $query = "INSERT INTO settings (keyword,value) VALUES('sys_user_tracking_id','".$row->id."')";
03864 $res = $this->db->query($query);
03865 ?>
03866
03867 <#229>
03868 ALTER TABLE `survey_questionblock` CHANGE `title` `title` TEXT DEFAULT NULL;
03869
03870 <#230>
03871 REPLACE INTO settings (keyword, value) VALUES ('enable_tracking', 0);
03872 REPLACE INTO settings (keyword, value) VALUES ('save_user_related_data', 0);
03873
03874 <#231>
03875 <?php
03876
03877 $ilCtrlStructureReader->getStructure();
03878
03879 ?>
03880
03881 <#232>
03882 <?php
03883
03884 $ilCtrlStructureReader->getStructure();
03885
03886 ?>
03887
03888 <#233>
03889 <?php
03890
03891
03892 $query = "SELECT obj_id FROM object_data WHERE type = 'typ' ".
03893 " AND title = 'trac'";
03894 $res = $this->db->query($query);
03895 $row = $res->fetchRow();
03896 $typ_id = $row[0];
03897
03898
03899
03900 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','1')";
03901 $this->db->query($query);
03902 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','2')";
03903 $this->db->query($query);
03904 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','3')";
03905 $this->db->query($query);
03906 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','6')";
03907 $this->db->query($query);
03908
03909 ?>
03910
03911 <#234>
03912 UPDATE settings SET value = '3.1.0_beta1 2004-07-11' WHERE keyword = 'ilias_version' LIMIT 1;
03913
03914 <#235>
03915 <?php
03916
03917 $ilCtrlStructureReader->getStructure();
03918
03919 ?>
03920
03921 <#236>
03922 ALTER TABLE `aicc_object` CHANGE `alm_id` `slm_id` INT( 11 ) DEFAULT '0' NOT NULL;
03923
03924 <#237>
03925 <?php
03926
03927 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
03928 "VALUES ('rolt', 'il_crs_admin', 'Administrator template for course admins', -1, now(), now())";
03929
03930 $this->db->query($query);
03931
03932
03933 $query = "SELECT obj_id FROM object_data WHERE type = 'rolt' AND title = 'il_crs_admin'";
03934 $res = $this->db->query($query);
03935 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
03936 {
03937 $admin_id = $row->obj_id;
03938 }
03939
03940 $admin["lm"] = array(1,2,3,4,6,7,8);
03941 $admin["slm"] = array(1,2,3,4,6,7,8);
03942 $admin["dbk"] = array(1,2,3,4,6);
03943 $admin["glo"] = array(1,2,3,4,6,7,8);
03944 $admin["frm"] = array(1,2,3,4,6,9,10);
03945 $admin["chat"] = array(1,2,3,4,6);
03946 $admin["file"] = array(1,2,3,4,6);
03947 $admin["tst"] = array(1,2,3,4,6);
03948 $admin["grp"] = array(1,2,3,4,6,7,8,18,20,21,22,23,24,25,26,27,29,31);
03949 $admin["exc"] = array(1,2,3,4,6);
03950 $admin["fold"] = array(1,2,3,4,6,18,20,21,22,25,26,29);
03951 $admin["crs"] = array(1,2,3,4,6,7,8,17,18,20,21,22,23,24,25,26,27,29,31,32);
03952
03953 $rbacadmin =& new ilRbacAdmin();
03954
03955 foreach($admin as $type => $ops)
03956 {
03957 $rbacadmin->setRolePermission($admin_id,$type,$ops,ROLE_FOLDER_ID);
03958 }
03959 $rbacadmin->assignRoleToFolder($admin_id,ROLE_FOLDER_ID,"n");
03960
03961
03962 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
03963 "VALUES ('rolt', 'il_crs_tutor', 'Tutor template for course tutors', -1, now(), now())";
03964
03965 $this->db->query($query);
03966
03967
03968 $query = "SELECT obj_id FROM object_data WHERE type = 'rolt' AND title = 'il_crs_tutor'";
03969 $res = $this->db->query($query);
03970 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
03971 {
03972 $tutor_id = $row->obj_id;
03973 }
03974 $admin["lm"] = array(2,3,4);
03975 $admin["slm"] = array(2,3,4,7,8);
03976 $admin["dbk"] = array(2,3,4);
03977 $admin["glo"] = array(2,3,4,7,8);
03978 $admin["frm"] = array(2,3,4,9);
03979 $admin["chat"] = array(2,3,4);
03980 $admin["file"] = array(2,3,4);
03981 $admin["tst"] = array(2,3,4);
03982 $admin["grp"] = array(2,3,4,7,8);
03983 $admin["exc"] = array(2,3,4);
03984 $admin["fold"] = array(2,3,4);
03985 $admin["crs"] = array(2,3,4,7,8);
03986
03987 $rbacadmin =& new ilRbacAdmin();
03988
03989 foreach($admin as $type => $ops)
03990 {
03991 $rbacadmin->setRolePermission($tutor_id,$type,$ops,ROLE_FOLDER_ID);
03992 }
03993 $rbacadmin->assignRoleToFolder($tutor_id,ROLE_FOLDER_ID,"n");
03994
03995
03996 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
03997 "VALUES ('rolt', 'il_crs_member', 'Member template for course members', -1, now(), now())";
03998
03999 $this->db->query($query);
04000
04001
04002 $query = "SELECT obj_id FROM object_data WHERE type = 'rolt' AND title = 'il_crs_member'";
04003 $res = $this->db->query($query);
04004 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
04005 {
04006 $member_id = $row->obj_id;
04007 }
04008 $admin["lm"] = array(2,3);
04009 $admin["slm"] = array(2,3,7,8);
04010 $admin["dbk"] = array(2,3);
04011 $admin["glo"] = array(2,3,7,8);
04012 $admin["frm"] = array(2,3);
04013 $admin["chat"] = array(2,3);
04014 $admin["file"] = array(2,3);
04015 $admin["tst"] = array(2,3);
04016 $admin["grp"] = array(2,3,7,8);
04017 $admin["exc"] = array(2,3);
04018 $admin["fold"] = array(2,3);
04019 $admin["crs"] = array(2,3,7,8);
04020
04021 $rbacadmin =& new ilRbacAdmin();
04022
04023 foreach($admin as $type => $ops)
04024 {
04025 $rbacadmin->setRolePermission($member_id,$type,$ops,ROLE_FOLDER_ID);
04026 }
04027
04028 $rbacadmin->assignRoleToFolder($member_id,ROLE_FOLDER_ID,"n");
04029 ?>
04030 <#238>
04031 <?php
04032
04033 $ilCtrlStructureReader->getStructure();
04034
04035 ?>
04036
04037 <#239>
04038 CREATE TABLE `crs_items` (
04039 `parent_id` int(11) NOT NULL default '0',
04040 `obj_id` int(11) NOT NULL default '0',
04041 `activation_unlimited` tinyint(2) default NULL,
04042 `activation_start` int(8) default NULL,
04043 `activation_end` int(8) default NULL,
04044 `position` int(11) default NULL,
04045 PRIMARY KEY (`parent_id`,`obj_id`)
04046 ) TYPE=MyISAM;
04047 CREATE TABLE `crs_members` (
04048 `obj_id` int(11) NOT NULL default '0',
04049 `usr_id` int(11) NOT NULL default '0',
04050 `status` tinyint(2) NOT NULL default '0',
04051 `role` tinyint(2) NOT NULL default '0',
04052 PRIMARY KEY (`obj_id`,`usr_id`)
04053 ) TYPE=MyISAM;
04054 CREATE TABLE `crs_settings` (
04055 `obj_id` int(11) NOT NULL default '0',
04056 `syllabus` text,
04057 `contact_name` varchar(255) default NULL,
04058 `contact_responsibility` varchar(255) default NULL,
04059 `contact_phone` varchar(255) default NULL,
04060 `contact_email` varchar(255) default NULL,
04061 `contact_consultation` text,
04062 `activation_unlimited` tinyint(2) default NULL,
04063 `activation_start` int(11) default NULL,
04064 `activation_end` int(11) default NULL,
04065 `activation_offline` int(1) default NULL,
04066 `subscription_unlimited` tinyint(2) default NULL,
04067 `subscription_start` int(11) default NULL,
04068 `subscription_end` int(11) default NULL,
04069 `subscription_type` int(2) default NULL,
04070 `subscription_password` varchar(32) default NULL,
04071 `subscription_max_members` int(4) default NULL,
04072 `subscription_notify` int(2) default NULL,
04073 `sortorder` int(2) default NULL,
04074 `archive_start` int(11) default NULL,
04075 `archive_end` int(11) default NULL,
04076 `archive_type` int(2) default NULL,
04077 PRIMARY KEY (`obj_id`)
04078 ) TYPE=MyISAM;
04079 CREATE TABLE `crs_subscribers` (
04080 `usr_id` int(11) NOT NULL default '0',
04081 `obj_id` int(11) NOT NULL default '0',
04082 `sub_time` int(11) NOT NULL default '0',
04083 PRIMARY KEY (`usr_id`,`obj_id`)
04084 ) TYPE=MyISAM;
04085
04086 <#240>
04087 CREATE TABLE `crs_archives` (
04088 `archive_id` int(11) NOT NULL auto_increment,
04089 `course_id` int(11) NOT NULL default '0',
04090 `archive_name` varchar(255) NOT NULL default '',
04091 `archive_type` tinyint(2) NOT NULL default '0',
04092 `archive_date` int(11) default NULL,
04093 `archive_size` int(11) default NULL,
04094 PRIMARY KEY (`archive_id`)
04095 ) TYPE=MyISAM;
04096
04097 <#241>
04098 ALTER TABLE `crs_archives` ADD `archive_lang` VARCHAR( 16 ) ;
04099
04100 <#242>
04101 ALTER TABLE `tst_tests` CHANGE `ref_fi` `obj_fi` INT( 11 ) DEFAULT '0' NOT NULL;
04102 ALTER TABLE `qpl_questions` CHANGE `ref_fi` `obj_fi` INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL;
04103 <#243>
04104 <?php
04105
04106
04107 $query = "SELECT object_reference.obj_id, tst_tests.obj_fi, tst_tests.test_id FROM object_reference, tst_tests WHERE tst_tests.obj_fi = object_reference.ref_id";
04108 $result = $this->db->query($query);
04109 while ($row = $result->fetchRow(DB_FETCHMODE_ASSOC))
04110 {
04111 $query = sprintf("UPDATE `tst_tests` SET `obj_fi` = %s WHERE `test_id` = %s",
04112 $this->db->quote($row["obj_id"]),
04113 $this->db->quote($row["test_id"])
04114 );
04115 $insert_result = $this->db->query($query);
04116 }
04117
04118
04119 $query = "SELECT object_reference.obj_id, qpl_questions.obj_fi, qpl_questions.question_id FROM object_reference, qpl_questions WHERE qpl_questions.obj_fi = object_reference.ref_id";
04120 $result = $this->db->query($query);
04121 while ($row = $result->fetchRow(DB_FETCHMODE_ASSOC))
04122 {
04123 $query = sprintf("UPDATE `qpl_questions` SET `obj_fi` = %s WHERE `question_id` = %s",
04124 $this->db->quote($row["obj_id"]),
04125 $this->db->quote($row["question_id"])
04126 );
04127 $insert_result = $this->db->query($query);
04128 }
04129
04130 ?>
04131
04132 <#244>
04133 <?php
04134 ilUtil::makeDir(CLIENT_WEB_DIR."/assessment/");
04135
04136 $d = opendir(CLIENT_WEB_DIR . "/assessment/") or die($php_errormsg);
04137 while (false !== ($f = readdir($d))) {
04138 if (preg_match("/\d+/", $f))
04139 {
04140 $query = sprintf("SELECT obj_id FROM object_reference WHERE ref_id = %s",
04141 $this->db->quote($f)
04142 );
04143 $result = $this->db->query($query);
04144 if ($result->numRows())
04145 {
04146 $row = $result->fetchRow(DB_FETCHMODE_ASSOC);
04147 rename(CLIENT_WEB_DIR . "/assessment/$f", CLIENT_WEB_DIR . "/assessment/" . $row["obj_id"]);
04148 }
04149 }
04150 }
04151 closedir($d);
04152 ?>
04153
04154 <#245>
04155 <?php
04156
04157 $query = "SELECT obj_id FROM object_data WHERE type = 'ldap' LIMIT 1";
04158 $res = $this->db->query($query);
04159 $row = $res->fetchRow();
04160 $obj_id = $row[0];
04161
04162
04163 $query = "INSERT INTO object_reference (obj_id) VALUES('".$obj_id."')";
04164 $res = $this->db->query($query);
04165
04166 $query = "SELECT LAST_INSERT_ID()";
04167 $res = $this->db->query($query);
04168 $row = $res->fetchRow();
04169 $ref_id = $row[0];
04170
04171
04172 $tree = new ilTree(ROOT_FOLDER_ID);
04173 $tree->insertNode($ref_id,SYSTEM_FOLDER_ID);
04174 ?>
04175
04176 <#246>
04177 UPDATE object_data SET type = 'auth', title = 'Authentication settings', description = 'Select and configure authentication mode for all user accounts' WHERE type = 'ldap' LIMIT 1;
04178 UPDATE object_data SET title = 'auth', description = 'Authentication settings' WHERE type = 'typ' AND title = 'ldap' AND owner = '-1' LIMIT 1;
04179 INSERT INTO settings (keyword,value) VALUES ('auth_mode',1);
04180
04181 <#247>
04182 <?php
04183
04184 $ilCtrlStructureReader->getStructure();
04185
04186 ?>
04187 <#248>
04188 CREATE TABLE `conditions` (
04189 `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
04190 `target_ref_id` INT( 11 ) NOT NULL ,
04191 `target_obj_id` INT( 11 ) NOT NULL ,
04192 `target_type` VARCHAR( 8 ) NOT NULL ,
04193 `trigger_ref_id` INT( 11 ) NOT NULL ,
04194 `trigger_obj_id` INT( 11 ) NOT NULL ,
04195 `trigger_type` VARCHAR( 8 ) NOT NULL ,
04196 `operation` VARCHAR( 64 ) ,
04197 `value` VARCHAR( 64 ) ,
04198 PRIMARY KEY ( `id` )
04199 );
04200 <#249>
04201 ALTER TABLE `crs_members` ADD `passed` TINYINT( 1 ) ;
04202 <#250>
04203 ALTER TABLE `conditions` CHANGE `operation` `operator` VARCHAR( 64 ) DEFAULT NULL;
04204 <#251>
04205 ALTER TABLE usr_data ADD COLUMN `time_limit_owner` int(10) default '0';
04206 ALTER TABLE usr_data ADD COLUMN `time_limit_unlimited` int(2) default '0';
04207 ALTER TABLE usr_data ADD COLUMN `time_limit_from` int(10) default '0';
04208 ALTER TABLE usr_data ADD COLUMN `time_limit_until` int(10) default '0';
04209
04210 <#252>
04211 UPDATE usr_data SET time_limit_unlimited = '1';
04212
04213 <#253>
04214 <?php
04215
04216 $ilCtrlStructureReader->getStructure();
04217
04218 ?>
04219 <#254>
04220 ALTER TABLE `chat_user` CHANGE `last_conn_timestamp` `last_conn_timestamp` INT( 14 ) DEFAULT NULL;
04221 <#255>
04222 DELETE FROM chat_user;
04223 <#256>
04224 <?php
04225
04226 $query = "SELECT ops_id FROM rbac_operations WHERE operation = 'create_file'";
04227 $res = $this->db->query($query);
04228 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
04229 {
04230 $ops_id = $row->ops_id;
04231 }
04232 $query = "SELECT obj_id FROM object_data WHERE type = 'typ' AND title = 'cat'";
04233 $res = $this->db->query($query);
04234 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
04235 {
04236 $obj_id = $row->obj_id;
04237 }
04238 if($obj_id and $ops_id)
04239 {
04240 $query = "INSERT INTO rbac_ta VALUES('".$obj_id."','".$ops_id."')";
04241 $res = $this->db->query($query);
04242 }
04243
04244 $query = "SELECT obj_id FROM object_data ".
04245 "WHERE type = 'rolt' AND title = 'Author'";
04246 $res = $this->db->query($query);
04247 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
04248 {
04249 $role_id = $row->obj_id;
04250 }
04251 if($role_id and $ops_id)
04252 {
04253 $query = "INSERT INTO rbac_templates ".
04254 "VALUES('".$role_id."','cat','".$ops_id."','".ROLE_FOLDER_ID."')";
04255
04256 $res = $this->db->query($query);
04257 }
04258 ?>
04259
04260 <#257>
04261 # INSERT INTO `object_data` VALUES (38, 'typ', 'alm', 'AICC Learning Module', -1, '2003-08-15 10:07:28', '2003-08-15 12:23:10', '');
04262 # INSERT INTO `object_data` VALUES (39, 'typ', 'hlm', 'HACP Learning Module', -1, '2003-08-15 10:07:28', '2003-08-15 12:23:10', '');
04263
04264 <?php
04265 $query = "SELECT ops_id FROM rbac_ta WHERE typ_id = '20'";
04266 $res = $this->db->query($query);
04267 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
04268 {
04269 $ops_id = $row->ops_id;
04270 }
04271 $query = "insert into rbac_ta VALUES('38', '".$ops_id."')";
04272
04273
04274 $query = "insert into rbac_ta VALUES('39', '".$ops_id."')";
04275
04276 ?>
04277 <#258>
04278 <?php
04279
04280 $query = "SELECT ref_id FROM object_reference LEFT JOIN object_data ON object_data.obj_id = object_reference.obj_id WHERE object_data.type = 'auth'";
04281 $res = $this->db->query($query);
04282
04283 if ($res->numRows() > 1)
04284 {
04285 $tree = new ilTree(ROOT_FOLDER_ID);
04286
04287 while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
04288 {
04289 $query = "SELECT * FROM tree WHERE child='".$row->ref_id."' AND parent='9'";
04290 $res2 = $this->db->query($query);
04291
04292 if ($res2->numRows() == 1)
04293 {
04294 continue;
04295 }
04296 else
04297 {
04298 $query = "DELETE FROM tree WHERE child='".$row->ref_id."'";
04299 $this->db->query($query);
04300 $query = "DELETE FROM object_reference WHERE ref_id='".$row->ref_id."'";
04301 $this->db->query($query);
04302 }
04303 }
04304
04305 $tree->renumber();
04306 }
04307 ?>
04308 <#259>
04309 ALTER TABLE usr_data ADD COLUMN `time_limit_message` int(2) default '0';
04310
04311 <#260>
04312 # <-257
04313 # DELETE FROM rbac_ta WHERE (typ_id=38 or typ_id=39);
04314
04315 <?php
04316 $query = "SELECT ops_id FROM rbac_ta WHERE typ_id = '20'";
04317 $res = $this->db->query($query);
04318 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
04319 {
04320 $ops_id = $row->ops_id;
04321
04322 $query = "insert into rbac_ta VALUES('38', '".$ops_id."')";
04323
04324
04325 $query = "insert into rbac_ta VALUES('39', '".$ops_id."')";
04326
04327
04328 }
04329 ?>
04330
04331 <#261>
04332 #
04333 # Remove materials table for assessment questions
04334 # The materials are no longer needed because of the
04335 # filelists in the PageObjects now uses in question text
04336 #
04337
04338 DROP TABLE `qpl_question_material`;
04339
04340 <#262>
04341 <?php
04342
04343
04344 $query = "INSERT object_data VALUES('','typ','pays','Payment settings',-1,NOW(),NOW(),'')";
04345 $this->db->query($query);
04346
04347 $query = "SELECT LAST_INSERT_ID()";
04348 $res = $this->db->query($query);
04349 $row = $res->fetchRow();
04350 $type_id = $row[0];
04351
04352 $query = "INSERT INTO object_data VALUES('','pays','Payment settings','Payment settings',-1,NOW(),NOW(),'')";
04353 $this->db->query($query);
04354
04355 $query = "SELECT LAST_INSERT_ID()";
04356 $res = $this->db->query($query);
04357 $row = $res->fetchRow();
04358 $obj_id = $row[0];
04359
04360
04361 $query = "INSERT INTO object_reference (obj_id) VALUES('".$obj_id."')";
04362 $this->db->query($query);
04363
04364 $query = "SELECT LAST_INSERT_ID()";
04365 $res = $this->db->query($query);
04366 $row = $res->fetchRow();
04367 $ref_id = $row[0];
04368
04369
04370 $tree = new ilTree(ROOT_FOLDER_ID);
04371 $tree->insertNode($ref_id,SYSTEM_FOLDER_ID);
04372 ?>
04373 <#263>
04374 <?php
04375 $query = "SELECT obj_id FROM object_data WHERE type = 'typ' AND title = 'pays'";
04376 $res = $this->db->query($query);
04377 $row = $res->fetchRow();
04378 $typ_id = $row[0];
04379
04380
04381 $query = "ALTER TABLE rbac_ta CHANGE typ_id typ_id INT( 11 ) DEFAULT '0' NOT NULL ";
04382 $this->db->query($query);
04383
04384 $query = "INSERT INTO rbac_ta VALUES('".$typ_id."','1')";
04385 $this->db->query($query);
04386
04387 $query = "INSERT INTO rbac_ta VALUES('".$typ_id."','2')";
04388 $this->db->query($query);
04389
04390 $query = "INSERT INTO rbac_ta VALUES('".$typ_id."','3')";
04391 $this->db->query($query);
04392
04393 $query = "INSERT INTO rbac_ta VALUES('".$typ_id."','4')";
04394 $this->db->query($query);
04395 ?>
04396 <#264>
04397 ALTER TABLE `tst_eval_settings` CHANGE `distancemean` `distancemedian` ENUM( '0' , '1' ) DEFAULT '1' NOT NULL;
04398 <#265>
04399 ALTER TABLE `tst_eval_settings` DROP `distancequintile`;
04400 <#266>
04401 CREATE TABLE `payment_vendors` (
04402 `vendor_id` INT( 11 ) NOT NULL ,
04403 `cost_center` VARCHAR( 16 ) NOT NULL ,
04404 PRIMARY KEY ( `vendor_id` )
04405 );
04406
04407 <#267>
04408 <?php
04409
04410 $query = "SELECT obj_id FROM object_data ".
04411 "WHERE type='typ' AND title='alm'";
04412 $res = $this->db->query($query);
04413 $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
04414 if ($row->obj_id > 0)
04415 {
04416 $query = "DELETE FROM rbac_ta WHERE typ_id='".$row->obj_id."'";
04417 $this->db->query($query);
04418 }
04419 $query = "DELETE FROM object_data WHERE type='typ' and title='alm'";
04420 $this->db->query($query);
04421
04422
04423 $query = "SELECT obj_id FROM object_data ".
04424 "WHERE type='typ' AND title='hlm'";
04425 $res = $this->db->query($query);
04426 $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
04427
04428 if ($row->obj_id > 0)
04429 {
04430 $query = "DELETE FROM rbac_ta WHERE typ_id='".$row->obj_id."'";
04431 $this->db->query($query);
04432 }
04433 $query = "DELETE FROM object_data WHERE type='typ' and title='hlm'";
04434 $this->db->query($query);
04435
04436 ?>
04437
04438 <#268>
04439 ALTER TABLE `survey_survey` CHANGE `ref_fi` `obj_fi` INT( 11 ) DEFAULT '0' NOT NULL;
04440 ALTER TABLE `survey_question` CHANGE `ref_fi` `obj_fi` INT( 11 ) UNSIGNED DEFAULT '0' NOT NULL;
04441 <#269>
04442 <?php
04443
04444
04445 $query = "SELECT object_reference.obj_id, survey_survey.obj_fi, survey_survey.survey_id FROM object_reference, survey_survey WHERE survey_survey.obj_fi = object_reference.ref_id";
04446 $result = $this->db->query($query);
04447 while ($row = $result->fetchRow(DB_FETCHMODE_ASSOC))
04448 {
04449 $query = sprintf("UPDATE `survey_survey` SET `obj_fi` = %s WHERE `survey_id` = %s",
04450 $this->db->quote($row["obj_id"]),
04451 $this->db->quote($row["survey_id"])
04452 );
04453 $insert_result = $this->db->query($query);
04454 }
04455
04456
04457 $query = "SELECT object_reference.obj_id, survey_question.obj_fi, survey_question.question_id FROM object_reference, survey_question WHERE survey_question.obj_fi = object_reference.ref_id";
04458 $result = $this->db->query($query);
04459 while ($row = $result->fetchRow(DB_FETCHMODE_ASSOC))
04460 {
04461 $query = sprintf("UPDATE `survey_question` SET `obj_fi` = %s WHERE `question_id` = %s",
04462 $this->db->quote($row["obj_id"]),
04463 $this->db->quote($row["question_id"])
04464 );
04465 $insert_result = $this->db->query($query);
04466 }
04467
04468 ?>
04469
04470 <#270>
04471 ALTER TABLE `qpl_answers` CHANGE `answertext` `answertext` TEXT NOT NULL;
04472 ALTER TABLE `qpl_answers` CHANGE `matchingtext` `matchingtext` TEXT NULL;
04473
04474 <#271>
04475 DELETE FROM settings WHERE keyword='ldap_enable';
04476 <#272>
04477 UPDATE settings SET value = '3.2.0_beta1 2004-09-02' WHERE keyword = 'ilias_version' LIMIT 1;
04478 <#273>
04479 ALTER TABLE content_object ADD COLUMN print_view_active ENUM('y','n') DEFAULT 'y';
04480 <#274>
04481 CREATE TABLE `payment_trustees` (
04482 `vendor_id` INT( 11 ) NOT NULL ,
04483 `trustee_id` INT( 11 ) NOT NULL ,
04484 `perm_stat` INT( 1 ) ,
04485 `perm_obj` INT( 1 ) NOT NULL ,
04486 PRIMARY KEY ( `vendor_id` , `trustee_id` )
04487 );
04488
04489 <#275>
04490 ALTER TABLE content_object ADD COLUMN numbering ENUM('y','n') DEFAULT 'n';
04491
04492 <#276>
04493 CREATE TABLE `payment_objects` (
04494 `pobject_id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
04495 `ref_id` INT( 11 ) NOT NULL ,
04496 `status` INT( 2 ) NOT NULL ,
04497 `pay_method` INT( 2 ) NOT NULL ,
04498 `vendor_id` INT( 11 ) NOT NULL ,
04499 PRIMARY KEY ( `pobject_id` )
04500 );
04501
04502 <#277>
04503 <?php
04504 $ilCtrlStructureReader->getStructure();
04505 ?>
04506
04507 <#278>
04508 <?php
04509 $ilCtrlStructureReader->getStructure();
04510 ?>
04511
04512 <#279>
04513 ALTER TABLE `role_data` ADD `assign_users` VARCHAR( 2 ) DEFAULT '0';
04514
04515 <#280>
04516 RENAME TABLE scorm_lm TO sahs_lm;
04517 ALTER TABLE sahs_lm ADD COLUMN type ENUM('scorm','aicc','hacp') DEFAULT 'scorm';
04518
04519 <#281>
04520 <?php
04521
04522 $query = "SELECT * FROM object_data where type = 'slm' or type = 'alm' or type = 'hlm'";
04523 $result = $this->db->query($query);
04524 while ($row = $result->fetchRow(DB_FETCHMODE_ASSOC))
04525 {
04526 switch($row["type"])
04527 {
04528 case "slm":
04529 $type = "scorm";
04530 break;
04531
04532 case "alm":
04533 $type = "aicc";
04534 break;
04535
04536 case "hlm":
04537 $type = "hacp";
04538 break;
04539 }
04540 $query = "UPDATE sahs_lm SET type='$type' WHERE id ='".$row["obj_id"]."'";
04541 $this->db->query($query);
04542 $query = "UPDATE object_data SET type='sahs' WHERE obj_id ='".$row["obj_id"]."'";
04543 $this->db->query($query);
04544 }
04545 ?>
04546
04547 <#282>
04548 UPDATE object_data SET title='sahs', description='SCORM/AICC Learning Module' WHERE title='slm' AND type='typ';
04549
04550 <#283>
04551 UPDATE rbac_operations SET operation='create_sahs', description='create new SCORM/AICC learning module' WHERE operation = 'create_slm';
04552
04553 <#284>
04554 UPDATE rbac_templates SET type='sahs' WHERE type='slm';
04555
04556 <#285>
04557 <?php
04558 $query = "INSERT INTO rbac_operations ".
04559 "VALUES('','cat_administrate_users','Administrate local user')";
04560 $this->db->query($query);
04561
04562 $query = "SELECT LAST_INSERT_ID() AS ops_id";
04563 $res = $this->db->query($query);
04564 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
04565 {
04566 $admin_ops = $row->ops_id;
04567 }
04568
04569 $query = "INSERT INTO rbac_operations ".
04570 "VALUES('','read_users','read local users')";
04571 $this->db->query($query);
04572
04573 $query = "SELECT LAST_INSERT_ID() AS ops_id";
04574 $res = $this->db->query($query);
04575 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
04576 {
04577 $read_ops = $row->ops_id;
04578 }
04579
04580 $query = "SELECT obj_id FROM object_data WHERE type = 'typ' AND title = 'cat'";
04581 $res = $this->db->query($query);
04582 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
04583 {
04584 $cat_id = $row->obj_id;
04585 }
04586
04587 $query = "SELECT obj_id FROM object_data WHERE type = 'typ' AND title = 'usrf'";
04588 $res = $this->db->query($query);
04589 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
04590 {
04591 $usrf_id = $row->obj_id;
04592 }
04593
04594 $query = "INSERT INTO rbac_ta VALUES('".$cat_id."','".$read_ops."')";
04595 $this->db->query($query);
04596
04597 $query = "INSERT INTO rbac_ta VALUES('".$cat_id."','".$admin_ops."')";
04598 $this->db->query($query);
04599
04600 $query = "INSERT INTO rbac_ta VALUES('".$usrf_id."','".$read_ops."')";
04601 $this->db->query($query);
04602 ?>
04603
04604 <#286>
04605 <?php
04606 $ilCtrlStructureReader->getStructure();
04607 ?>
04608 <#287>
04609 <?php
04610 $query = "UPDATE usr_data SET time_limit_owner = '7'";
04611 $this->db->query($query);
04612 ?>
04613
04614 <#288>
04615 ALTER TABLE `usr_data` ADD COLUMN `referral_comment` varchar(250) DEFAULT '';
04616 ALTER TABLE `usr_data` ADD COLUMN `active` int(4) unsigned NOT NULL DEFAULT '0';
04617 ALTER TABLE `usr_data` ADD COLUMN `approve_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';
04618
04619 REPLACE INTO settings (keyword, value) VALUES ('auto_registration', '1');
04620 REPLACE INTO settings (keyword, value) VALUES ('approve_recipient', '');
04621 REPLACE INTO settings (keyword, value) VALUES ('require_login', '1');
04622 REPLACE INTO settings (keyword, value) VALUES ('require_passwd', '1');
04623 REPLACE INTO settings (keyword, value) VALUES ('require_passwd2', '1');
04624 REPLACE INTO settings (keyword, value) VALUES ('require_firstname', '1');
04625 REPLACE INTO settings (keyword, value) VALUES ('require_gender', '1');
04626 REPLACE INTO settings (keyword, value) VALUES ('require_lastname', '1');
04627 REPLACE INTO settings (keyword, value) VALUES ('require_institution', '');
04628 REPLACE INTO settings (keyword, value) VALUES ('require_department', '');
04629 REPLACE INTO settings (keyword, value) VALUES ('require_street', '');
04630 REPLACE INTO settings (keyword, value) VALUES ('require_city', '');
04631 REPLACE INTO settings (keyword, value) VALUES ('require_zipcode', '');
04632 REPLACE INTO settings (keyword, value) VALUES ('require_country', '');
04633 REPLACE INTO settings (keyword, value) VALUES ('require_phone_office', '');
04634 REPLACE INTO settings (keyword, value) VALUES ('require_phone_home', '');
04635 REPLACE INTO settings (keyword, value) VALUES ('require_phone_mobile', '');
04636 REPLACE INTO settings (keyword, value) VALUES ('require_fax', '');
04637 REPLACE INTO settings (keyword, value) VALUES ('require_email', '1');
04638 REPLACE INTO settings (keyword, value) VALUES ('require_hobby', '');
04639 REPLACE INTO settings (keyword, value) VALUES ('require_default_role', '1');
04640 REPLACE INTO settings (keyword, value) VALUES ('require_referral_comment', '');
04641 <#289>
04642 <?php
04643 $ilCtrlStructureReader->getStructure();
04644 ?>
04645 <#290>
04646 CREATE TABLE `payment_prices` (
04647 `price_id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
04648 `pobject_id` INT( 11 ) NOT NULL ,
04649 `duration` INT( 4 ) NOT NULL ,
04650 `currency` INT( 4 ) NOT NULL ,
04651 `unit_value` INT( 6 ) DEFAULT '0',
04652 `sub_unit_value` INT( 3 ) DEFAULT '0',
04653 PRIMARY KEY ( `price_id` )
04654 );
04655 <#291>
04656 CREATE TABLE `payment_currencies` (
04657 `currency_id` int(3) NOT NULL default '0',
04658 `unit` char(32) NOT NULL default '',
04659 `subunit` char(32) NOT NULL default '',
04660 PRIMARY KEY (`currency_id`)
04661 ) TYPE=MyISAM;
04662 <#292>
04663 INSERT INTO `payment_currencies` VALUES (1, 'euro', 'cent');
04664 <#293>
04665 UPDATE `usr_data` SET `active`='1';
04666 <#294>
04667 ALTER TABLE `tst_tests` ADD `ects_output` ENUM( '0', '1' ) DEFAULT '0' NOT NULL AFTER `ending_time` ;
04668 ALTER TABLE `tst_tests` ADD `ects_fx` VARCHAR(2) DEFAULT NULL AFTER `ects_output` ;
04669 <#295>
04670 ALTER TABLE `tst_tests` CHANGE `ects_fx` `ects_fx` FLOAT DEFAULT NULL;
04671 <#296>
04672 <?php
04673 $ilCtrlStructureReader->getStructure();
04674 ?>
04675 <#297>
04676 ALTER TABLE `tst_tests` ADD `ects_a` DOUBLE DEFAULT '90' NOT NULL;
04677 ALTER TABLE `tst_tests` ADD `ects_b` DOUBLE DEFAULT '65' NOT NULL;
04678 ALTER TABLE `tst_tests` ADD `ects_c` DOUBLE DEFAULT '35' NOT NULL;
04679 ALTER TABLE `tst_tests` ADD `ects_d` DOUBLE DEFAULT '10' NOT NULL;
04680 ALTER TABLE `tst_tests` ADD `ects_e` DOUBLE DEFAULT '0' NOT NULL;
04681 <#298>
04682 DROP TABLE `payment_prices`;
04683 <#299>
04684 CREATE TABLE `payment_prices` (
04685 `price_id` int(11) NOT NULL auto_increment,
04686 `pobject_id` int(11) NOT NULL default '0',
04687 `duration` int(4) NOT NULL default '0',
04688 `currency` int(4) NOT NULL default '0',
04689 `unit_value` char(6) default '0',
04690 `sub_unit_value` char(3) default '00',
04691 PRIMARY KEY (`price_id`)
04692 ) TYPE=MyISAM;
04693 <#300>
04694 CREATE TABLE `payment_bill_vendor` (
04695 `pobject_id` int(11) NOT NULL default '0',
04696 `gender` tinyint(2) default NULL,
04697 `firstname` char(64) default NULL,
04698 `lastname` char(64) default NULL,
04699 `title` char(64) default NULL,
04700 `institution` char(64) default NULL,
04701 `department` char(64) default NULL,
04702 `street` char(64) default NULL,
04703 `zipcode` char(16) default NULL,
04704 `city` char(64) default NULL,
04705 `country` char(64) default NULL,
04706 `phone` char(32) default NULL,
04707 `fax` char(32) default NULL,
04708 `email` char(64) default NULL,
04709 `account_number` char(32) default NULL,
04710 `bankcode` char(32) default NULL,
04711 `iban` char(64) default NULL,
04712 `bic` char(64) default NULL,
04713 `bankname` char(64) default NULL,
04714 PRIMARY KEY (`pobject_id`)
04715 ) TYPE=MyISAM;
04716 <#301>
04717 <?php
04718 $ilCtrlStructureReader->getStructure();
04719 ?>
04720 <#302>
04721 DROP TABLE IF EXISTS `payment_statistic`;
04722 CREATE TABLE `payment_statistic` (
04723 `booking_id` int(11) NOT NULL auto_increment,
04724 `transaction` char(64) default NULL,
04725 `pobject_id` int(11) NOT NULL default '0',
04726 `customer_id` int(11) NOT NULL default '0',
04727 `b_vendor_id` int(11) default NULL,
04728 `b_pay_method` int(2) default NULL,
04729 `order_date` int(9) default NULL,
04730 `duration` char(16) default NULL,
04731 `price` char(16) NOT NULL default '',
04732 `payed` int(2) NOT NULL default '0',
04733 `access` int(2) NOT NULL default '0',
04734 PRIMARY KEY (`booking_id`)
04735 ) TYPE=MyISAM ;
04736 <#303>
04737 DROP TABLE IF EXISTS `payment_shopping_cart`;
04738 CREATE TABLE `payment_shopping_cart` (
04739 `psc_id` int(11) NOT NULL auto_increment,
04740 `customer_id` int(11) NOT NULL default '0',
04741 `pobject_id` int(11) NOT NULL default '0',
04742 `price_id` int(11) NOT NULL default '0',
04743 PRIMARY KEY (`psc_id`)
04744 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
04745 <#304>
04746 <?php
04747 $ilCtrlStructureReader->getStructure();
04748 ?>
04749 <#305>
04750 <?php
04751 $ilCtrlStructureReader->getStructure();
04752 ?>
04753 <#306>
04754 ALTER TABLE `survey_survey` ADD `anonymize` ENUM( '0', '1' ) DEFAULT '0' NOT NULL AFTER `created` ;
04755 <#307>
04756 ALTER TABLE `survey_finished` ADD `anonymous_id` VARCHAR( 32 ) NOT NULL AFTER `user_fi` ;
04757 ALTER TABLE `survey_answer` ADD `anonymous_id` VARCHAR( 32 ) NOT NULL AFTER `user_fi` ;
04758 <#308>
04759 ALTER TABLE `survey_finished` DROP `anonymous_id`;
04760 <#309>
04761 ALTER TABLE `qpl_questions` CHANGE `materials` `solution_hint` TEXT DEFAULT NULL;
04762 <#310>
04763 <?php
04764 $ilCtrlStructureReader->getStructure();
04765 ?>
04766 <#311>
04767 ALTER TABLE `tst_active` ADD INDEX `user_fi` (`user_fi`);
04768 ALTER TABLE `tst_active` ADD INDEX `test_fi` (`test_fi`);
04769 <#312>
04770 <?php
04771 $ilCtrlStructureReader->getStructure();
04772 ?>
04773 <#313>
04774 CREATE TABLE `exc_returned` (
04775 `returned_id` INT NOT NULL AUTO_INCREMENT ,
04776 `obj_id` INT NOT NULL ,
04777 `user_id` INT NOT NULL ,
04778 `filename` MEDIUMTEXT NOT NULL ,
04779 `filetitle` MEDIUMTEXT NOT NULL ,
04780 `mimetype` VARCHAR( 40 ) NOT NULL ,
04781 `TIMESTAMP` TIMESTAMP NOT NULL ,
04782 PRIMARY KEY ( `returned_id` ) ,
04783 INDEX ( `obj_id` ),
04784 INDEX ( `user_id` )
04785 );
04786 <#314>
04787 ALTER TABLE `usr_data` ADD `matriculation` VARCHAR( 40 ) AFTER `referral_comment` ;
04788 <#315>
04789 DROP TABLE IF EXISTS `survey_relation`;
04790
04791 CREATE TABLE `survey_relation` (
04792 `relation_id` int(11) NOT NULL auto_increment,
04793 `longname` varchar(20) NOT NULL default '',
04794 `shortname` char(2) NOT NULL default '',
04795 `TIMESTAMP` timestamp(14) NOT NULL,
04796 PRIMARY KEY (`relation_id`)
04797 ) TYPE=MyISAM AUTO_INCREMENT=7 ;
04798
04799 INSERT INTO `survey_relation` VALUES (1, 'less', '<', 20040518195753);
04800 INSERT INTO `survey_relation` VALUES (2, 'less_or_equal', '<=', 20040518195808);
04801 INSERT INTO `survey_relation` VALUES (3, 'equal', '=', 20040518195816);
04802 INSERT INTO `survey_relation` VALUES (4, 'not_equal', '<>', 20040518195839);
04803 INSERT INTO `survey_relation` VALUES (5, 'more_or_equal', '>=', 20040518195852);
04804 INSERT INTO `survey_relation` VALUES (6, 'more', '>', 20040518195903);
04805 <#316>
04806 DROP TABLE IF EXISTS `exc_returned`;
04807 CREATE TABLE `exc_returned` (
04808 `returned_id` INT NOT NULL AUTO_INCREMENT ,
04809 `obj_id` INT NOT NULL ,
04810 `user_id` INT NOT NULL ,
04811 `filename` MEDIUMTEXT NOT NULL ,
04812 `filetitle` MEDIUMTEXT NOT NULL ,
04813 `mimetype` VARCHAR( 40 ) NOT NULL ,
04814 `TIMESTAMP` TIMESTAMP NOT NULL ,
04815 PRIMARY KEY ( `returned_id` ) ,
04816 INDEX ( `obj_id` ),
04817 INDEX ( `user_id` )
04818 );
04819 <#317>
04820 ALTER TABLE `object_reference` ADD INDEX ( `obj_id` );
04821 ALTER TABLE `xmlnestedset` DROP INDEX `ns_l`;
04822 ALTER TABLE `xmlnestedset` DROP INDEX `ns_r`;
04823 <#318>
04824 CREATE TABLE `qpl_answer_enhanced` (
04825 `answer_enhanced_id` INT NOT NULL AUTO_INCREMENT ,
04826 `answerblock_fi` INT NOT NULL ,
04827 `answer_fi` INT NOT NULL ,
04828 `answer_boolean_prefix` ENUM( '0', '1' ) DEFAULT '0' NOT NULL ,
04829 `answer_boolean_connection` ENUM( '0', '1' ) DEFAULT '1' NOT NULL ,
04830 `enhanced_order` TINYINT DEFAULT '0' NOT NULL ,
04831 `TIMESTAMP` TIMESTAMP NOT NULL ,
04832 PRIMARY KEY ( `answer_enhanced_id` ) ,
04833 INDEX ( `answerblock_fi` , `answer_fi` )
04834 ) COMMENT = 'saves combinations of test question answers which are combined in an answer block';
04835
04836 CREATE TABLE `qpl_answerblock` (
04837 `answerblock_id` INT NOT NULL AUTO_INCREMENT ,
04838 `answerblock_index` TINYINT DEFAULT '0' NOT NULL ,
04839 `question_fi` INT NOT NULL ,
04840 `subquestion_index` TINYINT DEFAULT '0' NOT NULL ,
04841 `points` DOUBLE DEFAULT '0' NOT NULL ,
04842 `feedback` VARCHAR( 30 ) ,
04843 `TIMESTAMP` TIMESTAMP NOT NULL ,
04844 PRIMARY KEY ( `answerblock_id` ) ,
04845 INDEX ( `question_fi` )
04846 ) COMMENT = 'defines an answerblock, a combination of given answers of a test question';
04847
04848 <#319>
04849 <?php>
04850
04851 $query = "SELECT obj_id FROM object_data WHERE type='typ' AND title='fold'";
04852 $res = $this->db->query($query);
04853 $row = $res->fetchRow();
04854 $typ_id = $row[0];
04855
04856
04857 $query = "REPLACE INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','23')";
04858 $this->db->query($query);
04859 $query = "REPLACE INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','24')";
04860 $this->db->query($query);
04861 $query = "REPLACE INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','27')";
04862 $this->db->query($query);
04863 $query = "REPLACE INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','28')";
04864 $this->db->query($query);
04865 $query = "REPLACE INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','29')";
04866 $this->db->query($query);
04867 $query = "REPLACE INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','31')";
04868 $this->db->query($query);
04869 $query = "REPLACE INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','32')";
04870 $this->db->query($query);
04871 $query = "REPLACE INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','42')";
04872 $this->db->query($query);
04873 $query = "REPLACE INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','43')";
04874 $this->db->query($query);
04875 ?>
04876
04877 <#320>
04878 # add group & course operation assignments
04879 REPLACE INTO rbac_ta (typ_id,ops_id) VALUES (17,17);
04880 REPLACE INTO rbac_ta (typ_id,ops_id) VALUES (17,23);
04881 REPLACE INTO rbac_ta (typ_id,ops_id) VALUES (17,24);
04882 REPLACE INTO rbac_ta (typ_id,ops_id) VALUES (17,25);
04883 REPLACE INTO rbac_ta (typ_id,ops_id) VALUES (17,26);
04884 REPLACE INTO rbac_ta (typ_id,ops_id) VALUES (17,27);
04885 REPLACE INTO rbac_ta (typ_id,ops_id) VALUES (17,28);
04886 REPLACE INTO rbac_ta (typ_id,ops_id) VALUES (17,29);
04887 REPLACE INTO rbac_ta (typ_id,ops_id) VALUES (17,31);
04888 REPLACE INTO rbac_ta (typ_id,ops_id) VALUES (17,32);
04889 REPLACE INTO rbac_ta (typ_id,ops_id) VALUES (17,42);
04890 REPLACE INTO rbac_ta (typ_id,ops_id) VALUES (17,43);
04891
04892 REPLACE INTO rbac_ta (typ_id,ops_id) VALUES (15,27);
04893 REPLACE INTO rbac_ta (typ_id,ops_id) VALUES (15,28);
04894 REPLACE INTO rbac_ta (typ_id,ops_id) VALUES (15,42);
04895 REPLACE INTO rbac_ta (typ_id,ops_id) VALUES (15,43);
04896
04897 <#321>
04898 UPDATE settings SET value = '3.2.0 2004-10-20' WHERE keyword = 'ilias_version' LIMIT 1;
04899 <#322>
04900 ALTER TABLE `qpl_answer_enhanced` CHANGE `answer_fi` `answer_fi` VARCHAR( 20 ) DEFAULT '0' NOT NULL;
04901 <#323>
04902 ALTER TABLE `qpl_answer_enhanced` CHANGE `answer_fi` `value1` INT DEFAULT '0' NOT NULL;
04903 ALTER TABLE `qpl_answer_enhanced` ADD `value2` INT DEFAULT '0' NOT NULL AFTER `value1`;
04904 ALTER TABLE `qpl_answer_enhanced` DROP `answer_boolean_connection`;
04905 <#324>
04906 CREATE TABLE IF NOT EXISTS `qpl_suggested_solutions` (
04907 `suggested_solution_id` int(11) NOT NULL auto_increment,
04908 `question_fi` int(11) NOT NULL default '0',
04909 `internal_link` varchar(50) default '',
04910 `import_id` varchar(50) default '',
04911 `subquestion_index` int(11) NOT NULL default '0',
04912 `TIMESTAMP` timestamp(14) NOT NULL,
04913 PRIMARY KEY (`suggested_solution_id`),
04914 KEY `question_fi` (`question_fi`)
04915 );
04916 <#325>
04917 <?php>
04918
04919 $query = "SELECT * FROM qpl_questions WHERE solution_hint > 0";
04920 $res = $this->db->query($query);
04921 if ($res->numRows())
04922 {
04923 while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC))
04924 {
04925 $qinsert = sprintf("INSERT INTO qpl_suggested_solutions (suggested_solution_id, question_fi, internal_link, import_id, subquestion_index, TIMESTAMP) VALUES (NULL, %s, %s, %s, %s, NULL)",
04926 $this->db->quote($row["question_id"] . ""),
04927 $this->db->quote("il__lm_" . $row["solution_hint"]),
04928 $this->db->quote(""),
04929 $this->db->quote("0")
04930 );
04931 $result = $this->db->query($qinsert);
04932 }
04933 }
04934 ?>
04935 <#326>
04936 ALTER TABLE `qpl_questions` DROP `solution_hint`;
04937 <#327>
04938 <?php
04939 $ilCtrlStructureReader->getStructure();
04940 ?>
04941 <#328>
04942 ALTER TABLE `survey_survey` ADD `show_question_titles` ENUM( '0', '1' ) DEFAULT '1' NOT NULL AFTER `anonymize` ;
04943 <#329>
04944 CREATE TABLE `survey_question_obligatory` (
04945 `question_obligatory_id` INT NOT NULL AUTO_INCREMENT ,
04946 `survey_fi` INT NOT NULL ,
04947 `question_fi` INT NOT NULL ,
04948 `obligatory` ENUM( '0', '1' ) DEFAULT '1' NOT NULL ,
04949 `TIMESTAMP` TIMESTAMP NOT NULL ,
04950 PRIMARY KEY ( `question_obligatory_id` ) ,
04951 INDEX ( `survey_fi` , `question_fi` )
04952 ) COMMENT = 'Contains the obligatory state of questions in a survey';
04953 <#330>
04954 <?php
04955
04956 $query = "SELECT * FROM survey_questionblock, survey_questionblock_question WHERE survey_questionblock_question.questionblock_fi = survey_questionblock.questionblock_id";
04957 $res = $this->db->query($query);
04958 if ($res->numRows())
04959 {
04960 while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC))
04961 {
04962 $qinsert = sprintf("INSERT INTO survey_question_obligatory (question_obligatory_id, survey_fi, question_fi, obligatory, TIMESTAMP) VALUES (NULL, %s, %s, %s, NULL)",
04963 $this->db->quote($row["survey_fi"] . ""),
04964 $this->db->quote($row["question_fi"] . ""),
04965 $this->db->quote($row["obligatory"] . "")
04966 );
04967 $result = $this->db->query($qinsert);
04968 }
04969 }
04970 ?>
04971 <#331>
04972 ALTER TABLE `survey_questionblock` DROP COLUMN `obligatory`;
04973 <#332>
04974 ALTER TABLE `usr_data` ADD `agree_date` DATETIME DEFAULT '0000-00-00 00:00' NOT NULL;
04975 <#333>
04976 UPDATE settings SET value = '3.2.1 2004-11-03' WHERE keyword = 'ilias_version' LIMIT 1;
04977 <#334>
04978 ALTER TABLE `survey_survey_question` ADD `heading` VARCHAR(255) AFTER `sequence`;
04979 <#335>
04980 CREATE TABLE IF NOT EXISTS usr_pwassist (
04981 pwassist_id varchar(32) NOT NULL default '',
04982 expires int(11) NOT NULL default '0',
04983 ctime int(11) NOT NULL default '0',
04984 user_id int(10) unsigned NOT NULL default '0',
04985 PRIMARY KEY (pwassist_id),
04986 UNIQUE KEY user_id (user_id)
04987 ) TYPE=MyISAM;
04988
04989 <#336>
04990 ALTER TABLE `survey_question` ADD `orientation` ENUM('0','1') default '0' AFTER `obligatory`;
04991 <#337>
04992 ALTER TABLE `qpl_questions` ADD INDEX `question_type_fi` ( `question_type_fi` );
04993 ALTER TABLE `qpl_answers` ADD INDEX `question_fi` ( `question_fi` );
04994 ALTER TABLE `tst_solutions` ADD INDEX `user_fi` ( `user_fi` );
04995 ALTER TABLE `tst_solutions` ADD INDEX `test_fi` ( `test_fi` );
04996 <#338>
04997 UPDATE settings SET value = '3.2.2 2004-11-19' WHERE keyword = 'ilias_version' LIMIT 1;
04998 <#339>
04999 UPDATE settings SET value = '3.2.3 2004-11-22' WHERE keyword = 'ilias_version' LIMIT 1;
05000
05001 <#340>
05002 <?php
05003
05004 $tree = new ilTree(ROOT_FOLDER_ID);
05005 $tree->renumber();
05006 ?>
05007 <#341>
05008 REPLACE INTO settings (keyword, value) VALUES ('enable_js_edit', 1);
05009 <#342>
05010 <?php
05011 $ilCtrlStructureReader->getStructure();
05012 ?>
05013 <#343>
05014 CREATE TABLE `payment_settings` (
05015 `settings_id` bigint(20) NOT NULL auto_increment,
05016 `currency_unit` varchar(255) NOT NULL default '',
05017 `currency_subunit` varchar(255) NOT NULL default '',
05018 `address` text NOT NULL,
05019 `bank_data` text NOT NULL,
05020 `add_info` text NOT NULL,
05021 `vat_rate` varchar(255) NOT NULL default '',
05022 `pdf_path` varchar(255) NOT NULL default '',
05023 PRIMARY KEY (`settings_id`)
05024 ) TYPE=MyISAM;
05025 <#344>
05026 DROP TABLE IF EXISTS `payment_statistic`;
05027 CREATE TABLE `payment_statistic` (
05028 `booking_id` int(11) NOT NULL auto_increment,
05029 `transaction` char(64) default NULL,
05030 `pobject_id` int(11) NOT NULL default '0',
05031 `customer_id` int(11) NOT NULL default '0',
05032 `b_vendor_id` int(11) default NULL,
05033 `b_pay_method` int(2) default NULL,
05034 `order_date` int(9) default NULL,
05035 `duration` char(16) default NULL,
05036 `price` char(16) NOT NULL default '',
05037 `payed` int(2) NOT NULL default '0',
05038 `access` int(2) NOT NULL default '0',
05039 `voucher` char(64) default NULL,
05040 `transaction_extern` char(64) default NULL,
05041 PRIMARY KEY (`booking_id`)
05042 ) TYPE=MyISAM;
05043
05044 <#345>
05045 DROP TABLE IF EXISTS `history`;
05046 CREATE TABLE `history` (
05047 `obj_id` int(11) NOT NULL,
05048 `action` char(20) NOT NULL DEFAULT '',
05049 `hdate` DATETIME,
05050 `usr_id` int(11) NOT NULL,
05051 INDEX object_id (`obj_id`)
05052 ) TYPE=MyISAM;
05053
05054 <#346>
05055 ALTER TABLE file_data ADD version INT;
05056
05057 <#347>
05058 ALTER TABLE history ADD info_params TEXT;
05059
05060 <#348>
05061 UPDATE file_data SET version = 1;
05062 <#349>
05063 CREATE TABLE `frm_settings` (
05064 `obj_id` int(11) NOT NULL default '0',
05065 `default_view` int(2) NOT NULL default '0',
05066 PRIMARY KEY (`obj_id`)
05067 ) TYPE=MyISAM;
05068
05069 <#350>
05070 DROP TABLE IF EXISTS `frm_user_read`;
05071 CREATE TABLE `frm_user_read` (
05072 `usr_id` int(11) NOT NULL default '0',
05073 `obj_id` int(11) NOT NULL default '0',
05074 `thread_id` int(11) NOT NULL default '0',
05075 `post_id` int(11) NOT NULL default '0',
05076 PRIMARY KEY (`usr_id`,`obj_id`,`thread_id`,`post_id`)
05077 ) TYPE=MyISAM;
05078
05079 <#351>
05080 <?php
05081
05082 $query = "SELECT pos_pk,pos_usr_id,pos_thr_fk,pos_top_fk FROM frm_posts";
05083 $res = $this->db->query($query);
05084 while($row1 = $res->fetchRow(DB_FETCHMODE_OBJECT))
05085 {
05086 $query = "SELECT top_frm_fk FROM frm_data ".
05087 "WHERE top_pk = '".$row1->pos_top_fk."'";
05088
05089 $res2 = $this->db->query($query);
05090 while($row2 = $res2->fetchRow(DB_FETCHMODE_OBJECT))
05091 {
05092 $query = "INSERT INTO frm_user_read ".
05093 "SET usr_id = '".$row1->pos_usr_id."', ".
05094 "obj_id = '".$row2->top_frm_fk."', ".
05095 "thread_id = '".$row1->pos_thr_fk."', ".
05096 "post_id = '".$row1->pos_pk."'";
05097
05098 $this->db->query($query);
05099 }
05100 }
05101 ?>
05102 <#352>
05103 DROP TABLE IF EXISTS `frm_thread_access`;
05104 CREATE TABLE `frm_thread_access` (
05105 `usr_id` int(11) NOT NULL default '0',
05106 `obj_id` int(11) NOT NULL default '0',
05107 `thread_id` int(11) NOT NULL default '0',
05108 `access_old` int(11) NOT NULL default '0',
05109 `access_last` int(11) NOT NULL default '0',
05110 PRIMARY KEY (`usr_id`,`obj_id`,`thread_id`)
05111 ) TYPE=MyISAM;
05112
05113 <#353>
05114 DROP TABLE IF EXISTS `history`;
05115 CREATE TABLE `history` (
05116 `id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
05117 `obj_id` int(11) NOT NULL,
05118 `obj_type` CHAR(8) NOT NULL DEFAULT '',
05119 `action` char(20) NOT NULL DEFAULT '',
05120 `hdate` DATETIME,
05121 `usr_id` int(11) NOT NULL,
05122 `info_params` TEXT NOT NULL DEFAULT '',
05123 `user_comment` TEXT NOT NULL DEFAULT '',
05124 INDEX id_type (obj_id, obj_type)
05125 ) TYPE=MyISAM;
05126 <#354>
05127 ALTER TABLE content_object ADD COLUMN hist_user_comments ENUM('y','n') DEFAULT 'n';
05128 <#355>
05129 ALTER TABLE `tst_tests` ADD `random_test` ENUM( '0', '1' ) DEFAULT '0' NOT NULL AFTER `ects_e` ;
05130 <#356>
05131 CREATE TABLE `tst_test_random_question` (
05132 `test_random_question_id` int(11) NOT NULL auto_increment,
05133 `test_fi` int(11) NOT NULL default '0',
05134 `user_fi` int(11) NOT NULL default '0',
05135 `question_fi` int(11) NOT NULL default '0',
05136 `sequence` int(10) unsigned NOT NULL default '0',
05137 `TIMESTAMP` timestamp(14) NOT NULL,
05138 PRIMARY KEY (`test_random_question_id`)
05139 ) TYPE=MyISAM COMMENT='Relation table for random questions in tests';
05140
05141 ALTER TABLE `tst_tests` ADD `random_question_count` int(11) AFTER `random_test` ;
05142 <#357>
05143 CREATE TABLE `tst_test_random` (
05144 `test_random_id` int(11) NOT NULL auto_increment,
05145 `test_fi` int(11) NOT NULL default '0',
05146 `questionpool_fi` int(11) NOT NULL default '0',
05147 `num_of_q` int(10) unsigned NOT NULL default '0',
05148 `TIMESTAMP` timestamp(14) NOT NULL,
05149 PRIMARY KEY (`test_random_id`)
05150 ) TYPE=MyISAM COMMENT='Questionpools taken for a random test';
05151 <#358>
05152 ALTER TABLE `survey_finished` ADD `anonymous_id` VARCHAR(32) AFTER `user_fi` ;
05153 <#359>
05154 CREATE TABLE `link_check` (
05155 `page_id` int(11) NOT NULL default '0',
05156 `url` varchar(255) NOT NULL default '',
05157 `parent_type` varchar(8) NOT NULL default ''
05158 ) TYPE=MyISAM;
05159 <#360>
05160 <?php
05161
05162 $query = "SELECT qpl_answers.answer_id FROM qpl_answers, qpl_questions WHERE qpl_answers.question_fi = qpl_questions.question_id AND qpl_questions.question_type_fi = 1";
05163 $res = $this->db->query($query);
05164 while($row1 = $res->fetchRow(DB_FETCHMODE_OBJECT))
05165 {
05166 $query = sprintf("UPDATE qpl_answers SET correctness = '1', points = 0 WHERE answer_id = %s AND correctness = '0'",
05167 $this->db->quote($row1->answer_id . "")
05168 );
05169 $res2 = $this->db->query($query);
05170 }
05171
05172
05173 $query = "SELECT qpl_answers.answer_id FROM qpl_answers, qpl_questions WHERE qpl_answers.question_fi = qpl_questions.question_id AND qpl_questions.question_type_fi = 6";
05174 $res = $this->db->query($query);
05175 while($row1 = $res->fetchRow(DB_FETCHMODE_OBJECT))
05176 {
05177 $query = sprintf("UPDATE qpl_answers SET correctness = '1', points = 0 WHERE answer_id = %s AND correctness = '0'",
05178 $this->db->quote($row1->answer_id . "")
05179 );
05180 $res2 = $this->db->query($query);
05181 }
05182
05183
05184 $query = "SELECT qpl_answers.answer_id FROM qpl_answers, qpl_questions WHERE qpl_answers.question_fi = qpl_questions.question_id AND qpl_questions.question_type_fi = 6 AND qpl_answers.cloze_type = '1'";
05185 $res = $this->db->query($query);
05186 while($row1 = $res->fetchRow(DB_FETCHMODE_OBJECT))
05187 {
05188 $query = sprintf("UPDATE qpl_answers SET correctness = '1', points = 0 WHERE answer_id = %s AND correctness = '0'",
05189 $this->db->quote($row1->answer_id . "")
05190 );
05191 $res2 = $this->db->query($query);
05192 }
05193 ?>
05194 <#361>
05195 DROP TABLE IF EXISTS `link_check_report`;
05196 CREATE TABLE `link_check_report` (
05197 `obj_id` int(11) NOT NULL default '0',
05198 `usr_id` int(11) NOT NULL default '0',
05199 PRIMARY KEY (`obj_id`,`usr_id`)
05200 ) TYPE=MyISAM;
05201 <#362>
05202 DROP TABLE IF EXISTS `link_check`;
05203 CREATE TABLE `link_check` (
05204 `obj_id` int(11) NOT NULL default '0',
05205 `page_id` int(11) NOT NULL default '0',
05206 `url` varchar(255) NOT NULL default '',
05207 `parent_type` varchar(8) NOT NULL default ''
05208 ) TYPE=MyISAM;
05209 <#363>
05210 CREATE TABLE `tst_eval_users` (
05211 `eval_users_id` INT NOT NULL AUTO_INCREMENT ,
05212 `test_fi` INT NOT NULL ,
05213 `evaluator_fi` INT NOT NULL ,
05214 `user_fi` INT NOT NULL ,
05215 `TIMESTAMP` TIMESTAMP NOT NULL ,
05216 PRIMARY KEY ( `eval_users_id` ) ,
05217 INDEX ( `test_fi` , `evaluator_fi` , `user_fi` )
05218 ) COMMENT = 'Contains the users someone has chosen for a statistical evaluation';
05219
05220 CREATE TABLE `tst_eval_groups` (
05221 `eval_users_id` INT NOT NULL AUTO_INCREMENT ,
05222 `test_fi` INT NOT NULL ,
05223 `evaluator_fi` INT NOT NULL ,
05224 `group_fi` INT NOT NULL ,
05225 `TIMESTAMP` TIMESTAMP NOT NULL ,
05226 PRIMARY KEY ( `eval_users_id` ) ,
05227 INDEX ( `test_fi` , `evaluator_fi` , `group_fi` )
05228 ) COMMENT = 'Contains the groups someone has chosen for a statistical evaluation';
05229 <#364>
05230 ALTER TABLE `tst_eval_groups` CHANGE `eval_users_id` `eval_groups_id` int(11) NOT NULL DEFAULT NULL auto_increment;
05231
05232 <#365>
05233 DROP TABLE IF EXISTS `link_check`;
05234 CREATE TABLE `link_check` (
05235 `obj_id` int(11) NOT NULL default '0',
05236 `page_id` int(11) NOT NULL default '0',
05237 `url` varchar(255) NOT NULL default '',
05238 `parent_type` varchar(8) NOT NULL default '',
05239 `http_status_code` int(4) NOT NULL default '0',
05240 `last_check` int(11) NOT NULL default '0'
05241 ) TYPE=MyISAM;
05242 <#366>
05243 CREATE TABLE `survey_anonymous` (
05244 `anonymous_id` INT NOT NULL AUTO_INCREMENT ,
05245 `survey_key` VARCHAR( 32 ) NOT NULL ,
05246 `survey_fi` INT NOT NULL ,
05247 `TIMESTAMP` TIMESTAMP NOT NULL ,
05248 PRIMARY KEY ( `anonymous_id` ) ,
05249 INDEX ( `survey_key` , `survey_fi` )
05250 );
05251 <#367>
05252 ALTER TABLE `content_object` ADD `public_access_mode` ENUM( 'complete', 'selected' ) DEFAULT 'complete' NOT NULL;
05253 ALTER TABLE `lm_data` ADD `public_access` ENUM( 'y', 'n' ) DEFAULT 'n' NOT NULL AFTER `import_id`;
05254 ALTER TABLE `lm_data` ADD INDEX (`lm_id`);
05255 ALTER TABLE `lm_data` ADD INDEX (`type`);
05256 <#368>
05257 ALTER TABLE `survey_question` CHANGE `orientation` `orientation` ENUM( '0', '1', '2' ) DEFAULT '0';
05258 <#369>
05259 ALTER TABLE `survey_question` ADD `maxchars` INT DEFAULT '0' NOT NULL AFTER `orientation` ;
05260 <#370>
05261 ALTER TABLE content_object ADD public_html_file VARCHAR(50) DEFAULT '' NOT NULL;
05262 ALTER TABLE content_object ADD public_xml_file VARCHAR(50) DEFAULT '' NOT NULL;
05263 <#371>
05264 CREATE TABLE `survey_material` (
05265 `material_id` INT NOT NULL AUTO_INCREMENT ,
05266 `question_fi` INT NOT NULL ,
05267 `internal_link` VARCHAR( 50 ) ,
05268 `import_id` VARCHAR( 50 ) ,
05269 `TIMESTAMP` TIMESTAMP NOT NULL ,
05270 PRIMARY KEY ( `material_id` ) ,
05271 INDEX ( `question_fi` )
05272 );
05273 <#372>
05274 ALTER TABLE `survey_material` ADD `material_title` VARCHAR( 255 ) AFTER `import_id` ;
05275 <#373>
05276 ALTER TABLE content_object ADD COLUMN downloads_active ENUM('y','n') DEFAULT 'n';
05277 <#374>
05278 UPDATE object_data SET import_id='' WHERE import_id='Array';
05279 UPDATE lm_data SET import_id='' WHERE import_id='Array';
05280 <#375>
05281 CREATE TABLE `lm_menu` (
05282 `id` INT NOT NULL AUTO_INCREMENT ,
05283 `lm_id` INT NOT NULL ,
05284 `link_type` ENUM( 'extern', 'intern' ) ,
05285 `title` VARCHAR( 200 ) ,
05286 `target` VARCHAR( 200 ) ,
05287 `link_ref_id` INT,
05288 `active` ENUM( 'y', 'n' ) DEFAULT 'n' NOT NULL ,
05289 PRIMARY KEY ( `id` ) ,
05290 INDEX ( `link_type` ) ,
05291 INDEX ( `lm_id` ) ,
05292 INDEX ( `active` )
05293 );
05294 <#376>
05295 <?php
05296
05297
05298 $query = "ALTER TABLE rbac_ta CHANGE typ_id typ_id INT( 11 ) DEFAULT '0' NOT NULL ";
05299 $this->db->query($query);
05300
05301
05302 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
05303 "VALUES ('typ', 'assf', 'AssessmentFolder object', -1, now(), now())";
05304 $this->db->query($query);
05305
05306
05307
05308 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
05309 "VALUES ('assf', '__Test&Assessment', 'Test&Assessment Administration', -1, now(), now())";
05310 $this->db->query($query);
05311
05312 $query = "SELECT LAST_INSERT_ID() as id";
05313 $res = $this->db->query($query);
05314 $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
05315
05316
05317 $query = "INSERT INTO object_reference (obj_id) VALUES('".$row->id."')";
05318 $res = $this->db->query($query);
05319
05320 $query = "SELECT LAST_INSERT_ID() as id";
05321 $res = $this->db->query($query);
05322 $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
05323
05324
05325 $tree = new ilTree(ROOT_FOLDER_ID);
05326 $tree->insertNode($row->id,SYSTEM_FOLDER_ID);
05327
05328
05329 $query = "INSERT INTO settings (keyword,value) VALUES('sys_assessment_folder_id','".$row->id."')";
05330 $res = $this->db->query($query);
05331
05332
05333 $query = "SELECT obj_id FROM object_data WHERE type = 'typ' ".
05334 " AND title = 'assf'";
05335 $res = $this->db->query($query);
05336 $row = $res->fetchRow();
05337 $typ_id = $row[0];
05338
05339
05340
05341 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','1')";
05342 $this->db->query($query);
05343 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','2')";
05344 $this->db->query($query);
05345 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','3')";
05346 $this->db->query($query);
05347 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','4')";
05348 $this->db->query($query);
05349 ?>
05350 <#377>
05351 CREATE TABLE `ass_log` (
05352 `ass_log_id` INT NOT NULL AUTO_INCREMENT ,
05353 `user_fi` INT NOT NULL ,
05354 `obj_fi` INT NOT NULL ,
05355 `logtext` TEXT NOT NULL ,
05356 `question_fi` INT,
05357 `TIMESTAMP` TIMESTAMP NOT NULL ,
05358 PRIMARY KEY ( `ass_log_id` ) ,
05359 INDEX ( `user_fi` , `obj_fi` )
05360 ) COMMENT = 'Logging of Test&Assessment object changes';
05361 <#378>
05362 ALTER TABLE `ass_log` ADD `original_fi` INT AFTER `question_fi` ;
05363 <#379>
05364 INSERT INTO `qpl_question_type` ( `question_type_id` , `type_tag` ) VALUES ('8', 'qt_text') ;
05365 ALTER TABLE `qpl_questions` ADD `maxNrOfChars` INT DEFAULT '0' NOT NULL AFTER `params` ;
05366 ALTER TABLE `tst_solutions` CHANGE `value1` `value1` TEXT DEFAULT NULL ;
05367 <#380>
05368 <?php
05369 $ilCtrlStructureReader->getStructure();
05370 ?>
05371 <#381>
05372 ALTER TABLE `qpl_questions` CHANGE `maxNrOfChars` `maxNumOfChars` INT( 11 ) DEFAULT '0' NOT NULL;
05373
05374 <#382>
05375 <?php
05376
05377
05378 $query = "ALTER TABLE rbac_ta CHANGE typ_id typ_id INT( 11 ) DEFAULT '0' NOT NULL ";
05379 $this->db->query($query);
05380 ?>
05381 <#383>
05382 ALTER TABLE `survey_question` CHANGE `maxchars` `maxchars` INT( 11 );
05383 <#384>
05384 <?php
05385
05386 $q = "SELECT * FROM lm_tree WHERE child > 1";
05387 $tree_set = $this->db->query($q);
05388 while($tree_rec = $tree_set->fetchRow(DB_FETCHMODE_ASSOC))
05389 {
05390 $q2 = "UPDATE page_object SET parent_id='".$tree_rec["lm_id"]."' WHERE page_id='".$tree_rec["child"]."' AND parent_type='lm'";
05391 $this->db->query($q2);
05392 $q3 = "UPDATE lm_data SET lm_id='".$tree_rec["lm_id"]."' WHERE obj_id='".$tree_rec["child"]."' AND type='pg'";
05393 $this->db->query($q3);
05394 }
05395
05396 ?>
05397 <#385>
05398 <?php
05399 $ilCtrlStructureReader->getStructure();
05400 ?>
05401 <#386>
05402 DROP TABLE IF EXISTS `crs_objectives`;
05403 CREATE TABLE `crs_objectives` (
05404 `crs_id` int(11) NOT NULL default '0',
05405 `objective_id` int(11) NOT NULL auto_increment,
05406 `title` varchar(70) NOT NULL default '',
05407 `description` varchar(128) NOT NULL default '',
05408 `position` int(3) NOT NULL default '0',
05409 `created` int(11) NOT NULL default '0',
05410 PRIMARY KEY (`objective_id`),
05411 KEY `crs_id` (`crs_id`)
05412 ) TYPE=MyISAM;
05413
05414 DROP TABLE IF EXISTS `crs_objective_lm`;
05415 CREATE TABLE `crs_objective_lm` (
05416 `lm_ass_id` int(11) NOT NULL auto_increment,
05417 `objective_id` int(11) NOT NULL default '0',
05418 `ref_id` int(11) NOT NULL default '0',
05419 `obj_id` int(11) NOT NULL default '0',
05420 `type` char(6) NOT NULL default '',
05421 PRIMARY KEY (`lm_ass_id`)
05422 ) TYPE=MyISAM AUTO_INCREMENT=14 ;
05423
05424 <#387>
05425 DROP TABLE IF EXISTS `style_folder_styles`;
05426 CREATE TABLE `style_folder_styles` (
05427 `folder_id` int(11) NOT NULL default '0',
05428 `style_id` int(11) NOT NULL default '0',
05429 INDEX f_id (`folder_id`)
05430 ) TYPE=MyISAM;
05431
05432 <#388>
05433 <?php
05434
05435
05436 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
05437 "VALUES ('typ', 'styf', 'Style Folder', -1, now(), now())";
05438 $this->db->query($query);
05439
05440 $query = "SELECT LAST_INSERT_ID() as id";
05441 $res = $this->db->query($query);
05442 $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
05443
05444
05445 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$row->id."','1')";
05446 $this->db->query($query);
05447 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$row->id."','2')";
05448 $this->db->query($query);
05449 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$row->id."','3')";
05450 $this->db->query($query);
05451 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$row->id."','4')";
05452 $this->db->query($query);
05453
05454
05455
05456 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
05457 "VALUES ('styf', 'System Style Folder', 'System Style Templates', -1, now(), now())";
05458 $this->db->query($query);
05459
05460
05461 $query = "SELECT LAST_INSERT_ID() as id";
05462 $res = $this->db->query($query);
05463 $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
05464 $sty_folder_id = $row->id;
05465
05466
05467 $query = "INSERT INTO object_reference (obj_id) VALUES('".$row->id."')";
05468 $res = $this->db->query($query);
05469
05470 $query = "SELECT LAST_INSERT_ID() as id";
05471 $res = $this->db->query($query);
05472 $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
05473
05474
05475 $tree = new ilTree(ROOT_FOLDER_ID);
05476 $tree->insertNode($row->id,SYSTEM_FOLDER_ID);
05477
05478 ?>
05479 <#389>
05480 DROP TABLE IF EXISTS `crs_objective_qst`;
05481 CREATE TABLE `crs_objective_qst` (
05482 `qst_ass_id` int(11) NOT NULL auto_increment,
05483 `objective_id` int(11) NOT NULL default '0',
05484 `ref_id` int(11) NOT NULL default '0',
05485 `obj_id` int(11) NOT NULL default '0',
05486 `question_id` int(11) NOT NULL default '0',
05487 PRIMARY KEY (`qst_ass_id`)
05488 ) TYPE=MyISAM;
05489
05490 <#390>
05491
05492 CREATE TABLE IF NOT EXISTS `crs_objective_tst` (
05493 `test_objective_id` int(11) NOT NULL auto_increment,
05494 `objective_id` int(11) NOT NULL default '0',
05495 `ref_id` int(11) NOT NULL default '0',
05496 `obj_id` int(11) NOT NULL default '0',
05497 `tst_status` tinyint(2) default NULL,
05498 `tst_limit` tinyint(3) default NULL,
05499 PRIMARY KEY (`test_objective_id`)
05500 ) TYPE=MyISAM;
05501 <#391>
05502 ALTER TABLE `crs_settings` ADD `abo` TINYINT( 2 ) DEFAULT '1';
05503 <#392>
05504 <?php
05505 $ilCtrlStructureReader->getStructure();
05506 ?>
05507 <#393>
05508 ALTER TABLE `crs_settings` ADD `objective_view` TINYINT( 2 ) DEFAULT '0';
05509 <#394>
05510 <?php
05511
05512 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
05513 "VALUES ('typ', 'icrs', 'iLinc course object', -1, now(), now())";
05514 $this->db->query($query);
05515
05516
05517 $query = "SELECT LAST_INSERT_ID()";
05518 $res = $this->db->query($query);
05519 $row = $res->fetchRow();
05520 $typ_id = $row[0];
05521
05522
05523
05524 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','1')";
05525 $this->db->query($query);
05526 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','2')";
05527 $this->db->query($query);
05528 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','3')";
05529 $this->db->query($query);
05530 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','4')";
05531 $this->db->query($query);
05532 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','6')";
05533 $this->db->query($query);
05534
05535
05536 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
05537 "VALUES ('typ', 'icla', 'iLinc class room object', -1, now(), now())";
05538 $this->db->query($query);
05539
05540
05541 $query = "SELECT LAST_INSERT_ID()";
05542 $res = $this->db->query($query);
05543 $row = $res->fetchRow();
05544 $typ_id = $row[0];
05545
05546
05547
05548 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','1')";
05549 $this->db->query($query);
05550 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','2')";
05551 $this->db->query($query);
05552 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','3')";
05553 $this->db->query($query);
05554 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','4')";
05555 $this->db->query($query);
05556 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','6')";
05557 $this->db->query($query);
05558 ?>
05559
05560 CREATE TABLE IF NOT EXISTS `ilinc_data` (
05561 `obj_id` INT(11) UNSIGNED NOT NULL,
05562 `type` CHAR(5) NOT NULL,
05563 `course_id` INT(11) UNSIGNED NOT NULL,
05564 `class_id` INT(11) UNSIGNED,
05565 `user_id` INT(11) UNSIGNED,
05566 INDEX (`obj_id`)
05567 ) TYPE=MyISAM;
05568
05569 ALTER TABLE `usr_data` ADD `ilinc_id` INT UNSIGNED;
05570
05571 <#395>
05572 <?php
05573 $ilCtrlStructureReader->getStructure();
05574 ?>
05575 <#396>
05576 CREATE TABLE IF NOT EXISTS `crs_objective_results` (
05577 `res_id` int(11) NOT NULL auto_increment,
05578 `usr_id` int(11) NOT NULL default '0',
05579 `question_id` int(11) NOT NULL default '0',
05580 `points` int(11) NOT NULL default '0',
05581 PRIMARY KEY (`res_id`)
05582 ) TYPE=MyISAM;
05583 <#397>
05584 CREATE TABLE IF NOT EXISTS `crs_lm_history` (
05585 `usr_id` int(11) NOT NULL default '0',
05586 `crs_ref_id` int(11) NOT NULL default '0',
05587 `lm_ref_id` int(11) NOT NULL default '0',
05588 `lm_page_id` int(11) NOT NULL default '0',
05589 `last_access` int(11) NOT NULL default '0',
05590 PRIMARY KEY (`usr_id`,`crs_ref_id`,`lm_ref_id`)
05591 ) TYPE=MyISAM;
05592 <#398>
05593 <#399>
05594 <?php
05595
05596 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
05597 "VALUES ('typ', 'crsg', 'Course grouping object', -1, now(), now())";
05598 $this->db->query($query);
05599
05600
05601 $query = "SELECT LAST_INSERT_ID()";
05602 $res = $this->db->query($query);
05603 $row = $res->fetchRow();
05604 $typ_id = $row[0];
05605
05606
05607
05608 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','1')";
05609 $this->db->query($query);
05610 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','2')";
05611 $this->db->query($query);
05612 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','3')";
05613 $this->db->query($query);
05614 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','4')";
05615 $this->db->query($query);
05616 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','6')";
05617 $this->db->query($query);
05618 ?>
05619 <#400>
05620 <?php
05621 $ilCtrlStructureReader->getStructure();
05622 ?>
05623 <#401>
05624 ALTER TABLE `tst_eval_groups` ADD INDEX ( `test_fi` );
05625 ALTER TABLE `tst_eval_groups` ADD INDEX ( `evaluator_fi` );
05626 ALTER TABLE `tst_eval_groups` ADD INDEX ( `group_fi` );
05627 ALTER TABLE `tst_eval_settings` ADD INDEX ( `user_fi` );
05628 ALTER TABLE `tst_eval_users` ADD INDEX ( `evaluator_fi` );
05629 ALTER TABLE `tst_eval_users` ADD INDEX ( `user_fi` );
05630 ALTER TABLE `tst_eval_users` ADD INDEX ( `test_fi` );
05631 ALTER TABLE `tst_mark` ADD INDEX ( `test_fi` );
05632 ALTER TABLE `tst_solutions` ADD INDEX ( `question_fi` );
05633 ALTER TABLE `tst_test_question` ADD INDEX ( `test_fi` );
05634 ALTER TABLE `tst_test_question` ADD INDEX ( `question_fi` );
05635 ALTER TABLE `tst_test_random` ADD INDEX ( `test_fi` );
05636 ALTER TABLE `tst_test_random` ADD INDEX ( `questionpool_fi` );
05637 ALTER TABLE `tst_test_random_question` ADD INDEX ( `test_fi` );
05638 ALTER TABLE `tst_test_random_question` ADD INDEX ( `user_fi` );
05639 ALTER TABLE `tst_test_random_question` ADD INDEX ( `question_fi` );
05640 ALTER TABLE `tst_tests` ADD INDEX ( `obj_fi` );
05641 ALTER TABLE `tst_tests` ADD INDEX ( `test_type_fi` );
05642 ALTER TABLE `tst_times` ADD INDEX ( `active_fi` );
05643 ALTER TABLE `survey_anonymous` ADD INDEX ( `survey_fi` );
05644 ALTER TABLE `survey_answer` ADD INDEX ( `survey_fi` );
05645 ALTER TABLE `survey_answer` ADD INDEX ( `question_fi` );
05646 ALTER TABLE `survey_answer` ADD INDEX ( `user_fi` );
05647 ALTER TABLE `survey_answer` ADD INDEX ( `anonymous_id` );
05648 ALTER TABLE `survey_category` ADD INDEX ( `owner_fi` );
05649 ALTER TABLE `survey_constraint` ADD INDEX ( `question_fi` );
05650 ALTER TABLE `survey_constraint` ADD INDEX ( `relation_fi` );
05651 ALTER TABLE `survey_finished` ADD INDEX ( `survey_fi` );
05652 ALTER TABLE `survey_finished` ADD INDEX ( `user_fi` );
05653 ALTER TABLE `survey_finished` ADD INDEX ( `anonymous_id` );
05654 ALTER TABLE `survey_invited_group` ADD INDEX ( `survey_fi` );
05655 ALTER TABLE `survey_invited_group` ADD INDEX ( `group_fi` );
05656 ALTER TABLE `survey_invited_user` ADD INDEX ( `survey_fi` );
05657 ALTER TABLE `survey_invited_user` ADD INDEX ( `user_fi` );
05658 ALTER TABLE `survey_phrase` ADD INDEX ( `owner_fi` );
05659 ALTER TABLE `survey_phrase_category` ADD INDEX ( `phrase_fi` );
05660 ALTER TABLE `survey_phrase_category` ADD INDEX ( `category_fi` );
05661 ALTER TABLE `survey_question` ADD INDEX ( `obj_fi` );
05662 ALTER TABLE `survey_question` ADD INDEX ( `owner_fi` );
05663 ALTER TABLE `survey_question_constraint` ADD INDEX ( `survey_fi` );
05664 ALTER TABLE `survey_question_constraint` ADD INDEX ( `question_fi` );
05665 ALTER TABLE `survey_question_constraint` ADD INDEX ( `constraint_fi` );
05666 ALTER TABLE `survey_questionblock` ADD INDEX ( `owner_fi` );
05667 ALTER TABLE `survey_questionblock_question` ADD INDEX ( `survey_fi` );
05668 ALTER TABLE `survey_questionblock_question` ADD INDEX ( `questionblock_fi` );
05669 ALTER TABLE `survey_questionblock_question` ADD INDEX ( `question_fi` );
05670 ALTER TABLE `survey_survey` ADD INDEX ( `obj_fi` );
05671 ALTER TABLE `survey_survey_question` ADD INDEX ( `survey_fi` );
05672 ALTER TABLE `survey_survey_question` ADD INDEX ( `question_fi` );
05673 ALTER TABLE `survey_variable` ADD INDEX ( `category_fi` );
05674 ALTER TABLE `survey_variable` ADD INDEX ( `question_fi` );
05675 <#402>
05676 CREATE TABLE IF NOT EXISTS `crs_groupings` (
05677 `crs_grp_id` int(11) NOT NULL default '0',
05678 `crs_id` int(11) NOT NULL default '0',
05679 `unique_field` char(32) NOT NULL default '',
05680 PRIMARY KEY (`crs_grp_id`),
05681 KEY `crs_id` (`crs_id`)
05682 ) TYPE=MyISAM;
05683 <#403>
05684 <?php
05685 $ilCtrlStructureReader->getStructure();
05686 ?>
05687 <#404>
05688 <?php
05689 $ilCtrlStructureReader->getStructure();
05690 ?>
05691 <#405>
05692 CREATE TABLE IF NOT EXISTS `crs_start` (
05693 `crs_start_id` int(11) NOT NULL auto_increment,
05694 `crs_id` int(11) NOT NULL default '0',
05695 `item_ref_id` int(11) NOT NULL default '0',
05696 PRIMARY KEY (`crs_start_id`),
05697 KEY `crs_id` (`crs_id`)
05698 ) TYPE=MyISAM AUTO_INCREMENT=1;
05699 <#406>
05700 <?php
05701
05702 $query = "UPDATE object_data SET title='stys', description='Style Settings'".
05703 " WHERE title='styf' AND type='typ'";
05704 $this->db->query($query);
05705
05706
05707 $query = "UPDATE object_data SET type='stys', title = 'System Style Settings',".
05708 " description = 'Manage system skin and style settings here' ".
05709 " WHERE type='styf' ";
05710 $this->db->query($query);
05711 ?>
05712 <#407>
05713 DROP TABLE IF EXISTS `settings_deactivated_styles`;
05714 CREATE TABLE `settings_deactivated_styles` (
05715 `skin` VARCHAR(100) NOT NULL,
05716 `style` VARCHAR(100) NOT NULL,
05717 PRIMARY KEY (`skin`,`style`)
05718 ) TYPE=MyISAM;
05719 <#408>
05720 <?php
05721
05722 $query = "INSERT INTO settings (keyword, value) VALUES ('default_repository_view','flat')";
05723 $this->db->query($query);
05724 ?>
05725 <#409>
05726 <?php
05727
05728 $query = "SELECT * FROM object_data WHERE type = 'typ' AND title = 'usrf'";
05729 $res = $this->db->query($query);
05730 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
05731 {
05732 $type_id = $row->obj_id;
05733 }
05734
05735
05736 $query = "INSERT INTO rbac_operations ".
05737 "SET operation = 'push_desktop_items', description = 'Allow pushing desktop items'";
05738
05739 $this->db->query($query);
05740
05741 $query = "SELECT LAST_INSERT_ID() as ops_id FROM rbac_operations ";
05742 $res = $this->db->getRow($query);
05743 $ops_id = $res->ops_id;
05744
05745
05746 $query = "INSERT INTO rbac_ta SET typ_id = '".$type_id."', ops_id = '".$ops_id."'";
05747 $this->db->query($query);
05748 ?>
05749 <#410>
05750 <?php
05751 $query = "SELECT * FROM object_data ".
05752 "WHERE type = 'typ' AND title = 'crsg'";
05753
05754 $res = $this->db->getRow($query);
05755 $ops_id = $res->obj_id;
05756
05757 $query = "DELETE FROM rbac_ta WHERE typ_id = '".$ops_id."'";
05758 $this->db->query($query);
05759 ?>
05760 <#411>
05761 <?php
05762 $ilCtrlStructureReader->getStructure();
05763 ?>
05764 <#412>
05765 CREATE TABLE IF NOT EXISTS `role_desktop_items` (
05766 `role_item_id` int(11) NOT NULL auto_increment,
05767 `role_id` int(11) NOT NULL default '0',
05768 `item_id` int(11) NOT NULL default '0',
05769 `item_type` char(16) NOT NULL default '',
05770 KEY `role_item_id` (`role_item_id`,`role_id`)
05771 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
05772
05773 <#413>
05774 <?php
05775 $ilDB->query("DELETE FROM conditions WHERE operator = 'not_member'");
05776 $ilDB->query('DELETE FROM crs_groupings');
05777 ?>
05778
05779 <#414>
05780 ALTER TABLE `crs_groupings` ADD `crs_ref_id` INT( 11 ) NOT NULL AFTER `crs_grp_id` ;
05781
05782
05783 <#415>
05784 ALTER TABLE media_item ADD COLUMN tried_thumb ENUM('y','n') DEFAULT 'n';
05785
05786 <#416>
05787 <?php
05788
05789 $query = "INSERT INTO object_data (type, title, description, owner, create_date, last_update) ".
05790 "VALUES ('typ', 'webr', 'Link resource object', -1, now(), now())";
05791 $this->db->query($query);
05792
05793
05794 $query = "SELECT LAST_INSERT_ID()";
05795 $res = $this->db->query($query);
05796 $row = $res->fetchRow();
05797 $typ_id = $row[0];
05798
05799
05800
05801
05802 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','1')";
05803 $this->db->query($query);
05804 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','2')";
05805 $this->db->query($query);
05806 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','3')";
05807 $this->db->query($query);
05808 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','4')";
05809 $this->db->query($query);
05810 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','6')";
05811 $this->db->query($query);
05812 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','7')";
05813 $this->db->query($query);
05814 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','8')";
05815 $this->db->query($query);
05816
05817
05818 $query = "INSERT INTO rbac_operations ".
05819 "SET operation = 'create_webr', description = 'create web resource'";
05820 $this->db->query($query);
05821
05822
05823 $query = "SELECT LAST_INSERT_ID()";
05824 $res = $this->db->query($query);
05825 $row = $res->fetchRow();
05826 $ops_id = $row[0];
05827
05828
05829
05830 $query = "SELECT obj_id FROM object_data WHERE type='typ' and title='cat'";
05831 $res = $this->db->query($query);
05832 $row = $res->fetchRow();
05833 $typ_id = $row[0];
05834
05835 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','".$ops_id."')";
05836 $this->db->query($query);
05837
05838 $query = "SELECT obj_id FROM object_data WHERE type='typ' and title='crs'";
05839 $res = $this->db->query($query);
05840 $row = $res->fetchRow();
05841 $typ_id = $row[0];
05842
05843 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','".$ops_id."')";
05844 $this->db->query($query);
05845
05846 $query = "SELECT obj_id FROM object_data WHERE type='typ' and title='grp'";
05847 $res = $this->db->query($query);
05848 $row = $res->fetchRow();
05849 $typ_id = $row[0];
05850
05851 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','".$ops_id."')";
05852 $this->db->query($query);
05853
05854 $query = "SELECT obj_id FROM object_data WHERE type='typ' and title='fold'";
05855 $res = $this->db->query($query);
05856 $row = $res->fetchRow();
05857 $typ_id = $row[0];
05858
05859 $query = "INSERT INTO rbac_ta (typ_id, ops_id) VALUES ('".$typ_id."','".$ops_id."')";
05860 $this->db->query($query);
05861 ?>
05862 <#417>
05863 CREATE TABLE `webr_items` (
05864 `link_id` int(11) NOT NULL auto_increment,
05865 `webr_id` int(11) NOT NULL default '0',
05866 `title` varchar(127) default NULL,
05867 `target` text,
05868 `active` tinyint(1) default NULL,
05869 `disable_check` tinyint(1) default NULL,
05870 `create_date` int(11) NOT NULL default '0',
05871 `last_update` int(11) NOT NULL default '0',
05872 `last_check` int(11) default NULL,
05873 `valid` tinyint(1) NOT NULL default '0',
05874 KEY `link_id` (`link_id`,`webr_id`)
05875 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
05876
05877 <#418>
05878 ALTER TABLE benchmark MODIFY module VARCHAR(150);
05879 ALTER TABLE benchmark MODIFY benchmark VARCHAR(150);