Activity

  • Dennis replied to the question BuddyPress for Sensei Database ERROR in the forum Social Learner 8 years, 7 months ago

    Like I keep saying, the page won’t even load to the point I can check options or have a submit button.

    If I remove this function from the admin.php file the admin page loads (line 233):

    public function convert_subscribers_option() {
    $value = buddypress_sensei()->option( 'convert_subscribers' );
    $checked = '';
    if ( $value ) {
    $this->convert_users_to_bp_member_type( 'subscriber', 'student' );
    $checked = ' checked="checked" ';
    } else {
    $this->remove_convertion_users_to_bp_member_type( 'subscriber', 'student' );
    }
    echo "<input " . $checked . " id='convert_subscribers' name='buddypress_sensei_plugin_options[convert_subscribers]' type='checkbox' /> ";
    _e( 'Convert subscribers to user role Student', 'sensei-buddypress' );
    }

    If I change the word subscriber to student in these lines of that same function it will load:

    (line 237)

    $this->convert_users_to_bp_member_type( 'subscriber', 'student' );

    to

    $this->convert_users_to_bp_member_type( 'student', 'student' );

    (and line 240)

    $this->remove_convertion_users_to_bp_member_type( 'subscriber', 'student' );

    to

    $this->remove_convertion_users_to_bp_member_type( 'student', 'student' );

    If there is no interaction with the database I find it hard to know why changing that code would make the page load.

    I’m also not sure what this page can do that the default WP Users page, and the WP Settings New User Default Role can’t. Other than making student course data public.