Install 1.3.1 event module / calendar

Install 1.3.1 event module / calendar

by Scott McGill -
Number of replies: 3
Hi,

We have a problem.. During the upgrade there were some warning relating to the event module. On closer inspection of the new version the event folder does not exist in 1.3.1. This is no doubt the cause of the errors. Errors relate to line 602 in /course/lib.php unable to include /mod/event/lib.php. Other errors come up in the recent activity list.

So I copied the event folder from the old install to the new. good o all seems to work. No more errors under the Recent activity area.

But the problem now is that the calendar will not accept entries. It seems to be working nicely (no errors) but any entry we add does not appear on the calendar.

I'm happy to either

a. Go back and reinstall. (I have a backup of the SQL stuff)
b. Apply a solution to get calendar working?

any ideas?

We're running it on Apache on OSX Server.

cheers,

Scott
Average of ratings: -
In reply to Scott McGill

Re: Install 1.3.1 event module / calendar

by Gustav W Delius -

The event module was always only a development version. The calendar in the release has been realized differently. So if you had been testing the event module then you should now delete the event module from (Administration -> Modules) and then delete the event folder.

Finally the problem is that the new event table of Moodle 1.3 has a different structure from that in the event module. The new one is created with:

CREATE TABLE `prefix_event` (
                              `id` int(10) unsigned NOT NULL auto_increment,
                              `name` varchar(255) NOT NULL default '',
                              `description` text NOT NULL,
                              `courseid` int(10) unsigned NOT NULL default '0',
                              `groupid` int(10) unsigned NOT NULL default '0',
                              `userid` int(10) unsigned NOT NULL default '0',
                              `modulename` varchar(20) NOT NULL default '',
                              `instance` int(10) unsigned NOT NULL default '0',
                              `eventtype` varchar(20) NOT NULL default '',
                              `timestart` int(10) unsigned NOT NULL default '0',
                              `timeduration` int(10) unsigned NOT NULL default '0',
                              `timemodified` int(10) unsigned NOT NULL default '0',
                              PRIMARY KEY  (`id`),
                              UNIQUE KEY `id` (`id`),
                              KEY `courseid` (`courseid`),
                              KEY `userid` (`userid`)
                            ) TYPE=MyISAM COMMENT='For everything with a time associated to it';

If you don't need your old event then you can just drop the old table and execute the above SQL command to create the new one and everything will work. If however you want to keep your old events then you should only add the additional fields and rename old fields where necessary. I have never tried this, please let us know if you are successful.

In reply to Gustav W Delius

Re: Install 1.3.1 event module / calendar

by Scott McGill -
Thanks Gustav,

I read your response with enthusiasm. It all made perfect sense. I removed the event module as you suggested and ran the create table command.

Executed successfully according to mySql.

Unfortunately it has made no difference. Would you suggest I go back to the old sql database and start again?

Cheers,

Scott
In reply to Scott McGill

Re: Install 1.3.1 event module / calendar

by Scott McGill -
Ok we're right now.

We had to manually remove the sql table for mdl_event and remove the table out of modules for the old event module.

Removing from within moodle didn't seem to work but doing it manually in the sql worked.

thanks very much for your assistance. I've learned a lot about SQL in the last few days.

Scott