Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.5.4, 1.6, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.6.5, 1.7, 1.7.1, 1.7.2
-
Component/s: Calendar
-
Labels:None
-
Environment:Probably irrelevant, but RHEL4 w/ apache2, php 5.2.0 and a remote MSSQL 2005 database
-
Affected Branches:MOODLE_15_STABLE, MOODLE_16_STABLE, MOODLE_17_STABLE
-
Fixed Branches:MOODLE_18_STABLE, MOODLE_19_STABLE
Description
If you go to the detailed view of a calendar from a course, it will include the course id in the url (e.g. calendar/view.php?view=month&course=13&cal_d=1&cal_m=06&cal_y=2007). However, all of the links in the calendar do not have the course parameter so you'll get something like calendar/view.php?view=month&cal_d=1&cal_m=06&cal_y=2007. Oddly enough, it still stores which course you came from because that shows up in the breadcrumb, but it must be in a cookie or something.
This is bad on a number of accounts.
1. If the user bookmarks what they think is their calendar in one course, they come back later and it's another course because the cookie got changed.
2. For admin users who are viewing calendars for courses their not enrolled in, this is a big problem. Only the URLs with the course parameter will display the course's events. So as soon as they try to navigate anywhere in the calendar, they can't see anything anymore.
Attachments
-
$i18n.getText("admin.common.words.hide")
- calendar15x.zip
- 16/Oct/07 8:02 AM
- 29 kB
- Wen Hao Chuang
-
- event_select.html 2 kB
- lib.php 53 kB
- overlib.cfg.php 0.2 kB
- preferences.html 2 kB
- preferences.php 3 kB
- view.php 25 kB
- set.php 6 kB
- event.php 28 kB
- event_delete.html 2 kB
- event_edit.html 4 kB
- event_new.html 5 kB
-
- 0_AFTER_clicking_preferences_then_Calendar_breadcrumb.png
- 82 kB
- 12/Oct/07 8:58 AM
-
- 0_BEFORE_clicking_preferences.png
- 73 kB
- 12/Oct/07 8:58 AM
-
- After_click_on_Export_calendar_button.png
- 125 kB
- 09/Oct/07 6:01 AM
-
- after_create_a_new_course_event.png
- 122 kB
- 03/Oct/07 8:29 AM
-
- Before_click_on_Export_calendar_button.png
- 136 kB
- 09/Oct/07 6:01 AM
-
- calendar_course_id_back_to_3.png
- 84 kB
- 04/Oct/07 2:50 AM
-
- Calendar_Day_View.png
- 176 kB
- 08/Oct/07 9:36 PM
-
- Calendar_Editing_event.png
- 167 kB
- 08/Oct/07 9:38 PM
-
- calendar_export_breadcrumb_wrong_parameter.png
- 115 kB
- 05/Oct/07 3:21 AM
-
- calendar_not_listing_global_event.png
- 112 kB
- 04/Oct/07 2:49 AM
-
- when_you_create_a_new_event.png
- 122 kB
- 03/Oct/07 8:28 AM
Issue Links
| This issue is duplicated by: | ||||
| MDL-10319 | Can't create new course event |
|
|
|
| MDL-11133 | Course selection drop down does not work |
|
|
|
| MDL-10839 | Calendar unexpectedly shows events from other courses when switching months in editing view |
|
|
|
| MDL-11208 | Calendar always shows All Courses view even after selecting a single Course |
|
|
|
| This issue has a non-specific relationship to: | ||||
| MDL-9772 | Calendar events disappear twice a month, sometimes more often |
|
|
|
| MDL-9059 | When teacher creates Group event on calendar, they cannot see it |
|
|
|
Activity
- All
- Comments
- History
- Activity
- Source
- Test Sessions
I think this is a big problem and it happens to 1.5.x, 1.6.x, 1.7.x and 1.8.x (also 1.9 beta)... should probably bump up the priority level...
Raising priority, as this impears proper usage of calendar.
Also adding Martin D to the watch list. Martin do you know if Jon still maintaining calendar? Thanks!
Martin could you please take a look at this issue please? Thanks!
This issue seems to be fixed by Yu, as I just did some testing and in 1.9 beta+ it will pass alone the courseid while the most recent moodle_18_stable still have not fixed this issue yet. Yu could you please confirm this? Thanks!
Wen, I'm seeing the same as you (fixed in 1.9beta+ and NOT fixed in 1.8.x), but can't relate this to a recent commit.
Same as Nicolas, the problem is fixed in 1.9beta+ and NOT fixed in 1.8.x.
Martin or Yu, please can you fix this in 1.8.x ASAP?
JOseph
Hi guys, it's actually Derek from the Open University that fixed this. I have backported changes for calendar, please test and let me know if this can be closed.
Cheers,
Yu
Seems to be partially fixed.
I can still reproduce the following issue:
1) In a course, go to the calendar view.
2) Observe that the course var is correctly set in the URL and the course is correctly selected in the drop down menu.
3) In the Month view (calendars on the right column), click in the title link (name of the month), e.g. "october 2007".
4) Observe that the course var disappears from the URL and that the dropdown menu shows now "All courses".
Thanks for fixing this.
Hi Brad, you could click on the "Version Control" tab above to see exactly what got committed, and you could use this to generate patch for 1.8.2. Hope this helps.
Nicolas, I agree with you. I did some testing and it IS partially fixed. The problem is that it's not consistent. For example, here is how you can reproduce the still existing problem:
1. Create a GROUP event (as sys admin) for Oct 15 2007
2. Then create a new COURSE event for Oct 22 2007. Here when you are creating the COURSE event, you will notice that the GROUP event that you just created is NOT displayed correctly (see screenshot).
3. After you finish creating the COURSE event, you will notice that the GROUP event that you just created for Oct 15 2007 is now back.
I will do some more testing and report back here..
by the way can anyone confirm the MDL-9772 is actually a dupe, or it is a different issue? Thanks!
Wen Hao, I can't confirm that MDL-9772 is a dupe, as the description of the problem doens't match.
But the problem seems old and I can't test on older versions.
Hi Wen Hao and Yu,
Thanks for letting me know. It seem works fine after download those updates.
Cheers,
Brad
I can't manage to get group events correctly, neither in 1.8.2 (fresh from CVS) or in 1.9beta+ (fresh from CVS too). Can someone confirm that the bug is still present in this case.
All other issues seems to be gone. Thank you Yu ![]()
Just upgraded my moodle 1.8.2. Using calendar/view.php file ref:
<?php // $Id: view.php,v 1.77.2.9 2007/10/02 06:26:58 toyomoyo Exp $
With debugging set as : NORMAL: Show errors, warnings and notices
When I create a new event, upon event being saved I get 2 error messages:
-
-
- Notice: Use of undefined constant CALENDAR_MAXCOURSES - assumed 'CALENDAR_MAXCOURSES' in C:\moodle\www\moodle18\moodle\calendar\view.php on line 264
- Warning: Division by zero in C:\moodle\www\moodle18\moodle\calendar\view.php on line 264
-
Joseph
-
-
- Notice: Use of undefined constant CALENDAR_MAXCOURSES - assumed 'CALENDAR_MAXCOURSES' in C:\moodle\www\moodle18\moodle\calendar\view.php on line 264
- Warning: Division by zero in C:\moodle\www\moodle18\moodle\calendar\view.php on line 264
-
I was able to reproduce Joseph's problem. I also found another two bugs for the new fix:
1. If you go into the "calendar" view then click on "Preferences" button on the upper-right corner (see screenshot), the course id won't carry over and therefore, if you "save changes" (even that you didn't change anything), then click on "Continue", then you will be redirected to /calendar/view.php without any parameters carry over. I double checked with the /calendar/preferences.php and noticed that it was not changed for this fix
2. If you navigate back to the Moodle Test Case course, then all of your events should now re-appear (as now the course=3 parameter is back), except the Global event (see the screenshot).
Yu could you help fixing these two issues please? Thanks so much!
Hi Guys,
Fixed in notice and warning, sorry, backported something from HEAD by accident.
Wen,
1) Fixed, but it's set in session not visible in URL, however you should return to the same course view after setting preferences.
2) There's a setting (a preference) "Upcoming events look-ahead" that determines how far ahead to look. I noticed in your screenshot the event is in Nov so you probably don't have it set for more than 30 days.
Cheers,
Yu
Yu, good job and thanks for fixing this so quickly, we really appreciate that!
Now that the above issues are fixed. I still notice that the calendar/export.php is untouched and so whenever you click on the "export calendar" button then your most of your events would be gone! Also, when you are on the export.php page, if you click on the Calendar link from the Breadcrumbs, again that redirect does not include the course ID (see screenshot #3 "calendar_export_breadcrumb_wrong_parameter.png" above) and therefore you will lost most of your events in the next page view (displayed by view.php). Thanks again for your efforts on fixing this issue!
Hi guys,
I got a new error msg here after update all the files changed.
The error msg came out when I try to create new event inside calendar's monthly view:
Fatal error: Call to undefined function build_navigation() in /moodle/calendar/event.php on line 274
Any idea?
Cheers,
Brad
Hi Yu, there are still some glitches (in 1.8):
1. under calendar/view.php at around line #136
$prefsbutton = calendar_preferences_button();
The calendar_preferences_button() does not pass over the course id info
2. under calendar/view.php at around line #165 (//Link to calendar export page), this line should also pass the course id
print_single_button('export.php', false, get_string('exportcalendar', 'calendar'));
By the way, I talked to Yu and I volunteered to backport all these fixes to 1.5 (currently only tested on 1.5), so far it works although I still need some more testing. I will try to clean them up a little bit and post the backported version (for 1.5, and possibly for 1.6, 1.7 too) here so that people could help testing them. Thanks! ![]()
Hi Brad, I don't see the code in 1.8, maybe you accidentally used the version from HEAD?
Wen, preference and export use session variable to keep tracker of the course id (for redirects, and headers). So I wasn't sure why course ids need to be passed in explicitly, please explain. Thanks.
Cheers,
Yu
Hi Wen and Yu,
Thank you for your message. Can't connect with CVS this morning.
I download the wrong version of event.php file.
My moodle is version 1.8.2. So I need the v1.63.2.6 of event.php instead of V1.7.3.
Everything works fine after upload correct file. Many thanks you guys.
What's the V1.7.3 for? Is it for Moodle 1.9?
Cheers,
Brad
Hi guys,
New problem. Please see the attached photo of Calendar_Day_View.png and Calendar_Editing_evet.png.
The course id and events all disappeared after edit a excising event. Moodle version 1.8.2.
Cheers,
Brad
Just found that Jira would sort attached image files (screenshots) based on the filename so Brad's uploaded images should be #5 and #6 now.
I was able to reproduce the problem Brad reported. I think the switch($action) in event.php does handle case 'new' correctly but not the cases of 'edit' and possibly 'delete', Yu could you please take a look at this please?
Another separate issue. I also created screenshot #3 and #1 to demonstrate it probably still need course ID when you click on the "Export calendar" button (export.php) . As you could see if you login as an admin and login to one of the courses, then click on the "Export calendar" button, as the course ID was not carried over, so on your right hand view ("monthly view") many events will disappear. Same thing with "Preferences" button. Please let me know if you have questions. Thanks!
The "group" issue for calendar display is dealed MDL-9059.
Hi guys,
Fixed the events not showing up problem in export, and when editing existing event. However, I was unable to reproduce the problem in preferences. Wen maybe you can help me there, can you tell me exactly how to reproduce the exact problem in preferences?
Cheers,
Yu
Hi Yu,
I can't reproduce the preferences problem neither on 1.8.2+ or 1.9beta2. Even if the courseid isn't present in the URL, the session seems to take care of it and keeps the correct course id.
Suggesting closing of this bug, since the remaining problems (group issues with calendar) should be dealed in MDL-9059.
Yu, I think you fixed the export one. Good job! ![]()
However, I still can easily reproduce the preferences bug. Here are steps to reproduce:
Login as admin
1. Create two courses and assign them to one teacher, create whole bunch of events for both courses (very important)
2. Login as that teacher, get into one of the two courses, and click on Calendar, say October 2007 (see screenshot BEFORE_clicking_preferences.png)
3. Click on the "Preferences" button on the upper-right corner
4. Notice now that course ID was not passed over and the preferences.php shows ? at the end (although the session should have passed over), now do NOT click on "Save changes", click on the "Calendar" on the breadcrumb (navigation) bar, now suddenly you will be able to see BOTH course events, and the "Upcoming Events" pull-down menu is now reset to "All courses" (see screenshot AFTER_clicking_preferences_then_Calendar_breadcrumb.png)
It's not a major issue, but it could get teachers confused if they don't know they should use the "Upcoming Events" pull down menu and set it back to one course only. I have identified where need to be fixed. In preferences.php line#61, the $navigation should probably be handled similar to how $nav is handled in both view.php (line#70) or export.php (line#25), what do you think? This should be able to fix this issue. Hope this helps. ![]()
Yu, thanks again for everything! By the way I hope that you don't mind me reopen this ticket as this is a critical bug across moodle 1.5.x to 1.9, and I thought it would be a good idea if we could also get it fixed (back port the fix) to 1.5, 1.6, and 1.7. What do you think?
I have back ported the fixes to moodle 1.5.x and I could do the same thing with 1.6.x and 1.7.x too. Attached please find the fix for 1.5. I tested it throughly but it would be good if someone could help testing it before I commit it to the MOODLE_15_STABLE branch. Thanks!
Hi Teresa, the fix for 1.8.2 is already committed into MOODLE_18_STABLE. You just need to upgrade your 1.8.2 installation to the latest 1.8.x codes (through moodle cvs or download.moodle.org) and you will be able to get this fix. If you want to manually fix it you could also click on the "Version Control" tab in this ticket to see how to patch your current code. Hope this helps. ![]()
There is still an error in the 1.8 files:
On line the 249 of event.php an HTML representation of the "&" character is used.
This should be changed to a literal value, i.e. change & to &
In fact, the HTML-encoded ampersand is the only "correct" one on that line. XHTML demands that & be encoded as & even in URLs.
http://www.w3.org/TR/xhtml1/#C_12
So the other ones on that line need changing.
Hi Chris,
That line of code never render's to (X)HTML, it is used in a redirect.
Nicolas, if it is ok with you let's lower the priority on this one but still keep it open. The thing is, this bug got fixed in 1.8, 1.9, and 1.5 (I backported it), but I haven't got a chance to backport the fix to 1.6 and 1.7 yet so people who are using moodle 1.6 and 1.7 might still find calendar events got disappeared for no reason... Once I'm less busy I will help backporting the fix to 1.6 and 1.7 (or if there is any volunteer that would be great too). thanks!
Don't you think that :
Version 1.8.2 should appear in affect version(s) list ?
Versions 1.8.4 and 1.9 should appear in Fix version(s) list ?
the initial title or this issue should ne restored ?
It would be easier to find how to solve this issue when we use version 1.8.2.
Thank you Martin for you fast reaction to my comment.
Why did you not add 1.8.2 in affect versions list and why did you remove versions 1.6.9 and 1.7.8 from fix versions list ?
I forgot to explain that, in my opinion, "(1.6-1.7)" should be removed from title now since the bug is fixed.
Frédéric - From what I can tell looking at the long history of this issue in the tracker it was originally fixed for Moodle 1.8 and onward (i.e. in HEAD). Some continued tweaking was done after Moodle 1.9 was released and those were applied. Wen had wanted to backport the fixes to Moodle 1.5, 1.6, and 1.7; however, I suspect that after some work on Moodle 1.5 version he became busy and simply was unable to patch the fixes for Moodle 1.6 and 1.7. I suspect Martin came along and wanted to re-close the issue since it is fixed for Moodle 1.8 onward and basically noted that it will not be fixed for Moodle 1.6 or Moodle 1.7. If folks are having difficulty with this issue they should upgrade to Moodle 1.8. There is no need to worry (IMHO) about the reference to 1.6 or 1.7 in the title. That was what the person filing the issue had wanted but it simply is not what happened. Regardless, it is resolved as fixed so I think we can leave things as it is. Let me know if you have any other questions. Peace - Anthony
Hello all,
Thank you for your effective efforts! ![]()
I've recently installed Moodle 2.1 for our university, and I'm facing the same problem with the calendar. The course selection drop down is not working:
If I open the calendar while I'm inside a course, the drop down list shows the course I'm on. If I then try to select another option it does nothing. The drop down list remains on the course I'm on, and the query string in the URL shows ?course=[the id of the course I'm on]. So I'm assuming the selection does not succeed in sending the new query string.
Can anyone help out with this issue?
Thanks in advance! =)
See thread http://moodle.org/mod/forum/discuss.php?d=75161
Affects 1.8.2 as well