New field on course_modules called "indent" ... this is an integer

that tells us how far to indent the activity when it is displayed.

This gives us some more flexibility on the course outline to
arrange things as we might like them, into subtopics etc

Backup/restore is updated as well.

There is also a bit more robustness in course/mod.php
This commit is contained in:
moodler 2003-09-14 16:31:33 +00:00
parent 2b9f062552
commit aac94fd0cc
9 changed files with 91 additions and 25 deletions

View file

@ -501,6 +501,10 @@ function main_upgrade($oldversion=0) {
execute_sql(" INSERT INTO {$CFG->prefix}log_display (module, action, mtable, field) VALUES ('course', 'user report', 'user', 'CONCAT(firstname,\" \",lastname)') ");
}
if ($oldversion < 2003091400) {
table_column("course_modules", "", "indent", "integer", "5", "unsigned", "0", "", "score");
}
return $result;
}

View file

@ -104,6 +104,7 @@ CREATE TABLE `prefix_course_modules` (
`added` int(10) unsigned NOT NULL default '0',
`deleted` tinyint(1) unsigned NOT NULL default '0',
`score` tinyint(4) NOT NULL default '0',
`indent` int(5) unsigned NOT NULL default '0',
`visible` tinyint(1) NOT NULL default '1',
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)

View file

@ -250,6 +250,11 @@ function main_upgrade($oldversion=0) {
table_column("course", "", "showrecent", "integer", "10", "unsigned", "1", "", "numsections");
}
if ($oldversion < 2003091400) {
table_column("course_modules", "", "indent", "integer", "5", "unsigned", "0", "", "score");
}
return $result;
}
?>

View file

@ -62,6 +62,7 @@ CREATE TABLE prefix_course_modules (
added integer NOT NULL default '0',
deleted integer NOT NULL default '0',
score integer NOT NULL default '0',
indent integer NOT NULL default '0',
visible integer NOT NULL default '1'
);