Filter: sensei_pre_grade_question_auto

apply_filters( 'sensei_pre_grade_question_auto', $question_grade, $question_id, $question_type, $answer ) → {int|false}

Applying a grade before the auto grading takes place.

This filter is applied just before the question is auto graded. It fires in the context of a single question in the sensei_grade_question_auto function. It fires irrespective of the question type. If you return a value other than false the auto grade functionality will be ignored and your supplied grade will be user for this question.

Parameters:
Name Type Description
$question_grade int | false

Question grade, default false.

$question_id int

ID of the question being graded.

$question_type string

One of the Sensei question type.

$answer string

User supplied question answer.

Source:
Returns:

Filtered question grade.

Type
int | false