@@ -41,9 +41,9 @@ discard block |
||
41 | 41 | |
42 | 42 | /** |
43 | 43 | * Display output to the admin view |
44 | - * |
|
45 | - * This view is shown when grading a quiz for a single user in admin under grading |
|
46 | - * |
|
44 | + * |
|
45 | + * This view is shown when grading a quiz for a single user in admin under grading |
|
46 | + * |
|
47 | 47 | * @since 1.3.0 |
48 | 48 | * @return html |
49 | 49 | */ |
@@ -57,8 +57,8 @@ discard block |
||
57 | 57 | $user_quiz_grade_total = 0; |
58 | 58 | $quiz_grade_total = 0; |
59 | 59 | $quiz_grade = 0; |
60 | - $lesson_id = $this->lesson_id; |
|
61 | - $user_id = $this->user_id; |
|
60 | + $lesson_id = $this->lesson_id; |
|
61 | + $user_id = $this->user_id; |
|
62 | 62 | |
63 | 63 | ?><form name="<?php esc_attr_e( 'quiz_' . $this->quiz_id ); ?>" action="" method="post"> |
64 | 64 | <?php wp_nonce_field( 'sensei_manual_grading', '_wp_sensei_manual_grading_nonce' ); ?> |
@@ -206,11 +206,11 @@ discard block |
||
206 | 206 | <p class="user-answer"><?php |
207 | 207 | foreach ( $user_answer_content as $_user_answer ) { |
208 | 208 | |
209 | - if( 'multi-line' == Sensei()->question->get_question_type( $question->ID ) ){ |
|
209 | + if( 'multi-line' == Sensei()->question->get_question_type( $question->ID ) ){ |
|
210 | 210 | |
211 | - $_user_answer = htmlspecialchars_decode( nl2br( esc_html($_user_answer) ) ); |
|
211 | + $_user_answer = htmlspecialchars_decode( nl2br( esc_html($_user_answer) ) ); |
|
212 | 212 | |
213 | - } |
|
213 | + } |
|
214 | 214 | |
215 | 215 | echo apply_filters( 'sensei_answer_text', $_user_answer ) . "<br>"; |
216 | 216 | } |
@@ -86,7 +86,7 @@ |
||
86 | 86 | if ( WooThemes_Sensei_Utils::sensei_is_woocommerce_activated() ) { |
87 | 87 | global $woocommerce; |
88 | 88 | if( version_compare( $woocommerce->version, $version, ">=" ) ) { |
89 | - return true; |
|
89 | + return true; |
|
90 | 90 | } |
91 | 91 | } |
92 | 92 | return false; |
@@ -162,8 +162,8 @@ |
||
162 | 162 | $sortable[$id] = $data; |
163 | 163 | } |
164 | 164 | |
165 | - $primary = $this->get_primary_column_name(); |
|
166 | - $this->_column_headers = array( $columns, $hidden, $sortable, $primary ); |
|
165 | + $primary = $this->get_primary_column_name(); |
|
166 | + $this->_column_headers = array( $columns, $hidden, $sortable, $primary ); |
|
167 | 167 | |
168 | 168 | return $this->_column_headers; |
169 | 169 | } |
@@ -70,9 +70,9 @@ discard block |
||
70 | 70 | '1.7.2' => array( 'auto' => array( 'index_comment_status_field' => array( 'title' => __( 'Add database index to comment statuses', 'woothemes-sensei' ), 'desc' => __( 'This indexes the comment statuses in the database, which will speed up all Sensei activity queries.', 'woothemes-sensei' ) ), ), |
71 | 71 | /*'manual' => array( 'remove_legacy_comments' => array( 'title' => __( 'Remove legacy Sensei activity types', 'woothemes-sensei' ), 'desc' => __( 'This removes all legacy (pre-1.7) Sensei activity types - only run this update once the update to v1.7 is complete and everything is stable.', 'woothemes-sensei' ) ) )*/ |
72 | 72 | ), |
73 | - '1.8.0' => array( 'auto' => array( 'enhance_teacher_role' => array( 'title' => 'Enhance the \'Teacher\' role', 'desc' => 'Adds the ability for a \'Teacher\' to create courses, lessons , quizes and manage their learners.' ), ), |
|
74 | - 'manual' => array() |
|
75 | - ), |
|
73 | + '1.8.0' => array( 'auto' => array( 'enhance_teacher_role' => array( 'title' => 'Enhance the \'Teacher\' role', 'desc' => 'Adds the ability for a \'Teacher\' to create courses, lessons , quizes and manage their learners.' ), ), |
|
74 | + 'manual' => array() |
|
75 | + ), |
|
76 | 76 | ); |
77 | 77 | |
78 | 78 | $this->updates = apply_filters( 'sensei_upgrade_functions', $this->updates, $this->updates ); |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | } // End For Loop |
330 | 330 | } // End For Loop |
331 | 331 | |
332 | - $this->updates_run = array_unique( $this->updates_run ); // we only need one reference per update |
|
332 | + $this->updates_run = array_unique( $this->updates_run ); // we only need one reference per update |
|
333 | 333 | update_option( $this->token . '-upgrades', $this->updates_run ); |
334 | 334 | return true; |
335 | 335 | |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | */ |
447 | 447 | private function set_update_run( $update ) { |
448 | 448 | array_push( $this->updates_run, $update ); |
449 | - $this->updates_run = array_unique( $this->updates_run ); // we only need one reference per update |
|
449 | + $this->updates_run = array_unique( $this->updates_run ); // we only need one reference per update |
|
450 | 450 | update_option( $this->token . '-upgrades', $this->updates_run ); |
451 | 451 | } |
452 | 452 | |
@@ -918,11 +918,11 @@ discard block |
||
918 | 918 | update_post_meta( $lesson->ID, '_order_' . $course_id, 0 ); |
919 | 919 | } |
920 | 920 | |
921 | - $module = Sensei()->modules->get_lesson_module( $lesson->ID ); |
|
921 | + $module = Sensei()->modules->get_lesson_module( $lesson->ID ); |
|
922 | 922 | |
923 | - if( $module ) { |
|
924 | - update_post_meta( $lesson->ID, '_order_module_' . $module->term_id, 0 ); |
|
925 | - } |
|
923 | + if( $module ) { |
|
924 | + update_post_meta( $lesson->ID, '_order_module_' . $module->term_id, 0 ); |
|
925 | + } |
|
926 | 926 | |
927 | 927 | } |
928 | 928 | |
@@ -1732,22 +1732,22 @@ discard block |
||
1732 | 1732 | |
1733 | 1733 | } |
1734 | 1734 | |
1735 | - /** |
|
1736 | - * WooThemes_Sensei_Updates::enhance_teacher_role |
|
1737 | - * |
|
1738 | - * This runs the update to create the teacher role |
|
1739 | - * @access public |
|
1740 | - * @since 1.8.0 |
|
1741 | - * @return bool; |
|
1742 | - */ |
|
1743 | - public function enhance_teacher_role ( ) { |
|
1744 | - |
|
1745 | - require_once('class-sensei-teacher.php'); |
|
1746 | - $teacher = new Sensei_Teacher(); |
|
1747 | - $teacher->create_role(); |
|
1748 | - return true; |
|
1749 | - |
|
1750 | - }// end enhance_teacher_role |
|
1735 | + /** |
|
1736 | + * WooThemes_Sensei_Updates::enhance_teacher_role |
|
1737 | + * |
|
1738 | + * This runs the update to create the teacher role |
|
1739 | + * @access public |
|
1740 | + * @since 1.8.0 |
|
1741 | + * @return bool; |
|
1742 | + */ |
|
1743 | + public function enhance_teacher_role ( ) { |
|
1744 | + |
|
1745 | + require_once('class-sensei-teacher.php'); |
|
1746 | + $teacher = new Sensei_Teacher(); |
|
1747 | + $teacher->create_role(); |
|
1748 | + return true; |
|
1749 | + |
|
1750 | + }// end enhance_teacher_role |
|
1751 | 1751 | |
1752 | 1752 | } // End Class |
1753 | 1753 |
@@ -201,7 +201,7 @@ |
||
201 | 201 | |
202 | 202 | if( 'complete' == $item->comment_approved ) { |
203 | 203 | |
204 | - $status = __( 'Completed', 'woothemes-sensei' ); |
|
204 | + $status = __( 'Completed', 'woothemes-sensei' ); |
|
205 | 205 | $status_class = 'graded'; |
206 | 206 | |
207 | 207 | $course_end_date = $item->comment_date; |
@@ -1,90 +1,90 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if ( ! defined( 'ABSPATH' ) ) exit; |
3 | 3 | /** |
4 | - * The Template for displaying all single course meta information. |
|
5 | - * |
|
6 | - * Override this template by copying it to yourtheme/sensei/single-course/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 single course meta information. |
|
5 | + * |
|
6 | + * Override this template by copying it to yourtheme/sensei/single-course/course-lessons.php |
|
7 | + * |
|
8 | + * @author Automattic |
|
9 | + * @package Sensei |
|
10 | + * @category Templates |
|
11 | + * @version 1.9.0 |
|
12 | + */ |
|
13 | 13 | ?> |
14 | 14 | |
15 | 15 | <section class="course-lessons"> |
16 | 16 | |
17 | 17 | <?php |
18 | 18 | |
19 | - /** |
|
20 | - * Actions just before the sensei single course lessons loop begins |
|
21 | - * |
|
22 | - * @hooked WooThemes_Sensei_Course::load_single_course_lessons_query |
|
23 | - * @since 1.9.0 |
|
24 | - */ |
|
25 | - do_action( 'sensei_single_course_lessons_before' ); |
|
19 | + /** |
|
20 | + * Actions just before the sensei single course lessons loop begins |
|
21 | + * |
|
22 | + * @hooked WooThemes_Sensei_Course::load_single_course_lessons_query |
|
23 | + * @since 1.9.0 |
|
24 | + */ |
|
25 | + do_action( 'sensei_single_course_lessons_before' ); |
|
26 | 26 | |
27 | - ?> |
|
27 | + ?> |
|
28 | 28 | |
29 | 29 | <?php |
30 | 30 | |
31 | - //lessons loaded into loop in the sensei_single_course_lessons_before hook |
|
32 | - if( have_posts() ): |
|
31 | + //lessons loaded into loop in the sensei_single_course_lessons_before hook |
|
32 | + if( have_posts() ): |
|
33 | 33 | |
34 | - // start course lessons loop |
|
35 | - while ( have_posts() ): the_post(); ?> |
|
34 | + // start course lessons loop |
|
35 | + while ( have_posts() ): the_post(); ?> |
|
36 | 36 | |
37 | 37 | <article <?php post_class(); ?> > |
38 | 38 | |
39 | 39 | <?php |
40 | 40 | |
41 | - /** |
|
42 | - * The hook is inside the course lesson on the single course. It fires |
|
43 | - * for each lesson. It is just before the lesson excerpt. |
|
44 | - * |
|
45 | - * @since 1.9.0 |
|
46 | - * |
|
47 | - * @param $lessons_id |
|
48 | - * |
|
49 | - * @hooked WooThemes_Sensei_Lesson::the_lesson_meta - 5 |
|
50 | - * @hooked WooThemes_Sensei_Lesson::the_lesson_thumbnail - 8 |
|
51 | - * |
|
52 | - */ |
|
53 | - do_action( 'sensei_single_course_inside_before_lesson', get_the_ID() ); |
|
54 | - |
|
55 | - ?> |
|
41 | + /** |
|
42 | + * The hook is inside the course lesson on the single course. It fires |
|
43 | + * for each lesson. It is just before the lesson excerpt. |
|
44 | + * |
|
45 | + * @since 1.9.0 |
|
46 | + * |
|
47 | + * @param $lessons_id |
|
48 | + * |
|
49 | + * @hooked WooThemes_Sensei_Lesson::the_lesson_meta - 5 |
|
50 | + * @hooked WooThemes_Sensei_Lesson::the_lesson_thumbnail - 8 |
|
51 | + * |
|
52 | + */ |
|
53 | + do_action( 'sensei_single_course_inside_before_lesson', get_the_ID() ); |
|
54 | + |
|
55 | + ?> |
|
56 | 56 | |
57 | 57 | <section class="entry"> |
58 | 58 | |
59 | 59 | <?php |
60 | - /** |
|
61 | - * Output all course lessons. If none found for this course |
|
62 | - * a notice will be displayed. What is displayed |
|
63 | - * is manipulated via a |
|
64 | - */ |
|
65 | - the_excerpt(); |
|
66 | - ?> |
|
60 | + /** |
|
61 | + * Output all course lessons. If none found for this course |
|
62 | + * a notice will be displayed. What is displayed |
|
63 | + * is manipulated via a |
|
64 | + */ |
|
65 | + the_excerpt(); |
|
66 | + ?> |
|
67 | 67 | |
68 | 68 | </section> |
69 | 69 | |
70 | 70 | <?php |
71 | 71 | |
72 | - /** |
|
73 | - * The hook is inside the course lesson on the single course. It is just before the lesson closing markup. |
|
74 | - * It fires for each lesson. |
|
75 | - * |
|
76 | - * @since 1.9.0 |
|
77 | - */ |
|
78 | - do_action( 'sensei_single_course_inside_after_lesson', get_the_ID() ); |
|
72 | + /** |
|
73 | + * The hook is inside the course lesson on the single course. It is just before the lesson closing markup. |
|
74 | + * It fires for each lesson. |
|
75 | + * |
|
76 | + * @since 1.9.0 |
|
77 | + */ |
|
78 | + do_action( 'sensei_single_course_inside_after_lesson', get_the_ID() ); |
|
79 | 79 | |
80 | - ?> |
|
80 | + ?> |
|
81 | 81 | |
82 | 82 | </article> |
83 | 83 | |
84 | 84 | <?php |
85 | - // end course lessons loop |
|
86 | - endwhile; |
|
87 | - ?> |
|
85 | + // end course lessons loop |
|
86 | + endwhile; |
|
87 | + ?> |
|
88 | 88 | |
89 | 89 | <?php else: ?> |
90 | 90 | |
@@ -94,15 +94,15 @@ discard block |
||
94 | 94 | |
95 | 95 | <?php |
96 | 96 | |
97 | - /** |
|
98 | - * Actions just before the sensei single course lessons loop begins |
|
99 | - * |
|
100 | - * @hooked WooThemes_Sensei_Course::reset_single_course_query |
|
101 | - * |
|
102 | - * @since 1.9.0 |
|
103 | - */ |
|
104 | - do_action( 'sensei_single_course_lessons_after' ); |
|
97 | + /** |
|
98 | + * Actions just before the sensei single course lessons loop begins |
|
99 | + * |
|
100 | + * @hooked WooThemes_Sensei_Course::reset_single_course_query |
|
101 | + * |
|
102 | + * @since 1.9.0 |
|
103 | + */ |
|
104 | + do_action( 'sensei_single_course_lessons_after' ); |
|
105 | 105 | |
106 | - ?> |
|
106 | + ?> |
|
107 | 107 | |
108 | 108 | </section> |
@@ -1,24 +1,24 @@ |
||
1 | 1 | <?php |
2 | 2 | if ( ! defined( 'ABSPATH' ) ) exit; |
3 | 3 | /** |
4 | - * The Template for displaying Single Line Questions. |
|
5 | - * |
|
6 | - * Override this template by copying it to yourtheme/sensei/single-quiz/question_type-single-line.php |
|
7 | - * |
|
8 | - * @author Automattic |
|
9 | - * @package Sensei |
|
10 | - * @category Templates |
|
11 | - * @version 1.9.0 |
|
12 | - */ |
|
4 | + * The Template for displaying Single Line Questions. |
|
5 | + * |
|
6 | + * Override this template by copying it to yourtheme/sensei/single-quiz/question_type-single-line.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 |
@@ -1,23 +1,23 @@ discard block |
||
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 |
||
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 |
||
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> |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Learner completed course email |
|
4 | - * |
|
5 | - * @author WooThemes |
|
6 | - * @package Sensei/Templates/Emails/HTML |
|
7 | - * @version 1.6.0 |
|
8 | - */ |
|
3 | + * Learner completed course email |
|
4 | + * |
|
5 | + * @author WooThemes |
|
6 | + * @package Sensei/Templates/Emails/HTML |
|
7 | + * @version 1.6.0 |
|
8 | + */ |
|
9 | 9 | if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?> |
10 | 10 | |
11 | 11 | <?php |