Plugin Directory

Changeset 1887408


Ignore:
Timestamp:
06/05/2018 11:05:07 AM (8 years ago)
Author:
BuddyBoss
Message:

BuddyPress for LearnDash new version 1.2.5

Location:
buddypress-learndash
Files:
39 added
12 edited

Legend:

Unmodified
Added
Removed
  • buddypress-learndash/trunk/assets/js/admin.js

    r1713334 r1887408  
    11if ( typeof jq == "undefined" ) {
    2     var jq = jQuery;
     2    var jq = jQuery;
    33}
    44
    5 jq(document).on( 'ready', function($) {
     5/**
     6 * Course enrollment class
     7 * @param ld_vars
     8 * @returns {{init: init}}
     9 * @constructor
     10 */
     11var BuddyPress_Learndash_Group_Edit = function( ld_vars ) {
    612
    7     /**
    8      * Learndash group edit screen JS
    9      */
    10     var BuddyPress_Learndash_Group_Edit = {
     13    var $enrollmentNotice  = jq('#enrollment-notice'),
     14        startPos =  0,
     15        endPos = 10,
     16        noticeMessage = 'BuddyPress for Learndash enrolling users to the course buddypress groups. This can take a while if you have many students(members). Do not navigate away from this page until this is done.';
    1117
    12         vars: {
    13             $enrollmentNotice: jq('#enrollment-notice'),
    14             startPos: 0,
    15             endPos: 10,
    16         },
     18    function init() {
     19        if ( ld_vars.courses != null && ld_vars.users!= null  ) {
    1720
    18         init: function() {
    19             if ( typeof buddypress_learndash_vars != 'undefined' ) {
    20                 BuddyPress_Learndash_Group_Edit.vars.$enrollmentNotice.toggleClass('hidden');
    21                 this.user_enrollment(buddypress_learndash_vars.users.slice(BuddyPress_Learndash_Group_Edit.vars.startPos, BuddyPress_Learndash_Group_Edit.vars.endPos));
    22             }
    23         },
     21            // Add enrollment progress notice in class editor
     22            $enrollmentNotice.toggleClass('hidden');
    2423
    25         user_enrollment: function( users ) {
     24            // Add enrollment progress notice in gutenberg editor
     25            if ( 'undefined' !== typeof wp.data ) {
     26                wp.data.dispatch( 'core/editor' ).createInfoNotice( noticeMessage, {id : 'ldEnrollment' } );
     27            }
     28            user_enrollment(ld_vars.users.slice(startPos, endPos));
     29        }
     30    }
    2631
    27             if ( 0 == users.length ) {
    28                 BuddyPress_Learndash_Group_Edit.vars.$enrollmentNotice.toggleClass('hidden');
    29                 return 0;
    30             }
     32    function user_enrollment( users ) {
    3133
    32             jq.ajax({
    33                 type: 'POST',
    34                 url: ajaxurl,
    35                 data: { action: "mass_group_join", users: users, courses: buddypress_learndash_vars.courses },
    36                 success: function( response ) {
    37                     if ( response !== Object( response ) || ( typeof response.success === "undefined" && typeof response.error === "undefined" ) ) {
    38                         response = new Object;
    39                         response.success = false;
    40                         return;
    41                     }
     34        if ( 0 === users.length ) {
    4235
    43                     BuddyPress_Learndash_Group_Edit.vars.startPos = BuddyPress_Learndash_Group_Edit.vars.endPos;
    44                     BuddyPress_Learndash_Group_Edit.vars.endPos = BuddyPress_Learndash_Group_Edit.vars.endPos + 10;
    45                     BuddyPress_Learndash_Group_Edit.user_enrollment( buddypress_learndash_vars.users.slice( BuddyPress_Learndash_Group_Edit.vars.startPos, BuddyPress_Learndash_Group_Edit.vars.endPos ) );
    46                 }
    47             });
    48         }
     36            // Add enrollment progress notice in class editor
     37            $enrollmentNotice.toggleClass('hidden');
    4938
    50     };
     39            // Remove enrollment progress notice in gutenberg editor
     40            if ( 'undefined' !== typeof wp.data ) {
     41                wp.data.dispatch( 'core/editor' ).removeNotice( 'ldEnrollment' );
     42            }
     43            return 0;
     44        }
    5145
    52     BuddyPress_Learndash_Group_Edit.init();
     46        jq.ajax({
     47            type: 'POST',
     48            url: ajaxurl,
     49            data: { action: "mass_group_join", users: users, courses: ld_vars.courses },
     50            success: function( response ) {
     51                if ( response !== Object( response ) || ( typeof response.success === "undefined" && typeof response.error === "undefined" ) ) {
     52                    response = new Object;
     53                    response.success = false;
     54                    return;
     55                }
    5356
     57                startPos = endPos;
     58                endPos = endPos + 10;
     59                user_enrollment( ld_vars.users.slice( startPos, endPos ) );
     60            }
     61        });
     62    }
     63
     64    return {
     65        init: init
     66    }
     67};
     68
     69jq(function($) {
     70
     71    // Run enrollment after course update from classic editor
     72    if ( buddypress_learndash_vars.proceed_enrollment ) {
     73        new BuddyPress_Learndash_Group_Edit(buddypress_learndash_vars).init();
     74    }
     75
     76    // Run enrollment after course update from gutenberg editor
     77    jq( document ).ajaxComplete(function( event, xhr, settings ) {
     78
     79        if ( settings.url.indexOf('/sfwd-courses/') === -1
     80            && settings.url.indexOf('/groups/') === -1  ) {
     81            return false;
     82        }
     83
     84        // The condition runs only on the Course Edit Screen:
     85        // No need to go further if, course has not been attached with buddypress group
     86        if ( settings.url.indexOf('/sfwd-courses/') !== -1
     87            && document.getElementById('bp-course-group').value === '-1' ) {
     88            return false;
     89        }
     90
     91        jq.ajax({
     92            type: 'POST',
     93            url: ajaxurl,
     94            data: {
     95                action: "get_enrollment_data",
     96                screen_id: buddypress_learndash_vars.screen_id,
     97                post_ID: $('#post_ID')[0].value
     98            },
     99            success: function (response) {
     100                var ld_vars = response.data;
     101                new BuddyPress_Learndash_Group_Edit(ld_vars).init();
     102            }
     103        });
     104    });
    54105});
  • buddypress-learndash/trunk/assets/js/admin.min.js

    r1713334 r1887408  
    1 if("undefined"==typeof jq)var jq=jQuery;jq(document).on("ready",function(a){var b={vars:{$enrollmentNotice:jq("#enrollment-notice"),startPos:0,endPos:10},init:function(){"undefined"!=typeof buddypress_learndash_vars&&(b.vars.$enrollmentNotice.toggleClass("hidden"),this.user_enrollment(buddypress_learndash_vars.users.slice(b.vars.startPos,b.vars.endPos)))},user_enrollment:function(a){return 0==a.length?(b.vars.$enrollmentNotice.toggleClass("hidden"),0):void jq.ajax({type:"POST",url:ajaxurl,data:{action:"mass_group_join",users:a,courses:buddypress_learndash_vars.courses},success:function(a){return a!==Object(a)||"undefined"==typeof a.success&&"undefined"==typeof a.error?(a=new Object,void(a.success=!1)):(b.vars.startPos=b.vars.endPos,b.vars.endPos=b.vars.endPos+10,void b.user_enrollment(buddypress_learndash_vars.users.slice(b.vars.startPos,b.vars.endPos)))}})}};b.init()});
     1if("undefined"==typeof jq)var jq=jQuery;var BuddyPress_Learndash_Group_Edit=function(a){function b(){null!=a.courses&&null!=a.users&&(d.toggleClass("hidden"),"undefined"!=typeof wp.data&&wp.data.dispatch("core/editor").createInfoNotice(g,{id:"ldEnrollment"}),c(a.users.slice(e,f)))}function c(b){return 0===b.length?(d.toggleClass("hidden"),"undefined"!=typeof wp.data&&wp.data.dispatch("core/editor").removeNotice("ldEnrollment"),0):void jq.ajax({type:"POST",url:ajaxurl,data:{action:"mass_group_join",users:b,courses:a.courses},success:function(b){return b!==Object(b)||"undefined"==typeof b.success&&"undefined"==typeof b.error?(b=new Object,void(b.success=!1)):(e=f,f+=10,void c(a.users.slice(e,f)))}})}var d=jq("#enrollment-notice"),e=0,f=10,g="BuddyPress for Learndash enrolling users to the course buddypress groups. This can take a while if you have many students(members). Do not navigate away from this page until this is done.";return{init:b}};jq(function(a){buddypress_learndash_vars.proceed_enrollment&&new BuddyPress_Learndash_Group_Edit(buddypress_learndash_vars).init(),jq(document).ajaxComplete(function(b,c,d){return(d.url.indexOf("/sfwd-courses/")!==-1||d.url.indexOf("/groups/")!==-1)&&((d.url.indexOf("/sfwd-courses/")===-1||"-1"!==document.getElementById("bp-course-group").value)&&void jq.ajax({type:"POST",url:ajaxurl,data:{action:"get_enrollment_data",screen_id:buddypress_learndash_vars.screen_id,post_ID:a("#post_ID")[0].value},success:function(a){var b=a.data;new BuddyPress_Learndash_Group_Edit(b).init()}}))})});
  • buddypress-learndash/trunk/buddypress-learndash.php

    r1800376 r1887408  
    66 * Author:      BuddyBoss
    77 * Author URI:  http://buddyboss.com
    8  * Version:     1.2.4
     8 * Version:     1.2.5
    99 */
    1010// Exit if accessed directly
     
    1919// Codebase version
    2020if (!defined( 'BUDDYPRESS_LEARNDASH_PLUGIN_VERSION' ) ) {
    21   define( 'BUDDYPRESS_LEARNDASH_PLUGIN_VERSION', '1.2.4' );
     21  define( 'BUDDYPRESS_LEARNDASH_PLUGIN_VERSION', '1.2.5' );
    2222}
    2323
  • buddypress-learndash/trunk/includes/bp-learndash-functions.php

    r1800376 r1887408  
    1919function bp_learndash_profile_courses_slug()
    2020{
    21     return LearnDash_Custom_Label::label_to_slug( 'courses' );
     21    return apply_filters( 'bp_learndash_profile_courses_slug', 'courses' );
    2222}
    2323
     
    3737function bp_learndash_profile_my_courses_slug()
    3838{
    39     return sprintf( __( 'my-%s', 'buddypress-learndash' ), LearnDash_Custom_Label::label_to_slug( 'courses' ) );
     39    return apply_filters( 'bp_learndash_profile_my_courses_slug', 'my-courses' );
    4040}
    4141
     
    4545
    4646function bp_learndash_profile_create_courses_slug() {
    47     return sprintf( __( 'create-%s', 'buddypress-learndash' ), LearnDash_Custom_Label::label_to_slug( 'courses' ) );
     47    return apply_filters( 'bp_learndash_profile_create_courses_slug', 'create-courses' );
    4848}
    4949
     
    8888    global $wpdb;
    8989
    90     if ( empty( $type_id ) ) return;
     90    if ( empty( $type_id ) ) return array();
    9191
    9292    $student_ids = $wpdb->get_col("SELECT u.ID FROM {$wpdb->users} u INNER JOIN {$wpdb->prefix}term_relationships r ON u.ID = r.object_id WHERE u.user_status = 0 AND r.term_taxonomy_id = ".$type_id);
    93     return $student_ids;
     93
     94    return (array) $student_ids;
    9495}
    9596
     
    109110    $type_id = bp_learndash_sql_member_type_id($type_name);
    110111    $student_ids = bp_learndash_sql_members_by_type($type_id);
    111     $members_count = count($student_ids);
     112    $members_count = is_array( $student_ids ) ? count($student_ids) : 0;
    112113    return $members_count;
    113114}
     
    151152function bp_learndash_get_course_members( $course_id ) {
    152153    $meta = get_post_meta( $course_id, '_sfwd-courses', true );
    153    
    154     if ( !empty( $meta['sfwd-courses_course_access_list'] ) ) 
     154
     155    if ( !empty( $meta['sfwd-courses_course_access_list'] ) )
    155156        $course_access_list = explode( ',', $meta['sfwd-courses_course_access_list'] );
    156     else 
     157    else
    157158        $course_access_list = array();
    158    
     159
    159160    return $course_access_list;
    160161}
     
    168169
    169170    $course_students = bp_learndash_get_course_members( $course_id );
    170    
     171
    171172    if ( empty( $course_students ) ) {
    172173        return;
     
    223224    global $wpdb;
    224225
    225     if ( class_exists('bbPress') && bp_is_group_forums_active() ) {
     226    if ( class_exists('bbPress') && groups_get_group( $group_id )->enable_forum ) {
    226227
    227228        $group = groups_get_group( array( 'group_id' => $group_id ) );
     
    298299
    299300    $attached_media_id = get_post_thumbnail_id( $course_id, $group_id );
    300    
     301
    301302    if ( empty($attached_media_id) ) {
    302303        return;
    303304    }
    304    
     305
    305306    $attachment_src = wp_get_attachment_image_src( $attached_media_id, 'full' );
    306307
     
    389390    extract( $r );
    390391
    391     $activity_id = bp_activity_add( array(
     392    $activity_id = groups_record_activity( array(
    392393        'id' => $id,
    393394        'user_id' => $user_id,
     
    402403        'hide_sitewide' => $hide_sitewide
    403404    ) );
    404    
     405
    405406    bp_activity_add_meta( $activity_id, 'bp_learndash_group_activity_markup', 'true' );
    406    
     407
    407408    return $activity_id;
    408409}
     
    443444    }
    444445
    445     add_action( 'bp_has_activities', 'bp_learndash_activity_filter', 110, 2 );
    446    
     446    // add_action( 'bp_has_activities', 'bp_learndash_activity_filter', 110, 2 );
     447
    447448    /**
    448449     * Learndash menu items
     
    451452    function learndash_add_custom_menu_items() {
    452453        global $pagenow;
    453        
     454
    454455        if( 'nav-menus.php' == $pagenow ) {
    455456            add_meta_box( 'add-learndash-links', 'Learndash', 'wp_nav_menu_item_learndash_links_meta_box', 'nav-menus', 'side', 'low' );
     
    502503        <?php
    503504    }
    504    
     505
    505506    /**
    506507     * learndash_setup_nav_menu_item function.
     
    543544
    544545    } // End learndash_setup_nav_menu_item()
    545    
     546
    546547    add_filter( 'wp_setup_nav_menu_item', 'learndash_setup_nav_menu_item' );
    547548
     
    549550 * Hide lessons and topics from users if they dont have access to its parent course.
    550551 * Prevent those from appearing in bp-global-search results.
    551  * 
     552 *
    552553 * @param string $sql
    553554 * @param mixed $args
     
    559560        return $sql;
    560561    }
    561    
     562
    562563    $filtered_post_ids = array( 1 );//dummy, to return no results
    563564    /**
     
    567568    $user_courses = ld_get_mycourses( get_current_user_id() );
    568569    if( !empty( $user_courses ) && is_array( $user_courses ) ){
    569         $args = array( 
     570        $args = array(
    570571            'post_type'         => $args['post_type'],
    571572            'posts_per_page'    => -1,
     573            'fields'            => 'ids',
    572574            'meta_query'        => array(
    573575                array(
     
    579581        );
    580582        $pi_q = new WP_Query( $args );
    581        
     583
    582584        if( $pi_q->have_posts() ){
    583585            $filtered_post_ids = array();
     
    589591        wp_reset_postdata();
    590592    }
    591    
     593
    592594    $post_ids_csv = implode( ',', $filtered_post_ids );
    593595    $sql .= " AND id IN ( {$post_ids_csv} ) ";
    594    
     596
    595597    return $sql;
    596598}
     
    601603        $group_id = bp_get_group_id();
    602604    }
    603    
     605
    604606    $retval = $default_true;
    605607        $bp_sensei_course_activity = groups_get_groupmeta( $group_id, 'group_extension_course_setting_activities' );
     
    607609        $retval = isset( $bp_sensei_course_activity[$key] );
    608610    }
    609    
     611
    610612    return $retval;
    611613}
     
    714716                'item_id' => $group_attached,
    715717                'secondary_item_id' =>  $course_id,
    716                 'component' => $bp->groups->id,
    717                 'hide_sitewide' => true
     718                'component' => $bp->groups->id
    718719            );
    719720            $activity_recorded = bp_learndash_record_activity($args);
  • buddypress-learndash/trunk/includes/bp-learndash-group-settings.php

    r1800376 r1887408  
    1414
    1515        /**
    16          * Your __construct() method will contain configuration options for 
     16         * Your __construct() method will contain configuration options for
    1717         * your extension, and will pass them to parent::init()
    1818         */
     
    2828        function display( $group_id = null ) {
    2929        }
    30        
     30
    3131        /**
    32          * settings_screen() is the catch-all method for displaying the content 
     32         * settings_screen() is the catch-all method for displaying the content
    3333         * of the edit, create, and Dashboard admin panels
    3434         */
     
    4040                'post_status'   => 'publish'
    4141            ) );
    42            
     42
    4343            if ( !empty($courses) ) { ?>
    4444                <div class="bp-learndash-group-course">
     
    5858                </div><br><br/><br/><?php
    5959            }
    60            
     60
    6161            if ( !empty($group_status) && ( '-1' != $group_status )  ) {
    6262                $bp_learndash_course_activity = groups_get_groupmeta( $group_id, 'group_extension_course_setting_activities' );
     
    8585
    8686        /**
    87          * settings_screen_save() contains the catch-all logic for saving 
     87         * settings_screen_save() contains the catch-all logic for saving
    8888         * settings from the edit, create, and Dashboard admin panels
    8989         */
    9090        function settings_screen_save( $group_id = NULL ) {
    91            
     91
    9292            $bp_learndash_course_activity = array();
    9393            $old_course_id = groups_get_groupmeta( $group_id, 'bp_course_attached', true );
    9494
    9595            if ( isset( $_POST[ 'bp_group_course' ] )  && ( $_POST[ 'bp_group_course' ] ) != '-1' ) {
    96                
     96
    9797                if ( ! empty( $old_course_id ) && $old_course_id != $_POST['bp_group_course'] ) {
    9898                    delete_post_meta($old_course_id, 'bp_course_group');
     
    100100                    bp_learndash_remove_members_group( $old_course_id, $group_id );
    101101                }
    102                
     102
    103103                update_post_meta( $_POST[ 'bp_group_course' ], 'bp_course_group', $group_id );
    104104                groups_add_groupmeta( $group_id, 'bp_course_attached', $_POST[ 'bp_group_course' ] );
    105                
     105
    106106                bp_learndash_attach_forum($group_id);
    107                
    108                 //Updating visibilty of group
    109                 $group = groups_get_group( array( 'group_id' => $group_id ) );
    110                 if ( 'public' == $group->status ) {
    111                     $group->status = 'private';
    112                 } elseif ( 'hidden' == $group->status ) {
    113                     $group->status = 'hidden';
     107
     108                //Updating visibility of group if course is not open or free
     109                $course_price_type = get_course_meta_setting( $_POST[ 'bp_group_course' ], 'course_price_type' );
     110
     111                if ( 'open' !== $course_price_type && 'free' !== $course_price_type ) {
     112                    $group = groups_get_group( array( 'group_id' => $group_id ) );
     113                    if ( 'public' == $group->status ) {
     114                        $group->status = 'private';
     115                    } elseif ( 'hidden' == $group->status ) {
     116                        $group->status = 'hidden';
     117                    }
     118                    $group->save();
    114119                }
    115                 $group->save();
    116                
     120
    117121                //Updating group avatar
    118122                bp_learndash_update_group_avatar( $_POST[ 'bp_group_course' ], $group_id );
     
    121125                //Adding teacher as admin of group
    122126                bp_learndash_course_teacher_group_admin($_POST[ 'bp_group_course' ], $group_id );
    123                
     127
    124128            } else {
    125129                delete_post_meta($old_course_id, 'bp_course_group');
    126130                groups_delete_groupmeta( $group_id, 'bp_course_attached' );
    127131            }
    128            
     132
    129133            if ( !isset($_POST['activity-checkbox-enable'] ) ) {
    130134                $bp_learndash_course_activity = array(
     
    141145                );
    142146            }
    143            
     147
    144148            if ( isset( $_POST[ 'user_course_start' ] ) ) {
    145149                $bp_learndash_course_activity['user_course_start'] = $_POST[ 'user_course_start' ];
     
    175179            groups_update_groupmeta( $group_id, 'group_extension_course_setting_activities', $bp_learndash_course_activity );
    176180        }
    177        
     181
    178182        public function bp_is_checked( $value , $array ) {
    179183            if ( array_key_exists( $value, $array ) ) {
     
    185189            return $checked;
    186190        }
    187        
     191
    188192    }
    189  
     193
    190194endif; // if ( class_exists( 'BP_Group_Extension' ) )
  • buddypress-learndash/trunk/includes/bp-learndash-groups.php

    r1713334 r1887408  
    4444                add_action( 'save_post', array ( $this, 'bp_learndash_save_postdata' ), 10, 2 );
    4545                add_action( 'body_class', array ( $this, 'bp_learndash_group_body_class' ) );
    46                
     46
    4747                add_filter('the_content', array( $this,'bp_learndash_group_discussion_button' ),9999 );
    48                
     48
    4949                add_filter( 'bp_get_group_type', array( $this, 'bp_learndash_course_group_text' ) );
    5050            }
    5151        }
    52        
     52
    5353        /**
    5454         * course metabox
     
    6363            add_meta_box( 'bp_course_group', sprintf( __( '%s Group', 'buddypress-learndash' ), LearnDash_Custom_Label::get_label( 'course' ) ), array( $this, 'bp_learndash_metabox_function' ), 'sfwd-courses', 'side', 'core' );
    6464        }
    65        
     65
    6666        /**
    6767         * metabox html
     
    8888                        continue;
    8989                    }
    90                        
     90
    9191                    ?><option value="<?php echo $group->id; ?>" <?php echo (( $course_group == $group->id )) ? 'selected' : ''; ?>><?php _e( $group->name, 'buddypress-learndash' ); ?></option><?php
    9292                }
     
    9595            <h4><a href="<?php echo ( home_url() .'/'. buddypress()->{'groups'}->root_slug .'/create' ); ?>" target="_blank"><?php _e( '&#43; Create New Group', 'buddypress-learndash' ); ?></a></h4><?php
    9696        }
    97        
     97
    9898        /**
    9999         * Courses save postadata
     
    101101         */
    102102        public function bp_learndash_save_postdata( $post_id, $post ) {
    103             // verify if this is an auto save routine. 
     103            // verify if this is an auto save routine.
    104104            // If it is our form has not been submitted, so we dont want to do anything
    105105            if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
     
    135135                        //Add members to group, we are doing this with ajax batches to prevent timeout
    136136                        //bp_learndash_add_members_group($post_id, $_POST[ 'bp_course_group' ] );
    137                        
     137
    138138                        //Adding teacher as admin of group
    139139                        bp_learndash_course_teacher_group_admin($post_id, $_POST[ 'bp_course_group' ] );
    140                        
     140
    141141                        //Attach forum
    142142                        bp_learndash_attach_forum( $_POST[ 'bp_course_group' ] );
    143143
    144144                        //Set group visibility
    145                         bp_learndash_alter_group_status( $_POST[ 'bp_course_group' ] );
    146                        
     145                        $course_price_type = get_course_meta_setting( $post_id, 'course_price_type' );
     146
     147                        if ( 'open' !== $course_price_type && 'free' !== $course_price_type ) {
     148                            bp_learndash_alter_group_status( $_POST[ 'bp_course_group' ] );
     149                        }
     150
    147151                        //Update Group avatar
    148152                        bp_learndash_update_group_avatar( $post_id, $_POST[ 'bp_course_group' ] );
     
    154158            }
    155159        }
    156        
     160
    157161        /**
    158162         * group class
     
    161165         */
    162166        public function bp_learndash_group_body_class( $classes = '' ) {
    163            
     167
    164168            if ( in_array( 'group-settings', $classes ) ) {
    165169                $group = groups_get_current_group();
     
    168172                    $classes[] = 'bp-hidepublic';
    169173                }
    170                
     174
    171175            }
    172176            return $classes;
     
    179183         */
    180184        public function bp_learndash_user_course_reset( $user_id, $course_id ) {
    181            
     185
    182186            $group_attached = get_post_meta( $course_id, 'bp_course_group', true );
    183            
     187
    184188            if ( !empty( $group_attached ) ) {
    185189                groups_remove_member( $user_id, $group_attached );
    186190            }
    187            
    188         }
    189        
     191
     192        }
     193
    190194        /**
    191195         * change course group text
     
    196200        public function bp_learndash_course_group_text( $type ) {
    197201            global $groups_template;
    198            
     202
    199203            if ( empty( $group ) )
    200204                $group =& $groups_template->group;
    201            
     205
    202206            $group_id = $group->id;
    203207            $course_attached = groups_get_groupmeta( $group_id, 'bp_course_attached', true );
    204                
     208
    205209            if ( empty( $course_attached ) ) {
    206210                return apply_filters( 'bp_learndash_course_group_text', $type );
    207211            }
    208            
     212
    209213            if ( 'Private Group' == $type ) {
    210214                $type = __( "Private Course Group", "buddypress-learndash" );
     
    213217                $type = __( "Hidden Course Group", "buddypress-learndash" );
    214218            }
    215            
     219
    216220            return apply_filters( 'bp_learndash_course_group_text', $type );
    217221        }
    218        
     222
    219223        public function bp_learndash_group_discussion_button( $content ) {
    220            
     224
    221225            if ( ( is_singular( array('sfwd-courses', 'sfwd-lessons', 'sfwd-topic') ) ) ) {
    222                
     226
    223227                $html = '';
    224                
     228
    225229                if ( get_post_type() == 'sfwd-courses' ) {
    226230                    $course_id = get_the_ID();
    227231                }
    228                
     232
    229233                if ( get_post_type() == 'sfwd-lessons' ) {
    230234                    $course_id = get_post_meta(get_the_ID(),'course_id',true);
    231235                }
    232                
     236
    233237                if ( get_post_type() == 'sfwd-topic' ) {
    234238                    $lesson_id = get_post_meta(get_the_ID(),'lesson_id',true);
    235239                    $course_id = get_post_meta($lesson_id,'course_id',true);
    236240                }
    237                
     241
    238242                if ( sfwd_lms_has_access_fn( $course_id ) || current_user_can( 'manage_options' ) ) {
    239243                    $group_attached = get_post_meta( $course_id, 'bp_course_group', true );
     
    248252                }
    249253            }
    250            
     254
    251255            return $content;
    252256        }
  • buddypress-learndash/trunk/includes/bp-learndash-loader.php

    r1800376 r1887408  
    7474            }
    7575        }
    76        
     76
    7777        /**
    7878         * lesson create activity
     
    9999            // if already displayed
    100100            $attached_course_id = get_post_meta( $lesson_id, 'attached_course_id', true );
    101            
     101
    102102            if( $attached_course_id == $course_id ) return;
    103            
     103
    104104            $group_attached = get_post_meta( $course_id, 'bp_course_group', true );
    105            
     105
    106106            if ( empty( $group_attached ) ) {
    107107                return;
     
    110110                return;
    111111            }
    112            
     112
    113113            global $bp;
    114114            $user_link = bp_core_get_userlink( $user_id );
     
    127127                'item_id' => $group_attached,
    128128                'secondary_item_id' => $lesson_id,
    129                 'component' => $bp->groups->id,
    130                 'hide_sitewide' => true
     129                'component' => $bp->groups->id
    131130            );
    132            
     131
    133132            $activity_recorded = bp_learndash_record_activity( $args );
    134133            if($activity_recorded) {
     
    137136            }
    138137        }
    139        
     138
    140139        /**
    141140         * topic create activity
     
    156155
    157156            $lesson_id = $lesson_id_obj['sfwd-topic_lesson'];
    158            
     157
    159158            $course_id_obj = get_post_meta( $lesson_id, '_sfwd-lessons', true );
    160159
     
    162161
    163162            $course_id = $course_id_obj['sfwd-lessons_course'];
    164            
     163
    165164            if( ( '0' == $topic_id ) ) return;
    166165
    167166            // if already displayed
    168167            $attached_lesson_id = get_post_meta( $topic_id, 'attached_lesson_id', true );
    169            
     168
    170169            if( $attached_lesson_id == $lesson_id ) return;
    171            
     170
    172171            $group_attached = get_post_meta( $course_id, 'bp_course_group', true );
    173            
     172
    174173            if ( empty( $group_attached ) ) {
    175174                return;
     
    178177                return;
    179178            }
    180            
     179
    181180            global $bp;
    182181            $user_link = bp_core_get_userlink( $user_id );
     
    195194                'item_id' => $group_attached,
    196195                'secondary_item_id' => $topic_id,
    197                 'component' => $bp->groups->id,
    198                 'hide_sitewide' => true
     196                'component' => $bp->groups->id
    199197            );
    200            
     198
    201199            $activity_recorded = bp_learndash_record_activity( $args );
    202200            if($activity_recorded) {
     
    211209        public function bp_learndash_user_lesson_end_activity( $course_arr ) {
    212210            global $bp;
    213            
     211
    214212            $user_id = $course_arr['user']->ID;
    215213            $lesson_id = $course_arr['lesson']->ID;
    216214            $course_id = $course_arr['course']->ID;
    217            
     215
    218216            $group_attached = get_post_meta( $course_id, 'bp_course_group', true );
    219217            if ( empty( $group_attached ) ) {
     
    235233                    'item_id' => $group_attached,
    236234                    'secondary_item_id' => $lesson_id,
    237                     'component' => $bp->groups->id,
    238                     'hide_sitewide' => true
     235                    'component' => $bp->groups->id
    239236                );
    240237                $activity_recorded = bp_learndash_record_activity( $args );
     
    243240                }
    244241        }
    245        
     242
    246243        /**
    247244         * user lesson end activity
     
    249246        public function bp_learndash_user_topic_end_activity( $course_arr ) {
    250247            global $bp;
    251            
     248
    252249            $user_id = $course_arr['user']->ID;
    253250            $topic_id = $course_arr['topic']->ID;
    254251            $lesson_id = $course_arr['lesson']->ID;
    255252            $course_id = $course_arr['course']->ID;
    256            
     253
    257254            $group_attached = get_post_meta( $course_id, 'bp_course_group', true );
    258255            if ( empty( $group_attached ) ) {
     
    274271                    'item_id' => $group_attached,
    275272                    'secondary_item_id' => $topic_id,
    276                     'component' => $bp->groups->id,
    277                     'hide_sitewide' => true
     273                    'component' => $bp->groups->id
    278274                );
    279275                $activity_recorded = bp_learndash_record_activity( $args );
     
    282278                }
    283279        }
    284        
     280
    285281        /**
    286282         * User course end activity
     
    288284        public function bp_learndash_user_course_end_activity( $course_arr ) {
    289285            global $bp;
    290            
     286
    291287            $user_id = $course_arr['user']->ID;
    292288            $course_id = $course_arr['course']->ID;
    293            
     289
    294290            $group_attached = get_post_meta( $course_id, 'bp_course_group', true );
    295291            if ( empty( $group_attached ) ) {
     
    299295                return;
    300296            }
    301                
     297
    302298            $user_link = bp_core_get_userlink( $user_id );
    303299            $course_title = get_the_title( $course_id );
     
    312308                'item_id' => $group_attached,
    313309                'secondary_item_id' => $course_id,
    314                 'component' => $bp->groups->id,
    315                 'hide_sitewide' => true
     310                'component' => $bp->groups->id
    316311            );
    317312            $activity_recorded = bp_learndash_record_activity( $args );
     
    332327            $post_id = $comment_obj->comment_post_ID;
    333328            $post_type = get_post_type( $post_id );
    334            
     329
    335330            if ( 'sfwd-lessons' == $post_type && 'approve' == $comment_status ) {
    336                    
     331
    337332                global $bp;
    338333                $course_id = get_post_meta($post_id,'attached_course_id',true);
     
    355350                    'secondary_item_id' => $post_id,
    356351                    'component' => $bp->groups->id,
    357                     'hide_sitewide' => true,
    358352                    'content' => $comment_obj->comment_content
    359353                );
     
    364358            }
    365359        }
    366        
     360
    367361        /**
    368362         * Record topic comment preapproved
     
    386380                    return;
    387381                }
    388                
     382
    389383                $user_link = bp_core_get_userlink( $comment_obj->user_id );
    390384                $lesson_title = get_the_title( $post_id );
     
    396390                    'item_id' => $group_attached,
    397391                    'component' => $bp->groups->id,
    398                     'hide_sitewide' => true,
    399392                    'content' => $comment_obj->comment_content
    400393                );
     
    405398            }
    406399        }
    407        
     400
    408401        /**
    409402         * Record lesson comment preapproved
     
    417410            $post_id = $comment_obj->comment_post_ID;
    418411            $post_type = get_post_type( $post_id );
    419            
     412
    420413            if ( 'sfwd-lessons' == $post_type && $commentdata ) {
    421                    
     414
    422415                global $bp;
    423416                $course_id = get_post_meta($post_id,'attached_course_id',true);
     
    440433                    'component' => $bp->groups->id,
    441434                    'secondary_item_id' => $post_id,
    442                     'hide_sitewide' => true,
    443435                    'content' => $comment_obj->comment_content
    444436                );
     
    449441            }
    450442        }
    451        
     443
    452444        /**
    453445         * Record course comment
     
    461453            $post_id = $course_id = $comment_obj->comment_post_ID;
    462454            $post_type = get_post_type( $post_id );
    463            
     455
    464456            if ( 'sfwd-courses' == $post_type && $commentdata ) {
    465                    
     457
    466458                global $bp;
    467459                $group_attached = get_post_meta( $course_id, 'bp_course_group', true );
     
    483475                    'secondary_item_id' => $post_id,
    484476                    'component' => $bp->groups->id,
    485                     'hide_sitewide' => true,
    486477                    'content' => $comment_obj->comment_content
    487478                );
     
    492483            }
    493484        }
    494        
     485
    495486        /**
    496487         * Record quiz activity
     
    498489         */
    499490        public function bp_learndash_complete_quiz_activity( $quizdata, $user ) {
    500            
     491
    501492            global $bp;
    502            
     493
    503494            $quiz_passesd = $quizdata['pass'];
    504            
     495
    505496            if ( $quiz_passesd != '1' ) return;
    506            
     497
    507498            $quiz_id = $quizdata['quiz']->ID;
    508499            $quiz_grade = $quizdata['score'];
     
    526517                    'secondary_item_id' => $quiz_id,
    527518                    'component' => $bp->groups->id,
    528                     'hide_sitewide' => true
    529519                );
    530520                $activity_recorded = bp_learndash_record_activity( $args );
     
    691681                )
    692682            );
    693            
     683
    694684            if( current_user_can( 'manage_options' ) ) {
    695685                $all_post_types[] =
     
    701691                );
    702692            }
    703            
     693
    704694            foreach($all_post_types as $single){
    705695                $this->bp_learndash_setup_admin_bar($single['name'], $single['slug'], $single['parent'], $single['nav_link']);
  • buddypress-learndash/trunk/includes/bp-learndash-users-enrollment.php

    r1722193 r1887408  
    1919        add_action( 'wp_ajax_mass_group_join',  array( $this, 'mass_group_join' ) );
    2020        add_action( 'edit_form_top',            array( $this, 'notice'), 10 );
     21        add_action( 'wp_ajax_get_enrollment_data', array( $this, 'get_enrollment_data_ajax_callback' ) );
    2122    }
    2223
     
    6061        if ( ! isset( $current_screen->id ) || ! in_array(  $current_screen->id , array( 'sfwd-courses', 'groups') ) ) return;
    6162
    62         if ( $current_screen->action == 'add' ) return;
     63        //if ( $current_screen->action == 'add' ) return;
    6364
    6465        wp_enqueue_script( 'bp-ld-admin-script',  BUDDYPRESS_LEARNDASH_PLUGIN_URL .'assets/js/admin.min.js', array( 'jquery' ), BUDDYPRESS_LEARNDASH_PLUGIN_VERSION );
    6566        wp_enqueue_style( 'bp-ld-admin-style',  BUDDYPRESS_LEARNDASH_PLUGIN_URL .'assets/css/admin.min.css', array(), BUDDYPRESS_LEARNDASH_PLUGIN_VERSION );
    6667
    67         $post_ID = $post->ID;
     68        $enrollment_data = $this->get_enrollment_data( $current_screen->post_type, $post->ID );
     69        $enrollment_data['screen_id'] = $current_screen->post_type;
    6870
    69         // Learndah group edit screen
    70         if ( $current_screen->post_type == 'groups' ) {
    71             $courses = learndash_group_enrolled_courses( $post_ID );
    72             $users = learndash_get_groups_user_ids( $post_ID );
    73         }
     71        if ( 'sfwd-courses' === $current_screen->id ) {
     72            $group_attached = get_post_meta( $post->ID, 'bp_course_group', true );
     73            if ( ! empty( $_GET['message'] ) && ! empty( $group_attached ) ) {
     74                $enrollment_data['proceed_enrollment'] = true;
     75            }
     76        }
    7477
    75         // Learndash course edit screen
    76         if ( $current_screen->post_type == 'sfwd-courses' ) {
     78        wp_localize_script( 'bp-ld-admin-script', 'buddypress_learndash_vars', apply_filters( 'buddypress_learndash_vars', $enrollment_data ) );
    7779
    78             $courses            = array( $post_ID );
    79             $users              = array();
    80             $course_user_query  = learndash_get_users_for_course( $post_ID, array( 'count_total' => false ) );
     80    }
    8181
    82             if ( is_object( $course_user_query ) && $course_user_query instanceof WP_User_Query ) {
    83                 $users = $course_user_query->get_results();
    84             }
    85         }
     82    function get_enrollment_data( $current_screen, $post_ID ) {
    8683
    87         if ( ! empty( $_GET['message'] ) ) {
     84        // Learndah group edit screen
     85        if ( $current_screen == 'groups' ) {
     86            $courses = learndash_group_enrolled_courses( $post_ID );
     87            $users = learndash_get_groups_user_ids( $post_ID );
     88        }
    8889
    89             wp_localize_script( 'bp-ld-admin-script', 'buddypress_learndash_vars', apply_filters( 'buddypress_learndash_vars', array(
    90                 'courses' => $courses,
    91                 'users' =>  $users
    92             )));
    93         }
     90        // Learndash course edit screen
     91        if ( $current_screen == 'sfwd-courses' ) {
     92
     93            $courses            = array( $post_ID );
     94            $users              = array();
     95            $course_user_query  = learndash_get_users_for_course( $post_ID, array( 'count_total' => false ) );
     96
     97            if ( is_object( $course_user_query ) && $course_user_query instanceof WP_User_Query ) {
     98                $users = $course_user_query->get_results();
     99            }
     100        }
     101
     102        return array(
     103            'courses' => $courses,
     104            'users' => $users
     105        );
     106    }
     107
     108    function get_enrollment_data_ajax_callback() {
     109        $current_screen = $_POST['screen_id'];
     110        $post_ID = $_POST['post_ID'];
     111        $enrollment_data = $this->get_enrollment_data( $current_screen, $post_ID );
     112        wp_send_json_success($enrollment_data);
    94113    }
    95114
  • buddypress-learndash/trunk/languages/buddypress-learndash- fr_FR.po

    r1800376 r1887408  
    33"Project-Id-Version: BuddyPress for LearnDash\n"
    44"Report-Msgid-Bugs-To: https://www.buddyboss.com/contact/\n"
    5 "POT-Creation-Date: 2018-01-09 13:23:00+00:00\n"
     5"POT-Creation-Date: 2018-06-05 10:06:40+00:00\n"
    66"PO-Revision-Date: 2017-08-14 20:19+0530\n"
    77"Last-Translator: jean-pierre michaud <[email protected]>\n"
     
    177177#: includes/bp-learndash-activity.php:125
    178178#: includes/bp-learndash-activity.php:149 includes/bp-learndash-loader.php:125
    179 #: includes/bp-learndash-loader.php:193
     179#: includes/bp-learndash-loader.php:192
    180180msgid "%1$s added the %2$s %3$s to the %4$s %5$s"
    181181msgstr "%1$s ajouté le %2$s %3$s à %4$s %5$s"
    182182
    183183#: includes/bp-learndash-activity.php:169
    184 #: includes/bp-learndash-activity.php:189 includes/bp-learndash-loader.php:233
    185 #: includes/bp-learndash-loader.php:272
     184#: includes/bp-learndash-activity.php:189 includes/bp-learndash-loader.php:231
     185#: includes/bp-learndash-loader.php:269
    186186msgid "%1$s completed the %2$s %3$s"
    187187msgstr "%1$s completé le %2$s %3$s"
    188188
    189 #: includes/bp-learndash-activity.php:209 includes/bp-learndash-loader.php:310
     189#: includes/bp-learndash-activity.php:209 includes/bp-learndash-loader.php:306
    190190msgid "%1$s completed the course %2$s"
    191191msgstr "%1$s a complété le cours %2$s"
    192192
    193 #: includes/bp-learndash-activity.php:229 includes/bp-learndash-loader.php:353
    194 #: includes/bp-learndash-loader.php:395 includes/bp-learndash-loader.php:438
     193#: includes/bp-learndash-activity.php:229 includes/bp-learndash-loader.php:348
     194#: includes/bp-learndash-loader.php:389 includes/bp-learndash-loader.php:431
    195195msgid "%1$s commented on %2$s %3$s"
    196196msgstr "%1$s commenté sur le %2$s, %3$s"
    197197
    198 #: includes/bp-learndash-activity.php:249 includes/bp-learndash-loader.php:481
     198#: includes/bp-learndash-activity.php:249 includes/bp-learndash-loader.php:473
    199199msgid "%1$s commented on course %2$s"
    200200msgstr "%1$s a commenté le cours %2$s"
    201201
    202 #: includes/bp-learndash-activity.php:272 includes/bp-learndash-loader.php:524
     202#: includes/bp-learndash-activity.php:272 includes/bp-learndash-loader.php:515
    203203msgid "%1$s has passed the %2$s %3$s with score %4$s"
    204204msgstr "%1$s a passé le %2$s %3$s avec le score %4$s"
    205205
    206206#: includes/bp-learndash-activity.php:292
    207 #: includes/bp-learndash-functions.php:712
     207#: includes/bp-learndash-functions.php:714
    208208msgid "%1$s started taking the course %2$s"
    209209msgstr "%1$s a commencé à prendre le cours %2$s"
     
    226226
    227227#: includes/bp-learndash-functions.php:30
    228 #: includes/bp-learndash-functions.php:464
     228#: includes/bp-learndash-functions.php:465
    229229msgid "My %s"
    230230msgstr "Mes %s"
    231 
    232 #: includes/bp-learndash-functions.php:39
    233 msgid "my-%s"
    234 msgstr "my-%s"
    235231
    236232#: includes/bp-learndash-functions.php:43
     
    238234msgstr "Créer un %s"
    239235
    240 #: includes/bp-learndash-functions.php:47
    241 msgid "create-%s"
    242 msgstr "create-%s"
    243 
    244 #: includes/bp-learndash-functions.php:497
     236#: includes/bp-learndash-functions.php:498
    245237msgid "Add to Menu"
    246238msgstr "Ajouter au menu"
     
    308300msgstr "&#43; Créer un Nouveau Groupe"
    309301
    310 #: includes/bp-learndash-groups.php:210
     302#: includes/bp-learndash-groups.php:214
    311303msgid "Private Course Group"
    312304msgstr "Groupe de Cours Privé"
    313305
    314 #: includes/bp-learndash-groups.php:213
     306#: includes/bp-learndash-groups.php:217
    315307msgid "Hidden Course Group"
    316308msgstr "Groupe de Cours Caché"
    317309
    318 #: includes/bp-learndash-groups.php:245
     310#: includes/bp-learndash-groups.php:249
    319311msgid "%s Discussion"
    320312msgstr "Groupe de discussion du %s"
    321313
    322 #: includes/bp-learndash-loader.php:726
     314#: includes/bp-learndash-loader.php:716
    323315msgid "Students"
    324316msgstr "Etudiants"
    325317
    326 #: includes/bp-learndash-loader.php:727
     318#: includes/bp-learndash-loader.php:717
    327319msgid "Student"
    328320msgstr "Étudiant(e)"
    329321
    330 #: includes/bp-learndash-loader.php:732
     322#: includes/bp-learndash-loader.php:722
    331323msgid "Group Leaders"
    332324msgstr "Responsables de groupe"
    333325
    334 #: includes/bp-learndash-loader.php:733
     326#: includes/bp-learndash-loader.php:723
    335327msgid "Group Leader"
    336328msgstr "Chef de Groupe"
    337329
    338 #: includes/bp-learndash-loader.php:740
     330#: includes/bp-learndash-loader.php:730
    339331msgid "Group Leaders <span>%s</span>"
    340332msgstr "Chef du Groupe <span>%s</span>"
    341333
    342 #: includes/bp-learndash-loader.php:741
     334#: includes/bp-learndash-loader.php:731
    343335msgid "Students <span>%s</span>"
    344336msgstr "Étudiants de <span>%s</span>"
    345337
    346 #: includes/bp-learndash-users-enrollment.php:33
     338#: includes/bp-learndash-users-enrollment.php:34
    347339#, fuzzy
    348340msgid ""
     
    415407msgstr ""
    416408
     409#~ msgid "my-%s"
     410#~ msgstr "my-%s"
     411
     412#~ msgid "create-%s"
     413#~ msgstr "create-%s"
     414
    417415#~ msgid "Mass Group Enrollment"
    418416#~ msgstr "Inscription de Masse"
  • buddypress-learndash/trunk/languages/buddypress-learndash-en_US.po

    r1800376 r1887408  
    55"Project-Id-Version: BuddyPress Learndash\n"
    66"Report-Msgid-Bugs-To: https://www.buddyboss.com/contact/\n"
    7 "POT-Creation-Date: 2018-01-09 13:23:00+00:00\n"
     7"POT-Creation-Date: 2018-06-05 10:06:40+00:00\n"
    88"PO-Revision-Date: 2017-08-14 20:20+0530\n"
    99"Last-Translator: BuddyBoss <[email protected]>\n"
     
    164164#: includes/bp-learndash-activity.php:125
    165165#: includes/bp-learndash-activity.php:149 includes/bp-learndash-loader.php:125
    166 #: includes/bp-learndash-loader.php:193
     166#: includes/bp-learndash-loader.php:192
    167167msgid "%1$s added the %2$s %3$s to the %4$s %5$s"
    168168msgstr ""
    169169
    170170#: includes/bp-learndash-activity.php:169
    171 #: includes/bp-learndash-activity.php:189 includes/bp-learndash-loader.php:233
    172 #: includes/bp-learndash-loader.php:272
     171#: includes/bp-learndash-activity.php:189 includes/bp-learndash-loader.php:231
     172#: includes/bp-learndash-loader.php:269
    173173msgid "%1$s completed the %2$s %3$s"
    174174msgstr ""
    175175
    176 #: includes/bp-learndash-activity.php:209 includes/bp-learndash-loader.php:310
     176#: includes/bp-learndash-activity.php:209 includes/bp-learndash-loader.php:306
    177177msgid "%1$s completed the course %2$s"
    178178msgstr ""
    179179
    180 #: includes/bp-learndash-activity.php:229 includes/bp-learndash-loader.php:353
    181 #: includes/bp-learndash-loader.php:395 includes/bp-learndash-loader.php:438
     180#: includes/bp-learndash-activity.php:229 includes/bp-learndash-loader.php:348
     181#: includes/bp-learndash-loader.php:389 includes/bp-learndash-loader.php:431
    182182msgid "%1$s commented on %2$s %3$s"
    183183msgstr ""
    184184
    185 #: includes/bp-learndash-activity.php:249 includes/bp-learndash-loader.php:481
     185#: includes/bp-learndash-activity.php:249 includes/bp-learndash-loader.php:473
    186186msgid "%1$s commented on course %2$s"
    187187msgstr ""
    188188
    189 #: includes/bp-learndash-activity.php:272 includes/bp-learndash-loader.php:524
     189#: includes/bp-learndash-activity.php:272 includes/bp-learndash-loader.php:515
    190190msgid "%1$s has passed the %2$s %3$s with score %4$s"
    191191msgstr ""
    192192
    193193#: includes/bp-learndash-activity.php:292
    194 #: includes/bp-learndash-functions.php:712
     194#: includes/bp-learndash-functions.php:714
    195195msgid "%1$s started taking the course %2$s"
    196196msgstr ""
     
    213213
    214214#: includes/bp-learndash-functions.php:30
    215 #: includes/bp-learndash-functions.php:464
     215#: includes/bp-learndash-functions.php:465
    216216msgid "My %s"
    217 msgstr ""
    218 
    219 #: includes/bp-learndash-functions.php:39
    220 msgid "my-%s"
    221217msgstr ""
    222218
     
    225221msgstr ""
    226222
    227 #: includes/bp-learndash-functions.php:47
    228 msgid "create-%s"
    229 msgstr ""
    230 
    231 #: includes/bp-learndash-functions.php:497
     223#: includes/bp-learndash-functions.php:498
    232224msgid "Add to Menu"
    233225msgstr ""
     
    295287msgstr ""
    296288
    297 #: includes/bp-learndash-groups.php:210
     289#: includes/bp-learndash-groups.php:214
    298290msgid "Private Course Group"
    299291msgstr ""
    300292
    301 #: includes/bp-learndash-groups.php:213
     293#: includes/bp-learndash-groups.php:217
    302294msgid "Hidden Course Group"
    303295msgstr ""
    304296
    305 #: includes/bp-learndash-groups.php:245
     297#: includes/bp-learndash-groups.php:249
    306298msgid "%s Discussion"
    307299msgstr ""
    308300
    309 #: includes/bp-learndash-loader.php:726
     301#: includes/bp-learndash-loader.php:716
    310302msgid "Students"
    311303msgstr ""
    312304
    313 #: includes/bp-learndash-loader.php:727
     305#: includes/bp-learndash-loader.php:717
    314306msgid "Student"
    315307msgstr ""
    316308
    317 #: includes/bp-learndash-loader.php:732
     309#: includes/bp-learndash-loader.php:722
    318310msgid "Group Leaders"
    319311msgstr ""
    320312
    321 #: includes/bp-learndash-loader.php:733
     313#: includes/bp-learndash-loader.php:723
    322314msgid "Group Leader"
    323315msgstr ""
    324316
    325 #: includes/bp-learndash-loader.php:740
     317#: includes/bp-learndash-loader.php:730
    326318msgid "Group Leaders <span>%s</span>"
    327319msgstr ""
    328320
    329 #: includes/bp-learndash-loader.php:741
     321#: includes/bp-learndash-loader.php:731
    330322msgid "Students <span>%s</span>"
    331323msgstr ""
    332324
    333 #: includes/bp-learndash-users-enrollment.php:33
     325#: includes/bp-learndash-users-enrollment.php:34
    334326msgid ""
    335327"<strong>BuddyPress for Learndash</strong> enrolling users to the course "
  • buddypress-learndash/trunk/languages/buddypress-learndash.pot

    r1800376 r1887408  
    55"Project-Id-Version: \n"
    66"Report-Msgid-Bugs-To: https://www.buddyboss.com/contact/\n"
    7 "POT-Creation-Date: 2018-01-10 10:46:50+00:00\n"
     7"POT-Creation-Date: 2018-06-05 10:13:10+00:00\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=utf-8\n"
     
    166166#: includes/bp-learndash-activity.php:125
    167167#: includes/bp-learndash-activity.php:149 includes/bp-learndash-loader.php:125
    168 #: includes/bp-learndash-loader.php:193
     168#: includes/bp-learndash-loader.php:192
    169169msgid "%1$s added the %2$s %3$s to the %4$s %5$s"
    170170msgstr ""
    171171
    172172#: includes/bp-learndash-activity.php:169
    173 #: includes/bp-learndash-activity.php:189 includes/bp-learndash-loader.php:233
    174 #: includes/bp-learndash-loader.php:272
     173#: includes/bp-learndash-activity.php:189 includes/bp-learndash-loader.php:231
     174#: includes/bp-learndash-loader.php:269
    175175msgid "%1$s completed the %2$s %3$s"
    176176msgstr ""
    177177
    178 #: includes/bp-learndash-activity.php:209 includes/bp-learndash-loader.php:310
     178#: includes/bp-learndash-activity.php:209 includes/bp-learndash-loader.php:306
    179179msgid "%1$s completed the course %2$s"
    180180msgstr ""
    181181
    182 #: includes/bp-learndash-activity.php:229 includes/bp-learndash-loader.php:353
    183 #: includes/bp-learndash-loader.php:395 includes/bp-learndash-loader.php:438
     182#: includes/bp-learndash-activity.php:229 includes/bp-learndash-loader.php:348
     183#: includes/bp-learndash-loader.php:389 includes/bp-learndash-loader.php:431
    184184msgid "%1$s commented on %2$s %3$s"
    185185msgstr ""
    186186
    187 #: includes/bp-learndash-activity.php:249 includes/bp-learndash-loader.php:481
     187#: includes/bp-learndash-activity.php:249 includes/bp-learndash-loader.php:473
    188188msgid "%1$s commented on course %2$s"
    189189msgstr ""
    190190
    191 #: includes/bp-learndash-activity.php:272 includes/bp-learndash-loader.php:524
     191#: includes/bp-learndash-activity.php:272 includes/bp-learndash-loader.php:515
    192192msgid "%1$s has passed the %2$s %3$s with score %4$s"
    193193msgstr ""
    194194
    195195#: includes/bp-learndash-activity.php:292
    196 #: includes/bp-learndash-functions.php:712
     196#: includes/bp-learndash-functions.php:714
    197197msgid "%1$s started taking the course %2$s"
    198198msgstr ""
     
    215215
    216216#: includes/bp-learndash-functions.php:30
    217 #: includes/bp-learndash-functions.php:464
     217#: includes/bp-learndash-functions.php:465
    218218msgid "My %s"
    219 msgstr ""
    220 
    221 #: includes/bp-learndash-functions.php:39
    222 msgid "my-%s"
    223219msgstr ""
    224220
     
    227223msgstr ""
    228224
    229 #: includes/bp-learndash-functions.php:47
    230 msgid "create-%s"
    231 msgstr ""
    232 
    233 #: includes/bp-learndash-functions.php:497
     225#: includes/bp-learndash-functions.php:498
    234226msgid "Add to Menu"
    235227msgstr ""
     
    297289msgstr ""
    298290
    299 #: includes/bp-learndash-groups.php:210
     291#: includes/bp-learndash-groups.php:214
    300292msgid "Private Course Group"
    301293msgstr ""
    302294
    303 #: includes/bp-learndash-groups.php:213
     295#: includes/bp-learndash-groups.php:217
    304296msgid "Hidden Course Group"
    305297msgstr ""
    306298
    307 #: includes/bp-learndash-groups.php:245
     299#: includes/bp-learndash-groups.php:249
    308300msgid "%s Discussion"
    309301msgstr ""
    310302
    311 #: includes/bp-learndash-loader.php:726
     303#: includes/bp-learndash-loader.php:716
    312304msgid "Students"
    313305msgstr ""
    314306
    315 #: includes/bp-learndash-loader.php:727
     307#: includes/bp-learndash-loader.php:717
    316308msgid "Student"
    317309msgstr ""
    318310
    319 #: includes/bp-learndash-loader.php:732
     311#: includes/bp-learndash-loader.php:722
    320312msgid "Group Leaders"
    321313msgstr ""
    322314
    323 #: includes/bp-learndash-loader.php:733
     315#: includes/bp-learndash-loader.php:723
    324316msgid "Group Leader"
    325317msgstr ""
    326318
    327 #: includes/bp-learndash-loader.php:740
     319#: includes/bp-learndash-loader.php:730
    328320msgid "Group Leaders <span>%s</span>"
    329321msgstr ""
    330322
    331 #: includes/bp-learndash-loader.php:741
     323#: includes/bp-learndash-loader.php:731
    332324msgid "Students <span>%s</span>"
    333325msgstr ""
    334326
    335 #: includes/bp-learndash-users-enrollment.php:33
     327#: includes/bp-learndash-users-enrollment.php:34
    336328msgid ""
    337329"<strong>BuddyPress for Learndash</strong> enrolling users to the course "
  • buddypress-learndash/trunk/readme.txt

    r1800376 r1887408  
    44Tags: buddypress, learndash, lms, learning management system, learning, courses, courseware, education, social networking, activity, profiles, messaging, friends, groups, forums, notifications, settings, social, community, networks, networking
    55Requires at least: 3.8
    6 Tested up to: 4.9.1
    7 Stable tag: 1.2.4
     6Tested up to: 4.9.6
     7Stable tag: 1.2.5
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    109109
    110110== Changelog ==
     111
     112= 1.2.5 =
     113* Fix - Gutenberg editor compatibility
     114* Fix - Cannot set a group public when it is linked with the Course
     115* Fix - Leave off group enrollment if course has no buddypress group attached
     116* Fix - If group is public then Course Activity are not appearing on Site- wide Activity page
     117* Fix - Forbid translation of the buddypress profile courses menu slugs
     118* Fix - Global Search out of memory issue fix
     119* Fix - FATAL error occurs while saving/updating the course if course has group attached
     120* Fix - FATAL error on single group page after BuddyPress 3.0 update
     121* Fix - PHP Warnings
    111122
    112123= 1.2.4 =
     
    123134= 1.2.2 =
    124135* Tweak - Student access list update logic tweak
    125 * Fix - Single activity page is blank for some group activities 
     136* Fix - Single activity page is blank for some group activities
    126137* Fix - Course settings inside group should not be accessible for the student
    127138* Fix - removed group activation check
     
    170181= 1.0.6 =
    171182* Fix - Duplicate forum getting created when updating course
    172 * Fix - Group/forum registration not working with group enrollment 
     183* Fix - Group/forum registration not working with group enrollment
    173184* Fix - BP Reorder Tabs compatibility
    174185
Note: See TracChangeset for help on using the changeset viewer.