saltalib
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Forum: Plugins
In reply to: [BadgeOS] BadgeOS Reports PluginFor the update issue, I had to go inside the code to manually change its version to .3 so it doesn’t give me the update message every 2 minutes. Learning Times never responded to my multiple call attempts. But we finally got it to work on our own.
Forum: Plugins
In reply to: [BadgeOS] BadgeOS Reports PluginWe finally got it to work by keeping the original SQL query code. But we removed this buddypress code:
// If Buddy Press is activated, only then display Group Filters if( class_exists( 'BP_Groups_Group' ) && bp_is_active( 'groups' ) && class_exists("BadgeOS_Group_Management")){ // Query filter for tables based on groups if(isset($_REQUEST['groups']) && !empty($_REQUEST['groups'])) $group_filter = "AND groups.id = ".$_REQUEST['groups']; // Query filter for tables based on users if(badgeos_get_user_role()=="school_admin"){ $usermeta_filter = "AND usermeta.meta_key = 'school_id' AND usermeta.meta_value =".get_current_user_id(); }elseif(badgeos_get_user_role()=="author"){ /*$usermeta_filter = " AND (usermeta.meta_key = 'school_id' AND usermeta.meta_value =".badgeos_get_school_id()." OR usermeta.meta_key = 'teacher_id' AND usermeta.meta_value =".get_current_user_id().")"; */ $usermeta_filter = " AND usermeta.meta_key = 'teacher_id' AND usermeta.meta_value =".get_current_user_id(); } // Load Groups drop down based on user roles $user_role = badgeos_get_user_role( absint( get_current_user_id() )); $user_id = ($user_role=="author")?absint( get_current_user_id() ):''; $group_meta_query = ($user_role=="school_admin")?array ( array ('key' => 'school_id','value' => absint( get_current_user_id() ) ) ):''; $bp_public_groups = groups_get_groups( array( 'user_id' => $user_id, 'meta_query' => $group_meta_query, 'orderby' => 'name', 'order' => 'ASC' ) ); $selected_id = isset( $_REQUEST['groups'] ) ? absint( $_REQUEST['groups'] ) : 0; if ( $bp_public_groups['total'] > 0 ) { $groups_drop_down = '<h3>Groups:</h3>'; $groups_drop_down .= ' <select name="groups" id="groups" class="achievement-reports" onchange="this.form.submit()" style="max-width: 15%" form="report-filter">'; $groups_drop_down .= '<option value="">' . __( 'All', 'badgeos-reports' ) . '</option>'; foreach( $bp_public_groups['groups'] as $group ) { if($user_role=="author" && !groups_is_user_admin($user_id,$group->id)) continue; $groups_drop_down .= '<option value="' . absint( $group->id ) . '" ' . selected( $selected_id, $group->id, false ) . '>' . esc_attr( $group->name ) . '</option>'; } $groups_drop_down .= '</select>'; } }
Forum: Plugins
In reply to: [BadgeOS] BadgeOS Reports PluginHi Reuben! Is there a way I can contact you directly via phone please? My email is altalib[@]gmail.com. Thank you very much!!!
Forum: Plugins
In reply to: [BadgeOS] BadgeOS Reports PluginI tried to use the updated code above but I am still not getting any records to display. I called you a couple of times but no response. I need this resolved ASAP please.
Viewing 4 replies - 1 through 4 (of 4 total)