Class Sensei_Teacher
Sensei Teacher class
All functionality pertaining to the teacher role.
public
|
|
public
|
|
protected
|
|
public
|
|
public
|
|
public
array
|
|
public
array
|
|
public static
|
#
update_course_modules_author( $course_id, $new_teacher_id )
Update all the course terms set(selected) on the given course. Moving course term ownership to the new author. Making sure the course terms are maintained. |
public
array
|
#
update_course_lessons_author( $course_id, $new_author )
Sensei_Teacher::update_course_lessons_author |
public
array
|
#
course_analysis_teacher_access_limit( $query )
Sensei_Teacher::course_analysis_teacher_access_limit |
public
boolean
|
|
public
object
|
#
list_table_counts( object $counts, string $type, string $perm )
Show correct post counts on list table for Sensei post types |
public
|
#
filter_queries( $query )
Filter the post queries to show only lesson /course and users that belong to the current logged teacher. |
public
array
|
#
filter_grading_activity_queries( array $comments )
Limit grading quizzes to only those within courses belonging to the current teacher . This excludes the admin user. |
public
array
|
#
limit_grading_totals( array $args )
Limit the grading screen totals to only show lessons in the course belonging to the currently logged in teacher. This only applies to the teacher role. |
public
WP_Query
|
#
add_courses_to_author_archive( WP_Query $query )
It ensures that the author archive shows course by the current user. |
public
boolean
|
#
teacher_course_assigned_notification( $teacher_id, $course_id )
Notify teacher when someone assigns a course to their account. |
public
boolean
|
#
notify_admin_teacher_course_creation( integer $new_status, $old_status, $post )
Email the admin when a teacher creates a new course |
public
array
|
#
limit_analysis_learners( array $args )
Limit the analysis view to only the users taking courses belong to this teacher |
public
mixed
|
#
allow_teacher_access_to_questions( $questions, $quiz_id )
Give teacher full admin access to the question post type in certain cases. |
public
mixed
|
#
give_access_to_all_questions( $wp_query )
Give the teacher role access to questions from the question bank |
public
array
|
|
public
|
|
public
array
|
#
get_teacher_courses( integer $teacher_id, boolean $return_ids_only = false )
Return only courses belonging to the given teacher. |
public
mixed
|
#
limit_edit_messages_query( $query )
Limit the message display to only those sent to the current teacher |
public
|
|
public
|
|
public
array
|
#
restrict_media_library( array $request = array() )
Only show current teacher's media in the media library |
public
array
|
#
restrict_media_library_modal( array $query = array() )
Only show current teacher's media in the media library modal on the course/lesson/quesion edit screen |
public
|
#
update_lesson_teacher( integer $lesson_id )
When saving the lesson, update the teacher if the lesson belongs to a course |
public
WP_Query
|
#
limit_teacher_edit_screen_post_types( $wp_query )
Sensei_Teacher::limit_teacher_edit_screen_post_types |
public
|
|
public
|
|
public
WP_Comment_Query
|
|
public static
boolean
|
|
public static
|
|
public static
|
protected
|
$teacher_role
$teacher_role |
|
public
|
$token
$token |