Completed
Push — master ( 7d92ba...201c1b )
by Dwain
05:05
created
templates/single-course/modules.php 3 patches
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.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined('ABSPATH')) exit;
3 3
 /**
4 4
  * List the Course Modules and Lesson in these modules
5 5
  *
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
 
31 31
 ?>
32 32
 
33
-<?php if( sensei_have_modules() ): ?>
33
+<?php if (sensei_have_modules()): ?>
34 34
 
35
-    <?php while ( sensei_have_modules() ): sensei_setup_module(); ?>
36
-        <?php if( sensei_module_has_lessons() ): ?>
35
+    <?php while (sensei_have_modules()): sensei_setup_module(); ?>
36
+        <?php if (sensei_module_has_lessons()): ?>
37 37
 
38 38
             <article class="module">
39 39
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
                     <h2>
59 59
 
60
-                        <a href="<?php sensei_the_module_permalink(); ?>" title="<?php sensei_the_module_title_attribute();?>">
60
+                        <a href="<?php sensei_the_module_permalink(); ?>" title="<?php sensei_the_module_title_attribute(); ?>">
61 61
 
62 62
                             <?php sensei_the_module_title(); ?>
63 63
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
                         <ul class="lessons-list" >
81 81
 
82
-                            <?php while( sensei_module_has_lessons() ): the_post(); ?>
82
+                            <?php while (sensei_module_has_lessons()): the_post(); ?>
83 83
 
84 84
                                 <li class="' . $status . '">
85 85
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	exit;
4
+}
3 5
 /**
4 6
  * The Template for displaying the my course page data.
5 7
  *
Please login to merge, or discard this patch.
templates/single-course.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,9 +11,9 @@  discard block
 block discarded – undo
11 11
  */
12 12
 ?>
13 13
 
14
-<?php  get_sensei_header();  ?>
14
+<?php  get_sensei_header(); ?>
15 15
 
16
-<article <?php post_class( array( 'course', 'post' ) ); ?>>
16
+<article <?php post_class(array('course', 'post')); ?>>
17 17
 
18 18
     <?php
19 19
 
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      * @hooked Sensei()->message->send_message_link        -  35
30 30
      * @hooked Sensei_Course::the_course_video             -  40
31 31
      */
32
-    do_action( 'sensei_single_course_content_inside_before' );
32
+    do_action('sensei_single_course_content_inside_before');
33 33
 
34 34
     ?>
35 35
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      * @hooked
50 50
      *
51 51
      */
52
-    do_action( 'sensei_single_course_content_inside_after' );
52
+    do_action('sensei_single_course_content_inside_after');
53 53
 
54 54
     ?>
55 55
 </article><!-- .post .single-course -->
Please login to merge, or discard this patch.
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The Template for displaying all single courses.
4
- *
5
- * Override this template by copying it to yourtheme/sensei/single-course.php
6
- *
7
- * @author 		Automattic
8
- * @package 	Sensei
9
- * @category    Templates
10
- * @version     1.9.0
11
- */
3
+	 * The Template for displaying all single courses.
4
+	 *
5
+	 * Override this template by copying it to yourtheme/sensei/single-course.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();  ?>
@@ -17,21 +17,21 @@  discard block
 block discarded – undo
17 17
 
18 18
     <?php
19 19
 
20
-    /**
21
-     * Hook inside the single course post above the content
22
-     *
23
-     * @since 1.9.0
24
-     *
25
-     * @hooked Sensei()->frontend->sensei_course_start     -  10
26
-     * @hooked Sensei_Course::the_title                    -  10
27
-     * @hooked Sensei_WC::course_in_cart_message           -  20
28
-     * @hooked Sensei_Course::the_course_enrolment_actions -  30
29
-     * @hooked Sensei()->message->send_message_link        -  35
30
-     * @hooked Sensei_Course::the_course_video             -  40
31
-     */
32
-    do_action( 'sensei_single_course_content_inside_before' );
33
-
34
-    ?>
20
+	/**
21
+	 * Hook inside the single course post above the content
22
+	 *
23
+	 * @since 1.9.0
24
+	 *
25
+	 * @hooked Sensei()->frontend->sensei_course_start     -  10
26
+	 * @hooked Sensei_Course::the_title                    -  10
27
+	 * @hooked Sensei_WC::course_in_cart_message           -  20
28
+	 * @hooked Sensei_Course::the_course_enrolment_actions -  30
29
+	 * @hooked Sensei()->message->send_message_link        -  35
30
+	 * @hooked Sensei_Course::the_course_video             -  40
31
+	 */
32
+	do_action( 'sensei_single_course_content_inside_before' );
33
+
34
+	?>
35 35
 
36 36
     <section class="entry fix">
37 37
 
@@ -41,17 +41,17 @@  discard block
 block discarded – undo
41 41
 
42 42
     <?php
43 43
 
44
-    /**
45
-     * Hook inside the single course post above the content
46
-     *
47
-     * @since 1.9.0
48
-     *
49
-     * @hooked
50
-     *
51
-     */
52
-    do_action( 'sensei_single_course_content_inside_after' );
53
-
54
-    ?>
44
+	/**
45
+	 * Hook inside the single course post above the content
46
+	 *
47
+	 * @since 1.9.0
48
+	 *
49
+	 * @hooked
50
+	 *
51
+	 */
52
+	do_action( 'sensei_single_course_content_inside_after' );
53
+
54
+	?>
55 55
 </article><!-- .post .single-course -->
56 56
 
57 57
 <?php get_sensei_footer(); ?>
58 58
\ No newline at end of file
Please login to merge, or discard this patch.
templates/course-results/lessons.php 3 patches
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined('ABSPATH')) exit;
3 3
 /**
4 4
  * The Template for displaying all course lessons on the course results page.
5 5
  *
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 global $course;
15 15
 ?>
16 16
 
17
-<?php if ( is_user_logged_in() ): ?>
17
+<?php if (is_user_logged_in()): ?>
18 18
 
19 19
     <?php
20 20
     /**
@@ -22,53 +22,53 @@  discard block
 block discarded – undo
22 22
      * is uer logged check, just above the lessons header.
23 23
      * @since 1.4.0
24 24
      */
25
-    do_action( 'sensei_course_results_before_lessons', $course->ID );
25
+    do_action('sensei_course_results_before_lessons', $course->ID);
26 26
     ?>
27 27
 
28 28
     <header>
29 29
 
30
-        <h2>  <?php _e( 'Lessons', 'woothemes-sensei' );  ?> </h2>
30
+        <h2>  <?php _e('Lessons', 'woothemes-sensei'); ?> </h2>
31 31
 
