Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/main/calendar/exportEventMembers.php

39 lines
1.0 KiB

<?php
/* For licensing terms, see /license.txt */
/**
* This file exclusively export event members for invitation or subscription.
*
* @author Nicolas Ducoulombier <nicolas.ducoulombier@beeznest.com>
*/
// setting the global file that gets the general configuration, the databases, the languages, ...
require_once __DIR__.'/../inc/global.inc.php';
$this_section = SECTION_MYAGENDA;
api_block_anonymous_users();
$type = 'personal';
$id = (int) explode('_', $_REQUEST['id'])[1];
$action = $_REQUEST['a'] ?? null;
if (empty($id)) {
exit;
}
$agenda = new Agenda($type);
switch ($action) {
case 'export_invitees':
if (!$agenda->getIsAllowedToEdit()) {
break;
}
$data = $agenda->exportEventMembersToCsv($id, "Invitee");
Export::arrayToCsv($data);
break;
case 'export_subscribers':
if (!$agenda->getIsAllowedToEdit()) {
break;
}
$data = $agenda->exportEventMembersToCsv($id, "Subscriber");
Export::arrayToCsv($data);
break;
}
exit;