PluginProbe ʕ •ᴥ•ʔ
Tutor LMS – eLearning and online course solution / 1.4.0
Tutor LMS – eLearning and online course solution v1.4.0
3.9.14 3.9.13 3.9.12 3.9.11 trunk 1.0.0 1.0.0-alpha 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.2.0 1.2.1 1.2.11 1.2.12 1.2.13 1.2.20 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 1.7.7 1.7.8 1.7.9 1.8.0 1.8.1 1.8.10 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9.0 1.9.1 1.9.10 1.9.11 1.9.12 1.9.13 1.9.14 1.9.15 1.9.16 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 2.0.10 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.10 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.3.0 2.4.0 2.5.0 2.6.0 2.6.1 2.6.2 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 3.0.0 3.0.1 3.0.2 3.1.0 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.6.1 3.6.2 3.6.3 3.6.4 3.7.0 3.7.1 3.7.2 3.7.3 3.7.4 3.8.0 3.8.1 3.8.2 3.8.3 3.9.0 3.9.1 3.9.10 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 3.9.8 3.9.9
tutor / classes / Tutor.php
tutor / classes Last commit date
Addons.php 6 years ago Admin.php 6 years ago Ajax.php 6 years ago Assets.php 6 years ago Course.php 6 years ago Course_Widget.php 6 years ago Dashboard.php 6 years ago Gutenberg.php 6 years ago Instructor.php 6 years ago Instructors_List.php 6 years ago Lesson.php 6 years ago Options.php 6 years ago Post_types.php 6 years ago Q_and_A.php 6 years ago Question.php 6 years ago Question_Answers_List.php 6 years ago Quiz.php 6 years ago Quiz_Attempts_List.php 6 years ago Rewrite_Rules.php 6 years ago Shortcode.php 6 years ago Student.php 6 years ago Students_List.php 6 years ago Taxonomies.php 6 years ago Template.php 6 years ago Theme_Compatibility.php 6 years ago Tools.php 6 years ago Tutor.php 6 years ago TutorEDD.php 6 years ago Tutor_Base.php 6 years ago Tutor_List_Table.php 6 years ago Upgrader.php 6 years ago User.php 6 years ago Utils.php 6 years ago Video_Stream.php 6 years ago Withdraw.php 6 years ago Withdraw_Requests_List.php 6 years ago WooCommerce.php 6 years ago
Tutor.php
614 lines
1 <?php
2 namespace TUTOR;
3
4 if ( ! defined( 'ABSPATH' ) )
5 exit;
6
7 final class Tutor{
8 public $version = TUTOR_VERSION;
9 public $path;
10 public $url;
11 public $basename;
12
13 /**
14 * The single instance of the class.
15 *
16 * @since v.1.2.0
17 */
18 protected static $_instance = null;
19
20 //Components
21 public $utils;
22 public $admin;
23 public $ajax;
24 public $options;
25 public $shortcode;
26
27 private $addons;
28 private $post_types;
29 private $taxonomies;
30 private $assets;
31 private $course;
32 private $lesson;
33 private $rewrite_rules;
34 private $template;
35 private $instructor;
36 private $student;
37 private $q_and_a;
38 private $quiz;
39 private $question;
40 private $tools;
41 private $user;
42 private $theme_compatibility;
43 private $gutenberg;
44
45 private $woocommerce;
46 private $edd;
47 private $withdraw;
48
49 private $course_widget;
50 private $upgrader;
51 private $dashboard;
52
53 /**
54 * @return null|Tutor
55 *
56 * Run the TUTOR
57 *
58 * @since 1.2.0
59 */
60 public static function instance() {
61 if ( is_null( self::$_instance ) ) {
62 self::$_instance = new self();
63 }
64 return self::$_instance;
65 }
66
67 function __construct() {
68
69 $this->path = plugin_dir_path(TUTOR_FILE);
70 $this->url = plugin_dir_url(TUTOR_FILE);
71 $this->basename = plugin_basename(TUTOR_FILE);
72
73 add_filter('wp_doing_ajax', array($this, 'wp_doing_ajax'));
74
75 /**
76 * Include Files
77 */
78 //add_action( 'init', array( $this, 'includes' ), 11 );
79 $this->includes();
80
81 /**
82 * Loading Autoloader
83 */
84
85 if ( function_exists( '__autoload' ) ) {
86 spl_autoload_register( '__autoload' );
87 }
88 spl_autoload_register(array($this, 'loader'));
89
90 do_action('tutor_before_load');
91
92 $this->addons = new Addons();
93 $this->post_types = new Post_types();
94 $this->taxonomies = new Taxonomies();
95 $this->assets = new Assets();
96 $this->admin = new Admin();
97 $this->ajax = new Ajax();
98 $this->options = new Options();
99 $this->shortcode = new Shortcode();
100 $this->course = new Course();
101 $this->lesson = new Lesson();
102 $this->rewrite_rules = new Rewrite_Rules();
103 $this->template = new Template();
104 $this->instructor = new Instructor();
105 $this->student = new Student();
106 $this->q_and_a = new Q_and_A();
107 $this->quiz = new Quiz();
108 $this->question = new Question();
109 $this->tools = new Tools();
110 $this->user = new User();
111 $this->theme_compatibility = new Theme_Compatibility();
112 $this->gutenberg = new Gutenberg();
113 $this->woocommerce = new WooCommerce();
114 $this->edd = new TutorEDD();
115 $this->withdraw = new Withdraw();
116 $this->course_widget = new Course_Widget();
117 $this->upgrader = new Upgrader();
118 $this->dashboard = new Dashboard();
119
120 /**
121 * Run Method
122 * @since v.1.2.0
123 */
124 $this->run();
125
126 do_action('tutor_loaded');
127
128 add_action( 'init', array( $this, 'init_action' ) );
129 }
130
131 /**
132 * @param $className
133 *
134 * Auto Load class and the files
135 */
136 private function loader($className) {
137 if ( ! class_exists($className)){
138 $className = preg_replace(
139 array('/([a-z])([A-Z])/', '/\\\/'),
140 array('$1$2', DIRECTORY_SEPARATOR),
141 $className
142 );
143
144 $className = str_replace('TUTOR'.DIRECTORY_SEPARATOR, 'classes'.DIRECTORY_SEPARATOR, $className);
145 $file_name = $this->path.$className.'.php';
146
147 if (file_exists($file_name) ) {
148 require_once $file_name;
149 }
150 }
151 }
152
153 public function includes(){
154 include tutor()->path.'includes/tutor-general-functions.php';
155 include tutor()->path.'includes/tutor-template-functions.php';
156 include tutor()->path.'includes/tutor-template-hook.php';
157 }
158
159 //Run the TUTOR right now
160 public function run(){
161 do_action('tutor_before_run');
162
163 register_activation_hook( TUTOR_FILE, array($this, 'tutor_activate' ) );
164 register_deactivation_hook(TUTOR_FILE, array($this, 'tutor_deactivation'));
165
166 do_action('tutor_after_run');
167 }
168
169 /**
170 * Tutor Action Via do_action
171 * @since 1.2.14
172 */
173 public function init_action(){
174 if (isset($_REQUEST['tutor_action'])){
175 do_action('tutor_action_'.$_REQUEST['tutor_action']);
176 }
177
178 }
179
180 /**
181 * Do some task during plugin activation
182 */
183 public function tutor_activate(){
184 $version = get_option('tutor_version');
185 //Save Option
186 if ( ! $version){
187 //Create Database
188 $this->create_database();
189
190 $options = self::default_options();
191 update_option('tutor_option', $options);
192
193 //Rewrite Flush
194 update_option('required_rewrite_flush', time());
195 self::manage_tutor_roles_and_permissions();
196
197 self::save_data();//Save initial Page
198 update_option('tutor_version', TUTOR_VERSION);
199 }
200
201 //Set Schedule
202 if (! wp_next_scheduled ( 'tutor_once_in_day_run_schedule' )) {
203 wp_schedule_event(time(), 'twicedaily', 'tutor_once_in_day_run_schedule');
204 }
205
206 /**
207 * Backward Compatibility for version < 1.2.0
208 */
209 if (version_compare(get_option('tutor_version'), '1.2.0', '<')){
210 /**
211 * Creating New Database
212 */
213 $this->create_withdraw_database();
214 //Update the tutor version
215 update_option('tutor_version', '1.2.0');
216 //Rewrite Flush
217 update_option('required_rewrite_flush', time());
218 }
219
220 /**
221 * Backward Compatibility to < 1.3.1 for make course plural
222 */
223 if (version_compare(get_option('tutor_version'), '1.3.1', '<')){
224 global $wpdb;
225
226 if ( ! get_option('is_course_post_type_updated')){
227 $wpdb->update($wpdb->posts, array('post_type' => 'courses'), array('post_type' => 'course'));
228 update_option('is_course_post_type_updated', true);
229 update_option('tutor_version', '1.3.1');
230 flush_rewrite_rules();
231 }
232 }
233
234 /**
235 * Save First activation Time
236 */
237 $first_activation_date = get_option('tutor_first_activation_time');
238 if ( ! $first_activation_date){
239 update_option('tutor_first_activation_time', time());
240 }
241
242 }
243
244 //Run task on deactivation
245 public function tutor_deactivation() {
246 wp_clear_scheduled_hook('tutor_once_in_day_run_schedule');
247 }
248
249 public function create_database(){
250 global $wpdb;
251
252 $charset_collate = $wpdb->get_charset_collate();
253
254 /**
255 * Table SQL
256 *
257 * {$wpdb->prefix}tutor_quiz_attempts
258 * {$wpdb->prefix}tutor_quiz_attempt_answers
259 * {$wpdb->prefix}tutor_quiz_questions
260 * {$wpdb->prefix}tutor_quiz_question_answers
261 * {$wpdb->prefix}tutor_earnings
262 * {$wpdb->prefix}tutor_withdraws
263 *
264 * @since v.1.0.0
265 */
266 $quiz_attempts_sql = "CREATE TABLE {$wpdb->prefix}tutor_quiz_attempts (
267 attempt_id int(11) NOT NULL AUTO_INCREMENT,
268 course_id int(11) DEFAULT NULL,
269 quiz_id int(11) DEFAULT NULL,
270 user_id int(11) DEFAULT NULL,
271 total_questions int(11) DEFAULT NULL,
272 total_answered_questions int(11) DEFAULT NULL,
273 total_marks decimal(9,2) DEFAULT NULL,
274 earned_marks decimal(9,2) DEFAULT NULL,
275 attempt_info text,
276 attempt_status varchar(50) DEFAULT NULL,
277 attempt_ip varchar(250) DEFAULT NULL,
278 attempt_started_at datetime DEFAULT NULL,
279 attempt_ended_at datetime DEFAULT NULL,
280 is_manually_reviewed int(1) DEFAULT NULL,
281 manually_reviewed_at datetime DEFAULT NULL,
282 PRIMARY KEY (attempt_id)
283 ) $charset_collate;";
284
285 $quiz_attempt_answers = "CREATE TABLE {$wpdb->prefix}tutor_quiz_attempt_answers (
286 attempt_answer_id int(11) NOT NULL AUTO_INCREMENT,
287 user_id int(11) DEFAULT NULL,
288 quiz_id int(11) DEFAULT NULL,
289 question_id int(11) DEFAULT NULL,
290 quiz_attempt_id int(11) DEFAULT NULL,
291 given_answer longtext,
292 question_mark decimal(8,2) DEFAULT NULL,
293 achieved_mark decimal(8,2) DEFAULT NULL,
294 minus_mark decimal(8,2) DEFAULT NULL,
295 is_correct tinyint(4) DEFAULT NULL,
296 PRIMARY KEY (attempt_answer_id)
297 ) $charset_collate;";
298
299 $tutor_quiz_questions = "CREATE TABLE {$wpdb->prefix}tutor_quiz_questions (
300 question_id int(11) NOT NULL AUTO_INCREMENT,
301 quiz_id int(11) DEFAULT NULL,
302 question_title text,
303 question_description longtext,
304 question_type varchar(50) DEFAULT NULL,
305 question_mark decimal(9,2) DEFAULT NULL,
306 question_settings longtext,
307 question_order int(11) DEFAULT NULL,
308 PRIMARY KEY (question_id)
309 ) $charset_collate;";
310
311 $tutor_quiz_question_answers = "CREATE TABLE {$wpdb->prefix}tutor_quiz_question_answers (
312 answer_id int(11) NOT NULL AUTO_INCREMENT,
313 belongs_question_id int(11) DEFAULT NULL,
314 belongs_question_type varchar(250) DEFAULT NULL,
315 answer_title text,
316 is_correct tinyint(4) DEFAULT NULL,
317 image_id int(11) DEFAULT NULL,
318 answer_two_gap_match text,
319 answer_view_format varchar(250) DEFAULT NULL,
320 answer_settings text,
321 answer_order int(11) DEFAULT '0',
322 PRIMARY KEY (answer_id)
323 ) $charset_collate;";
324
325 $earning_table = "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}tutor_earnings (
326 earning_id int(11) NOT NULL AUTO_INCREMENT,
327 user_id int(11) DEFAULT NULL,
328 course_id int(11) DEFAULT NULL,
329 order_id int(11) DEFAULT NULL,
330 order_status varchar(50) DEFAULT NULL,
331 course_price_total decimal(16,2) DEFAULT NULL,
332 course_price_grand_total decimal(16,2) DEFAULT NULL,
333 instructor_amount decimal(16,2) DEFAULT NULL,
334 instructor_rate decimal(16,2) DEFAULT NULL,
335 admin_amount decimal(16,2) DEFAULT NULL,
336 admin_rate decimal(16,2) DEFAULT NULL,
337 commission_type varchar(20) DEFAULT NULL,
338 deduct_fees_amount decimal(16,2) DEFAULT NULL,
339 deduct_fees_name varchar(250) DEFAULT NULL,
340 deduct_fees_type varchar(20) DEFAULT NULL,
341 process_by varchar(20) DEFAULT NULL,
342 created_at datetime DEFAULT NULL,
343 PRIMARY KEY (earning_id)
344 ) $charset_collate;";
345
346 $withdraw_table = "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}tutor_withdraws (
347 withdraw_id int(11) NOT NULL AUTO_INCREMENT,
348 user_id int(11) DEFAULT NULL,
349 amount decimal(16,2) DEFAULT NULL,
350 method_data text DEFAULT NULL,
351 status varchar(50) DEFAULT NULL,
352 updated_at datetime DEFAULT NULL,
353 created_at datetime DEFAULT NULL,
354 PRIMARY KEY (withdraw_id)
355 ) $charset_collate;";
356
357 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
358 dbDelta( $quiz_attempts_sql );
359 dbDelta( $quiz_attempt_answers );
360 dbDelta( $tutor_quiz_questions );
361 dbDelta( $tutor_quiz_question_answers );
362 dbDelta( $earning_table );
363 dbDelta( $withdraw_table );
364 }
365
366 public static function manage_tutor_roles_and_permissions(){
367 /**
368 * Add role for instructor
369 */
370 $instructor_role = tutor()->instructor_role;
371
372 remove_role($instructor_role);
373 add_role( $instructor_role, __('Tutor Instructor', 'tutor'), array() );
374
375 $custom_post_type_permission = array(
376 //Manage Instructor
377 'manage_tutor_instructor',
378
379 //Tutor Posts Type Permission
380 'edit_tutor_course',
381 'read_tutor_course',
382 'delete_tutor_course',
383 'delete_tutor_courses',
384 'edit_tutor_courses',
385 'edit_others_tutor_courses',
386 'read_private_tutor_courses',
387 'edit_tutor_courses',
388
389 'edit_tutor_lesson',
390 'read_tutor_lesson',
391 'delete_tutor_lesson',
392 'delete_tutor_lessons',
393 'edit_tutor_lessons',
394 'edit_others_tutor_lessons',
395 'read_private_tutor_lessons',
396 'edit_tutor_lessons',
397 'publish_tutor_lessons',
398
399 'edit_tutor_quiz',
400 'read_tutor_quiz',
401 'delete_tutor_quiz',
402 'delete_tutor_quizzes',
403 'edit_tutor_quizzes',
404 'edit_others_tutor_quizzes',
405 'read_private_tutor_quizzes',
406 'edit_tutor_quizzes',
407 'publish_tutor_quizzes',
408
409 'edit_tutor_question',
410 'read_tutor_question',
411 'delete_tutor_question',
412 'delete_tutor_questions',
413 'edit_tutor_questions',
414 'edit_others_tutor_questions',
415 'publish_tutor_questions',
416 'read_private_tutor_questions',
417 'edit_tutor_questions',
418 );
419
420 $instructor = get_role( $instructor_role );
421 if ( $instructor ) {
422 $instructor_cap = array (
423 'edit_posts',
424 'read',
425 'upload_files',
426 );
427
428 $instructor_cap = array_merge($instructor_cap, $custom_post_type_permission);
429
430 $can_publish_course = (bool) tutor_utils()->get_option('instructor_can_publish_course');
431 if ($can_publish_course){
432 $instructor_cap[] = 'publish_tutor_courses';
433 }
434
435 foreach ($instructor_cap as $cap){
436 $instructor->add_cap( $cap );
437 }
438 }
439
440 $administrator = get_role( 'administrator' );
441 if ( $administrator ) {
442
443 $administrator_cap = array (
444 'manage_tutor',
445 );
446 $administrator_cap = array_merge($administrator_cap, $custom_post_type_permission);
447 $administrator_cap[] = 'publish_tutor_courses';
448
449 foreach ($administrator_cap as $cap){
450 $administrator->add_cap( $cap );
451 }
452 }
453
454 /**
455 * Add Instructor role to administrator
456 */
457 if (current_user_can('administrator')){
458 tutor_utils()->add_instructor_role(get_current_user_id());
459 }
460
461 }
462
463 /**
464 * Save data like page
465 */
466 public static function save_data(){
467 $student_dashboard_args = array(
468 'post_title' => __('Dashboard', 'tutor'),
469 'post_content' => '',
470 'post_type' => 'page',
471 'post_status' => 'publish',
472 );
473 $student_dashboard_page_id = wp_insert_post( $student_dashboard_args );
474 tutor_utils()->update_option('tutor_dashboard_page_id', $student_dashboard_page_id);
475
476 $student_registration_args = array(
477 'post_title' => __('Student Registration', 'tutor'),
478 'post_content' => '[tutor_student_registration_form]',
479 'post_type' => 'page',
480 'post_status' => 'publish',
481 );
482 $student_register_page_id = wp_insert_post( $student_registration_args );
483 tutor_utils()->update_option('student_register_page', $student_register_page_id);
484
485 $instructor_registration_args = array(
486 'post_title' => __('Instructor Registration', 'tutor'),
487 'post_content' => '[tutor_instructor_registration_form]',
488 'post_type' => 'page',
489 'post_status' => 'publish',
490 );
491 $instructor_registration_id = wp_insert_post( $instructor_registration_args );
492 tutor_utils()->update_option('instructor_register_page', $instructor_registration_id);
493 }
494
495 public static function default_options(){
496 $options = array (
497 'pagination_per_page' => '20',
498 'load_tutor_css' => '1',
499 'load_tutor_js' => '1',
500 'course_allow_upload_private_files' => '1',
501 'display_course_instructors' => '1',
502 'enable_q_and_a_on_course' => '1',
503 'courses_col_per_row' => '3',
504 'courses_per_page' => '3',
505 'lesson_permalink_base' => 'lesson',
506 'quiz_time_limit' =>
507 array (
508 'value' => '0',
509 'time' => 'minutes',
510 ),
511 'quiz_when_time_expires' => 'autosubmit',
512 'quiz_attempts_allowed' => '10',
513 'quiz_grade_method' => 'highest_grade',
514 'enable_public_profile' => '1',
515 'email_to_students' =>
516 array (
517 'quiz_completed' => '1',
518 'completed_course' => '1',
519 ),
520 'email_to_instructors' =>
521 array (
522 'a_student_enrolled_in_course' => '1',
523 'a_student_completed_course' => '1',
524 'a_student_completed_lesson' => '1',
525 'a_student_placed_question' => '1',
526 ),
527 'email_from_name' => get_option('blogname'),
528 'email_from_address' => get_option('admin_email'),
529 'email_footer_text' => '',
530 );
531 return $options;
532 }
533
534
535 /**
536 * Create withdraw database
537 *
538 * @since v.1.2.0
539 */
540 public function create_withdraw_database(){
541 global $wpdb;
542
543 $charset_collate = $wpdb->get_charset_collate();
544
545 /**
546 * Table SQL
547 *
548 * {$wpdb->prefix}tutor_earnings
549 * {$wpdb->prefix}tutor_withdraws
550 *
551 * @since v.1.2.0
552 */
553
554 $earning_table = "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}tutor_earnings (
555 earning_id int(11) NOT NULL AUTO_INCREMENT,
556 user_id int(11) DEFAULT NULL,
557 course_id int(11) DEFAULT NULL,
558 order_id int(11) DEFAULT NULL,
559 order_status varchar(50) DEFAULT NULL,
560 course_price_total decimal(16,2) DEFAULT NULL,
561 course_price_grand_total decimal(16,2) DEFAULT NULL,
562 instructor_amount decimal(16,2) DEFAULT NULL,
563 instructor_rate decimal(16,2) DEFAULT NULL,
564 admin_amount decimal(16,2) DEFAULT NULL,
565 admin_rate decimal(16,2) DEFAULT NULL,
566 commission_type varchar(20) DEFAULT NULL,
567 deduct_fees_amount decimal(16,2) DEFAULT NULL,
568 deduct_fees_name varchar(250) DEFAULT NULL,
569 deduct_fees_type varchar(20) DEFAULT NULL,
570 process_by varchar(20) DEFAULT NULL,
571 created_at datetime DEFAULT NULL,
572 PRIMARY KEY (earning_id)
573 ) $charset_collate;";
574
575 $withdraw_table = "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}tutor_withdraws (
576 withdraw_id int(11) NOT NULL AUTO_INCREMENT,
577 user_id int(11) DEFAULT NULL,
578 amount decimal(16,2) DEFAULT NULL,
579 method_data text DEFAULT NULL,
580 status varchar(50) DEFAULT NULL,
581 updated_at datetime DEFAULT NULL,
582 created_at datetime DEFAULT NULL,
583 PRIMARY KEY (withdraw_id)
584 ) $charset_collate;";
585
586 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
587 dbDelta( $earning_table );
588 dbDelta( $withdraw_table );
589
590 /**
591 * Setting previous dashboard to new dashboard
592 */
593 $previous_dashboard_page_id = (int) tutor_utils()->get_option('student_dashboard');
594 tutor_utils()->update_option('tutor_dashboard_page_id', $previous_dashboard_page_id);
595 }
596
597 /**
598 * @param $bool
599 *
600 * @return bool
601 *
602 * Filter the wp_doing_ajax from tutor requests to get advanced advantages from Tutor
603 *
604 * @since v.1.3.4
605 */
606 public function wp_doing_ajax($bool){
607 if (isset($_REQUEST['tutor_ajax_action'])){
608 return true;
609 }
610 return $bool;
611 }
612
613
614 }