PluginProbe ʕ •ᴥ•ʔ
Tutor LMS – eLearning and online course solution / 1.3.1
Tutor LMS – eLearning and online course solution v1.3.1
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 7 years ago Admin.php 7 years ago Ajax.php 7 years ago Assets.php 7 years ago Course.php 7 years ago Course_Widget.php 7 years ago Gutenberg.php 7 years ago Instructor.php 7 years ago Instructors_List.php 7 years ago Lesson.php 7 years ago Options.php 7 years ago Post_types.php 7 years ago Q_and_A.php 7 years ago Question.php 7 years ago Question_Answers_List.php 7 years ago Quiz.php 7 years ago Quiz_Attempts_List.php 7 years ago Rewrite_Rules.php 7 years ago Shortcode.php 7 years ago Student.php 7 years ago Students_List.php 7 years ago Taxonomies.php 7 years ago Template.php 7 years ago Theme_Compatibility.php 7 years ago Tools.php 7 years ago Tutor.php 7 years ago TutorEDD.php 7 years ago Tutor_Base.php 7 years ago Tutor_List_Table.php 7 years ago User.php 7 years ago Utils.php 7 years ago Video_Stream.php 7 years ago Withdraw.php 7 years ago Withdraw_Requests_List.php 7 years ago WooCommerce.php 7 years ago
Tutor.php
601 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
51 /**
52 * @return null|Tutor
53 *
54 * Run the TUTOR
55 *
56 * @since 1.2.0
57 */
58 public static function instance() {
59 if ( is_null( self::$_instance ) ) {
60 self::$_instance = new self();
61 }
62 return self::$_instance;
63 }
64
65 function __construct() {
66
67 $this->path = plugin_dir_path(TUTOR_FILE);
68 $this->url = plugin_dir_url(TUTOR_FILE);
69 $this->basename = plugin_basename(TUTOR_FILE);
70
71 add_action('admin_init', array($this, 'tutor_course_post_type_update'));
72
73 /**
74 * Include Files
75 */
76 //add_action( 'init', array( $this, 'includes' ), 11 );
77 $this->includes();
78
79 /**
80 * Loading Autoloader
81 */
82
83 if ( function_exists( '__autoload' ) ) {
84 spl_autoload_register( '__autoload' );
85 }
86 spl_autoload_register(array($this, 'loader'));
87
88 do_action('tutor_before_load');
89
90 $this->addons = new Addons();
91 $this->post_types = new Post_types();
92 $this->taxonomies = new Taxonomies();
93 $this->assets = new Assets();
94 $this->admin = new Admin();
95 $this->ajax = new Ajax();
96 $this->options = new Options();
97 $this->shortcode = new Shortcode();
98 $this->course = new Course();
99 $this->lesson = new Lesson();
100 $this->rewrite_rules = new Rewrite_Rules();
101 $this->template = new Template();
102 $this->instructor = new Instructor();
103 $this->student = new Student();
104 $this->q_and_a = new Q_and_A();
105 $this->quiz = new Quiz();
106 $this->question = new Question();
107 $this->tools = new Tools();
108 $this->user = new User();
109 $this->theme_compatibility = new Theme_Compatibility();
110 $this->gutenberg = new Gutenberg();
111 $this->woocommerce = new WooCommerce();
112 $this->edd = new TutorEDD();
113 $this->withdraw = new Withdraw();
114
115 $this->course_widget = new Course_Widget();
116
117 /**
118 * Run Method
119 * @since v.1.2.0
120 */
121 $this->run();
122
123 do_action('tutor_loaded');
124
125 add_action( 'init', array( $this, 'init_action' ) );
126 }
127
128 /**
129 * @param $className
130 *
131 * Auto Load class and the files
132 */
133 private function loader($className) {
134 if ( ! class_exists($className)){
135 $className = preg_replace(
136 array('/([a-z])([A-Z])/', '/\\\/'),
137 array('$1$2', DIRECTORY_SEPARATOR),
138 $className
139 );
140
141 $className = str_replace('TUTOR'.DIRECTORY_SEPARATOR, 'classes'.DIRECTORY_SEPARATOR, $className);
142 $file_name = $this->path.$className.'.php';
143
144 if (file_exists($file_name) ) {
145 require_once $file_name;
146 }
147 }
148 }
149
150 public function includes(){
151 include tutor()->path.'includes/tutor-general-functions.php';
152 include tutor()->path.'includes/tutor-template-functions.php';
153 include tutor()->path.'includes/tutor-template-hook.php';
154 }
155
156 //Run the TUTOR right now
157 public function run(){
158 do_action('tutor_before_run');
159
160 register_activation_hook( TUTOR_FILE, array($this, 'tutor_activate' ) );
161 register_deactivation_hook(TUTOR_FILE, array($this, 'tutor_deactivation'));
162
163 do_action('tutor_after_run');
164 }
165
166 /**
167 * Tutor Action Via do_action
168 * @since 1.2.14
169 */
170 public function init_action(){
171 if (isset($_REQUEST['tutor_action'])){
172 do_action('tutor_action_'.$_REQUEST['tutor_action']);
173 }
174 }
175
176 /**
177 * Do some task during plugin activation
178 */
179 public function tutor_activate(){
180 $version = get_option('tutor_version');
181 //Save Option
182 if ( ! $version){
183 //Create Database
184 $this->create_database();
185
186 $options = self::default_options();
187 update_option('tutor_option', $options);
188
189 //Rewrite Flush
190 update_option('required_rewrite_flush', time());
191 self::manage_tutor_roles_and_permissions();
192
193 self::save_data();//Save initial Page
194 update_option('tutor_version', TUTOR_VERSION);
195 }
196
197 //Set Schedule
198 if (! wp_next_scheduled ( 'tutor_once_in_day_run_schedule' )) {
199 wp_schedule_event(time(), 'twicedaily', 'tutor_once_in_day_run_schedule');
200 }
201
202 /**
203 * Backward Compatibility for version < 1.2.0
204 */
205 if (version_compare(get_option('TUTOR_VERSION'), '1.2.0', '<')){
206 /**
207 * Creating New Database
208 */
209 $this->create_withdraw_database();
210 //Update the tutor version
211 update_option('tutor_version', '1.2.0');
212 //Rewrite Flush
213 update_option('required_rewrite_flush', time());
214 }
215
216 /**
217 * Backward Compatibility to < 1.3.1 for make course plural
218 */
219 if (version_compare(get_option('TUTOR_VERSION'), '1.3.1', '<')){
220 global $wpdb;
221
222 if ( ! get_option('is_course_post_type_updated')){
223 $wpdb->update($wpdb->posts, array('post_type' => 'courses'), array('post_type' => 'course'));
224 update_option('is_course_post_type_updated', true);
225 update_option('tutor_version', '1.3.1');
226 flush_rewrite_rules();
227 }
228 }
229
230 }
231
232 //Run task on deactivation
233 public function tutor_deactivation() {
234 wp_clear_scheduled_hook('tutor_once_in_day_run_schedule');
235 }
236
237 public function tutor_course_post_type_update(){
238 /**
239 * Backward Compatibility to < 1.3.1 for make course plural
240 */
241 if (version_compare(get_option('TUTOR_VERSION'), '1.3.1', '<')){
242 global $wpdb;
243
244 if ( ! get_option('is_course_post_type_updated')){
245 $wpdb->update($wpdb->posts, array('post_type' => 'courses'), array('post_type' => 'course'));
246 update_option('is_course_post_type_updated', true);
247 update_option('tutor_version', '1.3.1');
248 flush_rewrite_rules();
249 }
250 }
251 }
252
253 public function create_database(){
254 global $wpdb;
255
256 $charset_collate = $wpdb->get_charset_collate();
257
258 /**
259 * Table SQL
260 *
261 * {$wpdb->prefix}tutor_quiz_attempts
262 * {$wpdb->prefix}tutor_quiz_attempt_answers
263 * {$wpdb->prefix}tutor_quiz_questions
264 * {$wpdb->prefix}tutor_quiz_question_answers
265 * {$wpdb->prefix}tutor_earnings
266 * {$wpdb->prefix}tutor_withdraws
267 *
268 * @since v.1.0.0
269 */
270 $quiz_attempts_sql = "CREATE TABLE {$wpdb->prefix}tutor_quiz_attempts (
271 attempt_id int(11) NOT NULL AUTO_INCREMENT,
272 course_id int(11) DEFAULT NULL,
273 quiz_id int(11) DEFAULT NULL,
274 user_id int(11) DEFAULT NULL,
275 total_questions int(11) DEFAULT NULL,
276 total_answered_questions int(11) DEFAULT NULL,
277 total_marks decimal(9,2) DEFAULT NULL,
278 earned_marks decimal(9,2) DEFAULT NULL,
279 attempt_info text,
280 attempt_status varchar(50) DEFAULT NULL,
281 attempt_ip varchar(250) DEFAULT NULL,
282 attempt_started_at datetime DEFAULT NULL,
283 attempt_ended_at datetime DEFAULT NULL,
284 is_manually_reviewed int(1) DEFAULT NULL,
285 manually_reviewed_at datetime DEFAULT NULL,
286 PRIMARY KEY (attempt_id)
287 ) $charset_collate;";
288
289 $quiz_attempt_answers = "CREATE TABLE {$wpdb->prefix}tutor_quiz_attempt_answers (
290 attempt_answer_id int(11) NOT NULL AUTO_INCREMENT,
291 user_id int(11) DEFAULT NULL,
292 quiz_id int(11) DEFAULT NULL,
293 question_id int(11) DEFAULT NULL,
294 quiz_attempt_id int(11) DEFAULT NULL,
295 given_answer longtext,
296 question_mark decimal(8,2) DEFAULT NULL,
297 achieved_mark decimal(8,2) DEFAULT NULL,
298 minus_mark decimal(8,2) DEFAULT NULL,
299 is_correct tinyint(4) DEFAULT NULL,
300 PRIMARY KEY (attempt_answer_id)
301 ) $charset_collate;";
302
303 $tutor_quiz_questions = "CREATE TABLE {$wpdb->prefix}tutor_quiz_questions (
304 question_id int(11) NOT NULL AUTO_INCREMENT,
305 quiz_id int(11) DEFAULT NULL,
306 question_title text,
307 question_description longtext,
308 question_type varchar(50) DEFAULT NULL,
309 question_mark decimal(9,2) DEFAULT NULL,
310 question_settings longtext,
311 question_order int(11) DEFAULT NULL,
312 PRIMARY KEY (question_id)
313 ) $charset_collate;";
314
315 $tutor_quiz_question_answers = "CREATE TABLE {$wpdb->prefix}tutor_quiz_question_answers (
316 answer_id int(11) NOT NULL AUTO_INCREMENT,
317 belongs_question_id int(11) DEFAULT NULL,
318 belongs_question_type varchar(250) DEFAULT NULL,
319 answer_title text,
320 is_correct tinyint(4) DEFAULT NULL,
321 image_id int(11) DEFAULT NULL,
322 answer_two_gap_match text,
323 answer_view_format varchar(250) DEFAULT NULL,
324 answer_settings text,
325 answer_order int(11) DEFAULT '0',
326 PRIMARY KEY (answer_id)
327 ) $charset_collate;";
328
329 $earning_table = "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}tutor_earnings (
330 earning_id int(11) NOT NULL AUTO_INCREMENT,
331 user_id int(11) DEFAULT NULL,
332 course_id int(11) DEFAULT NULL,
333 order_id int(11) DEFAULT NULL,
334 order_status varchar(50) DEFAULT NULL,
335 course_price_total decimal(16,2) DEFAULT NULL,
336 course_price_grand_total decimal(16,2) DEFAULT NULL,
337 instructor_amount decimal(16,2) DEFAULT NULL,
338 instructor_rate decimal(16,2) DEFAULT NULL,
339 admin_amount decimal(16,2) DEFAULT NULL,
340 admin_rate decimal(16,2) DEFAULT NULL,
341 commission_type varchar(20) DEFAULT NULL,
342 deduct_fees_amount decimal(16,2) DEFAULT NULL,
343 deduct_fees_name varchar(250) DEFAULT NULL,
344 deduct_fees_type varchar(20) DEFAULT NULL,
345 process_by varchar(20) DEFAULT NULL,
346 created_at datetime DEFAULT NULL,
347 PRIMARY KEY (earning_id)
348 ) $charset_collate;";
349
350 $withdraw_table = "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}tutor_withdraws (
351 withdraw_id int(11) NOT NULL AUTO_INCREMENT,
352 user_id int(11) DEFAULT NULL,
353 amount decimal(16,2) DEFAULT NULL,
354 method_data text DEFAULT NULL,
355 status varchar(50) DEFAULT NULL,
356 updated_at datetime DEFAULT NULL,
357 created_at datetime DEFAULT NULL,
358 PRIMARY KEY (withdraw_id)
359 ) $charset_collate;";
360
361 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
362 dbDelta( $quiz_attempts_sql );
363 dbDelta( $quiz_attempt_answers );
364 dbDelta( $tutor_quiz_questions );
365 dbDelta( $tutor_quiz_question_answers );
366 dbDelta( $earning_table );
367 dbDelta( $withdraw_table );
368 }
369
370 public static function manage_tutor_roles_and_permissions(){
371 /**
372 * Add role for instructor
373 */
374 $instructor_role = tutor()->instructor_role;
375
376 remove_role($instructor_role);
377 add_role( $instructor_role, __('Tutor Instructor', 'tutor'), array() );
378
379 $custom_post_type_permission = array(
380 //Manage Instructor
381 'manage_tutor_instructor',
382
383 //Tutor Posts Type Permission
384 'edit_tutor_course',
385 'read_tutor_course',
386 'delete_tutor_course',
387 'delete_tutor_courses',
388 'edit_tutor_courses',
389 'edit_others_tutor_courses',
390 'read_private_tutor_courses',
391 'edit_tutor_courses',
392
393 'edit_tutor_lesson',
394 'read_tutor_lesson',
395 'delete_tutor_lesson',
396 'delete_tutor_lessons',
397 'edit_tutor_lessons',
398 'edit_others_tutor_lessons',
399 'read_private_tutor_lessons',
400 'edit_tutor_lessons',
401 'publish_tutor_lessons',
402
403 'edit_tutor_quiz',
404 'read_tutor_quiz',
405 'delete_tutor_quiz',
406 'delete_tutor_quizzes',
407 'edit_tutor_quizzes',
408 'edit_others_tutor_quizzes',
409 'read_private_tutor_quizzes',
410 'edit_tutor_quizzes',
411 'publish_tutor_quizzes',
412
413 'edit_tutor_question',
414 'read_tutor_question',
415 'delete_tutor_question',
416 'delete_tutor_questions',
417 'edit_tutor_questions',
418 'edit_others_tutor_questions',
419 'publish_tutor_questions',
420 'read_private_tutor_questions',
421 'edit_tutor_questions',
422 );
423
424 $instructor = get_role( $instructor_role );
425 if ( $instructor ) {
426 $instructor_cap = array (
427 'edit_posts',
428 'read',
429 'upload_files',
430 );
431
432 $instructor_cap = array_merge($instructor_cap, $custom_post_type_permission);
433
434 $can_publish_course = (bool) tutor_utils()->get_option('instructor_can_publish_course');
435 if ($can_publish_course){
436 $instructor_cap[] = 'publish_tutor_courses';
437 }
438
439 foreach ($instructor_cap as $cap){
440 $instructor->add_cap( $cap );
441 }
442 }
443
444 $administrator = get_role( 'administrator' );
445 if ( $administrator ) {
446
447 $administrator_cap = array (
448 'manage_tutor',
449 );
450 $administrator_cap = array_merge($administrator_cap, $custom_post_type_permission);
451 $administrator_cap[] = 'publish_tutor_courses';
452
453 foreach ($administrator_cap as $cap){
454 $administrator->add_cap( $cap );
455 }
456 }
457
458 /**
459 * Add Instructor role to administrator
460 */
461 if (current_user_can('administrator')){
462 tutor_utils()->add_instructor_role(get_current_user_id());
463 }
464
465 }
466
467 /**
468 * Save data like page
469 */
470 public static function save_data(){
471 $student_dashboard_args = array(
472 'post_title' => __('Dashboard', 'tutor'),
473 'post_content' => '',
474 'post_type' => 'page',
475 'post_status' => 'publish',
476 );
477 $student_dashboard_page_id = wp_insert_post( $student_dashboard_args );
478 tutor_utils()->update_option('tutor_dashboard_page_id', $student_dashboard_page_id);
479
480 $student_registration_args = array(
481 'post_title' => __('Student Registration', 'tutor'),
482 'post_content' => '[tutor_student_registration_form]',
483 'post_type' => 'page',
484 'post_status' => 'publish',
485 );
486 $student_register_page_id = wp_insert_post( $student_registration_args );
487 tutor_utils()->update_option('student_register_page', $student_register_page_id);
488
489 $instructor_registration_args = array(
490 'post_title' => __('Instructor Registration', 'tutor'),
491 'post_content' => '[tutor_instructor_registration_form]',
492 'post_type' => 'page',
493 'post_status' => 'publish',
494 );
495 $instructor_registration_id = wp_insert_post( $instructor_registration_args );
496 tutor_utils()->update_option('instructor_register_page', $instructor_registration_id);
497 }
498
499 public static function default_options(){
500 $options = array (
501 'load_tutor_css' => '1',
502 'load_tutor_js' => '1',
503 'course_allow_upload_private_files' => '1',
504 'display_course_instructors' => '1',
505 'enable_q_and_a_on_course' => '1',
506 'courses_col_per_row' => '3',
507 'courses_per_page' => '3',
508 'lesson_permalink_base' => 'lesson',
509 'quiz_time_limit' =>
510 array (
511 'value' => '0',
512 'time' => 'minutes',
513 ),
514 'quiz_when_time_expires' => 'autosubmit',
515 'quiz_attempts_allowed' => '10',
516 'quiz_grade_method' => 'highest_grade',
517 'enable_public_profile' => '1',
518 'email_to_students' =>
519 array (
520 'quiz_completed' => '1',
521 'completed_course' => '1',
522 ),
523 'email_to_instructors' =>
524 array (
525 'a_student_enrolled_in_course' => '1',
526 'a_student_completed_course' => '1',
527 'a_student_completed_lesson' => '1',
528 'a_student_placed_question' => '1',
529 ),
530 'email_from_name' => get_option('blogname'),
531 'email_from_address' => get_option('admin_email'),
532 'email_footer_text' => '',
533 );
534 return $options;
535 }
536
537
538 /**
539 * Create withdraw database
540 *
541 * @since v.1.2.0
542 */
543 public function create_withdraw_database(){
544 global $wpdb;
545
546 $charset_collate = $wpdb->get_charset_collate();
547
548 /**
549 * Table SQL
550 *
551 * {$wpdb->prefix}tutor_earnings
552 * {$wpdb->prefix}tutor_withdraws
553 *
554 * @since v.1.2.0
555 */
556
557 $earning_table = "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}tutor_earnings (
558 earning_id int(11) NOT NULL AUTO_INCREMENT,
559 user_id int(11) DEFAULT NULL,
560 course_id int(11) DEFAULT NULL,
561 order_id int(11) DEFAULT NULL,
562 order_status varchar(50) DEFAULT NULL,
563 course_price_total decimal(16,2) DEFAULT NULL,
564 course_price_grand_total decimal(16,2) DEFAULT NULL,
565 instructor_amount decimal(16,2) DEFAULT NULL,
566 instructor_rate decimal(16,2) DEFAULT NULL,
567 admin_amount decimal(16,2) DEFAULT NULL,
568 admin_rate decimal(16,2) DEFAULT NULL,
569 commission_type varchar(20) DEFAULT NULL,
570 deduct_fees_amount decimal(16,2) DEFAULT NULL,
571 deduct_fees_name varchar(250) DEFAULT NULL,
572 deduct_fees_type varchar(20) DEFAULT NULL,
573 process_by varchar(20) DEFAULT NULL,
574 created_at datetime DEFAULT NULL,
575 PRIMARY KEY (earning_id)
576 ) $charset_collate;";
577
578 $withdraw_table = "CREATE TABLE IF NOT EXISTS {$wpdb->prefix}tutor_withdraws (
579 withdraw_id int(11) NOT NULL AUTO_INCREMENT,
580 user_id int(11) DEFAULT NULL,
581 amount decimal(16,2) DEFAULT NULL,
582 method_data text DEFAULT NULL,
583 status varchar(50) DEFAULT NULL,
584 updated_at datetime DEFAULT NULL,
585 created_at datetime DEFAULT NULL,
586 PRIMARY KEY (withdraw_id)
587 ) $charset_collate;";
588
589 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
590 dbDelta( $earning_table );
591 dbDelta( $withdraw_table );
592
593 /**
594 * Setting previous dashboard to new dashboard
595 */
596 $previous_dashboard_page_id = (int) tutor_utils()->get_option('student_dashboard');
597 tutor_utils()->update_option('tutor_dashboard_page_id', $previous_dashboard_page_id);
598 }
599
600
601 }