Changeset 2392387
- Timestamp:
- 10/02/2020 02:01:08 PM (6 years ago)
- Location:
- wplms-mycred-addon
- Files:
-
- 28 added
- 9 edited
-
tags/4.0.1 (added)
-
tags/4.0.1/LICENSE (added)
-
tags/4.0.1/README.md (added)
-
tags/4.0.1/assets (added)
-
tags/4.0.1/assets/wplms-mycred-addon.css (added)
-
tags/4.0.1/assets/wplms-mycred-addon.js (added)
-
tags/4.0.1/changelog.txt (added)
-
tags/4.0.1/includes (added)
-
tags/4.0.1/includes/class.init.php (added)
-
tags/4.0.1/includes/class.points-awarding-system.php (added)
-
tags/4.0.1/includes/dashboard_widget.php (added)
-
tags/4.0.1/includes/myCRED-addon-wplms.php (added)
-
tags/4.0.1/includes/referral.php (added)
-
tags/4.0.1/languages (added)
-
tags/4.0.1/languages/wplms-mycred-en_US.po (added)
-
tags/4.0.1/languages/wplms-mycred.pot (added)
-
tags/4.0.1/readme.txt (added)
-
tags/4.0.1/vibebp (added)
-
tags/4.0.1/vibebp/assets (added)
-
tags/4.0.1/vibebp/assets/css (added)
-
tags/4.0.1/vibebp/assets/css/mycred.css (added)
-
tags/4.0.1/vibebp/assets/js (added)
-
tags/4.0.1/vibebp/assets/js/mycred.js (added)
-
tags/4.0.1/vibebp/includes (added)
-
tags/4.0.1/vibebp/includes/class.api.php (added)
-
tags/4.0.1/vibebp/includes/class.init.php (added)
-
tags/4.0.1/wplms-mycred-addon.php (added)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/includes/class.init.php (modified) (8 diffs)
-
trunk/includes/class.points-awarding-system.php (modified) (14 diffs)
-
trunk/includes/referral.php (modified) (1 diff)
-
trunk/languages/wplms-mycred-en_US.po (modified) (29 diffs)
-
trunk/languages/wplms-mycred.pot (added)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/vibebp/assets/js/mycred.js (modified) (1 diff)
-
trunk/vibebp/includes/class.api.php (modified) (2 diffs)
-
trunk/wplms-mycred-addon.php (modified) (2 diffs)
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 27 27 add_filter('wplms_course_product_metabox',array($this,'wplms_mycred_custom_metabox')); 28 28 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); 30 30 add_action('wplms_header_top_login',array($this,'wplms_mycred_show_points')); 31 31 add_filter('wplms_course_product_id',array($this,'wplms_mycred_take_this_course_label'),9); 32 32 add_action('wplms_course_before_front_main',array($this,'wplms_error_message_handle')); 33 33 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')); 34 35 add_action('wp_print_styles',array($this,'add_styles')); 35 36 add_action('wplms_front_end_pricing_content',array($this,'wplms_front_end_pricing'),10,1); … … 38 39 39 40 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')); 40 42 } 41 43 … … 194 196 195 197 function wplms_course_credits_array($price_html,$course_id){ 196 198 197 199 $points=get_post_meta($course_id,'vibe_mycred_points',true); 198 200 if(isset($points) && is_numeric($points)){ 201 199 202 $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); 201 204 $subscription = get_post_meta($course_id,'vibe_mycred_subscription',true); 202 205 if(isset($subscription) && $subscription && $subscription !='H'){ … … 208 211 $points_html .= ' <span class="subs"> '.__('per','wplms-mycred').' '.tofriendlytime($duration).'</span>'; 209 212 } 210 $key = '#hasmycredpoints';213 211 214 $points_html .='</strong>'; 215 216 $key = '#mycredpoints'; 212 217 if(is_user_logged_in()){ 213 218 $user_id = get_current_user_id(); … … 219 224 $key = '?error=login'; 220 225 } 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 221 231 $price_html[$key]=$points_html; 222 232 } 223 233 return $price_html; 224 234 } 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 225 279 226 280 function wplms_mycred_show_points(){ … … 270 324 271 325 function use_mycred_points(){ 272 $user_id=get_current_user_id();326 273 327 $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'])){ 275 329 _e('Security check Failed.','wplms-mycred'); 276 330 die(); 277 331 } 278 332 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 } 279 346 if(!is_numeric($course_id) || get_post_type($course_id) != 'course'){ 280 347 _e('Incorrect Course','wplms-mycred'); … … 283 350 284 351 $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 } 285 357 $mycred = mycred(); 286 358 $balance = $mycred->get_users_cred( $user_id ); … … 381 453 382 454 do_action('wplms_course_mycred_points_puchased',$course_id,$user_id,$points); 455 456 echo __('Course Assigned','wplms-mycred'); 383 457 die(); 384 458 } -
wplms-mycred-addon/trunk/includes/class.points-awarding-system.php
r2392003 r2392387 1 1 <?php 2 2 3 class points_awarding_system { 3 if ( ! defined( 'ABSPATH' ) ) exit; 4 5 class 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 } 4 14 5 15 public $action_hooks=array( … … 28 38 'unit' => array( 29 39 'finished'=>'wplms_unit_complete', 30 )); 31 function __construct(){ 40 )); 41 42 private function __construct(){ 32 43 33 44 $eligibility_option = get_option('wplms_mycred_eligibility'); … … 38 49 foreach($this->action_hooks as $key => $hooks){ 39 50 foreach($hooks as $hook){ 40 51 //print_r($hook.' action registered'); 41 52 add_action($hook,array($this,'check_eligibility'),10,4); 42 53 } … … 124 135 //post ids are points criteria 125 136 if(is_array($point_criteria_ids)){ 137 126 138 foreach($point_criteria_ids as $point_criteria_id){ 127 139 $module_id=get_post_meta($point_criteria_id,'wplms_module_id',true); 140 $passed_flag=1; 128 141 if(isset($module_id) && is_numeric($module_id)){ 142 if($module_id !== $id){ 143 $passed_flag=0; 144 } 145 } 146 if($passed_flag){ 129 147 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 } 174 190 } 175 191 } … … 178 194 179 195 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){ 181 197 $value = get_post_meta($point_criteria_id,'value',true); 182 198 if(!$user_id || !is_numeric($user_id)) … … 202 218 } 203 219 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){ 205 221 $value = get_post_meta($point_criteria_id,'value',true); 206 222 … … 226 242 } 227 243 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 229 248 $value = get_post_meta($point_criteria_id,'value',true); 230 249 $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){ 232 254 $mycred = mycred(); 233 255 $mycred->update_users_balance( $user_id, $value); … … 247 269 } 248 270 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){ 250 272 $value = get_post_meta($point_criteria_id,'value',true); 251 273 $module_score = get_post_meta($point_criteria_id,'wplms_module_score',true); … … 267 289 } 268 290 } 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){ 270 292 $value = get_post_meta($point_criteria_id,'value',true); 271 293 $module_score = get_post_meta($point_criteria_id,'wplms_module_score',true); … … 287 309 } 288 310 } 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){ 290 312 $value = get_post_meta($point_criteria_id,'value',true); 291 313 global $wpdb; … … 309 331 } 310 332 } 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){ 312 334 $value = get_post_meta($point_criteria_id,'value',true); 313 335 global $wpdb; … … 331 353 } 332 354 } 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){ 334 356 $value = get_post_meta($point_criteria_id,'value',true); 335 357 if(is_array($info)){ … … 354 376 } 355 377 } 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){ 357 379 $value = get_post_meta($point_criteria_id,'value',true); 358 380 … … 422 444 } 423 445 424 new points_awarding_system();446 WPLMS_Points_Awarding_System::init(); -
wplms-mycred-addon/trunk/includes/referral.php
r1204514 r2392387 100 100 $user_id = mycred_get_userid_from_ref( $ref_id ); 101 101 102 print_r($user_id); 103 102 104 103 if ( $user_id !== false ) return; 105 104 if ( is_user_logged_in() && get_current_user_id() == $user_id ) return; -
wplms-mycred-addon/trunk/languages/wplms-mycred-en_US.po
r1401247 r2392387 3 3 "Project-Id-Version: WPLMS MyCred ADDON v1.1\n" 4 4 "Report-Msgid-Bugs-To: \n" 5 "POT-Creation-Date: 20 16-04-21 17:22+0530\n"6 "PO-Revision-Date: 20 16-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" 8 8 "Language-Team: \n" 9 9 "Language: en_US\n" … … 12 12 "Content-Transfer-Encoding: 8bit\n" 13 13 "Plural-Forms: nplurals=2; plural=n != 1;\n" 14 "X-Generator: Poedit 1. 8.7\n"14 "X-Generator: Poedit 1.6.10\n" 15 15 "X-Poedit-SourceCharset: utf-8\n" 16 16 "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;" … … 21 21 22 22 # @ wplms-mycred 23 #: includes/class.init.php: 36 includes/dashboard_widget.php:19324 #: includes/myCRED-addon-wplms.php:1 6623 #: includes/class.init.php:47 includes/dashboard_widget.php:191 24 #: includes/myCRED-addon-wplms.php:194 vibebp/includes/class.init.php:79 25 25 msgid "Points" 26 26 msgstr "" 27 27 28 28 # @ vibe 29 #: includes/class.init.php:1 0029 #: includes/class.init.php:111 30 30 msgid "Purchase points to take this course" 31 31 msgstr "" 32 32 33 33 # @ wplms-mycred 34 #: includes/class.init.php:1 0034 #: includes/class.init.php:111 35 35 msgid "Add Points" 36 36 msgstr "" 37 37 38 38 # @ wplms-mycred 39 #: includes/class.init.php:1 1539 #: includes/class.init.php:126 40 40 msgid "MyCred points options for WPLMS Learning Management" 41 41 msgstr "" 42 42 43 #: includes/class.init.php:143 44 msgid "DAYS" 45 msgstr "" 46 43 47 # @ vibe-customtypes 44 #: includes/class.init.php:1 3748 #: includes/class.init.php:148 45 49 msgid "MyCred Points" 46 50 msgstr "" 47 51 48 52 # @ vibe-customtypes 49 #: includes/class.init.php:1 3853 #: includes/class.init.php:149 50 54 msgid "MyCred Points required to take this course." 51 55 msgstr "" 52 56 53 #: includes/class.init.php:1 4357 #: includes/class.init.php:154 54 58 msgid "MyCred Subscription " 55 59 msgstr "" 56 60 57 61 # @ vibe-customtypes 58 #: includes/class.init.php:1 4462 #: includes/class.init.php:155 59 63 msgid "Enable subscription mode for this Course" 60 64 msgstr "" 61 65 66 #: includes/class.init.php:160 67 msgid "Hide" 68 msgstr "" 69 70 #: includes/class.init.php:162 71 msgid "Show" 72 msgstr "" 73 62 74 # @ vibe-customtypes 63 #: includes/class.init.php:1 5675 #: includes/class.init.php:167 64 76 msgid "Subscription Duration" 65 77 msgstr "" 66 78 67 79 # @ vibe-customtypes 68 #: includes/class.init.php:1 5780 #: includes/class.init.php:168 69 81 msgid "Duration for Subscription Products (in " 70 82 msgstr "" 71 83 72 #: includes/class.init.php:1 6284 #: includes/class.init.php:173 73 85 msgid "Points duration parameter" 74 86 msgstr "" 75 87 76 #: includes/class.init.php:1 6388 #: includes/class.init.php:174 77 89 msgid "Subscription duration parameter" 78 90 msgstr "" 79 91 80 #: includes/class.init.php:1 8092 #: includes/class.init.php:191 81 93 #, fuzzy 82 94 msgid "DISABLE" 83 95 msgstr "Schakel uit" 84 96 85 #: includes/class.init.php:1 8097 #: includes/class.init.php:191 86 98 #, fuzzy 87 99 msgid "ENABLE" … … 89 101 90 102 # @ vibe 91 #: includes/class.init.php: 199103 #: includes/class.init.php:211 vibebp/includes/class.init.php:57 92 104 #, fuzzy 93 105 msgid "per" 94 106 msgstr "aantal items per pagina" 95 107 96 #: includes/class.init.php:233 108 #: includes/class.init.php:297 109 msgid "WPLMS Mycred Settings" 110 msgstr "" 111 112 #: includes/class.init.php:301 97 113 msgid "Buy Points Link" 98 114 msgstr "" 99 115 100 #: includes/class.init.php: 236116 #: includes/class.init.php:304 101 117 msgid "" 102 118 "Buy Points for MyCred, displayed when user points are less than required" … … 104 120 105 121 # @ wplms-mycred 106 #: includes/class.init.php: 263122 #: includes/class.init.php:329 107 123 msgid "Security check Failed." 108 124 msgstr "" 109 125 110 # @ wplms-mycred 111 #: includes/class.init.php:268 126 #: includes/class.init.php:343 127 msgid "Incorrect user" 128 msgstr "" 129 130 # @ wplms-mycred 131 #: includes/class.init.php:347 112 132 msgid "Incorrect Course" 113 133 msgstr "" 114 134 115 # @ wplms-mycred 116 #: includes/class.init.php:277 135 #: includes/class.init.php:354 136 msgid "No points set" 137 msgstr "" 138 139 # @ wplms-mycred 140 #: includes/class.init.php:361 117 141 msgid "Not enough balance" 118 142 msgstr "" 119 143 120 #: includes/class.init.php:3 02144 #: includes/class.init.php:386 vibebp/includes/class.api.php:142 121 145 #, php-format 122 146 msgid "Student %s subscibed for course" … … 124 148 125 149 # @ wplms-mycred 126 #: includes/class.init.php:3 04150 #: includes/class.init.php:388 vibebp/includes/class.api.php:144 127 151 msgid "Student Subscribed to course , ends on " 128 152 msgstr "" 129 153 130 154 # @ vibe 131 #: includes/class.init.php:3 10155 #: includes/class.init.php:394 vibebp/includes/class.api.php:150 132 156 msgid "Student subscribed for course " 133 157 msgstr "" 134 158 135 159 # @ vibe 136 #: includes/class.init.php:3 11160 #: includes/class.init.php:395 vibebp/includes/class.api.php:151 137 161 #, fuzzy 138 162 msgid "Student " … … 140 164 141 165 # @ vibe 142 #: includes/class.init.php:3 11166 #: includes/class.init.php:395 vibebp/includes/class.api.php:151 143 167 msgid " subscribed for course " 144 168 msgstr "" 145 169 146 170 # @ vibe 147 #: includes/class.init.php:3 11171 #: includes/class.init.php:395 vibebp/includes/class.api.php:151 148 172 msgid " for " 149 173 msgstr "" 150 174 151 175 # @ 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 153 178 msgid "Instructor earned commission" 154 179 msgstr "" 155 180 156 181 # @ 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 158 184 msgid "" 159 185 "Instructor earned commission for student purchasing the course via points " 160 186 msgstr "" 161 187 162 # @ vibe 163 #: includes/class.init.php:389 188 #: includes/class.init.php:456 189 msgid "Course Assigned" 190 msgstr "" 191 192 # @ vibe 193 #: includes/class.init.php:475 164 194 msgid "Set Course Points" 165 195 msgstr "" 166 196 167 #: includes/class.init.php: 393197 #: includes/class.init.php:479 168 198 msgid "Subscription Type" 169 199 msgstr "" 170 200 171 201 # @ vibe 172 #: includes/class.init.php: 396202 #: includes/class.init.php:482 173 203 msgid "Full Course" 174 204 msgstr "" 175 205 176 206 # @ vibe 177 #: includes/class.init.php: 398207 #: includes/class.init.php:484 178 208 #, fuzzy 179 209 msgid "Subscription" … … 181 211 182 212 # @ vibe 183 #: includes/class.init.php:4 04213 #: includes/class.init.php:490 184 214 msgid "Set Subscription" 185 215 msgstr "" 186 216 187 #: includes/class.points-awarding-system.php: 130188 #: includes/class.points-awarding-system.php: 131217 #: includes/class.points-awarding-system.php:214 218 #: includes/class.points-awarding-system.php:215 189 219 #, php-format 190 220 msgid "" … … 192 222 msgstr "" 193 223 194 #: includes/class.points-awarding-system.php: 153195 #: includes/class.points-awarding-system.php: 154224 #: includes/class.points-awarding-system.php:238 225 #: includes/class.points-awarding-system.php:239 196 226 #, php-format 197 227 msgid "" … … 199 229 msgstr "" 200 230 201 #: includes/class.points-awarding-system.php: 174202 #: includes/class.points-awarding-system.php: 175231 #: includes/class.points-awarding-system.php:265 232 #: includes/class.points-awarding-system.php:266 203 233 #, php-format 204 234 msgid "" … … 207 237 msgstr "" 208 238 209 #: includes/class.points-awarding-system.php: 195210 #: includes/class.points-awarding-system.php: 196239 #: includes/class.points-awarding-system.php:286 240 #: includes/class.points-awarding-system.php:287 211 241 #, php-format 212 242 msgid "" … … 215 245 msgstr "" 216 246 217 #: includes/class.points-awarding-system.php: 215218 #: includes/class.points-awarding-system.php: 216247 #: includes/class.points-awarding-system.php:306 248 #: includes/class.points-awarding-system.php:307 219 249 #, php-format 220 250 msgid "" … … 223 253 msgstr "" 224 254 225 #: includes/class.points-awarding-system.php: 237226 #: includes/class.points-awarding-system.php: 238255 #: includes/class.points-awarding-system.php:328 256 #: includes/class.points-awarding-system.php:329 227 257 #, php-format 228 258 msgid "" … … 231 261 msgstr "" 232 262 233 #: includes/class.points-awarding-system.php: 259234 #: includes/class.points-awarding-system.php: 260263 #: includes/class.points-awarding-system.php:350 264 #: includes/class.points-awarding-system.php:351 235 265 #, php-format 236 266 msgid "" … … 239 269 msgstr "" 240 270 241 #: includes/class.points-awarding-system.php: 281242 #: includes/class.points-awarding-system.php: 282271 #: includes/class.points-awarding-system.php:372 272 #: includes/class.points-awarding-system.php:373 243 273 #, php-format 244 274 msgid "" … … 247 277 msgstr "" 248 278 249 #: includes/class.points-awarding-system.php:3 05250 #: includes/class.points-awarding-system.php:3 06279 #: includes/class.points-awarding-system.php:396 280 #: includes/class.points-awarding-system.php:397 251 281 #, php-format 252 282 msgid "" … … 255 285 msgstr "" 256 286 257 #: includes/class.points-awarding-system.php: 318287 #: includes/class.points-awarding-system.php:409 258 288 msgid "Started Course" 259 289 msgstr "" 260 290 261 #: includes/class.points-awarding-system.php: 320291 #: includes/class.points-awarding-system.php:411 262 292 msgid "Student Started course" 263 293 msgstr "" 264 294 265 295 # @ vibe 266 #: includes/class.points-awarding-system.php: 347296 #: includes/class.points-awarding-system.php:438 267 297 msgid "Add MyCred credits" 268 298 msgstr "" … … 279 309 280 310 # @ wplms-mycred 281 #: includes/dashboard_widget.php:82 includes/dashboard_widget.php:27 8311 #: includes/dashboard_widget.php:82 includes/dashboard_widget.php:276 282 312 msgid "My Balance" 283 313 msgstr "" 284 314 285 315 # @ wplms-mycred 286 #: includes/dashboard_widget.php:91 includes/dashboard_widget.php:28 8316 #: includes/dashboard_widget.php:91 includes/dashboard_widget.php:286 287 317 #, fuzzy 288 318 msgid "Title:" … … 290 320 291 321 # @ wplms-mycred 292 #: includes/dashboard_widget.php:95 includes/dashboard_widget.php:29 6322 #: includes/dashboard_widget.php:95 includes/dashboard_widget.php:294 293 323 msgid "Select Width" 294 324 msgstr "" 295 325 296 326 # @ wplms-mycred 297 #: includes/dashboard_widget.php:97 includes/dashboard_widget.php:29 8327 #: includes/dashboard_widget.php:97 includes/dashboard_widget.php:296 298 328 msgid "One Fourth" 299 329 msgstr "" 300 330 301 331 # @ wplms-mycred 302 #: includes/dashboard_widget.php:98 includes/dashboard_widget.php:29 9332 #: includes/dashboard_widget.php:98 includes/dashboard_widget.php:297 303 333 msgid "One Third" 304 334 msgstr "" 305 335 306 336 # @ wplms-mycred 307 #: includes/dashboard_widget.php:99 includes/dashboard_widget.php: 300337 #: includes/dashboard_widget.php:99 includes/dashboard_widget.php:298 308 338 msgid "One Half" 309 339 msgstr "" 310 340 311 341 # @ wplms-mycred 312 #: includes/dashboard_widget.php:100 includes/dashboard_widget.php: 301342 #: includes/dashboard_widget.php:100 includes/dashboard_widget.php:299 313 343 msgid "Two Third" 314 344 msgstr "" 315 345 316 346 # @ wplms-mycred 317 #: includes/dashboard_widget.php:101 includes/dashboard_widget.php:30 2347 #: includes/dashboard_widget.php:101 includes/dashboard_widget.php:300 318 348 msgid "Three Fourth" 319 349 msgstr "" 320 350 321 351 # @ wplms-mycred 322 #: includes/dashboard_widget.php:102 includes/dashboard_widget.php:30 3352 #: includes/dashboard_widget.php:102 includes/dashboard_widget.php:301 323 353 #, fuzzy 324 354 msgid "Full" … … 336 366 337 367 # @ wplms-dashboard 338 #: includes/dashboard_widget.php:19 3368 #: includes/dashboard_widget.php:191 339 369 msgid "Action" 340 370 msgstr "" 341 371 342 372 # @ wplms-dashboard 343 #: includes/dashboard_widget.php:2 11373 #: includes/dashboard_widget.php:209 344 374 msgid "No data found" 345 375 msgstr "" 346 376 347 377 # @ wplms-mycred 348 #: includes/dashboard_widget.php:29 2378 #: includes/dashboard_widget.php:290 349 379 msgid "Number of Transactions :" 350 380 msgstr "" 351 381 352 #: includes/myCRED-addon-wplms.php: 57382 #: includes/myCRED-addon-wplms.php:67 353 383 msgid "WPLMS : Started Course" 354 384 msgstr "" 355 385 356 386 # @ 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 359 390 msgid "WPLMS Points" 360 391 msgstr "" 361 392 362 393 # @ wplms-mycred 363 #: includes/myCRED-addon-wplms.php:1 00394 #: includes/myCRED-addon-wplms.php:128 364 395 msgid "WPLMS Point" 365 396 msgstr "" 366 397 367 398 # @ wplms-mycred 368 #: includes/myCRED-addon-wplms.php:1 01399 #: includes/myCRED-addon-wplms.php:129 369 400 msgid "Create New" 370 401 msgstr "" 371 402 372 403 # @ wplms-mycred 373 #: includes/myCRED-addon-wplms.php:1 02404 #: includes/myCRED-addon-wplms.php:130 374 405 msgid "Create New Points Awarding Criteria" 375 406 msgstr "" 376 407 377 408 # @ wplms-mycred 378 #: includes/myCRED-addon-wplms.php:1 03409 #: includes/myCRED-addon-wplms.php:131 379 410 msgid "Edit Point" 380 411 msgstr "" 381 412 382 413 # @ wplms-mycred 383 #: includes/myCRED-addon-wplms.php:1 04414 #: includes/myCRED-addon-wplms.php:132 384 415 msgid "New Point" 385 416 msgstr "" 386 417 387 418 # @ wplms-mycred 388 #: includes/myCRED-addon-wplms.php:1 07419 #: includes/myCRED-addon-wplms.php:135 389 420 msgid "Search wplms points" 390 421 msgstr "" 391 422 392 423 # @ wplms-mycred 393 #: includes/myCRED-addon-wplms.php:1 08424 #: includes/myCRED-addon-wplms.php:136 394 425 msgid "No wplms points found" 395 426 msgstr "" 396 427 397 428 # @ wplms-mycred 398 #: includes/myCRED-addon-wplms.php:1 09429 #: includes/myCRED-addon-wplms.php:137 399 430 msgid "No wplms point found in Trash" 400 431 msgstr "" 401 432 402 433 # @ wplms-mycred 403 #: includes/myCRED-addon-wplms.php:1 32 includes/myCRED-addon-wplms.php:135434 #: includes/myCRED-addon-wplms.php:160 includes/myCRED-addon-wplms.php:163 404 435 msgid "Points updated." 405 436 msgstr "" 406 437 407 438 # @ wplms-mycred 408 #: includes/myCRED-addon-wplms.php:1 37439 #: includes/myCRED-addon-wplms.php:165 409 440 msgid "WPLMS Point published." 410 441 msgstr "" 411 442 412 443 # @ wplms-mycred 413 #: includes/myCRED-addon-wplms.php:1 38444 #: includes/myCRED-addon-wplms.php:166 414 445 msgid "Point saved." 415 446 msgstr "" 416 447 417 448 # @ wplms-mycred 418 #: includes/myCRED-addon-wplms.php:1 41449 #: includes/myCRED-addon-wplms.php:169 419 450 msgid "Draft Point saved." 420 451 msgstr "" 421 452 422 453 # @ wplms-mycred 423 #: includes/myCRED-addon-wplms.php:1 67454 #: includes/myCRED-addon-wplms.php:195 424 455 msgid "# Times Awarded" 425 456 msgstr "" 426 457 427 458 # @ wplms-mycred 428 #: includes/myCRED-addon-wplms.php:1 68459 #: includes/myCRED-addon-wplms.php:196 429 460 msgid "Criteria" 430 461 msgstr "" 431 462 432 463 # @ wplms-mycred 433 #: includes/myCRED-addon-wplms.php:2 15464 #: includes/myCRED-addon-wplms.php:243 434 465 msgid "not yet awarded" 435 466 msgstr "" 436 467 437 468 # @ wplms-mycred 438 #: includes/myCRED-addon-wplms.php:2 25469 #: includes/myCRED-addon-wplms.php:253 439 470 msgid "Not defined" 440 471 msgstr "" 441 472 442 473 # @ wplms-mycred 443 #: includes/myCRED-addon-wplms.php:2 65474 #: includes/myCRED-addon-wplms.php:293 444 475 msgid "WPLMS Points Setup" 445 476 msgstr "" 446 477 447 478 # @ wplms-mycred 448 #: includes/myCRED-addon-wplms.php: 274479 #: includes/myCRED-addon-wplms.php:302 449 480 msgid "Criteria Usage Limits" 450 481 msgstr "" 451 482 452 483 # @ wplms-mycred 453 #: includes/myCRED-addon-wplms.php: 283484 #: includes/myCRED-addon-wplms.php:311 454 485 msgid "Points Awarding Criteria" 455 486 msgstr "" 456 487 457 488 # @ wplms-mycred 458 #: includes/myCRED-addon-wplms.php:3 18489 #: includes/myCRED-addon-wplms.php:347 459 490 #, fuzzy 460 491 msgid "Value" … … 462 493 463 494 # @ wplms-mycred 464 #: includes/myCRED-addon-wplms.php:3 21495 #: includes/myCRED-addon-wplms.php:350 465 496 msgid "The amount of %plural% this wplms is worth." 466 497 msgstr "" 467 498 468 499 # @ wplms-mycred 469 #: includes/myCRED-addon-wplms.php:3 24500 #: includes/myCRED-addon-wplms.php:353 470 501 msgid "Point Type" 471 502 msgstr "" 472 503 473 504 # @ wplms-mycred 474 #: includes/myCRED-addon-wplms.php:3 25505 #: includes/myCRED-addon-wplms.php:354 475 506 msgid "Select the point type that this wplms is applied." 476 507 msgstr "" 477 508 478 509 # @ wplms-mycred 479 #: includes/myCRED-addon-wplms.php:3 30510 #: includes/myCRED-addon-wplms.php:359 480 511 msgid "Expire" 481 512 msgstr "" 482 513 483 514 # @ wplms-mycred 484 #: includes/myCRED-addon-wplms.php:3 33515 #: includes/myCRED-addon-wplms.php:362 485 516 msgid "" 486 517 "Optional date when this wplms points criteria expires. Expired WPLMS points " … … 489 520 490 521 # @ wplms-mycred 491 #: includes/myCRED-addon-wplms.php:3 62522 #: includes/myCRED-addon-wplms.php:391 492 523 msgid "Global Maximum" 493 524 msgstr "" 494 525 495 526 # @ wplms-mycred 496 #: includes/myCRED-addon-wplms.php:3 65527 #: includes/myCRED-addon-wplms.php:394 497 528 msgid "" 498 529 "The maximum number of times this points awarding criteria can be used. Note " … … 502 533 503 534 # @ wplms-mycred 504 #: includes/myCRED-addon-wplms.php:3 69535 #: includes/myCRED-addon-wplms.php:398 505 536 msgid "User Maximum" 506 537 msgstr "" 507 538 508 539 # @ wplms-mycred 509 #: includes/myCRED-addon-wplms.php: 372540 #: includes/myCRED-addon-wplms.php:401 510 541 msgid "" 511 542 "The maximum number of times points can be awarded using this criteria to a " … … 514 545 515 546 # @ wplms-mycred 516 #: includes/myCRED-addon-wplms.php: 399547 #: includes/myCRED-addon-wplms.php:428 517 548 msgid "WPLMS Module" 518 549 msgstr "" 519 550 520 551 # @ wplms-mycred 521 #: includes/myCRED-addon-wplms.php:4 02552 #: includes/myCRED-addon-wplms.php:431 522 553 #, fuzzy 523 554 msgid "Course" … … 525 556 526 557 # @ wplms-mycred 527 #: includes/myCRED-addon-wplms.php:4 03558 #: includes/myCRED-addon-wplms.php:432 528 559 #, fuzzy 529 560 msgid "Unit" … … 531 562 532 563 # @ wplms-mycred 533 #: includes/myCRED-addon-wplms.php:4 04564 #: includes/myCRED-addon-wplms.php:433 534 565 #, fuzzy 535 566 msgid "Quiz" … … 537 568 538 569 # @ wplms-mycred 539 #: includes/myCRED-addon-wplms.php:4 05570 #: includes/myCRED-addon-wplms.php:434 540 571 #, fuzzy 541 572 msgid "Assignment" … … 543 574 544 575 # @ wplms-mycred 545 #: includes/myCRED-addon-wplms.php:4 08576 #: includes/myCRED-addon-wplms.php:437 546 577 msgid "Select module for the Points criteria." 547 578 msgstr "" 548 579 549 580 # @ wplms-mycred 550 #: includes/myCRED-addon-wplms.php:4 12581 #: includes/myCRED-addon-wplms.php:441 551 582 msgid "Module ID" 552 583 msgstr "" 553 584 554 585 # @ wplms-mycred 555 #: includes/myCRED-addon-wplms.php:4 15586 #: includes/myCRED-addon-wplms.php:444 556 587 msgid "Optional set this criteria for a specific module ID." 557 588 msgstr "" 558 589 559 590 # @ wplms-mycred 560 #: includes/myCRED-addon-wplms.php:4 19591 #: includes/myCRED-addon-wplms.php:448 561 592 msgid "Module Criteria" 562 593 msgstr "" 563 594 564 595 # @ wplms-mycred 565 #: includes/myCRED-addon-wplms.php:4 22596 #: includes/myCRED-addon-wplms.php:451 566 597 msgid "Started (No information required)" 567 598 msgstr "" 568 599 569 600 # @ wplms-mycred 570 #: includes/myCRED-addon-wplms.php:4 23601 #: includes/myCRED-addon-wplms.php:452 571 602 msgid "Finished (No information required)" 572 603 msgstr "" 573 604 574 605 # @ wplms-mycred 575 #: includes/myCRED-addon-wplms.php:4 24606 #: includes/myCRED-addon-wplms.php:453 576 607 msgid "Score Greater Than Equal to (Score required)" 577 608 msgstr "" 578 609 579 610 # @ wplms-mycred 580 #: includes/myCRED-addon-wplms.php:4 25611 #: includes/myCRED-addon-wplms.php:454 581 612 msgid "Score Lesser than (Score required)" 582 613 msgstr "" 583 614 584 615 # @ wplms-mycred 585 #: includes/myCRED-addon-wplms.php:4 26616 #: includes/myCRED-addon-wplms.php:455 586 617 msgid "Score Equals (Score required)" 587 618 msgstr "" 588 619 589 620 # @ wplms-mycred 590 #: includes/myCRED-addon-wplms.php:4 27621 #: includes/myCRED-addon-wplms.php:456 591 622 msgid "Highest Marks in module (No information required)" 592 623 msgstr "" 593 624 594 625 # @ wplms-mycred 595 #: includes/myCRED-addon-wplms.php:4 28626 #: includes/myCRED-addon-wplms.php:457 596 627 msgid "Lowest Marks in Module (No information required)" 597 628 msgstr "" 598 629 599 630 # @ wplms-mycred 600 #: includes/myCRED-addon-wplms.php:4 29631 #: includes/myCRED-addon-wplms.php:458 601 632 msgid "Number of Badges earned (# Badges information required)" 602 633 msgstr "" 603 634 604 635 # @ wplms-mycred 605 #: includes/myCRED-addon-wplms.php:4 30636 #: includes/myCRED-addon-wplms.php:459 606 637 msgid "Number of Certificates earned (# Certificates information required)" 607 638 msgstr "" 608 639 609 640 # @ wplms-mycred 610 #: includes/myCRED-addon-wplms.php:4 32641 #: includes/myCRED-addon-wplms.php:461 611 642 msgid "Criteria specific information" 612 643 msgstr "" 613 644 614 645 # @ wplms-mycred 615 #: includes/myCRED-addon-wplms.php:4 34646 #: includes/myCRED-addon-wplms.php:463 616 647 msgid "Set the Points criteria." 617 648 msgstr "" 618 649 619 650 # @ wplms-mycred 620 #: includes/myCRED-addon-wplms.php: 486651 #: includes/myCRED-addon-wplms.php:529 621 652 msgid "WPLMS" 622 653 msgstr "" 623 654 624 655 # @ wplms-mycred 625 #: includes/myCRED-addon-wplms.php: 488656 #: includes/myCRED-addon-wplms.php:531 626 657 msgid "Log Template" 627 658 msgstr "" 628 659 629 660 # @ wplms-mycred 630 #: includes/myCRED-addon-wplms.php: 492661 #: includes/myCRED-addon-wplms.php:535 631 662 msgid "Log entry for successful WPLMS Points criteria redemption." 632 663 msgstr "" 633 664 634 665 # @ wplms-mycred 635 #: includes/myCRED-addon-wplms.php: 495666 #: includes/myCRED-addon-wplms.php:538 636 667 msgid "Success Message" 637 668 msgstr "" 638 669 639 670 # @ wplms-mycred 640 #: includes/myCRED-addon-wplms.php: 499671 #: includes/myCRED-addon-wplms.php:542 641 672 msgid "Message to show when a user has successfully earned WPLMS Points." 642 673 msgstr "" 643 674 644 675 # @ wplms-mycred 645 #: includes/myCRED-addon-wplms.php:5 02676 #: includes/myCRED-addon-wplms.php:545 646 677 msgid "Referrals" 647 678 msgstr "" 648 679 649 680 # @ wplms-mycred 650 #: includes/myCRED-addon-wplms.php:5 06681 #: includes/myCRED-addon-wplms.php:549 651 682 msgid "Enter referral points when a user refers a new user." 652 683 msgstr "" … … 662 693 msgstr "" 663 694 664 #: wplms-mycred-addon.php:66 695 #: vibebp/includes/class.api.php:111 696 msgctxt "wplms-mycred" 697 msgid "Not enough balance" 698 msgstr "" 699 700 #: vibebp/includes/class.api.php:214 701 msgctxt "" 702 msgid "something went wrong" 703 msgstr "" 704 705 #: vibebp/includes/class.api.php:234 706 msgid "Entry" 707 msgstr "" 708 709 #: vibebp/includes/class.api.php:235 710 msgid "Date" 711 msgstr "" 712 713 #: vibebp/includes/class.api.php:241 714 msgctxt "" 715 msgid "Records found" 716 msgstr "" 717 718 #: vibebp/includes/class.init.php:89 719 msgid "Log" 720 msgstr "" 721 722 #: vibebp/includes/class.init.php:127 723 msgctxt "api call" 724 msgid "Date" 725 msgstr "" 726 727 # @ wplms-mycred 728 #: vibebp/includes/class.init.php:128 729 #, fuzzy 730 msgctxt "api call" 731 msgid "Course" 732 msgstr "CURSUS" 733 734 # @ vibe 735 #: vibebp/includes/class.init.php:129 736 #, fuzzy 737 msgctxt "api call" 738 msgid "Student" 739 msgstr "Student " 740 741 #: vibebp/includes/class.init.php:130 742 msgctxt "api call" 743 msgid "Select a date" 744 msgstr "" 745 746 #: vibebp/includes/class.init.php:131 747 msgctxt "api call" 748 msgid "Select start date" 749 msgstr "" 750 751 #: vibebp/includes/class.init.php:132 752 msgctxt "" 753 msgid "Points" 754 msgstr "" 755 756 #: vibebp/includes/class.init.php:133 757 msgctxt "" 758 msgid "Entry" 759 msgstr "" 760 761 #: vibebp/includes/class.init.php:135 762 msgctxt "" 763 msgid "Load More" 764 msgstr "" 765 766 #: vibebp/includes/class.init.php:136 767 msgctxt "" 768 msgid "No Records found!" 769 msgstr "" 770 771 #: vibebp/includes/class.init.php:137 772 msgctxt "" 773 msgid "Buy with Points" 774 msgstr "" 775 776 #: wplms-mycred-addon.php:76 665 777 msgctxt "Install mycred error message" 666 778 msgid "MyCred plugin missing. Please install MyCred plugin." -
wplms-mycred-addon/trunk/readme.txt
r2392003 r2392387 4 4 Requires at least: 3.6 5 5 Tested up to: 5.5.2 6 Stable tag: 4.0 6 Stable tag: 4.0.1 7 7 License: GPLv2 or later 8 8 License 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 209 209 $body = json_decode($request->get_body(),true); 210 210 $paged = $body['paged']; 211 $number = apply_filters('wplms_mycred_log_api_number', 10);211 $number = apply_filters('wplms_mycred_log_api_number',20); 212 212 $offset = ($paged-1)*$per_page; 213 //$date_start = $request->get_param('date_start');214 //$date_end = $request->get_param('date_end');215 213 216 214 $return = array('status'=>false,'entries' => array(),'message'=>_x('something went wrong','','wplms-mycred')); … … 220 218 'number' => $number, 221 219 'paged' => (int)$paged, 222 'offset' => $offset ,220 'offset' => $offset 223 221 ); 224 222 -
wplms-mycred-addon/trunk/wplms-mycred-addon.php
r2392003 r2392387 4 4 Plugin URI: http://www.vibethemes.com/ 5 5 Description: This plugin integrates MyCred points system with WPLMS theme [4.x compatible] 6 Version: 4.0 6 Version: 4.0.1 7 7 Author: Mr.Vibe 8 8 Author URI: http://www.vibethemes.com/ … … 33 33 } 34 34 if( !defined('WPLMS_MYCRED_PLUGIN_VERSION')){ 35 define('WPLMS_MYCRED_PLUGIN_VERSION','4.0 ');35 define('WPLMS_MYCRED_PLUGIN_VERSION','4.0.1'); 36 36 } 37 37
Note: See TracChangeset
for help on using the changeset viewer.