Changes to allow much better control over what "teachers" are called

in a course.  Firstly, the course settings page now allows the teachers
to specify the word they want to use in place of "teachers" and "students"
as well as "teacher" and "student".  Secondly, a new teacher admin tool
allows any teacher to modify the order and displayed role of teachers
in that course.  This affects the display on the course listings, the
participants page and so on.
This commit is contained in:
martin 2002-09-08 03:24:38 +00:00
parent 774ab66002
commit b4d7002e66
11 changed files with 65 additions and 21 deletions

View file

@ -37,7 +37,9 @@ CREATE TABLE `course` (
`format` enum('weeks','social','topics') NOT NULL default 'weeks',
`newsitems` smallint(5) unsigned NOT NULL default '1',
`teacher` varchar(100) NOT NULL default 'Teacher',
`teachers` varchar(100) NOT NULL default 'Teachers',
`student` varchar(100) NOT NULL default 'Student',
`students` varchar(100) NOT NULL default 'Students',
`guest` tinyint(2) unsigned NOT NULL default '0',
`startdate` int(10) unsigned NOT NULL default '0',
`numsections` smallint(5) unsigned NOT NULL default '1',
@ -214,7 +216,8 @@ CREATE TABLE `user_teachers` (
`id` int(10) unsigned NOT NULL auto_increment,
`user` int(10) unsigned NOT NULL default '0',
`course` int(10) unsigned NOT NULL default '0',
`authority` tinyint(3) NOT NULL default '3',
`authority` int(10) NOT NULL default '3',
`role` varchar(40) NOT NULL default '',
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) TYPE=MyISAM COMMENT='One record per teacher per course';

View file

@ -1164,7 +1164,7 @@ function get_course_students($courseid, $sort="u.lastaccess DESC") {
}
function get_course_teachers($courseid, $sort="t.authority ASC") {
return get_records_sql("SELECT u.*,t.authority FROM user u, user_teachers t
return get_records_sql("SELECT u.*,t.authority,t.role FROM user u, user_teachers t
WHERE t.course = '$courseid' AND t.user = u.id
ORDER BY $sort");
}