learndash_update_quiz_statistics

learndash_update_quiz_statistics( int $quiz_id,  int $question_id,  array $updated_quiz_data,  WP_Post $essay,  array $users_quiz_data )

Updates the quiz statistics for the given quiz attempt.


Description #

Updates the score when the essay grading is adjusted, I ran this through manual SQL queries because WpProQuiz doesn’t offer an elegant way to grab a particular question and update it.


Parameters #

$quiz_id

(int) (Required) Quiz ID.

$question_id

(int) (Required) Question ID.

$updated_quiz_data

(array) (Required) Updated quiz statistics data.

$essay

(WP_Post) (Required) The WP_Post essay object.

$users_quiz_data

(array) (Required) User quiz data.


Source #

File: includes/quiz/ld-quiz-essays.php


Changelog #

Changelog
Version Description
2.2.0 Introduced.