1

Setup

We have a multisite CiviCRM (Version 4.4.13) and the latest Drupal. CiviEvent is used to create events and manage participants. CiviCRM contacts and Drupal users are connected.

Each event has a custom contact reference field "Trainer". Admin staff will select the appropriate event's trainer (CiviCRM contact) in this field. Participants register via Drupal Webforms.

Aim

The aim is for every trainer to be able to see the names and certain registration information of his/her own training's participants (and only those). It should be accesible once the trainer logs in with his/her Drupal credentials.

Thoughts so far

One could probably use CiviCRM ACL feature. However, this would probably require to set up one ACL group per event - which is not feasible/comfortable as there are too many events.

We were considering a relationship created by the webform that grants the trainer permissions to view participants but wasn't able to come up with something viable either...

IMHO, most promising seems to be a Drupal View that shows the partcipants in question. However it would need some kind of filter or access restriction so that only the registration information of the trainer's participants is shown.

So far, I wasn't able to find a good solution. Maybe a contextual filter would work?

Question

Does anyone know, how to solve that in a Drupal View? Or of yourse any other approach which does not require a lot of manual work per event?

Any ideas or hints would be highly appreciated.

1

From my limited knowledge of the module, this sounds like the perfect use case for CiviCRM Entity.

You should be able to add an entity reference field to the Event entity (that CiviCRM Entity would create), the Participants entity (I think that CiviCRM Entity would create) and one to the Trainer Content Type (that you'd create) and link them together.

From there, you should be able to create whatever View you want with logged on user as the contextual filter.

  • Thanks for the feedback - haven't had a chance yet to try your approach but will share my experiences when I do – Fabian Jun 26 '15 at 14:30
  • As this isn't a requirement of the project anymore, I won't be able to test it. I am gonna mark your answer as correct as I think that it would be right approach. – Fabian Jul 21 '15 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.