Updating the Lab Safety quiz
From ITS Wiki
At the beginning of every fall and spring term we need to update the Lab Safety quiz database. The database on a Postgresql DB on the server IO. The web administrative interface can be found at the following URL: Lab safety. The path to the application files on IO is\\io\centre\web\academic\labsafety\
Contents |
Updating for Fall term
During the fall term we reset the system by droping the Students, Courses, Results related tables, and then adding the new student and course data provided by a .csv file from Jenzabar.
Removing previous year data
- Use remote desktop to connect to the server IO.
- Run the program pgAdmin III
- Double click on "PostgreSQL Database Server 8.0 (localhost:5432) in the lefthand list.
- Entre the password for the postgres account.
- This password can be found in out password vault under IO - PostgreSQL, DB Admin Account.
- Click on the lab_safety database.
- Click SQL from the top tool bar, this will give you a box to enter SQL commands.
- To drop previous year's student results enter:
delete from student_results_rec where id > 0;and click the run button at the top. You will see the results in the bottom box. - To drop previous year's courses enter"
delete from courses where courses_seq > 0;and click the run button at the top. - To drop previous year's students enter:
delete from student where stu_seq > 0;and click the run button at the top.
Adding new year data
After receiving the new student and course files from Jenzabar, use PFE or other program to resave them changing their type from Unix to MS. If you do not do this the files will not import properly because of the differnt styles of line breaks. You shoud move the files to the root of the IO's C: drive.
- Open the SQL editor by clicking on SQL in the top tool bar.
- To add the new courses:
copy courses from 'c:/\courses_filename' with delimiter '|'; - To add the new students:
copy student from 'c:/\students_filename' with delimiter '|'; - Delete source files from the root of the C: drive.
Updating for Spring term
During the spring term you only need to drop and re-add the students and courses because students that have taken the test the previous will not have to take it again.
Removing fall data
- Use remote desktop to connect to the server IO.
- Run the program pgAdmin III
- Double click on "PostgreSQL Database Server 8.0 (localhost:5432) in the lefthand list.
- Entre the password for the postgres account.
- This password can be found in out password vault under IO - PostgreSQL, DB Admin Account.
- Click on the lab_safety database.
- Click SQL from the top tool bar, this will give you a box to enter SQL commands.
- To drop previous term students enter:
delete from student where stu_seq > 0;and click the run button at the top. - To drop previous term courses enter:
delete from courses where courses_seq > 0;and click the run button at the top.
Adding spring data
After receiving the new student and course files from Jenzabar, use PFE or other program to resave them changing their type from Unix to MS. If you do not do this the files will not import properly because of the differnt styles of line breaks. You shoud move the files to the root of the IO's C: drive.
- Open the SQL editor by clicking on SQL in the top tool bar.
- To add the new courses:
copy courses from 'c:/\courses_filename' with delimiter '|';. - To add the new students:
copy student from 'c:/\students_filename' with delimiter '|';. - Delete source files from the root of the C: drive.
Updating Students because of Add/Drop
At the beginning of every term we add the proper information to the system and after a few days we have to reload the student info bacause of add drop. After receiving the new student file from Jenzabar, use PFE or other program to resave them changing their type from Unix to MS. If you do not do this the files will not import properly because of the differnt styles of line breaks. You shoud move the files to the root of the IO's C: drive.
- To drop outdated students records enter:
delete from student where stu_seq > 0;and click the run button at the top. - To add the new students:
copy student from 'c:/\students_filename' with delimiter '|';. - Delete source files from the root of the C: drive.

