This space is archived
For current information please use the current ExamSys documentation
Users Modules
As Entities
Modules themselves are not specific to any particular academic year, they in effect last forever. A record in the modules table holds information such as module code, title, school, etc.
Note: The modules_staff and modules_student linking tables join using the primary key ID of the modules table. Do not confuse this number with the module code which is sometimes referred to as ID (e.g. A11CLS).
Staff
Staff are placed on modules to form editing teams. The table modules_staff is used as a linking table between staff in the users table and module IDs in the modules table.
Useful Functions
Generic (userutils.class.php):
add_staff_to_module_by_modulecode | Add a member of staff onto a team by module code. |
clear_staff_modules_by_moduleID | Clear all users (staff) from a team. |
list_staff_modules_by_userID | Lists the teams a user ID is on (uses the user object for the curent users use this if we are not dealing with the logged in user) |
clear_staff_modules_by_userID | Clear a user (staff) from all teams. |
get_staff_modules_list_by_modID | Get a list of members of a team (using Module ID). |
get_staff_modules_list_by_name | Get a list of members of a team (using Module Code). |
Current user (userobject.class.php):
get_staff_modules | Get a list of modules the current member of staff is on. |
is_staff_user_on_module | Returns true or false if the current member of staff is on a module(s). |
get_staff_accessable_modules | Returns a list of modules the current member of staff can access. With Admin role this can be larger than the modules the current use is actually a member of. |
Students
Students are enrolled on particular modules in specific academic years. The table modules_student is used as a linking table between students in the users table and module IDs in the modules table. One difference to the staff modules (see above) is the inclusion of the calendar_year
field which holds which academic year the module pertains to.
Useful Functions
Generic (userutils.class.php):
add_student_to_module_by_name | Enrole a student on a module (by Module Code). |
add_student_to_module | Enrole a student on a module (by Module ID). |
clear_student_modules_by_userID | Clear a user (student) from all modules for that session and attempt. |
is_user_on_module_by_name | Test to see if a student is on a module by module code. |
is_user_on_module | Test to see if a student is on a module (by Module ID). |