Skip to content

Instantly share code, notes, and snippets.

@woogist
Created June 8, 2015 05:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save woogist/463380123de1ca534f22 to your computer and use it in GitHub Desktop.
Save woogist/463380123de1ca534f22 to your computer and use it in GitHub Desktop.
Sensei: Allow teachers to grade all quizzes
add_filter('sensei_check_for_activity', 'sensei_allow_teachers_to_grade_all_quizzes', 5 );
function sensei_allow_teachers_to_grade_all_quizzes( $args ){
// remove the limit
remove_filter( 'sensei_check_for_activity' , array( Sensei()->teacher, 'filter_grading_activity_queries') );
// make sure to the return the expected arguments
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment