foreach ($logs as $log) {
if ($ld = get_record_sql("SELECT * FROM log_display WHERE module='$log->module' AND action='$log->action'")) {
- $log->info = get_field($ld->table, $ld->field, "id", $log->info);
+ $log->info = get_field($ld->mtable, $ld->field, "id", $log->info);
}
echo "<TR>";
$count = 0;
$icon = "<IMG SRC=\"pix/i/course.gif\" HEIGHT=16 WIDTH=16 ALT=\"Course\">";
foreach ($courses as $course) {
- $moddata[]="<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->fullname</A>";
+ $moddata[]="<A TITLE=\"$course->shortname\" HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->fullname</A>";
$modicon[]=$icon;
if ($count++ >= $maxcount) {
break;
CREATE TABLE `log_display` (
`module` varchar(20) NOT NULL default '',
`action` varchar(20) NOT NULL default '',
- `table` varchar(20) NOT NULL default '',
+ `mtable` varchar(20) NOT NULL default '',
`field` varchar(40) NOT NULL default ''
-) TYPE=MyISAM COMMENT='For a particular module/action, specifies a table field.';
+) TYPE=MyISAM COMMENT='For a particular module/action, specifies a moodle table/field.';
# --------------------------------------------------------
#
`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` varchar(10) default NULL,
+ `authority` tinyint(3) NOT NULL default '3',
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) TYPE=MyISAM COMMENT='One record per teacher per course';
// If there's something it cannot do itself, it
// will tell you what you need to do.
-$version = 2002080200;
+$version = 2002080300;
function upgrade_moodle($oldversion=0) {
execute_sql(" ALTER TABLE `modules` DROP `search` ");
}
+ if ($oldversion < 2002080300) {
+ execute_sql(" ALTER TABLE `log_display` CHANGE `table` `mtable` VARCHAR( 20 ) NOT NULL ");
+ execute_sql(" ALTER TABLE `user_teachers` CHANGE `authority` `authority` TINYINT( 3 ) DEFAULT '3' NOT NULL ");
+ }
+
return true;
}