Subject: Re: CBT CMS database

GLG wrote:

Still looking for help with adding my own custom records to the CBT edition's Course Management System database. The docs say you can do it, but I can't find any specific function calls for creating a new record or reading/writing a custom record.

Do I need to be looking at the Paradox format database support dll?


I'm not quite sure what you are referring to by custom records. It is possible to add and remove fields from the tables to meet your specific needs. The ADMIN.HLP help file documents which fields are required by the CMS and which fields are optional in each of the tables. So, for example, if you wanted to add a field to the USER table that was the users student/employee identification number, you can do that. You would just:

open the admin.exe and go to author level
go to page 2
edit group-edit mode in group "DBFields" by double clicking in the data
entry fields
draw a new field and name it "studentID"
exit group edit mode and add a label for the new field.
do the same on page 3
then go to page 43
add studentID to the field name column
put an A in the field type column
make the size large enough to hold the student id #
save the book
exit the book
(if you want the users to see this field in student.exe you would have to add the field to the group in that book also.)

 -- to create a new database with the new record element:
edit asymcbt.ini file
delete the CMSDataDir entry from the [paths] section
run admin again and the tables will be rebuilt.
(wow - no scripting involved!!)

-- to add the field to an existing CMS database I would use Paradox for windows and just add the field. You could use DB exchange to import the current user table into a toolbook book, open the book and add a record field named "studentID", then use DB exchange to export the book back to paradox. (You would have to fix up the field sizes since DB exchange will just guess at size and types)

If you don't want to track addresses and phone numbers or don't want notes fields, you can remove those from the USER table also. To remove them:

open the admin.exe and go to author level
go to page 2
double click on the field you want to remove and delete it
do the same with the label

do the same on page 3
then go to page 43
delete the row from each column of the table there.
(The same comment on student also applies to removing fields)

To change the tables follow the steps above.

Changing the other tables is exactly the same, in general you just have to add/remove the UI access to the field and then add/remove the field from the table definition table at the end of admin.exe.

There are not any CMS API functions to just read & write records. The API deals with runtime operations only and since CMS doesn't add or delete records at runtime there are no API functions to do that. The functions to add and delete records are contained in the admin.exe book. The functions are broken down into task specific queries. For example there is a function to get all of the classes for a specific student and a function to assign a bunch of classes to a specific student.

All of the paradox dll functions you need to manipulate the database are linked by admin on startup and you can call them from any new scripts you add to the book. They are all aliased with the asym_ prefix like everything else in the CBT edition. There are helper functions in the book script for admin and in the ctb30r.sbk that you can use if you want with the warning that if they aren't documented in the help file they are subject to change in the next release.

I'm interested in what you have in mind here, let me (or us) know. The CMS was designed to be modifiable but I don't know how many people are/have tinkered with it.

Jeffery Ayars
Asymetrix Corporation

Revised 18/8/95
brianp@u.washington.edu (Brian Parkhurst)
University of Washington
Box 357260
Seattle, WA 98195-7260
206/543-9175