Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Question_Types::get_types()

Retrieve all the default question types loaded by the LifterLMS core


Return Return

(array)


Top ↑

Source Source

File: includes/class.llms.question.types.php

	private static function get_types() {

		$upgrade_url = 'https://lifterlms.com/product/advanced-quizzes/?utm_source=LifterLMS%20Plugin&utm_medium=Quiz%20Builder%20Button&utm_campaign=Advanced%20Question%20Upsell&utm_content=3.16.0&utm_term=';

		return array(

			'choice'          => array(
				'choices' => array(),
				'group'   => array(
					'order' => 0,
					'name'  => __( 'Basic Questions', 'lifterlms' ),
				),
				'icon'    => 'check',
				'id'      => 'choice',
				'name'    => esc_html__( 'Multiple Choice', 'lifterlms' ),
			),

			'picture_choice'  => array(
				'choices' => array(
					'type' => 'image',
				),
				'group'   => array(
					'order' => 0,
					'name'  => __( 'Basic Questions', 'lifterlms' ),
				),
				'icon'    => 'picture-o',
				'id'      => 'picture_choice',
				'name'    => esc_html__( 'Picture Choice', 'lifterlms' ),
			),

			'true_false'      => array(
				'choices'         => array(
					'max'   => 2,
					'min'   => 2,
					'multi' => false,
				),
				'default_choices' => array(
					array(
						'choice'  => esc_html__( 'True', 'lifterlms' ),
						'correct' => true,
						'marker'  => 'A',
					),
					array(
						'choice' => esc_html__( 'False', 'lifterlms' ),
						'marker' => 'B',
					),
				),
				'group'           => array(
					'order' => 0,
					'name'  => __( 'Basic Questions', 'lifterlms' ),
				),
				'icon'            => 'toggle-on',
				'id'              => 'true_false',
				'name'            => esc_html__( 'True or False', 'lifterlms' ),
			),

			'content'         => array(
				'choices'        => false,
				'clarifications' => false,
				'icon'           => 'window-maximize',
				'id'             => 'content',
				'grading'        => false,
				'name'           => esc_html__( 'Content', 'lifterlms' ),
				'placeholder'    => esc_attr__( 'Enter your content title...', 'lifterlms' ),
				'points'         => false,
				'random_lock'    => true,
			),

			'existing'        => array(
				'choices'        => false,
				'clarifications' => false,
				'icon'           => 'file-text-o',
				'id'             => 'existing',
				'grading'        => false,
				'name'           => esc_html__( 'Add Existing Question', 'lifterlms' ),
				'placeholder'    => '',
				'points'         => false,
				'random_lock'    => true,
			),

			// 'group' => array(
			// 'choices' => false,
			// 'clarifications' => false,
			// 'group' => array(
			// 'order' => 0,
			// 'name' => __( 'Basic Questions', 'lifterlms' )
			// ),
			// 'icon' => 'sitemap',
			// 'id' => 'group',
			// 'grading' => false,
			// 'name' => esc_html__( 'Question Group', 'lifterlms' ),
			// 'placeholder' => esc_attr__( 'Enter your group title...', 'lifterlms' ),
			// ),

			'blank'           => array(
				'choices' => false,
				'group'   => array(
					'order' => 10,
					'name'  => __( 'Advanced Questions', 'lifterlms' ),
				),
				'icon'    => 'window-minimize',
				'id'      => 'blank',
				'name'    => esc_html__( 'Fill in the Blank', 'lifterlms' ),
				'upgrade' => $upgrade_url . 'blank',
			),

			'reorder'         => array(
				'choices' => false,
				'group'   => array(
					'order' => 10,
					'name'  => __( 'Advanced Questions', 'lifterlms' ),
				),
				'icon'    => 'sort-numeric-asc',
				'id'      => 'reorder',
				'name'    => esc_html__( 'Reorder Items', 'lifterlms' ),
				'upgrade' => $upgrade_url . 'reorder',
			),

			'picture_reorder' => array(
				'choices' => false,
				'group'   => array(
					'order' => 10,
					'name'  => __( 'Advanced Questions', 'lifterlms' ),
				),
				'icon'    => 'picture-o',
				'id'      => 'picture_reorder',
				'name'    => esc_html__( 'Reorder Pictures', 'lifterlms' ),
				'upgrade' => $upgrade_url . 'picture_reorder',
			),

			'short_answer'    => array(
				'choices' => false,
				'group'   => array(
					'order' => 10,
					'name'  => __( 'Advanced Questions', 'lifterlms' ),
				),
				'icon'    => 'align-left',
				'id'      => 'short_answer',
				'name'    => esc_html__( 'Short Answer', 'lifterlms' ),
				'upgrade' => $upgrade_url . 'short_answer',
			),

			'long_answer'     => array(
				'choices' => false,
				'group'   => array(
					'order' => 10,
					'name'  => __( 'Advanced Questions', 'lifterlms' ),
				),
				'icon'    => 'paragraph',
				'id'      => 'long_answer',
				'name'    => esc_html__( 'Long Answer', 'lifterlms' ),
				'upgrade' => $upgrade_url . 'long_answer',
			),

			'upload'          => array(
				'choices' => false,
				'group'   => array(
					'order' => 10,
					'name'  => __( 'Advanced Questions', 'lifterlms' ),
				),
				'icon'    => 'cloud-upload',
				'id'      => 'upload',
				'name'    => esc_html__( 'File Upload', 'lifterlms' ),
				'upgrade' => $upgrade_url . 'upload',
			),

			'code'            => array(
				'choices' => false,
				'group'   => array(
					'order' => 10,
					'name'  => __( 'Advanced Questions', 'lifterlms' ),
				),
				'icon'    => 'code',
				'id'      => 'code',
				'name'    => esc_html__( 'Code', 'lifterlms' ),
				'upgrade' => $upgrade_url . 'code',
			),

			'scale'           => array(
				'choices' => false,
				'group'   => array(
					'order' => 10,
					'name'  => __( 'Advanced Questions', 'lifterlms' ),
				),
				'icon'    => 'sliders',
				'id'      => 'scale',
				'name'    => esc_html__( 'Scale', 'lifterlms' ),
				'upgrade' => $upgrade_url . 'scale',
			),

		);

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.16.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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