@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | * trigger function. |
38 | 38 | * |
39 | 39 | * @access public |
40 | - * @param integer $message_id |
|
40 | + * @param integer $message_id |
|
41 | 41 | * @return void |
42 | 42 | */ |
43 | 43 | function trigger( $message_id = 0 ) { |
@@ -55,16 +55,16 @@ discard block |
||
55 | 55 | $content_id = get_post_meta( $message_id, '_post', true ); |
56 | 56 | $content_title = get_the_title( $content_id ); |
57 | 57 | |
58 | - // setup the post type parameter |
|
59 | - $content_type = get_post_type( $content_id ); |
|
60 | - if( !$content_type ){ |
|
61 | - $content_type =''; |
|
62 | - } |
|
58 | + // setup the post type parameter |
|
59 | + $content_type = get_post_type( $content_id ); |
|
60 | + if( !$content_type ){ |
|
61 | + $content_type =''; |
|
62 | + } |
|
63 | 63 | |
64 | 64 | // Construct data array |
65 | 65 | $sensei_email_data = apply_filters( 'sensei_email_data', array( |
66 | 66 | 'template' => $this->template, |
67 | - $content_type.'_id' => $content_id, |
|
67 | + $content_type.'_id' => $content_id, |
|
68 | 68 | 'heading' => $this->heading, |
69 | 69 | 'teacher_id' => $this->teacher->ID, |
70 | 70 | 'learner_id' => $this->learner->ID, |
@@ -36,11 +36,11 @@ |
||
36 | 36 | /** |
37 | 37 | * trigger function. |
38 | 38 | * |
39 | - * @param int $user_id |
|
40 | - * @param int $quiz_id |
|
41 | - * @param int $grade |
|
42 | - * @param int $passmark |
|
43 | - * |
|
39 | + * @param int $user_id |
|
40 | + * @param int $quiz_id |
|
41 | + * @param int $grade |
|
42 | + * @param int $passmark |
|
43 | + * |
|
44 | 44 | * @return void |
45 | 45 | */ |
46 | 46 | function trigger ( $user_id = 0, $quiz_id = 0, $grade = 0, $passmark = 0 ) { |
@@ -38,10 +38,10 @@ |
||
38 | 38 | * trigger function. |
39 | 39 | * |
40 | 40 | * @access public |
41 | - * |
|
42 | - * @param int $user_id |
|
43 | - * @param int $course_id |
|
44 | - * |
|
41 | + * |
|
42 | + * @param int $user_id |
|
43 | + * @param int $course_id |
|
44 | + * |
|
45 | 45 | * @return void |
46 | 46 | */ |
47 | 47 | function trigger( $user_id = 0, $course_id = 0 ) { |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
7 | 7 | |
8 | 8 | if ( class_exists( 'Teacher_New_Course_Assignment' ) ){ |
9 | - return; |
|
9 | + return; |
|
10 | 10 | } |
11 | 11 | |
12 | 12 | /** |
@@ -40,40 +40,40 @@ discard block |
||
40 | 40 | */ |
41 | 41 | function __construct() { |
42 | 42 | |
43 | - $this->template = 'teacher-new-course-assignment'; |
|
43 | + $this->template = 'teacher-new-course-assignment'; |
|
44 | 44 | $this->subject = apply_filters( 'sensei_email_subject', sprintf( __( '[%1$s] You have been assigned to a course', 'woothemes-sensei' ), get_bloginfo( 'name' ) ), $this->template ); |
45 | 45 | $this->heading = apply_filters( 'sensei_email_heading', __( 'Course assigned to you', 'woothemes-sensei' ), $this->template ); |
46 | - return; |
|
46 | + return; |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
50 | 50 | * trigger function. |
51 | 51 | * |
52 | 52 | * @access public |
53 | - * @param $teacher_id |
|
54 | - * @param $course_id |
|
53 | + * @param $teacher_id |
|
54 | + * @param $course_id |
|
55 | 55 | * @return void |
56 | 56 | */ |
57 | 57 | function trigger( $teacher_id = 0, $course_id = 0 ) { |
58 | 58 | global $sensei_email_data; |
59 | 59 | |
60 | 60 | $this->teacher = new WP_User( $teacher_id ); |
61 | - $this->recipient = stripslashes( $this->teacher->user_email ); |
|
62 | - $this->subject = __( 'New course assigned to you', 'woothemes-sensei' ); |
|
61 | + $this->recipient = stripslashes( $this->teacher->user_email ); |
|
62 | + $this->subject = __( 'New course assigned to you', 'woothemes-sensei' ); |
|
63 | 63 | |
64 | - //course edit link |
|
65 | - $course_edit_link = admin_url('post.php?post=' . $course_id . '&action=edit' ); |
|
64 | + //course edit link |
|
65 | + $course_edit_link = admin_url('post.php?post=' . $course_id . '&action=edit' ); |
|
66 | 66 | |
67 | - // Course name |
|
68 | - $course = get_post( $course_id); |
|
67 | + // Course name |
|
68 | + $course = get_post( $course_id); |
|
69 | 69 | // Construct data array |
70 | 70 | $sensei_email_data = apply_filters( 'sensei_email_data', array( |
71 | 71 | 'template' => $this->template, |
72 | 72 | 'heading' => $this->heading, |
73 | 73 | 'teacher_id' => $teacher_id, |
74 | 74 | 'course_id' => $course_id, |
75 | - 'course_name' => $course->post_title, |
|
76 | - 'course_edit_link' => $course_edit_link, |
|
75 | + 'course_name' => $course->post_title, |
|
76 | + 'course_edit_link' => $course_edit_link, |
|
77 | 77 | ), $this->template ); |
78 | 78 | |
79 | 79 | // Send mail |
@@ -34,10 +34,10 @@ discard block |
||
34 | 34 | |
35 | 35 | /** |
36 | 36 | * trigger function. |
37 | - * |
|
38 | - * @param integer $learner_id |
|
39 | - * @param integer $quiz_id |
|
40 | - * |
|
37 | + * |
|
38 | + * @param integer $learner_id |
|
39 | + * @param integer $quiz_id |
|
40 | + * |
|
41 | 41 | * @return void |
42 | 42 | */ |
43 | 43 | function trigger( $learner_id = 0, $quiz_id = 0 ) { |
@@ -47,8 +47,8 @@ discard block |
||
47 | 47 | $this->learner = new WP_User( $learner_id ); |
48 | 48 | |
49 | 49 | // Get teacher ID and user object |
50 | - $lesson_id = get_post_meta( $quiz_id, '_quiz_lesson', true ); |
|
51 | - $course_id = get_post_meta( $lesson_id, '_lesson_course', true ); |
|
50 | + $lesson_id = get_post_meta( $quiz_id, '_quiz_lesson', true ); |
|
51 | + $course_id = get_post_meta( $lesson_id, '_lesson_course', true ); |
|
52 | 52 | $teacher_id = get_post_field( 'post_author', $course_id, 'raw' ); |
53 | 53 | $this->teacher = new WP_User( $teacher_id ); |
54 | 54 |
@@ -37,9 +37,9 @@ |
||
37 | 37 | /** |
38 | 38 | * trigger function. |
39 | 39 | * |
40 | - * @param int $learner_id |
|
41 | - * @param int $course_id |
|
42 | - * |
|
40 | + * @param int $learner_id |
|
41 | + * @param int $course_id |
|
42 | + * |
|
43 | 43 | * @return void |
44 | 44 | */ |
45 | 45 | function trigger( $learner_id = 0, $course_id = 0 ) { |
@@ -35,9 +35,9 @@ discard block |
||
35 | 35 | /** |
36 | 36 | * trigger function. |
37 | 37 | * |
38 | - * @param int $learner_id |
|
39 | - * @param int $lesson_id |
|
40 | - * |
|
38 | + * @param int $learner_id |
|
39 | + * @param int $lesson_id |
|
40 | + * |
|
41 | 41 | * @return void |
42 | 42 | */ |
43 | 43 | function trigger( $learner_id = 0, $lesson_id = 0 ) { |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $teacher_id = get_post_field( 'post_author', $lesson_id, 'raw' ); |
52 | 52 | $this->teacher = new WP_User( $teacher_id ); |
53 | 53 | |
54 | - // Construct data array |
|
54 | + // Construct data array |
|
55 | 55 | $sensei_email_data = apply_filters( 'sensei_email_data', array( |
56 | 56 | 'template' => $this->template, |
57 | 57 | 'heading' => $this->heading, |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $this->recipient = stripslashes( $this->teacher->user_email ); |
66 | 66 | |
67 | 67 | // Send mail |
68 | - Sensei()->emails->send( $this->recipient, $this->subject, Sensei()->emails->get_content( $this->template ) ); |
|
68 | + Sensei()->emails->send( $this->recipient, $this->subject, Sensei()->emails->get_content( $this->template ) ); |
|
69 | 69 | } |
70 | 70 | } |
71 | 71 |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | if ( current_user_can( 'manage_sensei_grades' ) ) { |
54 | 54 | |
55 | - add_submenu_page( 'sensei', __('Analysis', 'woothemes-sensei'), __('Analysis', 'woothemes-sensei') , 'manage_sensei_grades', 'sensei_analysis', array( $this, 'analysis_page' ) ); |
|
55 | + add_submenu_page( 'sensei', __('Analysis', 'woothemes-sensei'), __('Analysis', 'woothemes-sensei') , 'manage_sensei_grades', 'sensei_analysis', array( $this, 'analysis_page' ) ); |
|
56 | 56 | |
57 | 57 | } |
58 | 58 | |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | 'analysis-lesson' |
90 | 90 | ); |
91 | 91 | foreach ( $classes_to_load as $class_file ) { |
92 | - Sensei()->load_class( $class_file ); |
|
92 | + Sensei()->load_class( $class_file ); |
|
93 | 93 | } // End For Loop |
94 | 94 | } // End load_data_table_files() |
95 | 95 | |
@@ -433,7 +433,7 @@ discard block |
||
433 | 433 | |
434 | 434 | $user_id = intval( $_GET['user_id'] ); |
435 | 435 | $url = esc_url( add_query_arg( array( 'page' => $this->page_slug, 'user' => $user_id ), admin_url( 'admin.php' ) ) ); |
436 | - $user_name = Sensei_Learner::get_full_name( $user_id ); |
|
436 | + $user_name = Sensei_Learner::get_full_name( $user_id ); |
|
437 | 437 | $title .= sprintf( ' <span class="user-title">> <a href="%s">%s</a></span>', $url, $user_name ); |
438 | 438 | |
439 | 439 | } // End If Statement |
@@ -454,8 +454,8 @@ discard block |
||
454 | 454 | $user_id = intval( $_GET['user_id'] ); |
455 | 455 | $user_data = get_userdata( $user_id ); |
456 | 456 | $url = add_query_arg( array( 'page' => $this->page_slug, 'user_id' => $user_id ), admin_url( 'admin.php' ) ); |
457 | - $user_name = Sensei_Learner::get_full_name( $user_id ); |
|
458 | - $title .= sprintf( ' <span class="user-title">> <a href="%s">%s</a></span>', $url, $user_name ); |
|
457 | + $user_name = Sensei_Learner::get_full_name( $user_id ); |
|
458 | + $title .= sprintf( ' <span class="user-title">> <a href="%s">%s</a></span>', $url, $user_name ); |
|
459 | 459 | $title .= sprintf( ' <span class="user-title">> <a href="%s">%s</a></span>', esc_url( $url ), $user_data->display_name ); |
460 | 460 | } // End If Statement |
461 | 461 | if ( isset( $_GET['course_id'] ) ) { |
@@ -1,14 +1,14 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Class Sensei_Storefront |
|
4 | - * |
|
5 | - * Responsible for wrapping Storefront theme Sensei content |
|
6 | - * with the correct markup |
|
7 | - * |
|
8 | - * @package Views |
|
9 | - * @subpackage Theme-Integration |
|
10 | - * @author Automattic |
|
11 | - * |
|
12 | - * @since 1.9.0 |
|
3 | + * Class Sensei_Storefront |
|
4 | + * |
|
5 | + * Responsible for wrapping Storefront theme Sensei content |
|
6 | + * with the correct markup |
|
7 | + * |
|
8 | + * @package Views |
|
9 | + * @subpackage Theme-Integration |
|
10 | + * @author Automattic |
|
11 | + * |
|
12 | + * @since 1.9.0 |
|
13 | 13 | */ |
14 | 14 | Class Sensei_Storefront extends Sensei__S { } |