Global Database Oddities Orphans and Reconciliations Rob Phillips
Global Database Oddities: Orphans and Reconciliations • Rob Phillips – Teaching and Learning Centre, Murdoch University • Mark Hallam – Web. Ci. Te • James Strong – Net. Spot
Overview • Background • Common problems • Internal structure of Web. CT ‘databases’ • How to fix problems
Background • Web. CT initially developed by Murray Goldberg – for his Computer Science classes – code base developed by students • 1996 – beta versions available • Widely adopted – rich function set – low cost – responsive development team
Architecture • Web. CT V 1 was built around the idea of a single course – student database for that course • Separate user accounts for each course • Hard to manage • Strong demand for a common login facility
Global Database • Version 2. 0 • Global database linked to each of the course databases • Built on to the existing Web. CT courseoriented architecture • Preferable to build such a system from scratch – not possible in the required time frame
Problems • Ad-hoc and patched-together implementation sometimes leads to access problems • This presentation – identifies common problems – explains their origin – describes how to resolve them
Common Symptoms • Orphans – a break of some sort in the linkage between the ‘parent’ global database and the ‘child’ course database
Example
Web. CT Databases • Web. CT is mostly built around directories and files • Most ‘databases’ are simply text files • Some data is stored in the Berkeley DBM – primitive, non-relational database system – used in global database and some aspects of the course database
File and Directory Structure user Web. CT webct server generic courses Coursesuser files homearea admin Courses. Web. CT files database scripts globaldb stud_mgmt thumbprint userdata pass lots of other directories
Example • • Simple Web. CT installation, Courses: ‘course 1’, ‘course 2’, etc. Students: ‘student 1’, ‘student 2’, etc. Designers: ‘designer 1’, ‘designer 2’, etc.
Global Database webct Global ID generic Course list admin (, student 1, First, Surname, , course 1: course 2: course 3 , 421824518, S: S: S, , , ) database (, designer 1, First, Surname, , course 1: course 2: course 3, 421824518, D: D: D, , , ) globaldb Thumbprint Roles in courses
Global Passwords • Encrypted passwords stored in a file called ‘dbm_pass’ • in /webct/generic/homearea
Course Database • Traces of the user exist in four areas inside each course's database directory
The stud_mgmt directory webct • mapping_login. txt • mapping_user. txt • Linking global and course data • Files of pairs of values courses Courses. Web. CT files database stud_mgmt thumbprint userdata pass
mapping_login. txt • Global database records on the left • Course database records on the right student 1: student 1 student 2: student 2 designer 1: course 1 designer 2: course 1 Multiple student entries Multiple course entries
mapping_user. txt • Course database entries on the left • Global database entries on the right student 1: student 1 student 2: student 2 course 1: designer 1: : : designer 2 Course entry Primary designer Multiple student entries Secondary designer delimiter
The thumbprint directory • thumbprint file for every userdata directory • 9 -digit number courses Global DB (, student 1, First, Surname, , course 1: course 2: course 3, 421824518, S: S: S, , , ) Thumbprint file 421824518 Thumbprint stud_mgmt thumbprint Courses. Web. CT files database userdata pass webct
The userdata directory • Bulletin and mail messages, calendar entries, quiz submissions, etc. • One subdirectory for each student • Dummy file called ‘deny_access’ in student directory • If present: webct courses Courses. Web. CT files – Students are denied access – Greyed out database stud_mgmt thumbprint userdata pass
The pass directory • Passwords and Groups • ‘dbm_pass’ and ‘dbm_group’ • dbm files which authenticate users in a course • dbm_group contains a list of users and their role in the course – student 1: student – designer 1: designer stud_mgmt webct courses Courses. Web. CT files database thumbprint userdata pass
Fixing Common Problems • Orphan Students • Disconnected students • Mark to demo
Custom scripts • reconnect_orphan. pl GLOBAL_ID COURSE_ID – add the course to the user's global database record – link the course record with the global database record – enable access for the student for the course • reconnect_orphan_in_course. pl – acts on all students in a course.
Code Fragment $access = &dbm_determine_student_access($course, $login_id); if ($access == 2) { $result = &user_add_course_to_course_list_from_designer_special ($login_id, $course, 0); } else { $result = &user_add_course_to_course_list_from_homearea($login_id, $course); } &dbm_allow_student_access($course, $login_id);
Summary • This presentation has: – identified common problems with Web. CT – explained their origin in the Web. CT architecture – described how to resolve them • We hope you don’t need this information!
Questions? ? Rob Phillips Teaching and Learning Centre, Murdoch University Mark Hallam Web. Ci. Te James Strong Net. Spot
- Slides: 25