Project

General

Profile

Feature #3622

Import of multiple agenda items

Added by Bas Wijnen about 8 years ago. Updated almost 8 years ago.

Status:
Bug resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
19/06/2011
Due date:
% Done:

80%

Estimated time:
Spent time:
Complexity:
Easy
SCRUM pts - complexity:
?

Description

When importing an ical file with the agenda tool, only the first appointment is imported, the rest of the file is ignored. This is a patch which allows importing multiple entries at once. Perhaps a csv importer would be better for it, but this at least allows importing an entire agenda at once.


Files

agenda.patch (7.14 KB) agenda.patch Bas Wijnen, 19/06/2011 14:52
agenda.patch (7.31 KB) agenda.patch Bas Wijnen, 05/07/2011 00:41
test.ics (719 Bytes) test.ics Yannick Warnier, 04/08/2011 08:10

Related issues

Blocks Chamilo LMS - Feature #3752: Improve the Agenda tool layoutNew26/07/2011

Actions

Associated revisions

Revision b40ca543 (diff)
Added by Julio Montoya almost 8 years ago

Adding patch to fix ics import to the Agenda tool see #3622

History

#1

Updated by Yannick Warnier about 8 years ago

  • Status changed from New to Assigned
  • Assignee set to Yannick Warnier
  • Target version set to 1.8.8.4

Great. the patch seems good to me.
As per our coding conventions, we ask you to use 4 spaces instead of one tab to facilitate edition from terminal. See Coding conventions. Also (but I can see this is not your mistake but rather an older mistake that I will fix now), conditional "{" are opened on the same line and there must be a space after an "if" and before the following parenthesis.

Any chance you would be able to apply this patch to the development version of agenda.inc.php? (apparently, a lot of code has moved from one section to anothe of the file and the patch does not apply seemlessly). Otherwise please ensure you get a few more lines of "context" when building the patch.

Thanks!

#2

Updated by Bas Wijnen about 8 years ago

I'm happy to do that, but I can't find on the site how to import the repository to my computer. I'm probably misssing something. Please let me know how that can be done.

#3

Updated by Julio Montoya about 8 years ago

You need to do a

hg clone https://chamilo.googlecode.com/hg/ chamilo

in order to download the latest code

check also this page:

http://code.google.com/p/chamilo/source/checkout

#4

Updated by Bas Wijnen about 8 years ago

Here's a patch against the current hg.

What it does:
- loop over all events in the ical file.
- replace $_POST['selectedform'] by $attendee, since _POST is not valid in this function.
- explode the list of targeted users and groups, so it's possible to target more than one.

What is still required:
- The targeted group must be referenced by number. This is not normal, since users don't ever see this number and will not know it.

#5

Updated by Julio Montoya almost 8 years ago

  • Assignee changed from Yannick Warnier to Julio Montoya
#6

Updated by Julio Montoya almost 8 years ago

  • Status changed from Assigned to Needs more info
  • Assignee changed from Julio Montoya to Bas Wijnen
  • % Done changed from 60 to 80
#7

Updated by Yannick Warnier almost 8 years ago

  • File test.ics test.ics added
  • Status changed from Needs more info to Bug resolved

Attaching an example multiple-events ics. I can confirm it works. Thanks Bas (and Julio for the integration)

Also available in: Atom PDF