LLMS_Notification_View_Quiz_Graded::set_merge_data( string $code )

Replace merge codes with actual values


Parameters Parameters

$code

(string) (Required) the merge code to ge merged data for


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/notifications/views/class.llms.notification.view.quiz.graded.php

				$course = $lesson->get_course();
				if ( $course ) {
					$code = $course->get( 'title' );
				} else {
					$code = '';
				}
				break;

			case '{{GRADE}}':
				$code = LLMS()->grades()->round( $attempt->get( 'grade' ) ) . '%';
				break;

			case '{{LESSON_TITLE}}':
				$code = $lesson->get( 'title' );
				break;

			case '{{QUIZ_TITLE}}':
				$code = get_the_title( $attempt->get( 'quiz_id' ) );
				break;

			case '{{REVIEW_URL}}':
				$code = $attempt->get_permalink();
				break;

			case '{{STATUS}}':
				$code = $attempt->l10n( 'status' );
				break;

			case '{{STUDENT_NAME}}':
				$code = $this->user->get_name();
				break;

		}// End switch().

		return $code;

	}

	/**
	 * Setup notification subject for output
	 *
	 * @since 3.24.0
	 *
	 * @return string
	 */
	protected function set_subject() {
		// Translators: %s = Quiz Title.
		return sprintf( __( 'Your quiz "%s" has been reviewed', 'lifterlms' ), '{{QUIZ_TITLE}}' );
	}

	/**


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.