32 32
     </header>
33 33
 
34
-    <article class="<?php  esc_attr_e( join( ' ', get_post_class( array( 'course', 'post' ), $course->ID ) ) ); ?> ">
34
+    <article class="<?php  esc_attr_e(join(' ', get_post_class(array('course', 'post'), $course->ID))); ?> ">
35 35
 
36 36
         <?php
37 37
 
38 38
 		$displayed_lessons = array();
39
-        $modules = Sensei()->modules->get_course_modules( intval( $course->ID ) );
39
+        $modules = Sensei()->modules->get_course_modules(intval($course->ID));
40 40
 
41 41
         // List modules with lessons
42
-        foreach( $modules as $module ) {
42
+        foreach ($modules as $module) {
43 43
 
44
-            $lessons_query = Sensei()->modules->get_lessons_query( $course->ID, $module->term_id );
44
+            $lessons_query = Sensei()->modules->get_lessons_query($course->ID, $module->term_id);
45 45
             $lessons = $lessons_query->get_posts();
46 46
 
47
-            if( count( $lessons ) > 0 ) { ?>
47
+            if (count($lessons) > 0) { ?>
48 48
 
49 49
                 <h3> <?php echo $module->name; ?></h3>
50 50
 
51 51
                 <?php
52 52
                 $count = 0;
53
-                foreach( $lessons as $lesson ) {
53
+                foreach ($lessons as $lesson) {
54 54
 
55 55
                     $lesson_grade = 'n/a';
56
-                    $has_questions = get_post_meta( $lesson->ID, '_quiz_has_questions', true );
57
-                    if ( $has_questions ) {
58
-                        $lesson_status = WooThemes_Sensei_Utils::user_lesson_status( $lesson->ID, get_current_user_id() );
56
+                    $has_questions = get_post_meta($lesson->ID, '_quiz_has_questions', true);
57
+                    if ($has_questions) {
58
+                        $lesson_status = WooThemes_Sensei_Utils::user_lesson_status($lesson->ID, get_current_user_id());
59 59
                         // Get user quiz grade
60
-                        $lesson_grade = get_comment_meta( $lesson_status->comment_ID, 'grade', true );
61
-                        if ( $lesson_grade ) {
60
+                        $lesson_grade = get_comment_meta($lesson_status->comment_ID, 'grade', true);
61
+                        if ($lesson_grade) {
62 62
                             $lesson_grade .= '%';
63 63
                         }
64 64
                     }
65 65
                     ?>
66 66
                     <h2>
67 67
 
68
-                        <a href="<?php esc_url_raw( get_permalink( $lesson->ID ) ); ?>"
69
-                           title="<?php esc_attr_e( sprintf( __( 'Start %s', 'woothemes-sensei' ), $lesson->post_title ) ); ?>">
68
+                        <a href="<?php esc_url_raw(get_permalink($lesson->ID)); ?>"
69
+                           title="<?php esc_attr_e(sprintf(__('Start %s', 'woothemes-sensei'), $lesson->post_title)); ?>">
70 70
 
71
-                            <?php esc_html_e( $lesson->post_title ); ?>
71
+                            <?php esc_html_e($lesson->post_title); ?>
72 72
 
73 73
                         </a>
74 74
 
@@ -89,25 +89,25 @@  discard block
 block discarded – undo
89 89
 
90 90
         <?php
91 91
 
92
-        $lessons = Sensei()->modules->get_none_module_lessons( $course->ID );
93
-        if( 0 < count( $lessons ) ): ?>
92
+        $lessons = Sensei()->modules->get_none_module_lessons($course->ID);
93
+        if (0 < count($lessons)): ?>
94 94
 
95 95
 			<h3>
96 96
 
97
-                <?php _e( 'Other Lessons', 'woothemes-sensei' ); ?>
97
+                <?php _e('Other Lessons', 'woothemes-sensei'); ?>
98 98
 
99 99
             </h3>
100 100
 
101
-            <?php foreach ( $lessons as $lesson ): ?>
101
+            <?php foreach ($lessons as $lesson): ?>
102 102
 
103 103
                 <?php
104 104
                 $lesson_grade = 'n/a';
105
-                $has_questions = get_post_meta( $lesson->ID, '_quiz_has_questions', true );
106
-                if ( $has_questions ) {
107
-                    $lesson_status = WooThemes_Sensei_Utils::user_lesson_status( $lesson->ID, get_current_user_id());
105
+                $has_questions = get_post_meta($lesson->ID, '_quiz_has_questions', true);
106
+                if ($has_questions) {
107
+                    $lesson_status = WooThemes_Sensei_Utils::user_lesson_status($lesson->ID, get_current_user_id());
108 108
                     // Get user quiz grade
109
-                    $lesson_grade = get_comment_meta( $lesson_status->comment_ID, 'grade', true );
110
-                    if ( $lesson_grade ) {
109
+                    $lesson_grade = get_comment_meta($lesson_status->comment_ID, 'grade', true);
110
+                    if ($lesson_grade) {
111 111
                         $lesson_grade .= '%';
112 112
                     }
113 113
                 }
@@ -115,9 +115,9 @@  discard block
 block discarded – undo
115 115
 
116 116
                 <h2>
117 117
 
118
-                    <a href="<?php esc_url_raw( get_permalink( $lesson->ID ) ) ?>" title="<?php esc_attr_e( sprintf( __( 'Start %s', 'woothemes-sensei' ), $lesson->post_title ) ) ?>" >
118
+                    <a href="<?php esc_url_raw(get_permalink($lesson->ID)) ?>" title="<?php esc_attr_e(sprintf(__('Start %s', 'woothemes-sensei'), $lesson->post_title)) ?>" >
119 119
 
120
-                        <?php esc_html_e( sprintf( __( '%s', 'woothemes-sensei' ), $lesson->post_title ) ); ?>
120
+                        <?php esc_html_e(sprintf(__('%s', 'woothemes-sensei'), $lesson->post_title)); ?>
121 121
 
122 122
                     </a>
123 123
 
@@ -132,13 +132,13 @@  discard block
 block discarded – undo
132 132
 
133 133
         <h2 class="total-grade">
134 134
 
135
-            <?php _e( 'Total Grade', 'woothemes-sensei' ); ?>
135
+            <?php _e('Total Grade', 'woothemes-sensei'); ?>
136 136
             <span class="lesson-grade">
137 137
 
138 138
                 <?php
139 139
 
140
-                    $course_user_grade = WooThemes_Sensei_Utils::sensei_course_user_grade( $course->ID, get_current_user_id() );
141
-                    echo $course_user_grade . '%';
140
+                    $course_user_grade = WooThemes_Sensei_Utils::sensei_course_user_grade($course->ID, get_current_user_id());
141
+                    echo $course_user_grade.'%';
142 142
 
143 143
                 ?>
144 144
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
      *
156 156
      * @since 1.4.0
157 157
      */
158
-	do_action( 'sensei_course_results_after_lessons', $course->ID );
158
+	do_action('sensei_course_results_after_lessons', $course->ID);
159 159
     ?>
160 160
 
161 161
 <?php endif; //user logged in ?>
162 162
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	exit;
4
+}
3 5
 /**
4 6
  * The Template for displaying the my course page data.
5 7
  *
Please login to merge, or discard this patch.
Indentation   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if ( ! defined( 'ABSPATH' ) ) exit;
3 3
 /**
4
- * The Template for displaying all course lessons on the course results page.
5
- *
6
- * Override this template by copying it to yourtheme/sensei/course-results/course-lessons.php
7
- *
8
- * @author 		Automattic
9
- * @package 	Sensei
10
- * @category    Templates
11
- * @version     1.9.0
12
- */
4
+		 * The Template for displaying all course lessons on the course results page.
5
+		 *
6
+		 * Override this template by copying it to yourtheme/sensei/course-results/course-lessons.php
7
+		 *
8
+		 * @author 		Automattic
9
+		 * @package 	Sensei
10
+		 * @category    Templates
11
+		 * @version     1.9.0
12
+		 */
13 13
 
14 14
 global $course;
15 15
 ?>
@@ -17,13 +17,13 @@  discard block
 block discarded – undo
17 17
 <?php if ( is_user_logged_in() ): ?>
18 18
 
19 19
     <?php
20
-    /**
21
-     * Fires inside course-results/lessons.php after the
22
-     * is uer logged check, just above the lessons header.
23
-     * @since 1.4.0
24
-     */
25
-    do_action( 'sensei_course_results_before_lessons', $course->ID );
26
-    ?>
20
+	/**
21
+	 * Fires inside course-results/lessons.php after the
22
+	 * is uer logged check, just above the lessons header.
23
+	 * @since 1.4.0
24
+	 */
25
+	do_action( 'sensei_course_results_before_lessons', $course->ID );
26
+	?>
27 27
 
28 28
     <header>
29 29
 
@@ -36,33 +36,33 @@  discard block
 block discarded – undo
36 36
         <?php
37 37
 
38 38
 		$displayed_lessons = array();
39
-        $modules = Sensei()->modules->get_course_modules( intval( $course->ID ) );
39
+		$modules = Sensei()->modules->get_course_modules( intval( $course->ID ) );
40 40
 
41
-        // List modules with lessons
42
-        foreach( $modules as $module ) {
41
+		// List modules with lessons
42
+		foreach( $modules as $module ) {
43 43
 
44
-            $lessons_query = Sensei()->modules->get_lessons_query( $course->ID, $module->term_id );
45
-            $lessons = $lessons_query->get_posts();
44
+			$lessons_query = Sensei()->modules->get_lessons_query( $course->ID, $module->term_id );
45
+			$lessons = $lessons_query->get_posts();
46 46
 
47
-            if( count( $lessons ) > 0 ) { ?>
47
+			if( count( $lessons ) > 0 ) { ?>
48 48
 
49 49
                 <h3> <?php echo $module->name; ?></h3>
50 50
 
51 51
                 <?php
52
-                $count = 0;
53
-                foreach( $lessons as $lesson ) {
54
-
55
-                    $lesson_grade = 'n/a';
56
-                    $has_questions = get_post_meta( $lesson->ID, '_quiz_has_questions', true );
57
-                    if ( $has_questions ) {
58
-                        $lesson_status = WooThemes_Sensei_Utils::user_lesson_status( $lesson->ID, get_current_user_id() );
59
-                        // Get user quiz grade
60
-                        $lesson_grade = get_comment_meta( $lesson_status->comment_ID, 'grade', true );
61
-                        if ( $lesson_grade ) {
62
-                            $lesson_grade .= '%';
63
-                        }
64
-                    }
65
-                    ?>
52
+				$count = 0;
53
+				foreach( $lessons as $lesson ) {
54
+
55
+					$lesson_grade = 'n/a';
56
+					$has_questions = get_post_meta( $lesson->ID, '_quiz_has_questions', true );
57
+					if ( $has_questions ) {
58
+						$lesson_status = WooThemes_Sensei_Utils::user_lesson_status( $lesson->ID, get_current_user_id() );
59
+						// Get user quiz grade
60
+						$lesson_grade = get_comment_meta( $lesson_status->comment_ID, 'grade', true );
61
+						if ( $lesson_grade ) {
62
+							$lesson_grade .= '%';
63
+						}
64
+					}
65
+					?>
66 66
                     <h2>
67 67
 
68 68
                         <a href="<?php esc_url_raw( get_permalink( $lesson->ID ) ); ?>"
@@ -80,17 +80,17 @@  discard block
 block discarded – undo
80 80
 
81 81
                 <?php
82 82
 
83
-                }// end for each
83
+				}// end for each
84 84
 
85
-            }// end if count lesson
85
+			}// end if count lesson
86 86
 
87
-        } // end for each module
88
-        ?>
87
+		} // end for each module
88
+		?>
89 89
 
90 90
         <?php
91 91
 
92
-        $lessons = Sensei()->modules->get_none_module_lessons( $course->ID );
93
-        if( 0 < count( $lessons ) ): ?>
92
+		$lessons = Sensei()->modules->get_none_module_lessons( $course->ID );
93
+		if( 0 < count( $lessons ) ): ?>
94 94
 
95 95
 			<h3>
96 96
 
@@ -101,17 +101,17 @@  discard block
 block discarded – undo
101 101
             <?php foreach ( $lessons as $lesson ): ?>
102 102
 
103 103
                 <?php
104
-                $lesson_grade = 'n/a';
105
-                $has_questions = get_post_meta( $lesson->ID, '_quiz_has_questions', true );
106
-                if ( $has_questions ) {
107
-                    $lesson_status = WooThemes_Sensei_Utils::user_lesson_status( $lesson->ID, get_current_user_id());
108
-                    // Get user quiz grade
109
-                    $lesson_grade = get_comment_meta( $lesson_status->comment_ID, 'grade', true );
110
-                    if ( $lesson_grade ) {
111
-                        $lesson_grade .= '%';
112
-                    }
113
-                }
114
-                ?>
104
+				$lesson_grade = 'n/a';
105
+				$has_questions = get_post_meta( $lesson->ID, '_quiz_has_questions', true );
106
+				if ( $has_questions ) {
107
+					$lesson_status = WooThemes_Sensei_Utils::user_lesson_status( $lesson->ID, get_current_user_id());
108
+					// Get user quiz grade
109
+					$lesson_grade = get_comment_meta( $lesson_status->comment_ID, 'grade', true );
110
+					if ( $lesson_grade ) {
111
+						$lesson_grade .= '%';
112
+					}
113
+				}
114
+				?>
115 115
 
116 116
                 <h2>
117 117
 
@@ -137,10 +137,10 @@  discard block
 block discarded – undo
137 137
 
138 138
                 <?php
139 139
 
140
-                    $course_user_grade = WooThemes_Sensei_Utils::sensei_course_user_grade( $course->ID, get_current_user_id() );
141
-                    echo $course_user_grade . '%';
140
+					$course_user_grade = WooThemes_Sensei_Utils::sensei_course_user_grade( $course->ID, get_current_user_id() );
141
+					echo $course_user_grade . '%';
142 142
 
143
-                ?>
143
+				?>
144 144
 
145 145
             </span>
146 146
 
@@ -149,13 +149,13 @@  discard block
 block discarded – undo
149 149
     </article>
150 150
 
151 151
     <?php
152
-    /**
153
-     * Fires inside course-results/lessons.php after the
154
-     * is uer logged check, at the bottom of all lessons.
155
-     *
156
-     * @since 1.4.0
157
-     */
152
+	/**
153
+	 * Fires inside course-results/lessons.php after the
154
+	 * is uer logged check, at the bottom of all lessons.
155
+	 *
156
+	 * @since 1.4.0
157
+	 */
158 158
 	do_action( 'sensei_course_results_after_lessons', $course->ID );
159
-    ?>
159
+	?>
160 160
 
161 161
 <?php endif; //user logged in ?>
162 162
\ No newline at end of file
Please login to merge, or discard this patch.
templates/single-lesson.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@  discard block
 block discarded – undo
11 11
  */
12 12
 ?>
13 13
 
14
-<?php  get_sensei_header();  ?>
14
+<?php  get_sensei_header(); ?>
15 15
 
16 16
 <?php the_post(); ?>
17 17
 
18
-<article <?php post_class( array( 'lesson', 'post' ) ); ?>>
18
+<article <?php post_class(array('lesson', 'post')); ?>>
19 19
 
20 20
     <?php
21 21
 
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
          * @hooked deprecate_sensei_lesson_single_title - 15
30 30
          * @hooked deprecate_lesson_single_main_content_hook - 20
31 31
          */
32
-        do_action( 'sensei_single_lesson_content_inside_before' );
32
+        do_action('sensei_single_lesson_content_inside_before');
33 33
 
34 34
     ?>
35 35
 
@@ -37,11 +37,11 @@  discard block
 block discarded – undo
37 37
 
38 38
         <?php
39 39
 
40
-        if ( sensei_can_user_view_lesson() ) {
40
+        if (sensei_can_user_view_lesson()) {
41 41
 
42
-            if( apply_filters( 'sensei_video_position', 'top', $post->ID ) == 'top' ) {
42
+            if (apply_filters('sensei_video_position', 'top', $post->ID) == 'top') {
43 43
 
44
-                do_action( 'sensei_lesson_video', $post->ID );
44
+                do_action('sensei_lesson_video', $post->ID);
45 45
 
46 46
             }
47 47
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
          *
69 69
          * @hooked Sensei()->frontend->sensei_breadcrumb   - 30
70 70
          */
71
-        do_action( 'sensei_single_lesson_content_inside_after' );
71
+        do_action('sensei_single_lesson_content_inside_after');
72 72
 
73 73
     ?>
74 74
 
Please login to merge, or discard this patch.
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -19,58 +19,58 @@
 block discarded – undo
19 19
 
20 20
     <?php
21 21
 
22
-        /**
23
-         * Hook inside the single lesson above the content
24
-         *
25
-         * @since 1.9.0
26
-         *
27
-         * @hooked WooThemes_Sensei_Lesson::lesson_image() -  10
28
-         * @hooked deprecated_lesson_image_hook - 10
29
-         * @hooked deprecate_sensei_lesson_single_title - 15
30
-         * @hooked deprecate_lesson_single_main_content_hook - 20
31
-         */
32
-        do_action( 'sensei_single_lesson_content_inside_before' );
33
-
34
-    ?>
22
+		/**
23
+		 * Hook inside the single lesson above the content
24
+		 *
25
+		 * @since 1.9.0
26
+		 *
27
+		 * @hooked WooThemes_Sensei_Lesson::lesson_image() -  10
28
+		 * @hooked deprecated_lesson_image_hook - 10
29
+		 * @hooked deprecate_sensei_lesson_single_title - 15
30
+		 * @hooked deprecate_lesson_single_main_content_hook - 20
31
+		 */
32
+		do_action( 'sensei_single_lesson_content_inside_before' );
33
+
34
+	?>
35 35
 
36 36
     <section class="entry fix">
37 37
 
38 38
         <?php
39 39
 
40
-        if ( sensei_can_user_view_lesson() ) {
40
+		if ( sensei_can_user_view_lesson() ) {
41 41
 
42
-            if( apply_filters( 'sensei_video_position', 'top', $post->ID ) == 'top' ) {
42
+			if( apply_filters( 'sensei_video_position', 'top', $post->ID ) == 'top' ) {
43 43
 
44
-                do_action( 'sensei_lesson_video', $post->ID );
44
+				do_action( 'sensei_lesson_video', $post->ID );
45 45
 
46
-            }
46
+			}
47 47
 
48
-            the_content();
48
+			the_content();
49 49
 
50
-        } else {
51
-            ?>
50
+		} else {
51
+			?>
52 52
 
53 53
                 <p> <?php the_excerpt(); ?> </p>
54 54
 
55 55
             <?php
56
-        }
56
+		}
57 57
 
58
-        ?>
58
+		?>
59 59
 
60 60
     </section>
61 61
 
62 62
     <?php
63 63
 
64
-        /**
65
-         * Hook inside the single lesson template after the content
66
-         *
67
-         * @since 1.9.0
68
-         *
69
-         * @hooked Sensei()->frontend->sensei_breadcrumb   - 30
70
-         */
71
-        do_action( 'sensei_single_lesson_content_inside_after' );
64
+		/**
65
+		 * Hook inside the single lesson template after the content
66
+		 *
67
+		 * @since 1.9.0
68
+		 *
69
+		 * @hooked Sensei()->frontend->sensei_breadcrumb   - 30
70
+		 */
71
+		do_action( 'sensei_single_lesson_content_inside_after' );
72 72
 
73
-    ?>
73
+	?>
74 74
 
75 75
 </article><!-- .post -->
76 76
 
Please login to merge, or discard this patch.
templates/archive-course.php 3 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  */
12 12
 ?>
13 13
 
14
-<?php  get_sensei_header();  ?>
14
+<?php  get_sensei_header(); ?>
15 15
 
16 16
     <?php
17 17
 
@@ -25,17 +25,17 @@  discard block
 block discarded – undo
25 25
          * @hooked Sensei_Course::course_archive_filters 20
26 26
          * @hooked Sensei_Templates::deprecated_archive_hook 80
27 27
          */
28
-        do_action( 'sensei_archive_before_course_loop' );
28
+        do_action('sensei_archive_before_course_loop');
29 29
 
30 30
     ?>
31 31
 
32
-    <?php if ( have_posts() ): ?>
32
+    <?php if (have_posts()): ?>
33 33
 
34
-        <?php sensei_load_template( 'loop-course.php' ); ?>
34
+        <?php sensei_load_template('loop-course.php'); ?>
35 35
 
36 36
     <?php else: ?>
37 37
 
38
-        <p><?php _e( 'No courses found that match your selection.', 'woothemes-sensei' ); ?></p>
38
+        <p><?php _e('No courses found that match your selection.', 'woothemes-sensei'); ?></p>
39 39
 
40 40
     <?php  endif; // End If Statement ?>
41 41
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
          *
48 48
          * @since 1.9.0
49 49
          */
50
-        do_action( 'sensei_archive_after_course_loop' );
50
+        do_action('sensei_archive_after_course_loop');
51 51
 
52 52
     ?>
53 53
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,9 +33,12 @@
 block discarded – undo
33 33
 
34 34
         <?php sensei_load_template( 'loop-course.php' ); ?>
35 35
 
36
-    <?php else: ?>
36
+    <?php else {
37
+	: ?>
37 38
 
38
-        <p><?php _e( 'No courses found that match your selection.', 'woothemes-sensei' ); ?></p>
39
+        <p><?php _e( 'No courses found that match your selection.', 'woothemes-sensei' );
40
+}
41
+?></p>
39 42
 
40 43
     <?php  endif; // End If Statement ?>
41 44
 
Please login to merge, or discard this patch.
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -15,19 +15,19 @@  discard block
 block discarded – undo
15 15
 
16 16
     <?php
17 17
 
18
-        /**
19
-         * This action before course archive loop. This hook fires within the archive-course.php
20
-         * It fires even if the current archive has no posts.
21
-         *
22
-         * @since 1.9.0
23
-         *
24
-         * @hooked Sensei_Course::course_archive_sorting 20
25
-         * @hooked Sensei_Course::course_archive_filters 20
26
-         * @hooked Sensei_Templates::deprecated_archive_hook 80
27
-         */
28
-        do_action( 'sensei_archive_before_course_loop' );
29
-
30
-    ?>
18
+		/**
19
+		 * This action before course archive loop. This hook fires within the archive-course.php
20
+		 * It fires even if the current archive has no posts.
21
+		 *
22
+		 * @since 1.9.0
23
+		 *
24
+		 * @hooked Sensei_Course::course_archive_sorting 20
25
+		 * @hooked Sensei_Course::course_archive_filters 20
26
+		 * @hooked Sensei_Templates::deprecated_archive_hook 80
27
+		 */
28
+		do_action( 'sensei_archive_before_course_loop' );
29
+
30
+	?>
31 31
 
32 32
     <?php if ( have_posts() ): ?>
33 33
 
@@ -41,14 +41,14 @@  discard block
 block discarded – undo
41 41
 
42 42
     <?php
43 43
 
44
-        /**
45
-         * This action runs after including the course archive loop. This hook fires within the archive-course.php
46
-         * It fires even if the current archive has no posts.
47
-         *
48
-         * @since 1.9.0
49
-         */
50
-        do_action( 'sensei_archive_after_course_loop' );
44
+		/**
45
+		 * This action runs after including the course archive loop. This hook fires within the archive-course.php
46
+		 * It fires even if the current archive has no posts.
47
+		 *
48
+		 * @since 1.9.0
49
+		 */
50
+		do_action( 'sensei_archive_after_course_loop' );
51 51
 
52
-    ?>
52
+	?>
53 53
 
54 54
 <?php get_sensei_footer(); ?>
Please login to merge, or discard this patch.
templates/content-message.php 3 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined('ABSPATH')) exit;
3 3
 /**
4 4
  * Content-message.php template file
5 5
  *
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
  */
15 15
 ?>
16 16
 
17
-<article <?php post_class( array( 'post','sensei_message'), get_the_ID() ); ?>>
17
+<article <?php post_class(array('post', 'sensei_message'), get_the_ID()); ?>>
18 18
 
19 19
     <section class="message-content">
20 20
 
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
          * @hooked Sensei_Messages::the_message_title - 10
30 30
          * @hooked Sensei_Messages::the_message_sender - 20
31 31
          */
32
-        do_action( 'sensei_content_message_before', get_the_ID() );
32
+        do_action('sensei_content_message_before', get_the_ID());
33 33
         ?>
34 34
 
35 35
         <section class="entry">
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
             <p class="message-excerpt">
49 49
 
50
-                <?php the_excerpt();?>
50
+                <?php the_excerpt(); ?>
51 51
 
52 52
             </p>
53 53
 
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
          * @since 1.9
73 73
          * @param string $post_id
74 74
          */
75
-        do_action( 'sensei_content_message_after', get_the_ID() );
75
+        do_action('sensei_content_message_after', get_the_ID());
76 76
         ?>
77 77
 
78 78
     </section> <!-- article .message-content -->
79 79
 
80
-</article> <!-- article .(<?php esc_attr_e( join( ' ', get_post_class( array( 'sensei_message', 'post' ) ) ) ); ?>  -->
80
+</article> <!-- article .(<?php esc_attr_e(join(' ', get_post_class(array('sensei_message', 'post')))); ?>  -->
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	exit;
4
+}
3 5
 /**
4 6
  * The Template for displaying the my course page data.
5 7
  *
Please login to merge, or discard this patch.
Indentation   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if ( ! defined( 'ABSPATH' ) ) exit;
3 3
 /**
4
- * Content-message.php template file
5
- *
6
- * responsible for content on archive like pages. Only shows the message excerpt.
7
- *
8
- * For single message content please see single-message.php
9
- *
10
- * @author 		Automattic
11
- * @package 	Sensei
12
- * @category    Templates
13
- * @version     1.9.0
14
- */
4
+		 * Content-message.php template file
5
+		 *
6
+		 * responsible for content on archive like pages. Only shows the message excerpt.
7
+		 *
8
+		 * For single message content please see single-message.php
9
+		 *
10
+		 * @author 		Automattic
11
+		 * @package 	Sensei
12
+		 * @category    Templates
13
+		 * @version     1.9.0
14
+		 */
15 15
 ?>
16 16
 
17 17
 <article <?php post_class( array( 'post','sensei_message'), get_the_ID() ); ?>>
@@ -19,31 +19,31 @@  discard block
 block discarded – undo
19 19
     <section class="message-content">
20 20
 
21 21
         <?php
22
-        /**
23
-         * action that runs before the sensei {post_type} content. It runs inside the sensei
24
-         * content.php template. This applies to the specific post type that you've targeted.
25
-         *
26
-         * @since 1.9
27
-         * @param string $post_id
28
-         *
29
-         * @hooked Sensei_Messages::the_message_title - 10
30
-         * @hooked Sensei_Messages::the_message_sender - 20
31
-         */
32
-        do_action( 'sensei_content_message_before', get_the_ID() );
33
-        ?>
22
+		/**
23
+		 * action that runs before the sensei {post_type} content. It runs inside the sensei
24
+		 * content.php template. This applies to the specific post type that you've targeted.
25
+		 *
26
+		 * @since 1.9
27
+		 * @param string $post_id
28
+		 *
29
+		 * @hooked Sensei_Messages::the_message_title - 10
30
+		 * @hooked Sensei_Messages::the_message_sender - 20
31
+		 */
32
+		do_action( 'sensei_content_message_before', get_the_ID() );
33
+		?>
34 34
 
35 35
         <section class="entry">
36 36
 
37 37
             <?php
38
-            /**
39
-             * Fires just before the post content in the content-message.php file.
40
-             *
41
-             * @since 1.9
42
-             *
43
-             * @param string $post_id
44
-             */
45
-            do_action('sensei_content_message_inside_before', get_the_ID());
46
-            ?>
38
+			/**
39
+			 * Fires just before the post content in the content-message.php file.
40
+			 *
41
+			 * @since 1.9
42
+			 *
43
+			 * @param string $post_id
44
+			 */
45
+			do_action('sensei_content_message_inside_before', get_the_ID());
46
+			?>
47 47
 
48 48
             <p class="message-excerpt">
49 49
 
@@ -52,28 +52,28 @@  discard block
 block discarded – undo
52 52
             </p>
53 53
 
54 54
             <?php
55
-            /**
56
-             * Fires just after the post content in the message-content.php file.
57
-             *
58
-             * @since 1.9
59
-             *
60
-             * @param string $post_id
61
-             */
62
-            do_action('sensei_content_message_inside_after', get_the_ID());
63
-            ?>
55
+			/**
56
+			 * Fires just after the post content in the message-content.php file.
57
+			 *
58
+			 * @since 1.9
59
+			 *
60
+			 * @param string $post_id
61
+			 */
62
+			do_action('sensei_content_message_inside_after', get_the_ID());
63
+			?>
64 64
 
65 65
         </section> <!-- section .entry -->
66 66
 
67 67
         <?php
68
-        /**
69
-         * This action runs after the sensei message content. It runs inside the sensei
70
-         * message-content.php template.
71
-         *
72
-         * @since 1.9
73
-         * @param string $post_id
74
-         */
75
-        do_action( 'sensei_content_message_after', get_the_ID() );
76
-        ?>
68
+		/**
69
+		 * This action runs after the sensei message content. It runs inside the sensei
70
+		 * message-content.php template.
71
+		 *
72
+		 * @since 1.9
73
+		 * @param string $post_id
74
+		 */
75
+		do_action( 'sensei_content_message_after', get_the_ID() );
76
+		?>
77 77
 
78 78
     </section> <!-- article .message-content -->
79 79
 
Please login to merge, or discard this patch.
templates/single-message.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  */
12 12
 ?>
13 13
 
14
-<?php  get_sensei_header();  ?>
14
+<?php  get_sensei_header(); ?>
15 15
 
16 16
 <article <?php post_class(); ?> >
17 17
 
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      * @hooked WooThemes_Sensei_Messages::the_title                 - 20
25 25
      * @hooked WooThemes_Sensei_Messages::the_message_sent_by_title - 40
26 26
      */
27
-    do_action( 'sensei_single_message_content_inside_before');
27
+    do_action('sensei_single_message_content_inside_before');
28 28
     ?>
29 29
 
30 30
     <section class="entry">
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      *
42 42
      * @hooked
43 43
      */
44
-    do_action( 'sensei_single_message_content_inside_after');
44
+    do_action('sensei_single_message_content_inside_after');
45 45
 
46 46
     ?>
47 47
 </article><!-- .post -->
Please login to merge, or discard this patch.
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The Template for displaying all single messages.
4
- *
5
- * Override this template by copying it to yourtheme/sensei/single-message.php
6
- *
7
- * @author 		Automattic
8
- * @package 	Sensei
9
- * @category    Templates
10
- * @version     1.9.0
11
- */
3
+	 * The Template for displaying all single messages.
4
+	 *
5
+	 * Override this template by copying it to yourtheme/sensei/single-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();  ?>
@@ -16,16 +16,16 @@  discard block
 block discarded – undo
16 16
 <article <?php post_class(); ?> >
17 17
 
18 18
     <?php
19
-    /**
20
-     * Action inside the single message template before the content
21
-     *
22
-     * @since 1.9.0
23
-     *
24
-     * @hooked WooThemes_Sensei_Messages::the_title                 - 20
25
-     * @hooked WooThemes_Sensei_Messages::the_message_sent_by_title - 40
26
-     */
27
-    do_action( 'sensei_single_message_content_inside_before');
28
-    ?>
19
+	/**
20
+	 * Action inside the single message template before the content
21
+	 *
22
+	 * @since 1.9.0
23
+	 *
24
+	 * @hooked WooThemes_Sensei_Messages::the_title                 - 20
25
+	 * @hooked WooThemes_Sensei_Messages::the_message_sent_by_title - 40
26
+	 */
27
+	do_action( 'sensei_single_message_content_inside_before');
28
+	?>
29 29
 
30 30
     <section class="entry">
31 31
 
@@ -35,15 +35,15 @@  discard block
 block discarded – undo
35 35
 
36 36
     <?php
37 37
 
38
-    /**
39
-     * action inside the single message template after the content
40
-     * @since 1.9.0
41
-     *
42
-     * @hooked
43
-     */
44
-    do_action( 'sensei_single_message_content_inside_after');
38
+	/**
39
+	 * action inside the single message template after the content
40
+	 * @since 1.9.0
41
+	 *
42
+	 * @hooked
43
+	 */
44
+	do_action( 'sensei_single_message_content_inside_after');
45 45
 
46
-    ?>
46
+	?>
47 47
 </article><!-- .post -->
48 48
 
49 49
 <?php get_sensei_footer(); ?>
Please login to merge, or discard this patch.
templates/single-quiz/question_type-gap-fill.php 3 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined('ABSPATH')) exit;
3 3
 /**
4 4
  * The Template for displaying Gap Fill Line Questions.
5 5
  *
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
      * Get the question data with the current quiz id
19 19
      * All data is loaded in this array to keep the template clean.
20 20
      */
21
-    $question_data = WooThemes_Sensei_Question::get_template_data( sensei_get_the_question_id(), get_the_ID() );
21
+    $question_data = WooThemes_Sensei_Question::get_template_data(sensei_get_the_question_id(), get_the_ID());
22 22
 
23 23
 ?>
24 24
 
@@ -26,16 +26,16 @@  discard block
 block discarded – undo
26 26
 
27 27
     <span class="gapfill-answer-pre">
28 28
 
29
-        <?php echo apply_filters( 'sensei_answer_text', esc_html( $question_data[ 'gapfill_pre' ] ) ); ?>
29
+        <?php echo apply_filters('sensei_answer_text', esc_html($question_data['gapfill_pre'])); ?>
30 30
 
31
-        <input type="text" id="<?php echo esc_attr( 'question_' .  $question_data[ 'ID' ]  ); ?>"
32
-               name="<?php echo esc_attr( 'sensei_question[' . $question_data[ 'ID' ] . ']' ); ?>"
33
-               value="<?php echo esc_attr( $question_data[ 'user_answer_entry' ]  ); ?>"
31
+        <input type="text" id="<?php echo esc_attr('question_'.$question_data['ID']); ?>"
32
+               name="<?php echo esc_attr('sensei_question['.$question_data['ID'].']'); ?>"
33
+               value="<?php echo esc_attr($question_data['user_answer_entry']); ?>"
34 34
                class="gapfill-answer-gap" />
35 35
 
36 36
         <span class="gapfill-answer-post">
37 37
 
38
-            <?php echo apply_filters( 'sensei_answer_text', esc_html(  $question_data[ 'gapfill_post' ]  ) ); ?>
38
+            <?php echo apply_filters('sensei_answer_text', esc_html($question_data['gapfill_post'])); ?>
39 39
 
40 40
         </span>
41 41
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	exit;
4
+}
3 5
 /**
4 6
  * The Template for displaying the my course page data.
5 7
  *
Please login to merge, or discard this patch.
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,24 +1,24 @@
 block discarded – undo
1 1
 <?php
2 2
 if ( ! defined( 'ABSPATH' ) ) exit;
3 3
 /**
4
- * The Template for displaying Gap Fill Line Questions.
5
- *
6
- * Override this template by copying it to yourtheme/sensei/single-quiz/question_type-gap-fill.php
7
- *
8
- * @author 		Automattic
9
- * @package 	Sensei
10
- * @category    Templates
11
- * @version     1.9.0
12
- */
4
+		 * The Template for displaying Gap Fill Line Questions.
5
+		 *
6
+		 * Override this template by copying it to yourtheme/sensei/single-quiz/question_type-gap-fill.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
-    /**
18
-     * Get the question data with the current quiz id
19
-     * All data is loaded in this array to keep the template clean.
20
-     */
21
-    $question_data = WooThemes_Sensei_Question::get_template_data( sensei_get_the_question_id(), get_the_ID() );
17
+	/**
18
+	 * Get the question data with the current quiz id
19
+	 * All data is loaded in this array to keep the template clean.
20
+	 */
21
+	$question_data = WooThemes_Sensei_Question::get_template_data( sensei_get_the_question_id(), get_the_ID() );
22 22
 
23 23
 ?>
24 24
 
Please login to merge, or discard this patch.
templates/single-quiz/question_type-boolean.php 3 patches
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined('ABSPATH')) exit;
3 3
 /**
4 4
  * The Template for displaying True/False ( Boolean ) Question type.
5 5
  *
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
      * Get the question data with the current quiz id
17 17
      * All data is loaded in this array to keep the template clean.
18 18
      */
19
-    $question_data = WooThemes_Sensei_Question::get_template_data( sensei_get_the_question_id(), get_the_ID() );
20
-    $boolean_options = array( 'true', 'false' );
19
+    $question_data = WooThemes_Sensei_Question::get_template_data(sensei_get_the_question_id(), get_the_ID());
20
+    $boolean_options = array('true', 'false');
21 21
 
22 22
 ?>
23 23
 
@@ -27,20 +27,20 @@  discard block
 block discarded – undo
27 27
 
28 28
     // setup the options the right answer set by the admin/teacher
29 29
     // will be compared to.
30
-    $boolean_options = array( 'true', 'false' );
30
+    $boolean_options = array('true', 'false');
31 31
 
32 32
     //loop through the 2 boolean options and compare them with
33 33
     // the selected right answer
34
-    foreach ( $boolean_options as $option ){
34
+    foreach ($boolean_options as $option) {
35 35
 
36 36
         $answer_class = '';
37 37
 
38 38
         // Add classes to indicate correctness, only if there is a grade
39
-        if( isset( $question_data[ 'user_correct' ] ) && 0 < $question_data['question_grade'] ) {
39
+        if (isset($question_data['user_correct']) && 0 < $question_data['question_grade']) {
40 40
 
41
-            if( $question_right_answer == $question_data[ 'question_right_answer' ] ) {
41
+            if ($question_right_answer == $question_data['question_right_answer']) {
42 42
 
43
-                if( $question_data[ 'user_correct' ] ) {
43
+                if ($question_data['user_correct']) {
44 44
 
45 45
                     $answer_class = 'user_right';
46 46
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
             } else {
52 52
 
53
-                if( ! $question_data[ 'user_correct' ] ) {
53
+                if ( ! $question_data['user_correct']) {
54 54
 
55 55
                     $answer_class = 'user_wrong';
56 56
 
@@ -62,25 +62,25 @@  discard block
 block discarded – undo
62 62
 
63 63
     ?>
64 64
 
65
-    <li class="<?php esc_attr_e( $answer_class ); ?>">
65
+    <li class="<?php esc_attr_e($answer_class); ?>">
66 66
 
67 67
         <input type="radio"
68
-               id="<?php echo esc_attr( 'question_' . $question_data[ 'ID' ]  ) . '-option-true'; ?>"
69
-               name="<?php echo esc_attr( 'sensei_question[' . $question_data[ 'ID' ]  . ']' ); ?>"
68
+               id="<?php echo esc_attr('question_'.$question_data['ID']).'-option-true'; ?>"
69
+               name="<?php echo esc_attr('sensei_question['.$question_data['ID'].']'); ?>"
70 70
                value="true"
71
-            <?php echo checked( $question_data[ 'user_answer_entry' ], $option, false ); ?>
72
-            <?php if ( !is_user_logged_in() ) { echo ' disabled'; } ?>
71
+            <?php echo checked($question_data['user_answer_entry'], $option, false); ?>
72
+            <?php if ( ! is_user_logged_in()) { echo ' disabled'; } ?>
73 73
 
74
-        <label for="<?php echo esc_attr( 'question_' . $question_data[ 'ID' ]  ) . '-option-'.$option; ?>">
74
+        <label for="<?php echo esc_attr('question_'.$question_data['ID']).'-option-'.$option; ?>">
75 75
             <?php
76 76
 
77
-            if( 'true' == $option ){
77
+            if ('true' == $option) {
78 78
 
79
-                _e( 'True', 'woothemes-sensei' );
79
+                _e('True', 'woothemes-sensei');
80 80
 
81
-            }else{
81
+            } else {
82 82
 
83
-                _e( 'False', 'woothemes-sensei' );
83
+                _e('False', 'woothemes-sensei');
84 84
 
85 85
             }
86 86
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	exit;
4
+}
3 5
 /**
4 6
  * The Template for displaying True/False ( Boolean ) Question type.
5 7
  *
@@ -78,7 +80,7 @@  discard block
 block discarded – undo
78 80
 
79 81
                 _e( 'True', 'woothemes-sensei' );
80 82
 
81
-            }else{
83
+            } else{
82 84
 
83 85
                 _e( 'False', 'woothemes-sensei' );
84 86
 
Please login to merge, or discard this patch.
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -1,23 +1,23 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if ( ! defined( 'ABSPATH' ) ) exit;
3 3
 /**
4
- * The Template for displaying True/False ( Boolean ) Question type.
5
- *
6
- * @author 		Automattic
7
- * @package 	Sensei
8
- * @category    Templates
9
- * @version     1.9.0
10
- */
4
+	 * The Template for displaying True/False ( Boolean ) Question type.
5
+	 *
6
+	 * @author 		Automattic
7
+	 * @package 	Sensei
8
+	 * @category    Templates
9
+	 * @version     1.9.0
10
+	 */
11 11
 ?>
12 12
 
13 13
 <?php
14 14
 
15
-    /**
16
-     * Get the question data with the current quiz id
17
-     * All data is loaded in this array to keep the template clean.
18
-     */
19
-    $question_data = WooThemes_Sensei_Question::get_template_data( sensei_get_the_question_id(), get_the_ID() );
20
-    $boolean_options = array( 'true', 'false' );
15
+	/**
16
+	 * Get the question data with the current quiz id
17
+	 * All data is loaded in this array to keep the template clean.
18
+	 */
19
+	$question_data = WooThemes_Sensei_Question::get_template_data( sensei_get_the_question_id(), get_the_ID() );
20
+	$boolean_options = array( 'true', 'false' );
21 21
 
22 22
 ?>
23 23
 
@@ -25,42 +25,42 @@  discard block
 block discarded – undo
25 25
 
26 26
     <?php
27 27
 
28
-    // setup the options the right answer set by the admin/teacher
29
-    // will be compared to.
30
-    $boolean_options = array( 'true', 'false' );
28
+	// setup the options the right answer set by the admin/teacher
29
+	// will be compared to.
30
+	$boolean_options = array( 'true', 'false' );
31 31
 
32
-    //loop through the 2 boolean options and compare them with
33
-    // the selected right answer
34
-    foreach ( $boolean_options as $option ){
32
+	//loop through the 2 boolean options and compare them with
33
+	// the selected right answer
34
+	foreach ( $boolean_options as $option ){
35 35
 
36
-        $answer_class = '';
36
+		$answer_class = '';
37 37
 
38
-        // Add classes to indicate correctness, only if there is a grade
39
-        if( isset( $question_data[ 'user_correct' ] ) && 0 < $question_data['question_grade'] ) {
38
+		// Add classes to indicate correctness, only if there is a grade
39
+		if( isset( $question_data[ 'user_correct' ] ) && 0 < $question_data['question_grade'] ) {
40 40
 
41
-            if( $question_right_answer == $question_data[ 'question_right_answer' ] ) {
41
+			if( $question_right_answer == $question_data[ 'question_right_answer' ] ) {
42 42
 
43
-                if( $question_data[ 'user_correct' ] ) {
43
+				if( $question_data[ 'user_correct' ] ) {
44 44
 
45
-                    $answer_class = 'user_right';
45
+					$answer_class = 'user_right';
46 46
 
47
-                }
47
+				}
48 48
 
49
-                $answer_class .= ' right_answer';
49
+				$answer_class .= ' right_answer';
50 50
 
51
-            } else {
51
+			} else {
52 52
 
53
-                if( ! $question_data[ 'user_correct' ] ) {
53
+				if( ! $question_data[ 'user_correct' ] ) {
54 54
 
55
-                    $answer_class = 'user_wrong';
55
+					$answer_class = 'user_wrong';
56 56
 
57
-                }
57
+				}
58 58
 
59
-            } // end if right answer == current booloean options
59
+			} // end if right answer == current booloean options
60 60
 
61
-        }// end if $user_correct .. $question_grade
61
+		}// end if $user_correct .. $question_grade
62 62
 
63
-    ?>
63
+	?>
64 64
 
65 65
     <li class="<?php esc_attr_e( $answer_class ); ?>">
66 66
 
@@ -74,17 +74,17 @@  discard block
 block discarded – undo
74 74
         <label for="<?php echo esc_attr( 'question_' . $question_data[ 'ID' ]  ) . '-option-'.$option; ?>">
75 75
             <?php
76 76
 
77
-            if( 'true' == $option ){
77
+			if( 'true' == $option ){
78 78
 
79
-                _e( 'True', 'woothemes-sensei' );
79
+				_e( 'True', 'woothemes-sensei' );
80 80
 
81
-            }else{
81
+			}else{
82 82
 
83
-                _e( 'False', 'woothemes-sensei' );
83
+				_e( 'False', 'woothemes-sensei' );
84 84
 
85
-            }
85
+			}
86 86
 
87
-            ?>
87
+			?>
88 88
 
89 89
 
90 90
         </label>
Please login to merge, or discard this patch.