Support

Home Forums Roles and Permissions Add-ons (EE3) Sharing Question Groups Among Admins

Sharing Question Groups Among Admins

Posted: January 22, 2015 at 12:48 pm

Viewing 10 reply threads


Christine

January 22, 2015 at 12:48 pm

Hello!

WP Ver: 4.1
EE Ver: (Latest) Version 3.1.36.6.P
New?: No
Online?: Yes. http://www.interstatetraining.com/calendar/

I have found this topic regarding question groups being unassignable to other admins. I currently have the “Permissions” and “Roles & Permissions Pro” plugins activated on my site because I need to give “View Attendee” access to other admins.

My question is how do I share question groups among my site administrators (or Event Espresso Master Admins) without disabling those two plugins?

Thanks!


Jonathan Wilson

January 22, 2015 at 3:57 pm

  • This reply was modified 9 years, 9 months ago by Jonathan Wilson. Reason: Removed post. Irrelevant information


Jonathan Wilson

January 22, 2015 at 4:06 pm

Hi Matt,

I apologize for the misinformation. We actually have a hook now for R&P that lets you override the default behavior that separates the questions.

You should be able to get what you are looking for with R&P if you add this to your theme’s functions.php file or a custom functions plugin:
https://gist.github.com/joshfeck/bc142af122836b3a081b


Christine

January 26, 2015 at 11:24 am

Thank you for the PHP hook! I tried inserting it in my functions file, then logging out and logging back in but the question groups still aren’t shared. Can I verify this code location is correct?

<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
//remove r&P question group filter so any event editor has all the questions:
add_action( 'init', 'ee3_modify_permissions_questions' );
function ee3_modify_permissions_questions() {
	remove_filter('espresso_get_question_groups_for_event_where', 'espresso_rp_basic_get_question_groups_for_event_where', 10, 3);
}
global $avia_config;
add_theme_support('avia_conditionals_for_mega_menu');
add_theme_support('avia_template_builder_custom_css');
add_filter('show_admin_bar', '__return_false');
add_filter('div.menu-contact-us-container', '__return_false');
/*
* Add your own functions here. You can also copy some of the theme functions into this file. 
* WordPress will use those functions instead of the original functions then.
*/

Do I need to add a reference anywhere else?

Thank you!


Dean

January 27, 2015 at 1:29 am

Hi,

I added the above code to a Site Specific plugin (https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/) and all admins can access the questions in the events and editing.

Have you added the code to a Site Specific plugin or elsewhere?

Note: when looking in the Questions menu page, you may need to click the All Questions link near the top to access questions from other admins.


Christine

January 28, 2015 at 3:34 pm

I apologize for my long response time. Thank you for being so fast in responding!

I added the above code to my child theme functions.php file. I can now see question groups when editing an event; but I’m still not able to see question groups when creating a new event.

Also, if I go to Event Espresso > Question Groups. I am able to see “All Groups” at the top of the screen. I just can’t access them when making a new event.

Thanks!


Tony

  • Support Staff

January 29, 2015 at 3:36 am

You’ll also need to add something like this:

add_filter('espresso_get_question_groups_for_event_where', 'custom_espresso_get_question_groups_for_event_where', 10, 3);
function custom_espresso_get_question_groups_for_event_where($where, $existing_question_groups, $event) {
  return '';
}

Just to note if you have created the same question with each admin, you’ll have what appear to be duplicates in the question list, as each admin can create there own set of questions.


Christine

January 29, 2015 at 9:57 am

That makes sense. The first question group is mandatory (and stays invisible), while the others will become shared. Is that correct?

Can I just add it in the same Functions.php file I have the other code in?

Thank you!


Lorenzo Orlando Caum

  • Support Staff

January 29, 2015 at 3:02 pm

Hi, question groups will appear for each admin since those are created for each event admin.

The additional code snippet can be added to the same location where you have the existing code snippets. For example, if you have added it to a site specific plugin, then you could add it there.

If you have added it to your child theme’s functions.php file, then you could add it there.


Lorenzo


Christine

January 29, 2015 at 3:07 pm

Awesome. I think everything is working now. I assume the questions that are shared depend on the event creator?

Thanks!


Tony

  • Support Staff

January 30, 2015 at 6:21 am

I think everything is working now. I assume the questions that are shared depend on the event creator?

Can you explain this a little more please?

The code above removes the feature that allows each Event Admin to have their own set of questions/groups. Any questions/groups created by any admin will be available for all admins to use.

Viewing 10 reply threads

The support post ‘Sharing Question Groups Among Admins’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso