Plugin Directory

Changeset 2392387


Ignore:
Timestamp:
10/02/2020 02:01:08 PM (6 years ago)
Author:
VibeThemes
Message:

Compatibility with 4.0 WPLMS

Location:
wplms-mycred-addon
Files:
28 added
9 edited

Legend:

Unmodified
Added
Removed
  • wplms-mycred-addon/trunk/changelog.txt

    r2290784 r2392387  
    1 *1.7
    2 *continue in place of return to let continue other module_criteria ids
    3 *unit complete not working in app fix
    4 *fixed mycred points not working when 3 assignments with 3 points criteria is done in a row
    5 *Depcrecated function warning removed for php 7.0.26 version
    6 *Translation bug fixed
    7 *1.6.1
    8 *App style header conflict fix
    9 *1.6
    10 *compatibility with MyCred 1.7
    11 *1.5
    12 *version1.5
    13 *Commission breakup script
    14 *Mycred duration parameter
    15 *global usage fix in points criteria for badges and certificates
    16 *Commission breakup in Widgets
    17 *WArning message
    18 *readme changes
    19 *version 1.4
    20 *MyCred plugin install check
    21 *better log entries
    22 *version1.3.7
    23 *security bug fix
    24 *fixes
    25 *loader class
    26 *version1.3.6
    27 *Log entry fix
    28 *Mycred label
    29 *Reload improvement
    30 *Readme updated
    31 *version1.3.5
    32 *Login error handling
    33 *My Cred addon insufficient error
    34 *Bug fix MyCred points
    35 *version1.3.4
    36 *Course not assigning on Take this course button click
    37 *MyCred define shortcode bug
    38 *Front End points deletion
    39 *version update 1.3.3
    40 *Fixed add user meta
    41 *readme.txt
    42 *Points history connection
    43 *bug fixes
    44 *Check mycred addon activation
    45 *Mycred Addon activation bug fix
    46 *Sales array error
    47 *version1.3
    48 *Small fixes
    49 *version 1.2
    50 *Added points support for Multi course pricing.
    51 *ADDED Translation files
    52 *version1.1
    53 *Fixes in point awarding system.
    54 *MyCred Widget for Dashboard and Front end Course creation changes
    55 *Version 1.0
    56 *Initial commit
     1* e32e469 : 4.0.1
     2* 00256dd : remove print_r
     3* edda6ca : assign course sin v4
     4* dcdc6c6 : logs
     5* 6e6ca6c : logs pag no
     6* 9c66c8b : points awarding for quizzes
     7* b3c2b1c : logs fixed
     8* f4b5e17 : buy with points added
     9* 01c7a1e : logs in profile
     10* e226435 : vibebp init
     11* 74f8f61 : course points awarding done
     12* a2d7c31 : 1.7
     13* 7d45a8f : continue in place of return to let continue other module_criteria ids
     14* 3feae11 : unit complete not working in app fix
     15* c5c088c : fixed mycred points not working when 3 assignments with 3 points criteria is done in a row
     16* 24b3792 : Depcrecated function warning removed for php 7.0.26 version
     17* 7d51f55 : Translation bug fixed
     18* 064d8db : 1.6.1
     19* a5bdbf3 : App style header conflict fix
     20* 556d0e2 : 1.6
     21* d9468e2 : compatibility with MyCred 1.7
     22* e2032a7 : 1.5
     23* d148750 : version1.5
     24* dcfac00 : Commission breakup script
     25* 9bbcd82 : Mycred duration parameter
     26* 706473b : global usage fix in points criteria for badges and certificates
     27* 1171d22 : Commission breakup in Widgets
     28* cf4c168 : WArning message
     29* 594daa2 : readme changes
     30* 77024f9 : version 1.4
     31* a7f2933 : MyCred plugin install check
     32* 6a8773e : better log entries
     33* 02fa8ff : version1.3.7
     34* 2d5837c : security bug fix
     35* 9a2820e : fixes
     36* 997dde6 : loader class
     37* ce65f0e : version1.3.6
     38* 38b11e6 : Log entry fix
     39* 6f621a5 : Mycred label
     40* d7b5f7a : Reload improvement
     41* e24d0d8 : Readme updated
     42* 99d5b06 : version1.3.5
     43* 1494f0c : Login error handling
     44* 50ebdcf : My Cred addon insufficient error
     45* 54be586 : Bug fix MyCred points
     46* 31a8563 : version1.3.4
     47* 0b56ef5 : Course not assigning on Take this course button click
     48* ddfa990 : MyCred define shortcode bug
     49* 665be08 : Front End points deletion
     50* 92546a2 : version update 1.3.3
     51* 81afc33 : Fixed add user meta
     52* 31954be : readme.txt
     53* f07c35c : Points history connection
     54* 808ff43 : bug fixes
     55* 35245cb : Check mycred addon activation
     56* 99b0f3e : Mycred Addon activation bug fix
     57* 3407124 : Sales array error
     58* 71807b8 : version1.3
     59* d0d2a84 : Small fixes
     60* f331184 : version 1.2
     61* c592ad2 : Added points support for Multi course pricing.
     62* db3f268 : ADDED Translation files
     63* 1df81f6 : version1.1
     64* 612fe9b : Fixes in point awarding system.
     65* dd43911 : MyCred Widget for Dashboard and Front end Course creation changes
     66* dac307c : Version 1.0
     67* f724d52 : Initial commit
  • wplms-mycred-addon/trunk/includes/class.init.php

    r2392003 r2392387  
    2727        add_filter('wplms_course_product_metabox',array($this,'wplms_mycred_custom_metabox'));
    2828       
    29         add_filter('wplms_course_credits_array',array($this,'wplms_course_credits_array'),10,2);
     29        add_filter('wplms_course_credits_array',array($this,'wplms_course_credits_array'),999,2);
    3030        add_action('wplms_header_top_login',array($this,'wplms_mycred_show_points'));
    3131        add_filter('wplms_course_product_id',array($this,'wplms_mycred_take_this_course_label'),9);
    3232        add_action('wplms_course_before_front_main',array($this,'wplms_error_message_handle'));
    3333        add_action('wp_ajax_use_mycred_points',array($this,'use_mycred_points'));
     34        add_action('wp_ajax_nopriv_use_mycred_points',array($this,'use_mycred_points'));
    3435        add_action('wp_print_styles',array($this,'add_styles'));
    3536        add_action('wplms_front_end_pricing_content',array($this,'wplms_front_end_pricing'),10,1);
     
    3839       
    3940        add_filter('wplms_mycred_metabox',array($this,'front_end'));
     41        add_action('wp_ajax_no_priv_wplms_mycred_assign_course',array($this,'wplms_mycred_assign_course'));
    4042    }
    4143
     
    194196
    195197    function wplms_course_credits_array($price_html,$course_id){
    196 
     198       
    197199        $points=get_post_meta($course_id,'vibe_mycred_points',true);
    198200        if(isset($points) && is_numeric($points)){
     201           
    199202            $mycred = mycred();
    200             $points_html ='<strong>'.$mycred->format_creds($points);
     203            $points_html ='<strong class="wplms_mycred_assign_course" data-course="'.$course_id.'">'.$mycred->format_creds($points);
    201204            $subscription = get_post_meta($course_id,'vibe_mycred_subscription',true);
    202205            if(isset($subscription) && $subscription && $subscription !='H'){
     
    208211                    $points_html .= ' <span class="subs"> '.__('per','wplms-mycred').' '.tofriendlytime($duration).'</span>';
    209212            }
    210             $key = '#hasmycredpoints';
     213           
    211214            $points_html .='</strong>';
     215
     216            $key = '#mycredpoints';
    212217            if(is_user_logged_in()){
    213218                $user_id = get_current_user_id();
     
    219224                $key = '?error=login';
    220225            }
     226            if(function_exists('is_wplms_4_0') && is_wplms_4_0()){
     227                $key = '#mycredpoints';
     228                add_action('wp_footer',array($this,'assign_course'));   
     229            }
     230
    221231            $price_html[$key]=$points_html;
    222232        }
    223233        return $price_html;
    224234    }
     235
     236    function assign_course(){
     237
     238        ?>
     239            <script>
     240            document.addEventListener('userLoaded',listenMyCredButton,false);
     241            function listenMyCredButton(){
     242               
     243                document.querySelectorAll('.the_course_button .course_button>a').forEach(function(el){
     244                    console.log('#');
     245                    if(el.getAttribute('href').indexOf('#mycredpoints') > -1){
     246
     247                        el.addEventListener('click',function(e){
     248                            e.preventDefault();
     249                           
     250                            let course_id = el.querySelector('.wplms_mycred_assign_course').getAttribute('data-course');
     251                           
     252                           
     253                            localforage.getItem('bp_login_token').then(function(token){
     254                                if(token){
     255                                    var xhr = new XMLHttpRequest();
     256                                    xhr.open('POST', ajaxurl);
     257                                    xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
     258                                    xhr.onload = function() {
     259                                        if (xhr.status === 200) {
     260                                            let data = xhr.responseText;
     261                                            var postevent = new CustomEvent('reload_course_button', { "detail":{course_id}});
     262                                            document.dispatchEvent(postevent);
     263                                        }
     264                                    };
     265                                    xhr.send(encodeURI('action=use_mycred_points&id='+course_id+'&token='+token)); 
     266                                }
     267                            });
     268                        });
     269
     270                        document.removeEventListener('userLoaded',listenMyCredButton, false );
     271                    }
     272                });
     273            }
     274        </script>
     275        <?php
     276    }
     277
     278
    225279
    226280    function wplms_mycred_show_points(){
     
    270324
    271325    function use_mycred_points(){
    272         $user_id=get_current_user_id();
     326       
    273327        $course_id = $_POST['id'];
    274         if ( !isset($_POST['security']) || !wp_verify_nonce($_POST['security'],'security'.$user_id) ){
     328        if ( (!isset($_POST['security']) || !wp_verify_nonce($_POST['security'],'security'.$user_id)) && empty($_POST['token'])){
    275329             _e('Security check Failed.','wplms-mycred');
    276330             die();
    277331        }   
    278332
     333        $user_id=get_current_user_id();
     334
     335        if(!empty($_POST['token']) && function_exists('vibebp_expand_token')){
     336            $data = vibebp_expand_token($_POST['token']);
     337            if($data['status']){
     338                $user_id = $data['data']->data->user->id;
     339            }
     340        }
     341
     342        if(!is_numeric($user_id)){
     343             _e('Incorrect user','wplms-mycred');
     344             die();
     345        }
    279346        if(!is_numeric($course_id) || get_post_type($course_id) != 'course'){
    280347             _e('Incorrect Course','wplms-mycred');
     
    283350
    284351        $points = get_post_meta($course_id,'vibe_mycred_points',true);
     352
     353        if(!is_numeric($points) || !$points){
     354             _e('No points set','wplms-mycred');
     355             die();
     356        }
    285357        $mycred = mycred();
    286358        $balance = $mycred->get_users_cred( $user_id );
     
    381453
    382454        do_action('wplms_course_mycred_points_puchased',$course_id,$user_id,$points);
     455
     456        echo __('Course Assigned','wplms-mycred');
    383457        die();
    384458    }
  • wplms-mycred-addon/trunk/includes/class.points-awarding-system.php

    r2392003 r2392387  
    11<?php
    22
    3 class points_awarding_system {
     3if ( ! defined( 'ABSPATH' ) ) exit;
     4
     5class WPLMS_Points_Awarding_System{
     6
     7    public static $instance;
     8    public static function init(){
     9    if ( is_null( self::$instance ) )
     10        self::$instance = new WPLMS_Points_Awarding_System();
     11
     12        return self::$instance;
     13    }
    414
    515    public $action_hooks=array(
     
    2838        'unit' => array(
    2939            'finished'=>'wplms_unit_complete',
    30             ));
    31     function __construct(){
     40    ));
     41
     42    private function __construct(){
    3243
    3344        $eligibility_option = get_option('wplms_mycred_eligibility');
     
    3849        foreach($this->action_hooks as $key => $hooks){
    3950            foreach($hooks as $hook){
    40 
     51                //print_r($hook.' action registered');
    4152                add_action($hook,array($this,'check_eligibility'),10,4);
    4253            }
     
    124135        //post ids are points criteria
    125136        if(is_array($point_criteria_ids)){
     137           
    126138            foreach($point_criteria_ids as $point_criteria_id){
    127139                $module_id=get_post_meta($point_criteria_id,'wplms_module_id',true);
     140                $passed_flag=1;
    128141                if(isset($module_id) && is_numeric($module_id)){
     142                    if($module_id !== $id){
     143                        $passed_flag=0;
     144                    }
     145                }
     146                if($passed_flag){
    129147                   
    130                     if($module_id != $id){
    131                         continue;
    132                     }
    133                 }
    134                 //echo '#1';
    135                 $expiry = get_post_meta($point_criteria_id,'expires',true);
    136                 if(isset($expiry) && is_date($expiry) && time() > strtotime($expiry)){
    137                
    138                     continue;
    139                 }
    140                 //echo '#2 ->'.$point_criteria_id.'<-';
    141                 $global_usage = get_post_meta($point_criteria_id,'global',true);
    142                 $total_usage = get_post_meta($point_criteria_id,'total',true);
    143                
    144                 if(!empty($global_usage) && is_numeric($global_usage)){
    145                     if($total_usage > $global_usage){
    146                
    147                         continue;
    148                     }
    149                 }
    150                 //echo '#3';
    151                 $user_usage = get_post_meta($point_criteria_id,'user',true);
    152                 $user_specific_usage = get_user_meta($user_id,$point_criteria_id,true);
    153                 if(isset($user_usage) && is_numeric($user_usage) && $user_specific_usage>$user_usage){
    154            
    155                     continue;
    156                 }
    157 
    158                 //echo '#4';
    159                 $operator = get_post_meta($point_criteria_id,'wplms_module_score_operator',true);
    160                
    161                
    162                 if(isset($operator) && $operator){
    163                     if(empty($total_usage)){
    164                         $total_usage = 0;
    165                     }
    166                     if(empty($user_specific_usage)){
    167                         $user_specific_usage = 0;
    168                     }
    169 
    170 
    171 
    172 
    173                     $this->$operator($point_criteria_id,$id,$info,$user_id,$module,$total_usage,$user_specific_usage);
     148                    $expiry = get_post_meta($point_criteria_id,'expires',true);
     149                    if(isset($expiry) && is_date($expiry) && time() < strtotime($expiry)){
     150                        $passed_flag=0;
     151                    }
     152
     153                    if($passed_flag){
     154                       
     155                        $global_usage = get_post_meta($point_criteria_id,'global',true);
     156                        $total_usage = get_post_meta($point_criteria_id,'total',true);
     157                       
     158                        if(!empty($global_usage) && is_numeric($global_usage)){
     159                            if($total_usage >= $global_usage){
     160                                $passed_flag=0;
     161                            }
     162                        }
     163                        if($passed_flag){
     164
     165                           
     166                            $user_usage = get_post_meta($point_criteria_id,'user',true);
     167                            $user_specific_usage = get_user_meta($user_id,$point_criteria_id,true);
     168                            if(isset($user_usage) && is_numeric($user_usage) && $user_specific_usage >= $user_usage){
     169                                $passed_flag=0;
     170                            }
     171
     172                            if($passed_flag){
     173                               
     174                                $operator = get_post_meta($point_criteria_id,'wplms_module_score_operator',true);
     175                               
     176                               
     177                                if(isset($operator) && $operator){
     178                                    if(empty($total_usage)){
     179                                        $total_usage = 0;
     180                                    }
     181                                    if(empty($user_specific_usage)){
     182                                        $user_specific_usage = 0;
     183                                    }
     184
     185                                    $this->$operator($point_criteria_id,$id,$info,$user_id,$module,$total_usage,$user_specific_usage,$another_u_id);
     186                                }
     187                            }
     188                        }
     189                    }
    174190                }
    175191            }
     
    178194
    179195
    180     function started($point_criteria_id,$id,$info=NULL,$user_id,$module,$total_usage,$user_specific_usage){
     196    function started($point_criteria_id,$id,$info=NULL,$user_id,$module,$total_usage,$user_specific_usage,$another_u_id=null){
    181197        $value = get_post_meta($point_criteria_id,'value',true);
    182198        if(!$user_id || !is_numeric($user_id))
     
    202218    }
    203219
    204     function finished($point_criteria_id,$id,$info,$user_id,$module,$total_usage,$user_specific_usage){
     220    function finished($point_criteria_id,$id,$info,$user_id,$module,$total_usage,$user_specific_usage,$another_u_id=null){
    205221        $value = get_post_meta($point_criteria_id,'value',true);
    206222       
     
    226242    }
    227243
    228     function greater($point_criteria_id,$id,$info=NULL,$user_id,$module,$total_usage,$user_specific_usage){
     244    function greater($point_criteria_id,$id,$info=NULL,$user_id,$module,$total_usage,$user_specific_usage,$another_u_id=null){
     245
     246       
     247
    229248        $value = get_post_meta($point_criteria_id,'value',true);
    230249        $module_score = get_post_meta($point_criteria_id,'wplms_module_score',true);
    231         if(is_numeric($value) && $info > $module_score){
     250
     251       
     252
     253        if(is_numeric($value) && $info >= $module_score){
    232254            $mycred = mycred();
    233255            $mycred->update_users_balance( $user_id, $value);
     
    247269    }
    248270
    249     function lesser($point_criteria_id,$id,$info=NULL,$user_id,$module,$total_usage,$user_specific_usage){
     271    function lesser($point_criteria_id,$id,$info=NULL,$user_id,$module,$total_usage,$user_specific_usage,$another_u_id=null){
    250272        $value = get_post_meta($point_criteria_id,'value',true);
    251273        $module_score = get_post_meta($point_criteria_id,'wplms_module_score',true);
     
    267289        }
    268290    }
    269     function equal($point_criteria_id,$id,$info=NULL,$user_id,$module,$total_usage,$user_specific_usage){
     291    function equal($point_criteria_id,$id,$info=NULL,$user_id,$module,$total_usage,$user_specific_usage,$another_u_id=null){
    270292        $value = get_post_meta($point_criteria_id,'value',true);
    271293        $module_score = get_post_meta($point_criteria_id,'wplms_module_score',true);
     
    287309        }
    288310    }
    289     function highest_score($point_criteria_id,$id,$info=NULL,$user_id,$module,$total_usage,$user_specific_usage){
     311    function highest_score($point_criteria_id,$id,$info=NULL,$user_id,$module,$total_usage,$user_specific_usage,$another_u_id=null){
    290312        $value = get_post_meta($point_criteria_id,'value',true);
    291313        global $wpdb;
     
    309331        }
    310332    }
    311     function lowest_score($point_criteria_id,$id,$info=NULL,$user_id,$module,$total_usage,$user_specific_usage){
     333    function lowest_score($point_criteria_id,$id,$info=NULL,$user_id,$module,$total_usage,$user_specific_usage,$another_u_id=null){
    312334        $value = get_post_meta($point_criteria_id,'value',true);
    313335        global $wpdb;
     
    331353        }
    332354    }
    333     function badges_earned($point_criteria_id,$id,$info=NULL,$user_id,$module,$total_usage,$user_specific_usage){
     355    function badges_earned($point_criteria_id,$id,$info=NULL,$user_id,$module,$total_usage,$user_specific_usage,$another_u_id=null){
    334356        $value = get_post_meta($point_criteria_id,'value',true);
    335357        if(is_array($info)){
     
    354376        }
    355377    }
    356     function certificates_earned($point_criteria_id,$id,$info=NULL,$user_id,$module,$total_usage,$user_specific_usage){
     378    function certificates_earned($point_criteria_id,$id,$info=NULL,$user_id,$module,$total_usage,$user_specific_usage,$another_u_id=null){
    357379        $value = get_post_meta($point_criteria_id,'value',true);
    358380       
     
    422444}
    423445
    424 new points_awarding_system();
     446WPLMS_Points_Awarding_System::init();
  • wplms-mycred-addon/trunk/includes/referral.php

    r1204514 r2392387  
    100100        $user_id = mycred_get_userid_from_ref( $ref_id );
    101101
    102         print_r($user_id);
    103 
     102       
    104103        if ( $user_id !== false ) return;
    105104        if ( is_user_logged_in() && get_current_user_id() == $user_id ) return;
  • wplms-mycred-addon/trunk/languages/wplms-mycred-en_US.po

    r1401247 r2392387  
    33"Project-Id-Version: WPLMS MyCred ADDON v1.1\n"
    44"Report-Msgid-Bugs-To: \n"
    5 "POT-Creation-Date: 2016-04-21 17:22+0530\n"
    6 "PO-Revision-Date: 2016-04-21 17:22+0530\n"
    7 "Last-Translator: vibethemes@gmail.com <vibethemes@gmail.com>\n"
     5"POT-Creation-Date: 2020-10-02 19:23+0530\n"
     6"PO-Revision-Date: 2020-10-02 19:23+0530\n"
     7"Last-Translator: VibeThemes <vibethemes@gmail.com>\n"
    88"Language-Team: \n"
    99"Language: en_US\n"
     
    1212"Content-Transfer-Encoding: 8bit\n"
    1313"Plural-Forms: nplurals=2; plural=n != 1;\n"
    14 "X-Generator: Poedit 1.8.7\n"
     14"X-Generator: Poedit 1.6.10\n"
    1515"X-Poedit-SourceCharset: utf-8\n"
    1616"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
     
    2121
    2222# @ wplms-mycred
    23 #: includes/class.init.php:36 includes/dashboard_widget.php:193
    24 #: includes/myCRED-addon-wplms.php:166
     23#: includes/class.init.php:47 includes/dashboard_widget.php:191
     24#: includes/myCRED-addon-wplms.php:194 vibebp/includes/class.init.php:79
    2525msgid "Points"
    2626msgstr ""
    2727
    2828# @ vibe
    29 #: includes/class.init.php:100
     29#: includes/class.init.php:111
    3030msgid "Purchase points to take this course"
    3131msgstr ""
    3232
    3333# @ wplms-mycred
    34 #: includes/class.init.php:100
     34#: includes/class.init.php:111
    3535msgid "Add Points"
    3636msgstr ""
    3737
    3838# @ wplms-mycred
    39 #: includes/class.init.php:115
     39#: includes/class.init.php:126
    4040msgid "MyCred points options for WPLMS Learning Management"
    4141msgstr ""
    4242
     43#: includes/class.init.php:143
     44msgid "DAYS"
     45msgstr ""
     46
    4347# @ vibe-customtypes
    44 #: includes/class.init.php:137
     48#: includes/class.init.php:148
    4549msgid "MyCred Points"
    4650msgstr ""
    4751
    4852# @ vibe-customtypes
    49 #: includes/class.init.php:138
     53#: includes/class.init.php:149
    5054msgid "MyCred Points required to take this course."
    5155msgstr ""
    5256
    53 #: includes/class.init.php:143
     57#: includes/class.init.php:154
    5458msgid "MyCred Subscription "
    5559msgstr ""
    5660
    5761# @ vibe-customtypes
    58 #: includes/class.init.php:144
     62#: includes/class.init.php:155
    5963msgid "Enable subscription mode for this Course"
    6064msgstr ""
    6165
     66#: includes/class.init.php:160
     67msgid "Hide"
     68msgstr ""
     69
     70#: includes/class.init.php:162
     71msgid "Show"
     72msgstr ""
     73
    6274# @ vibe-customtypes
    63 #: includes/class.init.php:156
     75#: includes/class.init.php:167
    6476msgid "Subscription Duration"
    6577msgstr ""
    6678
    6779# @ vibe-customtypes
    68 #: includes/class.init.php:157
     80#: includes/class.init.php:168
    6981msgid "Duration for Subscription Products (in "
    7082msgstr ""
    7183
    72 #: includes/class.init.php:162
     84#: includes/class.init.php:173
    7385msgid "Points duration parameter"
    7486msgstr ""
    7587
    76 #: includes/class.init.php:163
     88#: includes/class.init.php:174
    7789msgid "Subscription duration parameter"
    7890msgstr ""
    7991
    80 #: includes/class.init.php:180
     92#: includes/class.init.php:191
    8193#, fuzzy
    8294msgid "DISABLE"
    8395msgstr "Schakel uit"
    8496
    85 #: includes/class.init.php:180
     97#: includes/class.init.php:191
    8698#, fuzzy
    8799msgid "ENABLE"
     
    89101
    90102# @ vibe
    91 #: includes/class.init.php:199
     103#: includes/class.init.php:211 vibebp/includes/class.init.php:57
    92104#, fuzzy
    93105msgid "per"
    94106msgstr "aantal items per pagina"
    95107
    96 #: includes/class.init.php:233
     108#: includes/class.init.php:297
     109msgid "WPLMS Mycred Settings"
     110msgstr ""
     111
     112#: includes/class.init.php:301
    97113msgid "Buy Points Link"
    98114msgstr ""
    99115
    100 #: includes/class.init.php:236
     116#: includes/class.init.php:304
    101117msgid ""
    102118"Buy Points for MyCred, displayed when user points are less than required"
     
    104120
    105121# @ wplms-mycred
    106 #: includes/class.init.php:263
     122#: includes/class.init.php:329
    107123msgid "Security check Failed."
    108124msgstr ""
    109125
    110 # @ wplms-mycred
    111 #: includes/class.init.php:268
     126#: includes/class.init.php:343
     127msgid "Incorrect user"
     128msgstr ""
     129
     130# @ wplms-mycred
     131#: includes/class.init.php:347
    112132msgid "Incorrect Course"
    113133msgstr ""
    114134
    115 # @ wplms-mycred
    116 #: includes/class.init.php:277
     135#: includes/class.init.php:354
     136msgid "No points set"
     137msgstr ""
     138
     139# @ wplms-mycred
     140#: includes/class.init.php:361
    117141msgid "Not enough balance"
    118142msgstr ""
    119143
    120 #: includes/class.init.php:302
     144#: includes/class.init.php:386 vibebp/includes/class.api.php:142
    121145#, php-format
    122146msgid "Student %s subscibed for course"
     
    124148
    125149# @ wplms-mycred
    126 #: includes/class.init.php:304
     150#: includes/class.init.php:388 vibebp/includes/class.api.php:144
    127151msgid "Student Subscribed to course , ends on "
    128152msgstr ""
    129153
    130154# @ vibe
    131 #: includes/class.init.php:310
     155#: includes/class.init.php:394 vibebp/includes/class.api.php:150
    132156msgid "Student subscribed for course "
    133157msgstr ""
    134158
    135159# @ vibe
    136 #: includes/class.init.php:311
     160#: includes/class.init.php:395 vibebp/includes/class.api.php:151
    137161#, fuzzy
    138162msgid "Student "
     
    140164
    141165# @ vibe
    142 #: includes/class.init.php:311
     166#: includes/class.init.php:395 vibebp/includes/class.api.php:151
    143167msgid " subscribed for course "
    144168msgstr ""
    145169
    146170# @ vibe
    147 #: includes/class.init.php:311
     171#: includes/class.init.php:395 vibebp/includes/class.api.php:151
    148172msgid " for "
    149173msgstr ""
    150174
    151175# @ wplms-mycred
    152 #: includes/class.init.php:346 includes/class.init.php:362
     176#: includes/class.init.php:430 includes/class.init.php:446
     177#: vibebp/includes/class.api.php:182 vibebp/includes/class.api.php:198
    153178msgid "Instructor earned commission"
    154179msgstr ""
    155180
    156181# @ wplms-mycred
    157 #: includes/class.init.php:348 includes/class.init.php:364
     182#: includes/class.init.php:432 includes/class.init.php:448
     183#: vibebp/includes/class.api.php:184 vibebp/includes/class.api.php:200
    158184msgid ""
    159185"Instructor earned commission for student purchasing the course via points "
    160186msgstr ""
    161187
    162 # @ vibe
    163 #: includes/class.init.php:389
     188#: includes/class.init.php:456
     189msgid "Course Assigned"
     190msgstr ""
     191
     192# @ vibe
     193#: includes/class.init.php:475
    164194msgid "Set Course Points"
    165195msgstr ""
    166196
    167 #: includes/class.init.php:393
     197#: includes/class.init.php:479
    168198msgid "Subscription Type"
    169199msgstr ""
    170200
    171201# @ vibe
    172 #: includes/class.init.php:396
     202#: includes/class.init.php:482
    173203msgid "Full Course"
    174204msgstr ""
    175205
    176206# @ vibe
    177 #: includes/class.init.php:398
     207#: includes/class.init.php:484
    178208#, fuzzy
    179209msgid "Subscription"
     
    181211
    182212# @ vibe
    183 #: includes/class.init.php:404
     213#: includes/class.init.php:490
    184214msgid "Set Subscription"
    185215msgstr ""
    186216
    187 #: includes/class.points-awarding-system.php:130
    188 #: includes/class.points-awarding-system.php:131
     217#: includes/class.points-awarding-system.php:214
     218#: includes/class.points-awarding-system.php:215
    189219#, php-format
    190220msgid ""
     
    192222msgstr ""
    193223
    194 #: includes/class.points-awarding-system.php:153
    195 #: includes/class.points-awarding-system.php:154
     224#: includes/class.points-awarding-system.php:238
     225#: includes/class.points-awarding-system.php:239
    196226#, php-format
    197227msgid ""
     
    199229msgstr ""
    200230
    201 #: includes/class.points-awarding-system.php:174
    202 #: includes/class.points-awarding-system.php:175
     231#: includes/class.points-awarding-system.php:265
     232#: includes/class.points-awarding-system.php:266
    203233#, php-format
    204234msgid ""
     
    207237msgstr ""
    208238
    209 #: includes/class.points-awarding-system.php:195
    210 #: includes/class.points-awarding-system.php:196
     239#: includes/class.points-awarding-system.php:286
     240#: includes/class.points-awarding-system.php:287
    211241#, php-format
    212242msgid ""
     
    215245msgstr ""
    216246
    217 #: includes/class.points-awarding-system.php:215
    218 #: includes/class.points-awarding-system.php:216
     247#: includes/class.points-awarding-system.php:306
     248#: includes/class.points-awarding-system.php:307
    219249#, php-format
    220250msgid ""
     
    223253msgstr ""
    224254
    225 #: includes/class.points-awarding-system.php:237
    226 #: includes/class.points-awarding-system.php:238
     255#: includes/class.points-awarding-system.php:328
     256#: includes/class.points-awarding-system.php:329
    227257#, php-format
    228258msgid ""
     
    231261msgstr ""
    232262
    233 #: includes/class.points-awarding-system.php:259
    234 #: includes/class.points-awarding-system.php:260
     263#: includes/class.points-awarding-system.php:350
     264#: includes/class.points-awarding-system.php:351
    235265#, php-format
    236266msgid ""
     
    239269msgstr ""
    240270
    241 #: includes/class.points-awarding-system.php:281
    242 #: includes/class.points-awarding-system.php:282
     271#: includes/class.points-awarding-system.php:372
     272#: includes/class.points-awarding-system.php:373
    243273#, php-format
    244274msgid ""
     
    247277msgstr ""
    248278
    249 #: includes/class.points-awarding-system.php:305
    250 #: includes/class.points-awarding-system.php:306
     279#: includes/class.points-awarding-system.php:396
     280#: includes/class.points-awarding-system.php:397
    251281#, php-format
    252282msgid ""
     
    255285msgstr ""
    256286
    257 #: includes/class.points-awarding-system.php:318
     287#: includes/class.points-awarding-system.php:409
    258288msgid "Started Course"
    259289msgstr ""
    260290
    261 #: includes/class.points-awarding-system.php:320
     291#: includes/class.points-awarding-system.php:411
    262292msgid "Student Started course"
    263293msgstr ""
    264294
    265295# @ vibe
    266 #: includes/class.points-awarding-system.php:347
     296#: includes/class.points-awarding-system.php:438
    267297msgid "Add MyCred credits"
    268298msgstr ""
     
    279309
    280310# @ wplms-mycred
    281 #: includes/dashboard_widget.php:82 includes/dashboard_widget.php:278
     311#: includes/dashboard_widget.php:82 includes/dashboard_widget.php:276
    282312msgid "My Balance"
    283313msgstr ""
    284314
    285315# @ wplms-mycred
    286 #: includes/dashboard_widget.php:91 includes/dashboard_widget.php:288
     316#: includes/dashboard_widget.php:91 includes/dashboard_widget.php:286
    287317#, fuzzy
    288318msgid "Title:"
     
    290320
    291321# @ wplms-mycred
    292 #: includes/dashboard_widget.php:95 includes/dashboard_widget.php:296
     322#: includes/dashboard_widget.php:95 includes/dashboard_widget.php:294
    293323msgid "Select Width"
    294324msgstr ""
    295325
    296326# @ wplms-mycred
    297 #: includes/dashboard_widget.php:97 includes/dashboard_widget.php:298
     327#: includes/dashboard_widget.php:97 includes/dashboard_widget.php:296
    298328msgid "One Fourth"
    299329msgstr ""
    300330
    301331# @ wplms-mycred
    302 #: includes/dashboard_widget.php:98 includes/dashboard_widget.php:299
     332#: includes/dashboard_widget.php:98 includes/dashboard_widget.php:297
    303333msgid "One Third"
    304334msgstr ""
    305335
    306336# @ wplms-mycred
    307 #: includes/dashboard_widget.php:99 includes/dashboard_widget.php:300
     337#: includes/dashboard_widget.php:99 includes/dashboard_widget.php:298
    308338msgid "One Half"
    309339msgstr ""
    310340
    311341# @ wplms-mycred
    312 #: includes/dashboard_widget.php:100 includes/dashboard_widget.php:301
     342#: includes/dashboard_widget.php:100 includes/dashboard_widget.php:299
    313343msgid "Two Third"
    314344msgstr ""
    315345
    316346# @ wplms-mycred
    317 #: includes/dashboard_widget.php:101 includes/dashboard_widget.php:302
     347#: includes/dashboard_widget.php:101 includes/dashboard_widget.php:300
    318348msgid "Three Fourth"
    319349msgstr ""
    320350
    321351# @ wplms-mycred
    322 #: includes/dashboard_widget.php:102 includes/dashboard_widget.php:303
     352#: includes/dashboard_widget.php:102 includes/dashboard_widget.php:301
    323353#, fuzzy
    324354msgid "Full"
     
    336366
    337367# @ wplms-dashboard
    338 #: includes/dashboard_widget.php:193
     368#: includes/dashboard_widget.php:191
    339369msgid "Action"
    340370msgstr ""
    341371
    342372# @ wplms-dashboard
    343 #: includes/dashboard_widget.php:211
     373#: includes/dashboard_widget.php:209
    344374msgid "No data found"
    345375msgstr ""
    346376
    347377# @ wplms-mycred
    348 #: includes/dashboard_widget.php:292
     378#: includes/dashboard_widget.php:290
    349379msgid "Number of Transactions :"
    350380msgstr ""
    351381
    352 #: includes/myCRED-addon-wplms.php:57
     382#: includes/myCRED-addon-wplms.php:67
    353383msgid "WPLMS : Started Course"
    354384msgstr ""
    355385
    356386# @ wplms-mycred
    357 #: includes/myCRED-addon-wplms.php:99 includes/myCRED-addon-wplms.php:105
    358 #: includes/myCRED-addon-wplms.php:111 includes/myCRED-addon-wplms.php:155
     387#: includes/myCRED-addon-wplms.php:95 includes/myCRED-addon-wplms.php:96
     388#: includes/myCRED-addon-wplms.php:127 includes/myCRED-addon-wplms.php:133
     389#: includes/myCRED-addon-wplms.php:139 includes/myCRED-addon-wplms.php:183
    359390msgid "WPLMS Points"
    360391msgstr ""
    361392
    362393# @ wplms-mycred
    363 #: includes/myCRED-addon-wplms.php:100
     394#: includes/myCRED-addon-wplms.php:128
    364395msgid "WPLMS Point"
    365396msgstr ""
    366397
    367398# @ wplms-mycred
    368 #: includes/myCRED-addon-wplms.php:101
     399#: includes/myCRED-addon-wplms.php:129
    369400msgid "Create New"
    370401msgstr ""
    371402
    372403# @ wplms-mycred
    373 #: includes/myCRED-addon-wplms.php:102
     404#: includes/myCRED-addon-wplms.php:130
    374405msgid "Create New Points Awarding Criteria"
    375406msgstr ""
    376407
    377408# @ wplms-mycred
    378 #: includes/myCRED-addon-wplms.php:103
     409#: includes/myCRED-addon-wplms.php:131
    379410msgid "Edit Point"
    380411msgstr ""
    381412
    382413# @ wplms-mycred
    383 #: includes/myCRED-addon-wplms.php:104
     414#: includes/myCRED-addon-wplms.php:132
    384415msgid "New Point"
    385416msgstr ""
    386417
    387418# @ wplms-mycred
    388 #: includes/myCRED-addon-wplms.php:107
     419#: includes/myCRED-addon-wplms.php:135
    389420msgid "Search wplms points"
    390421msgstr ""
    391422
    392423# @ wplms-mycred
    393 #: includes/myCRED-addon-wplms.php:108
     424#: includes/myCRED-addon-wplms.php:136
    394425msgid "No wplms points found"
    395426msgstr ""
    396427
    397428# @ wplms-mycred
    398 #: includes/myCRED-addon-wplms.php:109
     429#: includes/myCRED-addon-wplms.php:137
    399430msgid "No wplms point found in Trash"
    400431msgstr ""
    401432
    402433# @ wplms-mycred
    403 #: includes/myCRED-addon-wplms.php:132 includes/myCRED-addon-wplms.php:135
     434#: includes/myCRED-addon-wplms.php:160 includes/myCRED-addon-wplms.php:163
    404435msgid "Points updated."
    405436msgstr ""
    406437
    407438# @ wplms-mycred
    408 #: includes/myCRED-addon-wplms.php:137
     439#: includes/myCRED-addon-wplms.php:165
    409440msgid "WPLMS Point published."
    410441msgstr ""
    411442
    412443# @ wplms-mycred
    413 #: includes/myCRED-addon-wplms.php:138
     444#: includes/myCRED-addon-wplms.php:166
    414445msgid "Point saved."
    415446msgstr ""
    416447
    417448# @ wplms-mycred
    418 #: includes/myCRED-addon-wplms.php:141
     449#: includes/myCRED-addon-wplms.php:169
    419450msgid "Draft Point saved."
    420451msgstr ""
    421452
    422453# @ wplms-mycred
    423 #: includes/myCRED-addon-wplms.php:167
     454#: includes/myCRED-addon-wplms.php:195
    424455msgid "# Times Awarded"
    425456msgstr ""
    426457
    427458# @ wplms-mycred
    428 #: includes/myCRED-addon-wplms.php:168
     459#: includes/myCRED-addon-wplms.php:196
    429460msgid "Criteria"
    430461msgstr ""
    431462
    432463# @ wplms-mycred
    433 #: includes/myCRED-addon-wplms.php:215
     464#: includes/myCRED-addon-wplms.php:243
    434465msgid "not yet awarded"
    435466msgstr ""
    436467
    437468# @ wplms-mycred
    438 #: includes/myCRED-addon-wplms.php:225
     469#: includes/myCRED-addon-wplms.php:253
    439470msgid "Not defined"
    440471msgstr ""
    441472
    442473# @ wplms-mycred
    443 #: includes/myCRED-addon-wplms.php:265
     474#: includes/myCRED-addon-wplms.php:293
    444475msgid "WPLMS Points Setup"
    445476msgstr ""
    446477
    447478# @ wplms-mycred
    448 #: includes/myCRED-addon-wplms.php:274
     479#: includes/myCRED-addon-wplms.php:302
    449480msgid "Criteria Usage Limits"
    450481msgstr ""
    451482
    452483# @ wplms-mycred
    453 #: includes/myCRED-addon-wplms.php:283
     484#: includes/myCRED-addon-wplms.php:311
    454485msgid "Points Awarding Criteria"
    455486msgstr ""
    456487
    457488# @ wplms-mycred
    458 #: includes/myCRED-addon-wplms.php:318
     489#: includes/myCRED-addon-wplms.php:347
    459490#, fuzzy
    460491msgid "Value"
     
    462493
    463494# @ wplms-mycred
    464 #: includes/myCRED-addon-wplms.php:321
     495#: includes/myCRED-addon-wplms.php:350
    465496msgid "The amount of %plural% this wplms is worth."
    466497msgstr ""
    467498
    468499# @ wplms-mycred
    469 #: includes/myCRED-addon-wplms.php:324
     500#: includes/myCRED-addon-wplms.php:353
    470501msgid "Point Type"
    471502msgstr ""
    472503
    473504# @ wplms-mycred
    474 #: includes/myCRED-addon-wplms.php:325
     505#: includes/myCRED-addon-wplms.php:354
    475506msgid "Select the point type that this wplms is applied."
    476507msgstr ""
    477508
    478509# @ wplms-mycred
    479 #: includes/myCRED-addon-wplms.php:330
     510#: includes/myCRED-addon-wplms.php:359
    480511msgid "Expire"
    481512msgstr ""
    482513
    483514# @ wplms-mycred
    484 #: includes/myCRED-addon-wplms.php:333
     515#: includes/myCRED-addon-wplms.php:362
    485516msgid ""
    486517"Optional date when this wplms points criteria expires. Expired WPLMS points "
     
    489520
    490521# @ wplms-mycred
    491 #: includes/myCRED-addon-wplms.php:362
     522#: includes/myCRED-addon-wplms.php:391
    492523msgid "Global Maximum"
    493524msgstr ""
    494525
    495526# @ wplms-mycred
    496 #: includes/myCRED-addon-wplms.php:365
     527#: includes/myCRED-addon-wplms.php:394
    497528msgid ""
    498529"The maximum number of times this points awarding criteria can be used. Note "
     
    502533
    503534# @ wplms-mycred
    504 #: includes/myCRED-addon-wplms.php:369
     535#: includes/myCRED-addon-wplms.php:398
    505536msgid "User Maximum"
    506537msgstr ""
    507538
    508539# @ wplms-mycred
    509 #: includes/myCRED-addon-wplms.php:372
     540#: includes/myCRED-addon-wplms.php:401
    510541msgid ""
    511542"The maximum number of times points can be awarded using this criteria to a "
     
    514545
    515546# @ wplms-mycred
    516 #: includes/myCRED-addon-wplms.php:399
     547#: includes/myCRED-addon-wplms.php:428
    517548msgid "WPLMS Module"
    518549msgstr ""
    519550
    520551# @ wplms-mycred
    521 #: includes/myCRED-addon-wplms.php:402
     552#: includes/myCRED-addon-wplms.php:431
    522553#, fuzzy
    523554msgid "Course"
     
    525556
    526557# @ wplms-mycred
    527 #: includes/myCRED-addon-wplms.php:403
     558#: includes/myCRED-addon-wplms.php:432
    528559#, fuzzy
    529560msgid "Unit"
     
    531562
    532563# @ wplms-mycred
    533 #: includes/myCRED-addon-wplms.php:404
     564#: includes/myCRED-addon-wplms.php:433
    534565#, fuzzy
    535566msgid "Quiz"
     
    537568
    538569# @ wplms-mycred
    539 #: includes/myCRED-addon-wplms.php:405
     570#: includes/myCRED-addon-wplms.php:434
    540571#, fuzzy
    541572msgid "Assignment"
     
    543574
    544575# @ wplms-mycred
    545 #: includes/myCRED-addon-wplms.php:408
     576#: includes/myCRED-addon-wplms.php:437
    546577msgid "Select module for the Points criteria."
    547578msgstr ""
    548579
    549580# @ wplms-mycred
    550 #: includes/myCRED-addon-wplms.php:412
     581#: includes/myCRED-addon-wplms.php:441
    551582msgid "Module ID"
    552583msgstr ""
    553584
    554585# @ wplms-mycred
    555 #: includes/myCRED-addon-wplms.php:415
     586#: includes/myCRED-addon-wplms.php:444
    556587msgid "Optional set this criteria for a specific module ID."
    557588msgstr ""
    558589
    559590# @ wplms-mycred
    560 #: includes/myCRED-addon-wplms.php:419
     591#: includes/myCRED-addon-wplms.php:448
    561592msgid "Module Criteria"
    562593msgstr ""
    563594
    564595# @ wplms-mycred
    565 #: includes/myCRED-addon-wplms.php:422
     596#: includes/myCRED-addon-wplms.php:451
    566597msgid "Started (No information required)"
    567598msgstr ""
    568599
    569600# @ wplms-mycred
    570 #: includes/myCRED-addon-wplms.php:423
     601#: includes/myCRED-addon-wplms.php:452
    571602msgid "Finished (No information required)"
    572603msgstr ""
    573604
    574605# @ wplms-mycred
    575 #: includes/myCRED-addon-wplms.php:424
     606#: includes/myCRED-addon-wplms.php:453
    576607msgid "Score Greater Than Equal to (Score required)"
    577608msgstr ""
    578609
    579610# @ wplms-mycred
    580 #: includes/myCRED-addon-wplms.php:425
     611#: includes/myCRED-addon-wplms.php:454
    581612msgid "Score Lesser than (Score required)"
    582613msgstr ""
    583614
    584615# @ wplms-mycred
    585 #: includes/myCRED-addon-wplms.php:426
     616#: includes/myCRED-addon-wplms.php:455
    586617msgid "Score Equals (Score required)"
    587618msgstr ""
    588619
    589620# @ wplms-mycred
    590 #: includes/myCRED-addon-wplms.php:427
     621#: includes/myCRED-addon-wplms.php:456
    591622msgid "Highest Marks in module (No information required)"
    592623msgstr ""
    593624
    594625# @ wplms-mycred
    595 #: includes/myCRED-addon-wplms.php:428
     626#: includes/myCRED-addon-wplms.php:457
    596627msgid "Lowest Marks in Module (No information required)"
    597628msgstr ""
    598629
    599630# @ wplms-mycred
    600 #: includes/myCRED-addon-wplms.php:429
     631#: includes/myCRED-addon-wplms.php:458
    601632msgid "Number of Badges earned (# Badges information required)"
    602633msgstr ""
    603634
    604635# @ wplms-mycred
    605 #: includes/myCRED-addon-wplms.php:430
     636#: includes/myCRED-addon-wplms.php:459
    606637msgid "Number of Certificates earned (# Certificates information required)"
    607638msgstr ""
    608639
    609640# @ wplms-mycred
    610 #: includes/myCRED-addon-wplms.php:432
     641#: includes/myCRED-addon-wplms.php:461
    611642msgid "Criteria specific information"
    612643msgstr ""
    613644
    614645# @ wplms-mycred
    615 #: includes/myCRED-addon-wplms.php:434
     646#: includes/myCRED-addon-wplms.php:463
    616647msgid "Set the Points criteria."
    617648msgstr ""
    618649
    619650# @ wplms-mycred
    620 #: includes/myCRED-addon-wplms.php:486
     651#: includes/myCRED-addon-wplms.php:529
    621652msgid "WPLMS"
    622653msgstr ""
    623654
    624655# @ wplms-mycred
    625 #: includes/myCRED-addon-wplms.php:488
     656#: includes/myCRED-addon-wplms.php:531
    626657msgid "Log Template"
    627658msgstr ""
    628659
    629660# @ wplms-mycred
    630 #: includes/myCRED-addon-wplms.php:492
     661#: includes/myCRED-addon-wplms.php:535
    631662msgid "Log entry for successful WPLMS Points criteria redemption."
    632663msgstr ""
    633664
    634665# @ wplms-mycred
    635 #: includes/myCRED-addon-wplms.php:495
     666#: includes/myCRED-addon-wplms.php:538
    636667msgid "Success Message"
    637668msgstr ""
    638669
    639670# @ wplms-mycred
    640 #: includes/myCRED-addon-wplms.php:499
     671#: includes/myCRED-addon-wplms.php:542
    641672msgid "Message to show when a user has successfully earned WPLMS Points."
    642673msgstr ""
    643674
    644675# @ wplms-mycred
    645 #: includes/myCRED-addon-wplms.php:502
     676#: includes/myCRED-addon-wplms.php:545
    646677msgid "Referrals"
    647678msgstr ""
    648679
    649680# @ wplms-mycred
    650 #: includes/myCRED-addon-wplms.php:506
     681#: includes/myCRED-addon-wplms.php:549
    651682msgid "Enter referral points when a user refers a new user."
    652683msgstr ""
     
    662693msgstr ""
    663694
    664 #: wplms-mycred-addon.php:66
     695#: vibebp/includes/class.api.php:111
     696msgctxt "wplms-mycred"
     697msgid "Not enough balance"
     698msgstr ""
     699
     700#: vibebp/includes/class.api.php:214
     701msgctxt ""
     702msgid "something went wrong"
     703msgstr ""
     704
     705#: vibebp/includes/class.api.php:234
     706msgid "Entry"
     707msgstr ""
     708
     709#: vibebp/includes/class.api.php:235
     710msgid "Date"
     711msgstr ""
     712
     713#: vibebp/includes/class.api.php:241
     714msgctxt ""
     715msgid "Records found"
     716msgstr ""
     717
     718#: vibebp/includes/class.init.php:89
     719msgid "Log"
     720msgstr ""
     721
     722#: vibebp/includes/class.init.php:127
     723msgctxt "api call"
     724msgid "Date"
     725msgstr ""
     726
     727# @ wplms-mycred
     728#: vibebp/includes/class.init.php:128
     729#, fuzzy
     730msgctxt "api call"
     731msgid "Course"
     732msgstr "CURSUS"
     733
     734# @ vibe
     735#: vibebp/includes/class.init.php:129
     736#, fuzzy
     737msgctxt "api call"
     738msgid "Student"
     739msgstr "Student "
     740
     741#: vibebp/includes/class.init.php:130
     742msgctxt "api call"
     743msgid "Select a date"
     744msgstr ""
     745
     746#: vibebp/includes/class.init.php:131
     747msgctxt "api call"
     748msgid "Select start date"
     749msgstr ""
     750
     751#: vibebp/includes/class.init.php:132
     752msgctxt ""
     753msgid "Points"
     754msgstr ""
     755
     756#: vibebp/includes/class.init.php:133
     757msgctxt ""
     758msgid "Entry"
     759msgstr ""
     760
     761#: vibebp/includes/class.init.php:135
     762msgctxt ""
     763msgid "Load More"
     764msgstr ""
     765
     766#: vibebp/includes/class.init.php:136
     767msgctxt ""
     768msgid "No Records found!"
     769msgstr ""
     770
     771#: vibebp/includes/class.init.php:137
     772msgctxt ""
     773msgid "Buy with Points"
     774msgstr ""
     775
     776#: wplms-mycred-addon.php:76
    665777msgctxt "Install mycred error message"
    666778msgid "MyCred plugin missing. Please install MyCred plugin."
  • wplms-mycred-addon/trunk/readme.txt

    r2392003 r2392387  
    44Requires at least: 3.6
    55Tested up to: 5.5.2
    6 Stable tag: 4.0
     6Stable tag: 4.0.1
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
  • wplms-mycred-addon/trunk/vibebp/assets/js/mycred.js

    r2392003 r2392387  
    1 !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=wp.element,o=(r.createElement,r.render,function(e){return wp.element.createElement("div",{class:"lds-ellipsis"},wp.element.createElement("div",null),wp.element.createElement("div",null),wp.element.createElement("div",null),wp.element.createElement("div",null))});function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var l,i=e[Symbol.iterator]();!(r=(l=i.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var p=wp.element,d=(p.createElement,p.useState),f=p.useEffect,b=p.Fragment,y=(p.render,p.useContext,p.useRef,wp.data),w=(y.dispatch,y.select),v=function(e){w("vibebp").getUser();var t=w("vibebp").getToken(),n=u(d(!0),2),r=n[0],a=n[1],i=u(d([]),2),s=i[0],m=i[1],p=u(d({paged:1}),2),y=p[0],v=p[1],g=u(d(null),2),h=g[0],E=g[1],O=u(d(!0),2),_=O[0],j=O[1];f((function(){S()}),[y]);var S=function(){a(!0),fetch("".concat(window.vibe_mycred.api_url,"/logs"),{method:"post",body:JSON.stringify({token:t,paged:y.paged})}).then((function(e){return e.json()})).then((function(e){if(e&&e.status){var t=c(s);if(e.entries.length){for(var n=e.entries.length-1;n>=0;n--)t.push(e.entries[n]);m(t)}}else j(!1);e.hasOwnProperty("balance")&&E(e.balance),a(!1)}))};return wp.element.createElement("div",null,null!==h?wp.element.createElement("div",{className:"columns"},wp.element.createElement("span",null,wp.element.createElement("span",{className:"vicon vicon-star"})," ",wp.element.createElement("span",{className:"title",style:{color:"inherit"}},h))):"",wp.element.createElement("div",{className:"points_records"},s.length?wp.element.createElement(b,null,wp.element.createElement("table",{className:"table"},wp.element.createElement("thead",null,wp.element.createElement("th",null,window.vibe_mycred.translations.entry),wp.element.createElement("th",null,window.vibe_mycred.translations.date),wp.element.createElement("th",null,window.vibe_mycred.translations.points_label)),wp.element.createElement("tbody",null,s.map((function(e){return wp.element.createElement("tr",{dangerouslySetInnerHTML:{__html:e}})})))),_&&!r?wp.element.createElement("a",{className:"link",onClick:function(){v(l(l({},y),{},{paged:y.paged+1}))}},window.vibe_mycred.translations.load_more):""):r?"":wp.element.createElement("div",{className:"vbp_message error message"},window.vibe_mycred.translations.no_records)),r?wp.element.createElement(o,null):"")};function g(e){return function(e){if(Array.isArray(e))return j(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||_(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var l,i=e[Symbol.iterator]();!(r=(l=i.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}(e,t)||_(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){if(e){if("string"==typeof e)return j(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j(e,t):void 0}}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var S=wp.element,A=(S.createElement,S.useState),P=S.useEffect,N=(S.Fragment,S.render,wp.data),I=(N.dispatch,N.select),k=function(e){var t=O(A(!1),2),n=(t[0],t[1],O(A([]),2)),r=n[0],o=n[1],a=O(A([]),2),l=a[0],i=a[1],c=O(A("logs"),2),u=c[0],s=c[1],m=O(A(!1),2);m[0],m[1];return P((function(){var e=I("vibebp").getMenu().filter((function(e){return"points"===e.parent}));e.map((function(t,n){-1===e.findIndex((function(e){return e.class.indexOf("current-menu-item")>-1}))&&e[n].class.push("current-menu-item")})),o(e),-1==document.querySelector("body").classList.value.indexOf("withsidebar")&&document.querySelector("body").classList.add("withsidebar")}),[]),wp.element.createElement("div",{className:"vibebp_sidebars"},wp.element.createElement("div",{className:"vibebp_left_sidebar_wrapper"},wp.element.createElement("div",{className:"vibebp_left_sidebar"},wp.element.createElement("h3",null,window.vibe_mycred.translations.points),r.map((function(e,t){var n=e.class.join(" ")+" "+e.css_id;return wp.element.createElement("a",{className:n,onClick:function(n){var a=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){E(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},l);a.filter=e.css_id,a.page=1,l.css_id!==a.filter&&i(a),s(e.css_id);var c=g(r),u=c.findIndex((function(e){return e.class.indexOf("current-menu-item")>-1}));c[u].class.splice(c[u].class.indexOf("current-menu-item"),1),c[t].class.push("current-menu-item"),o(c)}},e.name)})))),wp.element.createElement("div",{className:"vibebp_main"},"logs"===u?wp.element.createElement("div",{id:"logs_content"},wp.element.createElement(v,{type:"logs"})):""))};function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var l,i=e[Symbol.iterator]();!(r=(l=i.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var T=wp.element,D=(T.createElement,T.render,T.useState),M=T.useEffect,q=T.Fragment,L=wp.data,F=L.select,U=(L.dispatch,function(e){var t=x(D(!1),2),n=t[0],r=t[1],o=x(D(!1),2),a=o[0],l=o[1],i=x(D(""),2),c=i[0],u=i[1],s=F("vibebp").getToken();M((function(){r(!0)}),[e]);var m={};return a&&(m={opacity:"0.5","pointer-events":"none"}),wp.element.createElement(q,null,n?wp.element.createElement("div",{className:"popup_wrapper",onClick:function(e){e.preventDefault(),document.querySelector(".popup_wrapper")&&e.target===document.querySelector(".popup_wrapper")&&r(!1)}},wp.element.createElement("div",{className:"popup_content"},wp.element.createElement("span",{className:"vicon vicon-close",onClick:function(){r(!1)}}),wp.element.createElement("h3",null,window.vibe_mycred.translations.buy_with_points),c.length?wp.element.createElement("div",{className:"vbp_message error message"},c):"",wp.element.createElement("div",{className:"popup-footer"},wp.element.createElement("a",{className:"button is-primary",style:m,onClick:function(){l(!0),fetch("".concat(window.wplms_course_data.api_url,"/mycred/assigncourse"),{method:"post",body:JSON.stringify({id:e.id,token:s})}).then((function(e){return e.json()})).then((function(t){if(t.status){r(!1);var n=new CustomEvent("reload_course_button",{detail:{course:e.id}});document.dispatchEvent(n)}else t.hasOwnProperty("message")&&t.message.length&&u(t.message);l(!1)}))}},window.wplms_course_data.translations.yes),wp.element.createElement("a",{className:"button is-primary",onClick:function(){r(!1)}},window.wplms_course_data.translations.cancel)))):"")}),B=(n(0),wp.element),$=(B.createElement,B.useState,B.useEffect,B.Fragment,B.render),J=wp.data;J.dispatch,J.select;document.addEventListener("component_loaded",(function(e){"points"===e.detail.component&&setTimeout((function(){$(wp.element.createElement(k,null),document.querySelector("#points_component"))}),200)}),!1),document.addEventListener("coursebuttonpricingclicked",(function(e){if(null!==document.getElementById("wplms_popup")&&document.getElementById("wplms_popup").remove(),"#mycredpoints"==e.detail.price.link){var t=document.createElement("div");t.setAttribute("id","wplms_popup"),document.body.appendChild(t),$(wp.element.createElement(U,{id:e.detail.course,price:e.detail.price}),document.getElementById("wplms_popup"))}}),!1)}]);
     1!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=wp.element,o=(r.createElement,r.render,function(e){return wp.element.createElement("div",{class:"lds-ellipsis"},wp.element.createElement("div",null),wp.element.createElement("div",null),wp.element.createElement("div",null),wp.element.createElement("div",null))});function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var l,i=e[Symbol.iterator]();!(r=(l=i.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var p=wp.element,d=(p.createElement,p.useState),f=p.useEffect,b=p.Fragment,y=(p.render,p.useContext,p.useRef,wp.data),w=(y.dispatch,y.select),v=function(e){w("vibebp").getUser();var t=w("vibebp").getToken(),n=u(d(!0),2),r=n[0],a=n[1],i=u(d([]),2),s=i[0],m=i[1],p=u(d({paged:1}),2),y=p[0],v=p[1],g=u(d(null),2),h=g[0],E=g[1],O=u(d(!0),2),_=O[0],j=O[1];f((function(){S()}),[y]);var S=function(){a(!0),fetch("".concat(window.vibe_mycred.api_url,"/logs"),{method:"post",body:JSON.stringify({token:t,paged:y.paged})}).then((function(e){return e.json()})).then((function(e){if(e&&e.status){var t=c(s);if(e.entries.length){for(var n=e.entries.length-1;n>=0;n--)t.push(e.entries[n]);m(t)}e.entries.length<20&&j(!1)}else j(!1);e.hasOwnProperty("balance")&&E(e.balance),a(!1)}))};return wp.element.createElement("div",null,null!==h?wp.element.createElement("div",{className:"columns"},wp.element.createElement("span",null,wp.element.createElement("span",{className:"vicon vicon-star"})," ",wp.element.createElement("span",{className:"title",style:{color:"inherit"}},h))):"",wp.element.createElement("div",{className:"points_records"},s.length?wp.element.createElement(b,null,wp.element.createElement("table",{className:"table"},wp.element.createElement("thead",null,wp.element.createElement("th",null,window.vibe_mycred.translations.entry),wp.element.createElement("th",null,window.vibe_mycred.translations.date),wp.element.createElement("th",null,window.vibe_mycred.translations.points_label)),wp.element.createElement("tbody",null,s.reverse().map((function(e){return wp.element.createElement("tr",{dangerouslySetInnerHTML:{__html:e}})})))),_&&!r?wp.element.createElement("a",{className:"link",onClick:function(){v(l(l({},y),{},{paged:y.paged+1}))}},window.vibe_mycred.translations.load_more):""):r?"":wp.element.createElement("div",{className:"vbp_message error message"},window.vibe_mycred.translations.no_records)),r?wp.element.createElement(o,null):"")};function g(e){return function(e){if(Array.isArray(e))return j(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||_(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var l,i=e[Symbol.iterator]();!(r=(l=i.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}(e,t)||_(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){if(e){if("string"==typeof e)return j(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j(e,t):void 0}}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var S=wp.element,A=(S.createElement,S.useState),P=S.useEffect,N=(S.Fragment,S.render,wp.data),I=(N.dispatch,N.select),k=function(e){var t=O(A(!1),2),n=(t[0],t[1],O(A([]),2)),r=n[0],o=n[1],a=O(A([]),2),l=a[0],i=a[1],c=O(A("logs"),2),u=c[0],s=c[1],m=O(A(!1),2);m[0],m[1];return P((function(){var e=I("vibebp").getMenu().filter((function(e){return"points"===e.parent}));e.map((function(t,n){-1===e.findIndex((function(e){return e.class.indexOf("current-menu-item")>-1}))&&e[n].class.push("current-menu-item")})),o(e),-1==document.querySelector("body").classList.value.indexOf("withsidebar")&&document.querySelector("body").classList.add("withsidebar")}),[]),wp.element.createElement("div",{className:"vibebp_sidebars"},wp.element.createElement("div",{className:"vibebp_left_sidebar_wrapper"},wp.element.createElement("div",{className:"vibebp_left_sidebar"},wp.element.createElement("h3",null,window.vibe_mycred.translations.points),r.map((function(e,t){var n=e.class.join(" ")+" "+e.css_id;return wp.element.createElement("a",{className:n,onClick:function(n){var a=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){E(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},l);a.filter=e.css_id,a.page=1,l.css_id!==a.filter&&i(a),s(e.css_id);var c=g(r),u=c.findIndex((function(e){return e.class.indexOf("current-menu-item")>-1}));c[u].class.splice(c[u].class.indexOf("current-menu-item"),1),c[t].class.push("current-menu-item"),o(c)}},e.name)})))),wp.element.createElement("div",{className:"vibebp_main"},"logs"===u?wp.element.createElement("div",{id:"logs_content"},wp.element.createElement(v,{type:"logs"})):""))};function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var l,i=e[Symbol.iterator]();!(r=(l=i.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var T=wp.element,D=(T.createElement,T.render,T.useState),M=T.useEffect,q=T.Fragment,L=wp.data,F=L.select,U=(L.dispatch,function(e){var t=x(D(!1),2),n=t[0],r=t[1],o=x(D(!1),2),a=o[0],l=o[1],i=x(D(""),2),c=i[0],u=i[1],s=F("vibebp").getToken();M((function(){r(!0)}),[e]);var m={};return a&&(m={opacity:"0.5","pointer-events":"none"}),wp.element.createElement(q,null,n?wp.element.createElement("div",{className:"popup_wrapper",onClick:function(e){e.preventDefault(),document.querySelector(".popup_wrapper")&&e.target===document.querySelector(".popup_wrapper")&&r(!1)}},wp.element.createElement("div",{className:"popup_content"},wp.element.createElement("span",{className:"vicon vicon-close",onClick:function(){r(!1)}}),wp.element.createElement("h3",null,window.vibe_mycred.translations.buy_with_points),c.length?wp.element.createElement("div",{className:"vbp_message error message"},c):"",wp.element.createElement("div",{className:"popup-footer"},wp.element.createElement("a",{className:"button is-primary",style:m,onClick:function(){l(!0),fetch("".concat(window.wplms_course_data.api_url,"/mycred/assigncourse"),{method:"post",body:JSON.stringify({id:e.id,token:s})}).then((function(e){return e.json()})).then((function(t){if(t.status){r(!1);var n=new CustomEvent("reload_course_button",{detail:{course:e.id}});document.dispatchEvent(n)}else t.hasOwnProperty("message")&&t.message.length&&u(t.message);l(!1)}))}},window.wplms_course_data.translations.yes),wp.element.createElement("a",{className:"button is-primary",onClick:function(){r(!1)}},window.wplms_course_data.translations.cancel)))):"")}),B=(n(0),wp.element),$=(B.createElement,B.useState,B.useEffect,B.Fragment,B.render),J=wp.data;J.dispatch,J.select;document.addEventListener("component_loaded",(function(e){"points"===e.detail.component&&setTimeout((function(){$(wp.element.createElement(k,null),document.querySelector("#points_component"))}),200)}),!1),document.addEventListener("coursebuttonpricingclicked",(function(e){if(null!==document.getElementById("wplms_popup")&&document.getElementById("wplms_popup").remove(),"#mycredpoints"==e.detail.price.link){var t=document.createElement("div");t.setAttribute("id","wplms_popup"),document.body.appendChild(t),$(wp.element.createElement(U,{id:e.detail.course,price:e.detail.price}),document.getElementById("wplms_popup"))}}),!1)}]);
  • wplms-mycred-addon/trunk/vibebp/includes/class.api.php

    r2392003 r2392387  
    209209        $body = json_decode($request->get_body(),true);
    210210        $paged = $body['paged'];
    211         $number = apply_filters('wplms_mycred_log_api_number',10); 
     211        $number = apply_filters('wplms_mycred_log_api_number',20); 
    212212        $offset = ($paged-1)*$per_page;
    213         //$date_start = $request->get_param('date_start'); 
    214         //$date_end = $request->get_param('date_end'); 
    215213
    216214        $return = array('status'=>false,'entries' => array(),'message'=>_x('something went wrong','','wplms-mycred'));
     
    220218            'number' => $number,
    221219            'paged' => (int)$paged,
    222             'offset' => $offset,
     220            'offset' => $offset
    223221        );
    224222       
  • wplms-mycred-addon/trunk/wplms-mycred-addon.php

    r2392003 r2392387  
    44Plugin URI: http://www.vibethemes.com/
    55Description: This plugin integrates MyCred points system with WPLMS theme [4.x compatible]
    6 Version: 4.0
     6Version: 4.0.1
    77Author: Mr.Vibe
    88Author URI: http://www.vibethemes.com/
     
    3333}
    3434if( !defined('WPLMS_MYCRED_PLUGIN_VERSION')){
    35     define('WPLMS_MYCRED_PLUGIN_VERSION','4.0');
     35    define('WPLMS_MYCRED_PLUGIN_VERSION','4.0.1');
    3636}
    3737
Note: See TracChangeset for help on using the changeset viewer.