LLMS_Notification_Controller_Quiz_Passed::send_test( string $type, array $data = array() )

Send a test notification to the currently logged in users Extending classes should redefine this in order to properly setup the controller with post_id and user_id data


Parameters Parameters

$type

(string) (Required) notification type [basic|email]

$data

(array) (Optional) array of test notification data as specified by $this->get_test_data()

Default value: array()


Top ↑

Return Return

(int|false)


Top ↑

Source Source

File: includes/notifications/controllers/class.llms.notification.controller.quiz.passed.php

192
193
194
195
196
197
198
199
200
201
202
203
204
205
public function send_test( $type, $data = array() ) {
 
    if ( empty( $data['attempt_id'] ) ) {
        return;
    }
 
    $attempt       = new LLMS_Quiz_Attempt( $data['attempt_id'] );
    $this->user_id = $attempt->get( 'student_id' );
    $this->post_id = $attempt->get( 'quiz_id' );
    $this->quiz    = llms_get_post( $attempt->get( 'quiz_id' ) );
    $this->course  = $this->quiz->get_course();
    return parent::send_test( $type );
 
}


Top ↑

Changelog Changelog

Changelog
Version Description
3.24.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.