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) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 3.0 Release Testing »
  • Events full & roles
Pages: [1]

Author Topic: Events full & roles  (Read 1417 times)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Events full & roles
August 15, 2009, 12:47:37 am
Is the ability to define whether a role (eg. host/ speaker) counts towards the participant count in 3.0? I couldn't see any evidence of it so I may have been wrong in thinking it was going to be.
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

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: Events full & roles
August 15, 2009, 02:05:09 am
If I am not wrong -

I think there is no ability to consider role count.

we only consider participant status count for event full.
you might want to see function which is used to check event full ( CRM_Event_BAO_Participant::eventFull( ) )

we consider participant role as one of the parameter to check existing participant in process of online registartion.
( CRM/Event/Form/Registration/Register::checkRegistration( ) )

kiran

You Are Designed To Choose... Defined By Choice.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Events full & roles
August 17, 2009, 04:04:23 am
Hi,

I took at look at the parts of code you pointed to & it doesn't seem that difficult to add it.

I worked from the assumption I could grab the 'grouping' field out of civicrm_option_value.

So, I could make two small changes (below) to make this only count those roles with a this value set to 1.

Obviously if this is a valid approach then it would also be necessary to allow this field (or similar) to be edited on this screen:
http://sandbox.civicrm.org/civicrm/admin/options/participant_role&group=participant_role&reset=1

And to be differentiated from the various participant types on this screen:
http://sandbox.civicrm.org/civicrm/event&reset=1



FILE COMPARISON
Produced: 17/08/2009 10:51:04 p.m.


Left file: C:\xampp\htdocs\civi\civicrm_php\CRM\Event\PseudoConstant.php     Right file: C:\xampp\htdocs\civi\sites\all\modules\civicrm\CRM\Event\PseudoConstant.php
172c172
<     public static function &participantRole( $id = null ,$cond = null, $field = 'label')
---
>     public static function &participantRole( $id = null )
177c177
<             self::$participantRole = CRM_Core_OptionGroup::values("participant_role",false,false,false,$cond,$field);
---
>             self::$participantRole = CRM_Core_OptionGroup::values("participant_role");




****FILE 2****************

FILE COMPARISON
Produced: 17/08/2009 10:58:10 p.m.


Left file: C:\xampp\htdocs\civi\civicrm_php\CRM\Event\BAO\Participant.php     Right file: C:\xampp\htdocs\civi\sites\all\modules\civicrm\CRM\Event\BAO\Participant.php
332,335c331,332
<         $countedStatuses    = CRM_Event_PseudoConstant::participantStatus( null, "is_counted = 1" );
<         $countedStatuses    = CRM_Event_PseudoConstant::participantStatus( null, "is_counted = 1" );
<         $countedRoles    = implode(',',CRM_Event_PseudoConstant::participantRole( null, "AND grouping = 1","value" ));
<
---
>         $countedStatuses    = CRM_Event_PseudoConstant::participantStatus( null, "is_counted = 1" );
384d380
<      AND  counted.role_id IN ({$countedRoles})

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

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Events full & roles
August 18, 2009, 05:48:50 am
http://issues.civicrm.org/jira/browse/CRM-4924
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) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 3.0 Release Testing »
  • Events full & roles

This forum was archived on 2017-11-26.