Project

General

Profile

Bug #7285

Import ics calendar into a course doesn't work

Added by Agathe Hubert almost 5 years ago. Updated over 4 years ago.

Status:
Rejected - Abandoned
Priority:
Normal
Assignee:
Category:
Agenda
Target version:
Start date:
24/09/2014
Due date:
% Done:

50%

Estimated time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

Hi,
Import ics calendar into a course doesn't work. It displays Array()


Files

patch_repeat_event-main-calendar-agenda.inc.php (8.23 KB) patch_repeat_event-main-calendar-agenda.inc.php Agathe Hubert, 25/09/2014 14:12
patch_repeat_event-main-calendar-agenda.lib.php (4.6 KB) patch_repeat_event-main-calendar-agenda.lib.php Agathe Hubert, 25/09/2014 14:45
agenda.lib.php (86.2 KB) agenda.lib.php Yoselyn Castillo, 28/10/2014 04:38
exdate.ics (965 Bytes) exdate.ics Yannick Warnier, 31/10/2014 22:05

Associated revisions

Revision 0222665e (diff)
Added by Yoselyn Castillo almost 5 years ago

Add feedback message if empty ics file - refs #7285

Revision d1a3b48d (diff)
Added by Yannick Warnier almost 5 years ago

Avoid exception if "until" date is set without time for repeated events - refs #7285

Revision f7395f01 (diff)
Added by Yannick Warnier almost 5 years ago

Minor - added comment about repeated events not possible in the past - refs #7285

History

#1

Updated by Agathe Hubert almost 5 years ago

  • File patch-main-calendar-agenda.inc.php added

Here is the patch in order to solve the problem in chamilo 1.9.6. I think this will work in chamilo 1.9.8

#2

Updated by Julio Montoya almost 5 years ago

  • Status changed from New to Assigned
  • Assignee set to Yoselyn Castillo

Hi Yoselyn,
Can you check this task?

#3

Updated by Agathe Hubert almost 5 years ago

These 2 patches solve the problem with repeated events and add the functionality exclude date (exdate property from ics format). they replace the first patch I've added on this bug .

#4

Updated by Agathe Hubert almost 5 years ago

  • File deleted (patch-main-calendar-agenda.inc.php)
#5

Updated by Agathe Hubert almost 5 years ago

  • File deleted (patch_repeat_event-main-calendar-agenda.lib.php)
#7

Updated by Yannick Warnier almost 5 years ago

  • Status changed from Assigned to New
  • Assignee deleted (Yoselyn Castillo)
#8

Updated by Yannick Warnier almost 5 years ago

  • Status changed from New to Needs more info
  • Assignee set to Agathe Hubert

Agathe, when I try to import an ICS event before applying your patch, I get no issue.
Could you explain in more detail what the issue is or send me the ICS that isn't imported?

#9

Updated by Yannick Warnier almost 5 years ago

Ping Agathe

#10

Updated by Yannick Warnier almost 5 years ago

Agathe, we need feedback here...

#11

Updated by Julio Montoya almost 5 years ago

I just looked the patch. And it seems that the import failed because we don't support the "exclude dates" feature.
She added that feature.

We need here the ICS that gives the error in order to test this.

#12

Updated by Yannick Warnier almost 5 years ago

  • Status changed from Needs more info to Assigned
  • Assignee changed from Agathe Hubert to Julio Montoya

Here is an EXDATE example (surprisingly hard to find): https://github.com/tpruvot/PHP-iCal/blob/master/demo/exdate.ics

#13

Updated by Yannick Warnier almost 5 years ago

  • Assignee changed from Julio Montoya to Yoselyn Castillo
  • % Done changed from 0 to 30

Actually... Yoselyn should be able to check this one.

#14

Updated by Yoselyn Castillo almost 5 years ago

I have tried. I have successfully imported a ics calendar.
But when i tried with an emptpy ics calendar I've got the bug. It only happened for me when the ics file has no event.
Checking Hubert patch...

#15

Updated by Yoselyn Castillo almost 5 years ago

When I've tried to apply this patch i've got incompatibilities between agenda.lib.php file from server and the one from patch. But I have sent a fix for avoiding "Array" message when trying to import an empty calendar.
line 2319-2326
if (!empty($messages)) {
$messages = implode('<br /> ', $messages);
} else {
$messages = get_lang('NoAgendaItems');

}
return $messages;
Please upload this file, because i am not able to send it through git right now
#16

Updated by Yannick Warnier almost 5 years ago

  • Assignee changed from Yoselyn Castillo to Yannick Warnier
#17

Updated by Yannick Warnier almost 5 years ago

  • File exdate.ics exdate.ics added
  • Status changed from Assigned to Needs more info
  • Assignee changed from Yannick Warnier to Agathe Hubert
  • Target version changed from 1.9.10 to 1.10.0
  • % Done changed from 30 to 50

Attaching example exdate.ics with date on the 8th of January 2015.

A few notes:
  • I fixed an issue with the date in the RRULE being detected as not datetime (which generated an exception)
  • there is a check preventing any repeatable event to be inserted if the repetition's end date is in the past. I left it there, because it sounds logical not to insert a repeated date in the past, but it is important to know that the limit exists
  • Yoselyn's change has been included

I'm postponing this task because of a lack of feedback, and because we couldn't find the issue itself, but it is worth knowing that it has helped improve the ics import a little.

#18

Updated by Yannick Warnier over 4 years ago

  • Status changed from Needs more info to Rejected - Abandoned

I'm closing this. We need more input to be able to solve it and to know if it is still there.
Feel free to comment to allow us to re-open it, or to open a new issue with more details.

Also available in: Atom PDF