CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Automatically reflect Event Attendance back to change Drupal Roles (Help Please)
Pages: [1]

Author Topic: Automatically reflect Event Attendance back to change Drupal Roles (Help Please)  (Read 1693 times)

PBarwell

  • Guest
Automatically reflect Event Attendance back to change Drupal Roles (Help Please)
March 27, 2008, 09:45:43 pm
I need any (paid workshop) Event attendee to automatically have their Drupal 'Role' changed from Authenticated User to custom role 'Attendee' so that they can then 'see' additional content not available to Authenticated Users.

My searching uncovered the Drupal CiviMember_Role module which will do this if they have a specific Memebership.
Is there any automatic way to make all CiviEvent 'Attendees' part of a particular membership, so I could then use the Drupal CiviMember_Role module.

I briefly explored 'Groups' and found a manual way to make all CiviEvent 'Attendees' part of a CiviCRM Group, but so far I haven't been able to find any way to 'reflect' that back into Drupal, ie there doesn't seem to be a Drupal CiviGroup_Role module and besides the Group update was a manual process (unsure if it can be automated).

I also found a reference to 'UpdateMemberships.php', but could not find any references to it outside of "Topic: Drupal Membership Site (please help)".

So being a Civi Newbie have I missed an obvious way whereby Event Atendees can automatically become part of a membership, thereby enabling me to use the the Drupal CiviMember_Role module;
OR
am I faced with converting the Drupal CiviMember_Role module into a the Drupal CiviEvents_Participant module.

Comments / Guidance please !

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Automatically reflect Event Attendance back to change Drupal Roles (Help Ple
March 27, 2008, 10:34:21 pm

CiviMember and CiviEvent are two separate and distinct modules within CiviCRM. There have been a few request to auto create a membership when someone registers for an event, however that is still on the feature list :)

Your best bet for the below is to create a civiparticipant_role module similar to civimember_role. You'll want to ensure that you allow the admin to decide what civievent status's are considered to be "registered" and do the needful

If you do create a module, please create a drupal project etc and publish your code :)

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

PBarwell

  • Guest
Re: Automatically reflect Event Attendance back to change Drupal Roles (Help Please)
April 07, 2008, 10:05:34 am
lobo - thanks for the reply - I missed it - didn't set the Notify on - thought it was automatic for the original poster - you live and learn - have looked at Drupal's CiviMember_role module - little esoteric for a Drupal / CiviCRM newbie - but I believe do-able.

One very small issue - as Events have only one type indicator - the 'event_type_id' - then the Drupal role change will occur across ALL of the selected event type - say all 'Workshops' - for ALL participants with the selected status (say 'Attendee').

My original idea was to have some form of sub-set of 'event_type' indicating that the Drupal role change would occur - in the short term its easily solved by simply adding an additional custom 'event type' - that may be sufficient as the answer - but I feel that a 'Drupal Role Change Indicator' would make it easier for users. I'll carry on without it as it would mean a change to the CiviCRM_Event table - but was curious as to your thoughts.

Fair amount of work on at the momnet - this will probably take a few weeks elapsed time - cheers PB


Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Automatically reflect Event Attendance back to change Drupal Roles (Help Ple
April 07, 2008, 11:56:33 am
This is tangential to your main question, but... you can automatically put event attendees into a "Smart" group by doing an Advanced Search for folks who meet your criteria (e.g. Participant status = x, Event type = y etc.) and saving it as a Smart Group (from -more actions- dropdown).

... and it might be more useful for you and the community to consider working on civicrm_group_role module (more general solution) rather than the participant_role approach ???
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Automatically reflect Event Attendance back to change Drupal Roles (Help Please)

This forum was archived on 2017-11-26.