LLMS_Question::get_correct_option_key()

Get the key of the correct option


Description Description


Return Return

(int|null)


Top ↑

Source Source

File: includes/models/model.llms.question.php

	public function get_correct_option_key() {
		$options = $this->get_options();
		foreach ( $options as $key => $option ) {
			if ( $option['correct_option'] ) {
				return $key;
			}
		}
		return null;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.9.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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





Permalink: