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) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Event full hook
Pages: [1]

Author Topic: Event full hook  (Read 1270 times)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Event full hook
November 07, 2009, 12:57:36 am
Hi there,

In a previous discussion Lobo mentioned that having an event full hook might be a good idea - I'd like to resurrect it.

I was trying to implement a scenario where some roles counted and others didn't towards the event being full and submitted a patch

http://issues.civicrm.org/jira/browse/CRM-4924?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel

However, I found a limitation with what I was doing - the event full function is called before you can input the role (or other details) about the latest registration. So, once the event is full you can't add another 'not-counted' role like a volunteer because the event is already defined as full before the role can be entered in the registration form. I also tried to set it by url using a hook but didn't manage to add my extra participant that way either.

Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

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: Event full hook
November 07, 2009, 07:30:45 am

one hacky workaround this would be to:

eventFull always returns false, and you check for fullness in the validate hook of the Register Form

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

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Event full hook
November 07, 2009, 11:52:03 am
I'm not sure I understand that correctly
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Event full hook

This forum was archived on 2017-11-26.