Plugin Directory

Changeset 1919210


Ignore:
Timestamp:
08/03/2018 07:06:06 AM (8 years ago)
Author:
leehld
Message:

Update version 3.0.3 - Fixed issue about missing instructor role in back end

Location:
learnpress-bbpress
Files:
10 added
4 edited

Legend:

Unmodified
Added
Removed
  • learnpress-bbpress/trunk/inc/functions.php

    r1906856 r1919210  
    4141
    4242function learn_press_bbp_dynamic_roles( $_roles ) {
    43     $roles['lp_teacher'] = array(
    44         'name'         => __( 'Instructor', 'learnpress-bbpress' ),
    45         'capabilities' => bbp_get_caps_for_role( 'lp_teacher' )
    46     );
    4743
    48     foreach ( $_roles as $k => $role ) {
    49         $roles[ $k ] = $role;
     44    if ( is_admin() ) {
     45        return $_roles;
     46    }
     47
     48    if ( empty( $_roles['lp_teacher'] ) ) {
     49        $roles['lp_teacher'] = array(
     50            'name'         => __( 'Instructor', 'learnpress-bbpress' ),
     51            'capabilities' => bbp_get_caps_for_role( 'lp_teacher' )
     52        );
     53
     54        foreach ( $_roles as $k => $role ) {
     55            $roles[ $k ] = $role;
     56        }
     57    } else {
     58        $roles = $_roles;
    5059    }
    5160
    5261    return $roles;
    5362}
     63
    5464add_filter( 'bbp_get_dynamic_roles', 'learn_press_bbp_dynamic_roles' );
    5565
    56 //function learn_press_bbp_get_user_role($role, $user_id, $user){
    57 //  return 'instructor';
    58 //}
    59 //
    60 //add_filter('bbp_get_user_role', 'learn_press_bbp_get_user_role', 10, 3);
     66/*function learn_press_bbp_get_user_role($role, $user_id, $user){
     67    return 'lp_teacher';
     68}
     69
     70add_filter('bbp_get_user_role', 'learn_press_bbp_get_user_role', 10, 3);*/
  • learnpress-bbpress/trunk/languages/learnpress-bbpress.pot

    r1848986 r1919210  
    3333msgstr ""
    3434
    35 #: inc/functions.php:44
     35#: inc/functions.php:50
    3636msgid "Instructor"
    3737msgstr ""
    3838
    39 #: inc/load.php:101
     39#: inc/load.php:97
    4040msgid "Create New"
    4141msgstr ""
    4242
    43 #: inc/load.php:119
     43#: inc/load.php:115
    4444msgid "Forum"
    4545msgstr ""
    4646
    47 #: inc/load.php:125
     47#: inc/load.php:121
    4848msgid "Enable"
    4949msgstr ""
    5050
    51 #: inc/load.php:128
     51#: inc/load.php:124
    5252msgid "Enable bbPress forum for this course."
    5353msgstr ""
    5454
    55 #: inc/load.php:132
     55#: inc/load.php:128
    5656msgid "Course Forum"
    5757msgstr ""
    5858
    59 #: inc/load.php:135
     59#: inc/load.php:131
    6060msgid ""
    6161"Select forum of this course, choose Create New to create new forum for "
     
    6363msgstr ""
    6464
    65 #: inc/load.php:149
     65#: inc/load.php:145
    6666msgid "Restrict User"
    6767msgstr ""
    6868
    69 #: inc/load.php:152
     69#: inc/load.php:148
    7070msgid "Only user(s) enrolled course can access this forum."
    7171msgstr ""
  • learnpress-bbpress/trunk/learnpress-bbpress.php

    r1906856 r1919210  
    55Description: Using the forum for courses provided by bbPress.
    66Author: ThimPress
    7 Version: 3.0.2
     7Version: 3.0.3
    88Author URI: http://thimpress.com
    99Tags: learnpress, lms, add-on, bbpress
     
    1616
    1717define( 'LP_ADDON_BBPRESS_FILE', __FILE__ );
    18 define( 'LP_ADDON_BBPRESS_VER', '3.0.2' );
     18define( 'LP_ADDON_BBPRESS_VER', '3.0.3' );
    1919define( 'LP_ADDON_BBPRESS_REQUIRE_VER', '3.0.0' );
    2020
  • learnpress-bbpress/trunk/readme.txt

    r1906859 r1919210  
    44Tags: lms, elearning, e-learning, learning management system, education, course, courses, quiz, quizzes, questions, training, guru, sell courses 
    55Requires at least: 3.8 
    6 Tested up to: 4.9.7
    7 Stable tag: 3.0.2
     6Tested up to: 4.9.8
     7Stable tag: 3.0.3
    88License: GPLv2 or later 
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    5555== Changelog ==
    5656
     57= 3.0.3 =
     58+ Fixed issue about missing instructor role in back end.
     59
    5760= 3.0.2 =
    5861+ Fixed can't change user forum role when editing user
Note: See TracChangeset for help on using the changeset viewer.