mirror of
https://github.com/moodle/moodle.git
synced 2025-08-03 16:13:28 +02:00
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:
parent
774ab66002
commit
b4d7002e66
11 changed files with 65 additions and 21 deletions
|
@ -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';
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue