Completed
Push — master ( 7d92ba...201c1b )
by Dwain
05:05
created
templates/emails/teacher-new-course-assignment.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,9 +35,9 @@
 block discarded – undo
35 35
 <p style="<?php echo esc_attr( $style_small ); ?>">
36 36
     <?php
37 37
 
38
-    echo __( 'You can edit the assigned course here: ', 'woothemes-sensei' ) . '<a href="' . esc_url( $sensei_email_data['course_edit_link'] ) . '">'. $sensei_email_data['course_name'] . '</a>';
38
+	echo __( 'You can edit the assigned course here: ', 'woothemes-sensei' ) . '<a href="' . esc_url( $sensei_email_data['course_edit_link'] ) . '">'. $sensei_email_data['course_name'] . '</a>';
39 39
 
40
-    ?>
40
+	?>
41 41
 </p>
42 42
 
43 43
 <?php
Please login to merge, or discard this patch.
templates/emails/footer.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,14 +15,14 @@
 block discarded – undo
15 15
 // Load colours
16 16
 $base = '#557da1';
17 17
 if( isset( Sensei()->settings->settings['email_base_color'] ) && '' != Sensei()->settings->settings['email_base_color'] ) {
18
-    $base = Sensei()->settings->settings['email_base_color'];
18
+	$base = Sensei()->settings->settings['email_base_color'];
19 19
 }
20 20
 
21 21
 $base_lighter_40 = sensei_hex_lighter( $base, 40 );
22 22
 
23 23
 $footer_text = sprintf( __( '%1$s - Powered by Sensei', 'woothemes-sensei' ), get_bloginfo( 'name' ) );
24 24
 if( isset( Sensei()->settings->settings['email_footer_text'] ) ) {
25
-    $footer_text = Sensei()->settings->settings['email_footer_text'];
25
+	$footer_text = Sensei()->settings->settings['email_footer_text'];
26 26
 }
27 27
 
28 28
 // For gmail compatibility, including CSS styles in head/body are stripped out therefore styles need to be inline. These variables contain rules which are added to the template inline.
Please login to merge, or discard this patch.
templates/single-course/modules.php 1 patch
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -1,32 +1,32 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if ( ! defined( 'ABSPATH' ) ) exit;
3 3
 /**
4
- * List the Course Modules and Lesson in these modules
5
- *
6
- * Template is hooked into Single Course sensei_single_main_content. It will
7
- * only be shown if the course contains modules.
8
- *
9
- * All lessons shown here will not be included in the list of other lessons.
10
- *
11
- * @author 		Automattic
12
- * @package 	Sensei
13
- * @category    Templates
14
- * @version     1.9.0
15
- */
4
+	 * List the Course Modules and Lesson in these modules
5
+	 *
6
+	 * Template is hooked into Single Course sensei_single_main_content. It will
7
+	 * only be shown if the course contains modules.
8
+	 *
9
+	 * All lessons shown here will not be included in the list of other lessons.
10
+	 *
11
+	 * @author 		Automattic
12
+	 * @package 	Sensei
13
+	 * @category    Templates
14
+	 * @version     1.9.0
15
+	 */
16 16
 ?>
17 17
 
18 18
 <?php
19 19
 
20
-    /**
21
-     * Hook runs inside single-course/course-modules.php
22
-     *
23
-     * It runs before the modules are shown. This hook fires on the single course page. It will show
24
-     * irrespective of irrespective the course has any modules or not.
25
-     *
26
-     * @since 1.8.0
27
-     *
28
-     */
29
-    do_action('sensei_single_course_modules_before');
20
+	/**
21
+	 * Hook runs inside single-course/course-modules.php
22
+	 *
23
+	 * It runs before the modules are shown. This hook fires on the single course page. It will show
24
+	 * irrespective of irrespective the course has any modules or not.
25
+	 *
26
+	 * @since 1.8.0
27
+	 *
28
+	 */
29
+	do_action('sensei_single_course_modules_before');
30 30
 
31 31
 ?>
32 32
 
@@ -39,19 +39,19 @@  discard block
 block discarded – undo
39 39
 
40 40
                 <?php
41 41
 
42
-                /**
43
-                 * Hook runs inside single-course/course-modules.php
44
-                 *
45
-                 * It runs inside the if statement after the article tag opens just before the modules are shown. This hook will NOT fire if there
46
-                 * are no modules to show.
47
-                 *
48
-                 * @since 1.9.0
49
-                 *
50
-                 * @hooked Sensei()->modules->course_modules_title - 20
51
-                 */
52
-                do_action('sensei_single_course_modules_inside_before');
42
+				/**
43
+				 * Hook runs inside single-course/course-modules.php
44
+				 *
45
+				 * It runs inside the if statement after the article tag opens just before the modules are shown. This hook will NOT fire if there
46
+				 * are no modules to show.
47
+				 *
48
+				 * @since 1.9.0
49
+				 *
50
+				 * @hooked Sensei()->modules->course_modules_title - 20
51
+				 */
52
+				do_action('sensei_single_course_modules_inside_before');
53 53
 
54
-                ?>
54
+				?>
55 55
 
56 56
                 <header>
57 57
 
@@ -101,18 +101,18 @@  discard block
 block discarded – undo
101 101
 
102 102
                 <?php
103 103
 
104
-                /**
105
-                 * Hook runs inside single-course/course-modules.php
106
-                 *
107
-                 * It runs inside the if statement before the closing article tag directly after the modules were shown.
108
-                 * This hook will not trigger if there are no modules to show.
109
-                 *
110
-                 * @since 1.9.0
111
-                 *
112
-                 */
113
-                do_action('sensei_single_course_modules_inside_after');
114
-
115
-                ?>
104
+				/**
105
+				 * Hook runs inside single-course/course-modules.php
106
+				 *
107
+				 * It runs inside the if statement before the closing article tag directly after the modules were shown.
108
+				 * This hook will not trigger if there are no modules to show.
109
+				 *
110
+				 * @since 1.9.0
111
+				 *
112
+				 */
113
+				do_action('sensei_single_course_modules_inside_after');
114
+
115
+				?>
116 116
 
117 117
             </article>
118 118
 
Please login to merge, or discard this patch.
templates/archive-message.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -1,27 +1,27 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The Template for displaying message archives.
4
- *
5
- * Override this template by copying it to yourtheme/sensei/archive-message.php
6
- *
7
- * @author 		Automattic
8
- * @package 	Sensei
9
- * @category    Templates
10
- * @version     1.9.0
11
- */
3
+	 * The Template for displaying message archives.
4
+	 *
5
+	 * Override this template by copying it to yourtheme/sensei/archive-message.php
6
+	 *
7
+	 * @author 		Automattic
8
+	 * @package 	Sensei
9
+	 * @category    Templates
10
+	 * @version     1.9.0
11
+	 */
12 12
 ?>
13 13
 
14 14
 <?php  get_sensei_header();  ?>
15 15
 
16 16
 <?php
17 17
 /**
18
- * This action before course messages archive loop. This hook fires within the archive-message.php file.
19
- * It fires even if the current archive has no no messages.
20
- *
21
- * @since 1.9.0
22
- *
23
- * @hooked Sensei_Messages::the_archive_header -20
24
- */
18
+	 * This action before course messages archive loop. This hook fires within the archive-message.php file.
19
+	 * It fires even if the current archive has no no messages.
20
+	 *
21
+	 * @since 1.9.0
22
+	 *
23
+	 * @hooked Sensei_Messages::the_archive_header -20
24
+	 */
25 25
 do_action( 'sensei_archive_before_message_loop' );
26 26
 ?>
27 27
 
@@ -41,11 +41,11 @@  discard block
 block discarded – undo
41 41
 
42 42
 <?php
43 43
 /**
44
- * This action before course messages archive loop. This hook fires within the archive-message.php file.
45
- * It fires even if the current archive has no no messages.
46
- *
47
- * @since 1.9.0
48
- */
44
+	 * This action before course messages archive loop. This hook fires within the archive-message.php file.
45
+	 * It fires even if the current archive has no no messages.
46
+	 *
47
+	 * @since 1.9.0
48
+	 */
49 49
 do_action( 'sensei_archive_after_message_loop' );
50 50
 ?>
51 51
 
Please login to merge, or discard this patch.
templates/content-course.php 1 patch
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -1,51 +1,51 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if ( ! defined( 'ABSPATH' ) ) exit;
3 3
 /**
4
- * Content-course.php template file
5
- *
6
- * responsible for content on archive like pages. Only shows the course excerpt.
7
- *
8
- * For single course content please see single-course.php
9
- *
10
- * @author 		Automattic
11
- * @package 	Sensei
12
- * @category    Templates
13
- * @version     1.9.0
14
- */
4
+	 * Content-course.php template file
5
+	 *
6
+	 * responsible for content on archive like pages. Only shows the course excerpt.
7
+	 *
8
+	 * For single course content please see single-course.php
9
+	 *
10
+	 * @author 		Automattic
11
+	 * @package 	Sensei
12
+	 * @category    Templates
13
+	 * @version     1.9.0
14
+	 */
15 15
 ?>
16 16
 
17 17
 <li <?php post_class(  WooThemes_Sensei_Course::get_course_loop_content_class() ); ?> >
18 18
 
19 19
     <?php
20
-    /**
21
-     * This action runs before the sensei course content. It runs inside the sensei
22
-     * content-course.php template.
23
-     *
24
-     * @since 1.9
25
-     *
26
-     * @param $post
27
-     */
28
-    do_action( 'sensei_course_content_before', get_post() );
29
-    ?>
20
+	/**
21
+	 * This action runs before the sensei course content. It runs inside the sensei
22
+	 * content-course.php template.
23
+	 *
24
+	 * @since 1.9
25
+	 *
26
+	 * @param $post
27
+	 */
28
+	do_action( 'sensei_course_content_before', get_post() );
29
+	?>
30 30
 
31 31
     <section class="course-content">
32 32
 
33 33
         <section class="entry">
34 34
 
35 35
             <?php
36
-            /**
37
-             * Fires just before the course content in the content-course.php file.
38
-             *
39
-             * @since 1.9
40
-             *
41
-             * @param WP_Post $post
42
-             *
43
-             * @hooked Sensei_Templates::the_title          - 5
44
-             * @hooked Sensei()->course->course_image       - 10
45
-             * @hooked  Sensei()->course->the_course_meta   - 20
46
-             */
47
-            do_action('sensei_course_content_inside_before', get_post());
48
-            ?>
36
+			/**
37
+			 * Fires just before the course content in the content-course.php file.
38
+			 *
39
+			 * @since 1.9
40
+			 *
41
+			 * @param WP_Post $post
42
+			 *
43
+			 * @hooked Sensei_Templates::the_title          - 5
44
+			 * @hooked Sensei()->course->course_image       - 10
45
+			 * @hooked  Sensei()->course->the_course_meta   - 20
46
+			 */
47
+			do_action('sensei_course_content_inside_before', get_post());
48
+			?>
49 49
 
50 50
             <p class="course-excerpt">
51 51
 
@@ -54,34 +54,34 @@  discard block
 block discarded – undo
54 54
             </p>
55 55
 
56 56
             <?php
57
-            /**
58
-             * Fires just after the course content in the content-course.php file.
59
-             *
60
-             * @since 1.9
61
-             *
62
-             * @param WP_Post $post
63
-             *
64
-             * @hooked  Sensei()->course->the_course_free_lesson_preview - 20
65
-             */
66
-            do_action('sensei_course_content_inside_after', get_post());
67
-            ?>
57
+			/**
58
+			 * Fires just after the course content in the content-course.php file.
59
+			 *
60
+			 * @since 1.9
61
+			 *
62
+			 * @param WP_Post $post
63
+			 *
64
+			 * @hooked  Sensei()->course->the_course_free_lesson_preview - 20
65
+			 */
66
+			do_action('sensei_course_content_inside_after', get_post());
67
+			?>
68 68
 
69 69
         </section> <!-- section .entry -->
70 70
 
71 71
     </section> <!-- section .course-content -->
72 72
 
73 73
     <?php
74
-    /**
75
-     * Fires after the course block in the content-course.php file.
76
-     *
77
-     * @since 1.9
78
-     *
79
-     * @param WP_Post $post
80
-     *
81
-     * @hooked  Sensei()->course->the_course_free_lesson_preview - 20
82
-     */
83
-    do_action('sensei_course_content_after', get_post());
84
-    ?>
74
+	/**
75
+	 * Fires after the course block in the content-course.php file.
76
+	 *
77
+	 * @since 1.9
78
+	 *
79
+	 * @param WP_Post $post
80
+	 *
81
+	 * @hooked  Sensei()->course->the_course_free_lesson_preview - 20
82
+	 */
83
+	do_action('sensei_course_content_after', get_post());
84
+	?>
85 85
 
86 86
 
