LLMS_Notification_View_Quiz_Failed
Notification View: Quiz Failed
Source Source
File: includes/notifications/views/class.llms.notification.view.quiz.failed.php
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | class LLMS_Notification_View_Quiz_Failed extends LLMS_Abstract_Notification_View_Quiz_Completion { /** * Notification Trigger ID * * @var string */ public $trigger_id = 'quiz_failed' ; /** * Setup body content for output * * @return string * @since 3.8.0 * @version 3.24.0 */ protected function set_body() { if ( 'email' === $this ->notification->get( 'type' ) ) { return $this ->set_body_email(); } $content = sprintf( __( 'You failed %s!' , 'lifterlms' ), '{{QUIZ_TITLE}}' ); $content .= "\r\n\r\n{{GRADE_BAR}}" ; return $content ; } /** * Setup notification icon for output * * @return string * @since 3.8.0 * @version 3.8.0 */ protected function set_icon() { return $this ->get_icon_default( 'negative' ); } /** * Setup notification subject for output * * @return string * @since 3.8.0 * @version 3.8.0 */ protected function set_subject() { return sprintf( __( '%1$s failed %2$s' , 'lifterlms' ), '{{STUDENT_NAME}}' , '{{QUIZ_TITLE}}' ); } /** * Setup notification title for output * * @return string * @since 3.8.0 * @version 3.8.0 */ protected function set_title() { return sprintf( __( '%s failed a quiz' , 'lifterlms' ), '{{STUDENT_NAME}}' ); } } |
Expand full source code Collapse full source code View on GitHub
Methods Methods
- set_body — Setup body content for output
- set_icon — Setup notification icon for output
- set_subject — Setup notification subject for output
- set_title — Setup notification title for output
Changelog Changelog
Version | Description |
---|---|
3.8.0 | |
3.24.0 | Introduced. |