PluginProbe
Tutor LMS – eLearning and online course solution / 1.6.8
Tutor LMS – eLearning and online course solution v1.6.8
4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 4.0.0 3.9.15 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 All 191 releases
tutor / templates / profile / enrolled_course.php
enrolled_course.php
53 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package TutorLMS/Templates
4 * @version 1.4.3
5 */
6
7 if ( ! defined( 'ABSPATH' ) )
8 exit;
9
10 $show_enrolled_course = tutor_utils()->get_option('show_courses_completed_by_student');
11 if ( ! $show_enrolled_course){
12 return;
13 }
14
15 $user_name = sanitize_text_field(get_query_var('tutor_student_username'));
16 $get_user = tutor_utils()->get_user_by_login($user_name);
17 $user_id = $get_user->ID;
18
19 $my_courses = tutor_utils()->get_enrolled_courses_by_user($user_id);
20 ?>
21
22 <div class="tutor-courses ">
23 <?php
24 if ($my_courses && $my_courses->have_posts()):
25 while ($my_courses->have_posts()):
26 $my_courses->the_post();
27 /**
28 * @hook tutor_course/archive/before_loop_course
29 * @type action
30 * Usage Idea, you may keep a loop within a wrap, such as bootstrap col
31 */
32 do_action('tutor_course/archive/before_loop_course');
33
34 tutor_load_template('loop.course');
35
36 /**
37 * @hook tutor_course/archive/after_loop_course
38 * @type action
39 * Usage Idea, If you start any div before course loop, you can end it here, such as </div>
40 */
41 do_action('tutor_course/archive/after_loop_course');
42
43 endwhile;
44 wp_reset_postdata();
45 else : ?>
46 <div>
47 <h2><?php _e("Not Found" , 'tutor'); ?></h2>
48 <p><?php _e("Sorry, but you are looking for something that isn't here." , 'tutor'); ?></p>
49 </div>
50 <?php endif; ?>
51 </div>
52
53