problem with calendar

problem with calendar

by Matias Harju -
Number of replies: 17
HI!
I have a problem with calendar..
I have upgraded my Moodle from version 1.2 to version 1.3 beta.
Everything vent great with upgrading..
The problem is: when I add a new event into calender
it won´t show in there.
Moodle tells no complainings during 'addnew' prosess..
but it does nothing..
The calender is still empty sad
What could be wrong?
Please help..

--Matias--
Average of ratings: Useful (1)
In reply to Matias Harju

Re: problem with calendar

by John Papaioannou -
Hi Matias,

Can you please be more specific:

  • what kind of event are you trying to add?
  • what user are you logged in when trying to add it?
  • do you have filters on, and if yes, what filters?
  • does this happen for all kinds of events or in a specific case?
  • what EXACTLY do we have to do to reproduce this?

Help us to help you! smile

Jon
In reply to John Papaioannou

Re: problem with calendar

by Matias Harju -
Thanks, here is some information.

I have tried to add any kind of event, none worked.
And i have used admin and normal user to add these events.
The calender is still blank sad
Could the be some problem with database? I am using MySQL.
Into what table should calender information be stored?

I have these filtters enabled:
* Glossary auto linking
* Algebra notation
* Multimedia plugins


Maybe these informations helped you..
Please ask if you need more.

--Matias--
In reply to Matias Harju

Re: problem with calendar

by John Papaioannou -
I think it's a problem with the database. You probably have a wrong schema for the table mdl_event. I don't know how comfortable you are with PHP and MySQL (phpMyAdmin helps here), but you should check the schema for the table.

The correct schema (with today's nightly version) is:

CREATE TABLE `mdl_event` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
`description` text NOT NULL,
`format` int(4) unsigned NOT NULL default '0',
`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',
`visible` tinyint(1) NOT NULL default '1',
`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 can, drop the table you have and create a new one with the above schema, and see if it works. If you don't feel comfortable or don't know how to do it, check back here.

Average of ratings: Useful (1)
In reply to John Papaioannou

Re: problem with calendar

by Steven Day -
Thanks Jon. This worked for me; I didn't create a new table but overwrote the existing one per your information above. Now Calendar works fairly well.

I must admit, however, not knowing how to do the changes from "PRIMARY KEY" to the end. Are these all under 'Index' or still with the other elements in the table?

I also have problems with the preferences; clicking on the prefs button on the calendar page brings me to the preferences.html page. Do I need to change the preferences.php file?

Also see courseevents, which is rather unsightly.

Also got the following errors:

  • Notice: Undefined variable: PHP_SELF in /home/stevend/public_html/moodle/mod/event/webcalendar/includes/functions.php on line 20

  • Notice: Undefined variable: db_persistent in /home/stevend/public_html/moodle/mod/event/webcalendar/includes/php-dbi.php on line 48

  • Notice: Undefined variable: session_not_found in /home/stevend/public_html/moodle/mod/event/webcalendar/includes/connect.php on line 53

  • Notice: Undefined variable: login in /home/stevend/public_html/moodle/mod/event/webcalendar/includes/connect.php on line 103

  • Notice: Undefined variable: LANGUAGE in /home/stevend/public_html/moodle/mod/event/webcalendar/includes/translate.php on line 10

  • Notice: Undefined variable: LANGUAGE in /home/stevend/public_html/moodle/mod/event/webcalendar/includes/translate.php on line 11

  • Notice: Undefined variable: LANGUAGE in /home/stevend/public_html/moodle/mod/event/webcalendar/includes/translate.php on line 11


Just uploaded the latest cvs.

Thanks for all the great work you've done on Calendar. Can't wait to show it off next week at a conference.
In reply to Steven Day

Re: problem with calendar

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
The event module is old and unrelated to the actual Moodle calendar

As far as I know, it is completely obsolete. 

Go to Admin -> Configuration -> Modules  and delete the Event module.

Then delete this whole directory:  moodle/mod/event.
In reply to Martin Dougiamas

Re: problem with calendar

by Steven Day -
Thanks Martin. That's what I figured but I was thinking of still using it to highlight extra-curricular happenings or special events in the weekly topics format. With Calendar maturing, this seems less necessary I guess.

Best,

Steven
In reply to Martin Dougiamas

Re: problem with calendar

by Steven Day -
OK, I did that and now the one event in Calendar I had disappeared. I re-entered it but it does not show up. Actually, Calendar was working fine before with the obsolete Events module in place. What am I missing here?

Thanks.

Steven

PS I now see that 1.3 is coming out soon. I'll just wait and upgrade before doing anything else. Sorry for the troubles.
In reply to Steven Day

Re: problem with calendar

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Ah, whoops ... the event module probably deleted the "event" table which is what the calendar uses.  smile

You'l have to re-create the table manually using the SQL Jon posted above.
In reply to Martin Dougiamas

Re: problem with calendar

by Steven Day -
OK, I already did it once, though had some issues with the last few entries. Are they all in the same table? Or are the last items indexed? I don't know anything about DB, but it wasn't hard setting things up thanks to Jon's instructions.

Well, now creating a new table I get an "access denied" warning. What is the best way to proceed?
In reply to Steven Day

Re: problem with calendar

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
What I mean is that event table was most likely deleted when you deleted the event module (because it assumes that a table with that name belongs to itself). So you'll need to make it again.

It's quite easy: just go into phpmyadmin, press on the SQL button, then paste in the whole statement as above and execute it. Nothing more to do.
In reply to Martin Dougiamas

Re: problem with calendar

by Steven Day -
Thanks Martin. I've been trying to input the data line by line, without success. Will try again by cutting and pasting.

PS Great, that did the trick. Although I got an error message, it created the database and Calendar is working fine again now.

Thanks again for your timely help Martin! I'll do my best to promote Moodle at the conference next week.
In reply to Matias Harju

Re: problem with calendar

by Floyd Collins -

I have a small problem that I cant seem to get to go away, when I add a new event after updating the calendar code from the CVS I get the following. I have also updated the language pack. Not sure if this is a bug or something I am doing. Please let me know.

This is the error


Group event groupfor
In reply to Floyd Collins

Re: problem with calendar

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
This string is definitely in cvs:/moodle/lang/en/moodle.php
In reply to Martin Dougiamas

Re: problem with calendar

by Floyd Collins -
Yes it was, after you telling me this, I checked the lang file, I am such a dork,,,,,,,,,, I updated the wrong file. Thank You Martin. 
In reply to Matias Harju

Re: problem with calendar

by Marcel Berteler -
I cant enter text in the editor (see attachment)

Can this have something to do with my skin design?

Marcel
Attachment calendar.gif
In reply to Marcel Berteler

Re: problem with calendar

by Chardelle Busch -
Picture of Core developers

Hello,

I have kind of appointed myself the "keeper" of this problem since I started a thread related to this after 1.3 was released.  I believe that Martin is working on this and may have figured out a fix.  I'm sure he will give us an update on this soon.

In the meantime, you are not alone: 

http://moodle.org/mod/forum/discuss.php?d=8308

http://moodle.org/mod/forum/discuss.php?d=7073

In reply to Chardelle Busch

Re: problem with calendar

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
Yes Chardelle, an extremely good candidate for a fix is in CVS for serious testing. A 1.3.1. release with the fix is announced