Permalink
Browse files

New columns and tables.

  • Loading branch information...
les_kopari
les_kopari committed Jan 17, 2004
1 parent 88ba0fe commit 68cd6454aa81e7298146e166526a4094305fbfb1
Showing with 71 additions and 21 deletions.
  1. +71 −21 lib/db/schema.php
View
@@ -36,9 +36,9 @@
$rs = $db->Execute('drop table course');
$rs = $db->Execute('drop sequence SEQ_course');
$result = $schema->ExecuteSchema( $sql );
-$sql = "insert into course values (2,2,2,'2','2','2','2','2',2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2)";
+$sql = "insert into course values (2,2,2,'2','2','2','2','2',2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2)";
$rs = $db->Execute($sql);
-$sql = "insert into course values (3,3,3,'3','3','3','3','3',3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3)";
+$sql = "insert into course values (3,3,3,'3','3','3','3','3',3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3)";
$rs = $db->Execute($sql);
$rs = $db->Execute('select * from course');
rs2html($rs,'border=2 cellpadding=3',array('id','category','sortorder','password','fullname','shortname','summary','format','showgrades','modinfo','newsitems','teacher','teachers','student','students','guest','startdate','numsections','showrecent','marker','maxbytes','showreports','visible','timecreated','timemodified'));
@@ -75,12 +75,12 @@
$schema = new adoSchema($db);
$sql = $schema->ParseSchema("schemaCourse_modules.xml");
$result = $schema->ExecuteSchema( $sql );
-$sql = "insert into Course_modules values (2,2,2,2,2,2,2,2,2,2)";
+$sql = "insert into Course_modules values (2,2,2,2,2,2,2,2,2,2,2)";
$rs = $db->Execute($sql);
-$sql = "insert into Course_modules values (3,3,3,3,3,3,3,3,3,3)";
+$sql = "insert into Course_modules values (3,3,3,3,3,3,3,3,3,3,3)";
$rs = $db->Execute($sql);
$rs = $db->Execute('select * from Course_modules');
-rs2html($rs,'border=2 cellpadding=3',array('id','course','module','instance','section','added','deleted','score','indent','visible'));
+rs2html($rs,'border=2 cellpadding=3',array('id','course','module','instance','section','added','deleted','score','indent','visible','groupmode'));
echo "<h3>schemaCourse_sections.xml</h3>";
$rs = $db->Execute('drop table course_sections');
@@ -95,30 +95,43 @@
$rs = $db->Execute('select * from Course_sections');
rs2html($rs,'border=2 cellpadding=3',array('id','course','section','summary','sequence','visible'));
-echo "<h3>schemaCourse_groups.xml</h3>";
-$rs = $db->Execute('drop table course_groups');
-$rs = $db->Execute('drop sequence SEQ_course_groups');
+echo "<h3>schemaEvent.xml</h3>";
+$rs = $db->Execute('drop table event');
+$rs = $db->Execute('drop sequence SEQ_event');
$schema = new adoSchema($db);
-$sql = $schema->ParseSchema("schemaCourse_groups.xml");
+$sql = $schema->ParseSchema("schemaevent.xml");
$result = $schema->ExecuteSchema( $sql );
-$sql = "insert into Course_groups values (2,2,2,2,2,2,2,2)";
+$sql = "insert into event values (2,2,2,2,2,2,2,2,2,2,2,2)";
$rs = $db->Execute($sql);
-$sql = "insert into Course_groups values (3,3,3,3,3,3,3,3)";
+$sql = "insert into event values (3,3,3,3,3,3,3,3,3,3,3,3)";
$rs = $db->Execute($sql);
-$rs = $db->Execute('select * from Course_groups');
+$rs = $db->Execute('select * from event');
+rs2html($rs,'border=2 cellpadding=3',array('id','name','description','courseid','groupid','userid','modulename','instance','eventtype','timestart','timeduration','timemodified'));
+
+echo "<h3>schemaGroups.xml</h3>";
+$rs = $db->Execute('drop table Groups');
+$rs = $db->Execute('drop sequence SEQ_Groups');
+$schema = new adoSchema($db);
+$sql = $schema->ParseSchema("schemaGroups.xml");
+$result = $schema->ExecuteSchema( $sql );
+$sql = "insert into Groups values (2,2,2,2,2,2,2,2)";
+$rs = $db->Execute($sql);
+$sql = "insert into Groups values (3,3,3,3,3,3,3,3)";
+$rs = $db->Execute($sql);
+$rs = $db->Execute('select * from Groups');
rs2html($rs,'border=2 cellpadding=3',array('id','courseid','name','description','lang','picture','timecreated','timemodified'));
-echo "<h3>schemaCourse_groups_members.xml</h3>";
-$rs = $db->Execute('drop table course_groups_members');
-$rs = $db->Execute('drop sequence SEQ_course_groups_members');
+echo "<h3>schemaGroups_members.xml</h3>";
+$rs = $db->Execute('drop table Groups_members');
+$rs = $db->Execute('drop sequence SEQ_Groups_members');
$schema = new adoSchema($db);
-$sql = $schema->ParseSchema("schemaCourse_groups_members.xml");
+$sql = $schema->ParseSchema("schemaGroups_members.xml");
$result = $schema->ExecuteSchema( $sql );
-$sql = "insert into Course_groups_members values (2,2,2,2)";
+$sql = "insert into Groups_members values (2,2,2,2)";
$rs = $db->Execute($sql);
-$sql = "insert into Course_groups_members values (3,3,3,3)";
+$sql = "insert into Groups_members values (3,3,3,3)";
$rs = $db->Execute($sql);
-$rs = $db->Execute('select * from Course_groups_members');
+$rs = $db->Execute('select * from Groups_members');
rs2html($rs,'border=2 cellpadding=3',array('id','courseid','name','description','lang','picture','timecreated','timemodified'));
echo "<h3>schemaLog.xml</h3>";
@@ -187,19 +200,56 @@
$rs = $db->Execute('select * from m_user');
rs2html($rs,'border=2 cellpadding=3',array('id','confirmed','deleted','m_username','password','idnumber','firstname','lastname','email','icq','phone1','phone2','institution','department','address','city','country','lang','timezone','firstaccess','lastaccess','lastlogin','currentlogin','lastIP','secret','picture','url','description','mailformat','maildisplay','htmleditor','autosubscribe','timemodified'));
-
echo "<h3>schemaUser_admins.xml</h3>";
$rs = $db->Execute('drop table user_admins');
$rs = $db->Execute('drop sequence SEQ_user_admins');
$schema = new adoSchema($db);
$sql = $schema->ParseSchema("schemaUser_admins.xml");
$result = $schema->ExecuteSchema( $sql );
$sql = "insert into user_admins values (2,2)";
-
$rs = $db->Execute($sql);
$sql = "insert into user_admins values (3,3)";
$rs = $db->Execute($sql);
$rs = $db->Execute('select * from user_admins');
rs2html($rs,'border=2 cellpadding=3',array('id','userid'));
+echo "<h3>schemaUser_students.xml</h3>";
+$rs = $db->Execute('drop table user_students');
+$rs = $db->Execute('drop sequence SEQ_user_students');
+$schema = new adoSchema($db);
+$sql = $schema->ParseSchema("schemaUser_students.xml");
+$result = $schema->ExecuteSchema( $sql );
+$sql = "insert into user_students values (2,2,2,2,2,2,2)";
+$rs = $db->Execute($sql);
+$sql = "insert into user_students values (3,3,3,3,3,3,3)";
+$rs = $db->Execute($sql);
+$rs = $db->Execute('select * from user_students');
+rs2html($rs,'border=2 cellpadding=3',array('id','userid','course','timestart','timeend','time','timeaccess'));
+
+echo "<h3>schemaUser_teachers.xml</h3>";
+$rs = $db->Execute('drop table user_teachers');
+$rs = $db->Execute('drop sequence SEQ_user_teachers');
+$schema = new adoSchema($db);
+$sql = $schema->ParseSchema("schemaUser_teachers.xml");
+$result = $schema->ExecuteSchema( $sql );
+$sql = "insert into user_teachers values (2,2,2,2,2,2,2,2)";
+$rs = $db->Execute($sql);
+$sql = "insert into user_teachers values (3,3,3,3,3,3,3,3)";
+$rs = $db->Execute($sql);
+$rs = $db->Execute('select * from user_teachers');
+rs2html($rs,'border=2 cellpadding=3',array('id','userid','course','authority','role','editall','timemodified','timeaccess'));
+
+echo "<h3>schemaUser_coursecreators.xml</h3>";
+$rs = $db->Execute('drop table user_coursecreators');
+$rs = $db->Execute('drop sequence SEQ_user_coursecreators');
+$schema = new adoSchema($db);
+$sql = $schema->ParseSchema("schemaUser_coursecreators.xml");
+$result = $schema->ExecuteSchema( $sql );
+$sql = "insert into user_coursecreators values (2,2)";
+$rs = $db->Execute($sql);
+$sql = "insert into user_coursecreators values (3,3)";
+$rs = $db->Execute($sql);
+$rs = $db->Execute('select * from user_coursecreators');
+rs2html($rs,'border=2 cellpadding=3',array('id','userid'));
+
?>

0 comments on commit 68cd645

Please sign in to comment.