87 87
 </li> <!-- article .(<?php esc_attr_e( join( ' ', get_post_class( array( 'course', 'post' ) ) ) ); ?>  -->
88 88
\ No newline at end of file
Please login to merge, or discard this patch.
templates/user/login-form.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -27,13 +27,13 @@  discard block
 block discarded – undo
27 27
 <form method="post" name="sensi-login-form" id="loginform" class="login sensei">
28 28
 
29 29
     <?php
30
-    /**
31
-     *  Executes inside the sensei login form before all the default fields.
32
-     *
33
-     * @since 1.6.2
34
-     */
35
-        do_action( 'sensei_login_form_inside_before' );
36
-    ?>
30
+	/**
31
+	 *  Executes inside the sensei login form before all the default fields.
32
+	 *
33
+	 * @since 1.6.2
34
+	 */
35
+		do_action( 'sensei_login_form_inside_before' );
36
+	?>
37 37
 
38 38
 	<p class="sensei-login-username form-row form-row-wide">
39 39
 
@@ -52,15 +52,15 @@  discard block
 block discarded – undo
52 52
 	</p>
53 53
 
54 54
     <?php
55
-    /**
56
-     *  Executes inside the sensei login form after the password field.
57
-     *
58
-     *  You can use the action to add extra form login fields.
59
-     *
60
-     * @since 1.6.2
61
-     */
62
-        do_action( 'sensei_login_form_inside_after_password_field' );
63
-    ?>
55
+	/**
56
+	 *  Executes inside the sensei login form after the password field.
57
+	 *
58
+	 *  You can use the action to add extra form login fields.
59
+	 *
60
+	 * @since 1.6.2
61
+	 */
62
+		do_action( 'sensei_login_form_inside_after_password_field' );
63
+	?>
64 64
 
65 65
 	<p class='sensei-login-submit'>
66 66
 
@@ -81,13 +81,13 @@  discard block
 block discarded – undo
81 81
 	</p>
82 82
 
83 83
     <?php
84
-    /**
85
-     *  Executes inside the sensei login form after all the default fields.
86
-     *
87
-     * @since 1.6.2
88
-     */
89
-        do_action( 'sensei_login_form_inside_after' );
90
-    ?>
84
+	/**
85
+	 *  Executes inside the sensei login form after all the default fields.
86
+	 *
87
+	 * @since 1.6.2
88
+	 */
89
+		do_action( 'sensei_login_form_inside_after' );
90
+	?>
91 91
 
92 92
 	<?php wp_nonce_field( 'sensei-login' ); ?>
93 93
 
@@ -101,9 +101,9 @@  discard block
 block discarded – undo
101 101
 
102 102
 <?php
103 103
 /**
104
- *  Executes after the Login form markup closes.
105
- *
106
- *  @since 1.9.0
107
- */
104
+	 *  Executes after the Login form markup closes.
105
+	 *
106
+	 *  @since 1.9.0
107
+	 */
108 108
 do_action( 'sensei_login_form_after' );
109 109
 ?>
110 110
\ No newline at end of file
Please login to merge, or discard this patch.
templates/user/my-courses.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -1,61 +1,61 @@
 block discarded – undo
1 1
 <?php
2 2
 if ( ! defined( 'ABSPATH' ) ) exit;
3 3
 /**
4
- * The Template for displaying the my course page data.
5
- *
6
- * Override this template by copying it to yourtheme/sensei/user/my-courses.php
7
- *
8
- * @author 		Automattic
9
- * @package 	Sensei
10
- * @category    Templates
11
- * @version     1.9.0
12
- */
4
+	 * The Template for displaying the my course page data.
5
+	 *
6
+	 * Override this template by copying it to yourtheme/sensei/user/my-courses.php
7
+	 *
8
+	 * @author 		Automattic
9
+	 * @package 	Sensei
10
+	 * @category    Templates
11
+	 * @version     1.9.0
12
+	 */
13 13
 ?>
14 14
 
15 15
 <?php
16 16
 /**
17
- * Executes before the Sensei my courses markup begins. This hook
18
- * only fires whe a user is logged in. If you need to add
19
- * something here for when users are logged out use `sensei_login_form_before`.
20
- *
21
- * @since 1.9.0
22
- */
17
+	 * Executes before the Sensei my courses markup begins. This hook
18
+	 * only fires whe a user is logged in. If you need to add
19
+	 * something here for when users are logged out use `sensei_login_form_before`.
20
+	 *
21
+	 * @since 1.9.0
22
+	 */
23 23
 do_action( 'sensei_my_courses_before' );
24 24
 ?>
25 25
 
26 26
 <section id="main-course" class="course-container">
27 27
 
28 28
     <?php
29
-    /**
30
-     * Executes inside just before the Sensei my courses content. This hook
31
-     * only fires whe a user is logged in.
32
-     *
33
-     * @since 1.9.0
34
-     */
35
-    do_action( 'sensei_my_courses_content_inside_before' );
36
-    ?>
29
+	/**
30
+	 * Executes inside just before the Sensei my courses content. This hook
31
+	 * only fires whe a user is logged in.
32
+	 *
33
+	 * @since 1.9.0
34
+	 */
35
+	do_action( 'sensei_my_courses_content_inside_before' );
36
+	?>
37 37
 
38 38
     <?php sensei_the_my_courses_content(); ?>
39 39
 
40 40
     <?php
41
-    /**
42
-     * Executes inside just after the Sensei my courses content. This hook
43
-     * only fires whe a user is logged in.
44
-     *
45
-     * @since 1.9.0
46
-     */
47
-    do_action( 'sensei_my_courses_content_inside_after' );
48
-    ?>
41
+	/**
42
+	 * Executes inside just after the Sensei my courses content. This hook
43
+	 * only fires whe a user is logged in.
44
+	 *
45
+	 * @since 1.9.0
46
+	 */
47
+	do_action( 'sensei_my_courses_content_inside_after' );
48
+	?>
49 49
 
50 50
 </section>
51 51
 
52 52
 <?php
53 53
 /**
54
- * Executes after the Sensei my courses template markup ends. This hook
55
- * only fires whe a user is logged in. If you need to add
56
- * something here for when users are logged out use `sensei_login_form_after`.
57
- *
58
- * @since 1.9.0
59
- */
54
+	 * Executes after the Sensei my courses template markup ends. This hook
55
+	 * only fires whe a user is logged in. If you need to add
56
+	 * something here for when users are logged out use `sensei_login_form_after`.
57
+	 *
58
+	 * @since 1.9.0
59
+	 */
60 60
 do_action( 'sensei_my_courses_after' );
61 61
 ?>
Please login to merge, or discard this patch.
woothemes-sensei.php 1 patch
Indentation   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -30,80 +30,80 @@
 block discarded – undo
30 30
 
31 31
 	if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
32 32
 
33
-    require_once( 'includes/class-sensei-autoloader.php' );
34
-    require_once( 'includes/lib/woo-functions.php' );
35
-    require_once( 'includes/sensei-functions.php' );
36
-
37
-    if ( ! is_admin() ) {
38
-        require_once( 'includes/template-functions.php' );
39
-    }
40
-
41
-    /**
42
-     * Returns the global Sensei Instance.
43
-     *
44
-     * @since 1.8.0
45
-     */
46
-    function Sensei(){
47
-
48
-        return Sensei_Main::instance();
49
-
50
-    }
51
-
52
-    // set the sensei version number
53
-    Sensei()->version = '1.9-beta';
54
-
55
-    //backwards compatibility
56
-    global $woothemes_sensei;
57
-    $woothemes_sensei = Sensei();
58
-
59
-    /**
60
-    * Hook in WooCommerce functionality
61
-    */
62
-    if( Sensei_WC::is_woocommerce_active() ){
63
-        add_action('init', array( 'Sensei_WC', 'load_woocommerce_integration_hooks' ) );
64
-    }
65
-
66
-    /**
67
-     * Load all Template hooks
68
-    */
69
-    if(! is_admin() ){
70
-
71
-        require_once( 'includes/hooks/template.php' );
72
-
73
-    }
74
-
75
-    /**
76
-     * Plugin updates
77
-     * @since  1.0.1
78
-     */
79
-    woothemes_queue_update( plugin_basename( __FILE__ ), 'bad2a02a063555b7e2bee59924690763', 152116 );
80
-
81
-    /**
82
-     * Sensei Activation Hook registration
83
-     * @since 1.8.0
84
-     */
85
-    register_activation_hook( __FILE__, 'activate_sensei' );
86
-
87
-    /**
88
-     * Activate_sensei
89
-     *
90
-     * All the activation checks needed to ensure Sensei is ready for use
91
-     * @since 1.8.0
92
-     */
93
-    function activate_sensei () {
94
-
95
-        // create the teacher role on activation and ensure that it has all the needed capabilities
96
-        Sensei()->teacher->create_role();
97
-
98
-        //Setup all the role capabilities needed
99
-        Sensei()->updates->add_sensei_caps();
100
-        Sensei()->updates->add_editor_caps();
101
-        Sensei()->updates->assign_role_caps();
102
-
103
-        //Flush rules
104
-        add_action( 'activated_plugin' , array( 'Sensei_Main','activation_flush_rules' ), 10 );
105
-
106
-        //Load the Welcome Screen
107
-        add_action( 'activated_plugin' , array( 'Sensei_Welcome','redirect' ), 20 );
108
-
109
-    }// end activate_sensei
33
+	require_once( 'includes/class-sensei-autoloader.php' );
34
+	require_once( 'includes/lib/woo-functions.php' );
35
+	require_once( 'includes/sensei-functions.php' );
36
+
37
+	if ( ! is_admin() ) {
38
+		require_once( 'includes/template-functions.php' );
39
+	}
40
+
41
+	/**
42
+	 * Returns the global Sensei Instance.
43
+	 *
44
+	 * @since 1.8.0
45
+	 */
46
+	function Sensei(){
47
+
48
+		return Sensei_Main::instance();
49
+
50
+	}
51
+
52
+	// set the sensei version number
53
+	Sensei()->version = '1.9-beta';
54
+
55
+	//backwards compatibility
56
+	global $woothemes_sensei;
57
+	$woothemes_sensei = Sensei();
58
+
59
+	/**
60
+	 * Hook in WooCommerce functionality
61
+	 */
62
+	if( Sensei_WC::is_woocommerce_active() ){
63
+		add_action('init', array( 'Sensei_WC', 'load_woocommerce_integration_hooks' ) );
64
+	}
65
+
66
+	/**
67
+	 * Load all Template hooks
68
+	 */
69
+	if(! is_admin() ){
70
+
71
+		require_once( 'includes/hooks/template.php' );
72
+
73
+	}
74
+
75
+	/**
76
+	 * Plugin updates
77
+	 * @since  1.0.1
78
+	 */
79
+	woothemes_queue_update( plugin_basename( __FILE__ ), 'bad2a02a063555b7e2bee59924690763', 152116 );
80
+
81
+	/**
82
+	 * Sensei Activation Hook registration
83
+	 * @since 1.8.0
84
+	 */
85
+	register_activation_hook( __FILE__, 'activate_sensei' );
86
+
87
+	/**
88
+	 * Activate_sensei
89
+	 *
90
+	 * All the activation checks needed to ensure Sensei is ready for use
91
+	 * @since 1.8.0
92
+	 */
93
+	function activate_sensei () {
94
+
95
+		// create the teacher role on activation and ensure that it has all the needed capabilities
96
+		Sensei()->teacher->create_role();
97
+
98
+		//Setup all the role capabilities needed
99
+		Sensei()->updates->add_sensei_caps();
100
+		Sensei()->updates->add_editor_caps();
101
+		Sensei()->updates->assign_role_caps();
102
+
103
+		//Flush rules
104
+		add_action( 'activated_plugin' , array( 'Sensei_Main','activation_flush_rules' ), 10 );
105
+
106
+		//Load the Welcome Screen
107
+		add_action( 'activated_plugin' , array( 'Sensei_Welcome','redirect' ), 20 );
108
+
109
+	}// end activate_sensei
Please login to merge, or discard this patch.
includes/class-sensei-course-results.php 1 patch
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 class Sensei_Course_Results {
16 16
 
17 17
 	public $token;
18
-    public  $courses_url_base;
18
+	public  $courses_url_base;
19 19
 
20 20
 	/**
21 21
 	 * Constructor.
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 		global $wp_query,  $current_user;
97 97
 
98 98
 		if( isset( $wp_query->query_vars['course_results'] ) ) {
99
-            Sensei_Templates::get_template( 'course-results/course-info.php' );
99
+			Sensei_Templates::get_template( 'course-results/course-info.php' );
100 100
 		}
101 101
 
102 102
 	}
@@ -115,20 +115,20 @@  discard block
 block discarded – undo
115 115
 
116 116
 		sensei_do_deprecated_action( 'sensei_course_results_lessons','1.9.','sensei_course_results_content_inside_after', $course );
117 117
 
118
-        sensei_do_deprecated_action( 'sensei_course_results_bottom','1.9.','sensei_course_results_content_inside_after', $course->ID );
118
+		sensei_do_deprecated_action( 'sensei_course_results_bottom','1.9.','sensei_course_results_content_inside_after', $course->ID );
119 119
 
120 120
 	}
121 121
 
122 122
 	/**
123 123
 	 * Load template for displaying course lessons
124
-     *
124
+	 *
125 125
 	 * @since  1.4.0
126 126
 	 * @return void
127 127
 	 */
128 128
 	public function course_lessons() {
129 129
 
130 130
 		global $course;
131
-        _deprecated_function( 'Sensei_modules course_lessons ', '1.9.0' );
131
+		_deprecated_function( 'Sensei_modules course_lessons ', '1.9.0' );
132 132
 
133 133
 	}
134 134
 
@@ -145,62 +145,62 @@  discard block
 block discarded – undo
145 145
 		return $classes;
146 146
 	}
147 147
 
148
-    /**
149
-     * Deprecate the sensei_course_results_content hook
150
-     *
151
-     * @deprecated since 1.9.0
152
-     */
153
-    public static function deprecate_sensei_course_results_content_hook(){
148
+	/**
149
+	 * Deprecate the sensei_course_results_content hook
150
+	 *
151
+	 * @deprecated since 1.9.0
152
+	 */
153
+	public static function deprecate_sensei_course_results_content_hook(){
154 154
 
155
-        sensei_do_deprecated_action('sensei_course_results_content', '1.9.0','sensei_course_results_content_before');
155
+		sensei_do_deprecated_action('sensei_course_results_content', '1.9.0','sensei_course_results_content_before');
156 156
 
157
-    }
157
+	}
158 158
 
159
-    /**
160
-     * Fire the sensei frontend message hook
161
-     *
162
-     * @since 1.9.0
163
-     */
164
-    public static function fire_sensei_message_hook(){
159
+	/**
160
+	 * Fire the sensei frontend message hook
161
+	 *
162
+	 * @since 1.9.0
163
+	 */
164
+	public static function fire_sensei_message_hook(){
165 165
 
166
-        do_action( 'sensei_frontend_messages' );
166
+		do_action( 'sensei_frontend_messages' );
167 167
 
168
-    }
168
+	}
169 169
 
170
-    /**
171
-     * Deprecate the course_results info hook
172
-     *
173
-     * @since 1.9.0
174
-     */
175
-    public static function deprecate_course_result_info_hook(){
170
+	/**
171
+	 * Deprecate the course_results info hook
172
+	 *
173
+	 * @since 1.9.0
174
+	 */
175
+	public static function deprecate_course_result_info_hook(){
176 176
 
177
-        sensei_do_deprecated_action( 'sensei_course_results_info', '1.9.0', 'sensei_course_results_content_inside_before' );
177
+		sensei_do_deprecated_action( 'sensei_course_results_info', '1.9.0', 'sensei_course_results_content_inside_before' );
178 178
 
179
-    }
179
+	}
180 180
 
181
-    /**
182
-     * Deprecate the sensei_course_results_top hook
183
-     *
184
-     * @deprecate since 1.9.0
185
-     */
186
-    public static function deprecate_course_results_top_hook(){
181
+	/**
182
+	 * Deprecate the sensei_course_results_top hook
183
+	 *
184
+	 * @deprecate since 1.9.0
185
+	 */
186
+	public static function deprecate_course_results_top_hook(){
187 187
 
188
-        global $course;
189
-        sensei_do_deprecated_action( 'sensei_course_results_top', '1.9.0' ,'sensei_course_results_content_inside_before',$course->ID );
188
+		global $course;
189
+		sensei_do_deprecated_action( 'sensei_course_results_top', '1.9.0' ,'sensei_course_results_content_inside_before',$course->ID );
190 190
 
191
-    }
191
+	}
192 192
 
193
-    /**
194
-     * Fire the course image hook
195
-     *
196
-     * @since 1.8.0
197
-     */
198
-    public static function fire_course_image_hook(){
193
+	/**
194
+	 * Fire the course image hook
195
+	 *
196
+	 * @since 1.8.0
197
+	 */
198
+	public static function fire_course_image_hook(){
199 199
 
200
-        global $course;
201
-        do_action( 'sensei_course_image', $course->ID );
200
+		global $course;
201
+		do_action( 'sensei_course_image', $course->ID );
202 202
 
203
-    }
203
+	}
204 204
 
205 205
 } // End Class
206 206
 
Please login to merge, or discard this patch.