***NOTE NOTE NOTE **********************************************************

THIS IS A BIG CHANGE!

I've renamed the "reading" module to "resource".

This meant changing quite a few references throughout Moodle.

The automatic upgrade process should work OK (it worked OK on my
development server) and there shouldn't be any problems.

BUT PLEASE PROCEED WITH CAUTION AND KEEP BACKUPS OF EVERYTHING
UNTIL I HAVE A FEW MORE TESTS!   If you upgrade please let me know.

One thing that will break are any hard-coded links within forum messages.

What I will be doing to fix this on my apache server is to add this to
httpd.conf:

Redirect /mod/reading/ http://moodle.com/mod/resource/

Sorry about any inconvenience, but it's better this is done sooner than later.
This commit is contained in:
moodler 2002-10-17 14:03:59 +00:00
parent e1ac42728d
commit 2a439ba7f6
21 changed files with 680 additions and 26 deletions

View file

@ -77,6 +77,13 @@ function upgrade_moodle($oldversion=0) {
if ($oldversion < 2002101001) {
execute_sql(" ALTER TABLE `user` ADD `htmleditor` TINYINT(1) UNSIGNED DEFAULT '1' NOT NULL AFTER `maildisplay` ");
}
if ($oldversion < 2002101701) {
execute_sql(" ALTER TABLE `reading` RENAME `resource` "); // Small line with big consequences!
execute_sql(" DELETE FROM `log_display` WHERE module = 'reading'");
execute_sql(" INSERT INTO log_display VALUES ('resource', 'view', 'resource', 'name') ");
execute_sql(" UPDATE log SET module = 'resource' WHERE module = 'reading' ");
execute_sql(" UPDATE modules SET name = 'resource' WHERE name = 'reading' ");
}
return true;
}

View file

@ -1886,7 +1886,7 @@ function add_to_log($course, $module, $action, $url="", $info="") {
// any particular student has been doing.
//
// course = the course id
// module = forum, journal, reading, course, user etc
// module = forum, journal, resource, course, user etc
// action = view, edit, post (often but not always the same as the file.php)
// url = the file and parameters used to see the results of the action
// info = additional description information