Hi all,
At the moment, only the creator of an event can edit its list of attendees. For those who don't know, in the Event view, if you're the creator of an event, the number next to the Booked Places line is a hyperlink. You click on the link, and will be taken to a page where you can add attendees, remove attendees, and change attendee status.
This quick tutorial shows you how to change it, so that one group of users can edit attendees. I don't know about you, but being the only person who can edit attendees suck! I'm often in charge of a paddling club with over 120 active members, who register for up to 9 training sessions per week. It's a nightmare and I want to share this nightmare
The solution is also not as configurable as I would have liked, but I don't have the time to code it all pretty (and paddle and play hockey and keep a job). So, here it is:
1. Go to your components/com_jem/views/event/view.html.php file, and on line 192, from:
// Check if user can edit attendees
$isAuthor = ....
$permissions->canEditAttendees = $isAuthor;
Change to:
// Check if user can edit attendees
if (in_array('33', $user->groups, true)) {
$isCommittee = 'true';
}
$permissions->canEditAttendees = $isCommittee;
For me, I need my club committee members to all be able to edit attendees. 33 is the Joomla user group ID (i.e. go to Joomla, users, groups and get this ID)
2. Go to components/com_jem/models/attendees.php, and
comment out line 278. It looks like this:
$where[] = ' a.created_by = '.$this->_db->Quote($user->id);
Done!