public/wordpress/wp-content/plugins/wp-courseware/includes/legacy/pages/page-quiz-modify.php
/**
 * Render the placeholder for the AJAX-loading
 * Thickbox that allows the user to add a
 * selection of random questions using a tag.
 *
 * @since 1.0.0
 */
Render the placeholder for the AJAX-loading
Thickbox that allows the user to add a
selection of random questions using a tag.


Render the placeholder for the AJAX - loading Thickbox that allows the user to add a selection of random questions using a tag .
function WPCW_showPage_thickbox_randomQuestion() {
	$defaultQuestions = 10;
	printf( '<div id="wpcw_tb_random_question" style="display: none">' );
	printf( '<div id="wpcw_tb_random_question_inner">' );
	printf( '<div class="wpcw_tb_option_wrap" id="wpcw_tb_option_wrap_whole_pool">' );
	printf( '<label class="wpcw_bold"><input type="radio" name="wpcw_tb_random_question_type" value="whole_pool" /> %s</label>',
		__( 'Randomly Select from Entire Quiz Pool', 'wp-courseware' )
	);
	printf( '<div class="wpcw_tb_description">%s</div>', __( 'If this option is selected, then number of questions you choose wil be randomly chosen from the entire quiz pool, regardless of question tag.', 'wp-courseware' ) );
		$questionCount = WPCW_questions_getQuestionCount();
	printf( '<div class="wpcw_tb_option_selection">' );
	printf( '<label>%s&nbsp;&nbsp;</label>', __( 'Show a total of ', 'wp-courseware' ) );
	printf( '<input type="text" class="wpcw_spinner" value="%d" data-wpcw-max="%d"/>', $defaultQuestions, $questionCount );
	printf( '<label>&nbsp;&nbsp;%s</label>', __( 'questions', 'wp-courseware' ) );
	printf( '<div class="wpcw_tb_random_question_count">%s <b>%d</b> %s</div>',
		__( 'There are a total of ', 'wp-courseware' ),
		$questionCount,
		__( 'questions available in the question pool.', 'wp-courseware' )
	);
	printf( '</div>' );
	printf( '</div>' ); 
	printf( '<div class="wpcw_tb_option_wrap wpcw_tb_option_wrap_active" id="wpcw_tb_option_wrap_question_tags">' );
	printf( '<label class="wpcw_bold"><input type="radio" name="wpcw_tb_random_question_type" value="question_tags" checked/> %s</label>',
		__( 'Randomly Select using Question Tags', 'wp-courseware' )
	);
	printf( '<div class="wpcw_tb_description">%s</div>', __( 'If this option is selected, then number of questions you choose for each tag will be randomly displayed.', 'wp-courseware' ) );
	printf( '<div class="wpcw_tb_option_selection">' );
	printf( '<div id="wpcw_tb_option_wrap_question_tags_list">' );
	WPCW_showPage_thickbox_randomQuestion_tagSelectionLine( 10, true );
	printf( '</div>' );
	printf( '<hr/>' );
	printf( '<a href="#" id="wpcw_tb_option_wrap_question_tags_add">%s</a>', __( '+ Add Another', 'wp-courseware' ) );
	printf( '</div>' );
	printf( '</div>' ); 
	printf( '<br/><div class="wpcw_button_group">' );
	printf( '<a href="#new_question" class="button-primary" id="wpcw_tb_random_question_inner_insert">%s</a>', __( 'Insert Random Question Selection', 'wp-courseware' ) );
	printf( '</div>' );
	printf( '</div>' ); 
	printf( '</div>' ); 
}
function WPCW_showPage_thickbox_randomQuestion ( ) { $ defaultQuestions = 10 ; printf ( '<div id="wpcw_tb_random_question" style="display: none">' ) ; printf ( '<div id="wpcw_tb_random_question_inner">' ) ; printf ( '<div class="wpcw_tb_option_wrap" id="wpcw_tb_option_wrap_whole_pool">' ) ; printf ( '<label class="wpcw_bold"><input type="radio" name="wpcw_tb_random_question_type" value="whole_pool" /> %s</label>' , __ ( 'Randomly Select from Entire Quiz Pool' , 'wp-courseware' ) ) ; printf ( '<div class="wpcw_tb_description">%s</div>' , __ ( 'If this option is selected, then number of questions you choose wil be randomly chosen from the entire quiz pool, regardless of question tag.' , 'wp-courseware' ) ) ; $ questionCount = WPCW_questions_getQuestionCount ( ) ; printf ( '<div class="wpcw_tb_option_selection">' ) ; printf ( '<label>%s&nbsp;&nbsp;</label>' , __ ( 'Show a total of ' , 'wp-courseware' ) ) ; printf ( '<input type="text" class="wpcw_spinner" value="%d" data-wpcw-max="%d"/>' , $ defaultQuestions , $ questionCount ) ; printf ( '<label>&nbsp;&nbsp;%s</label>' , __ ( 'questions' , 'wp-courseware' ) ) ; printf ( '<div class="wpcw_tb_random_question_count">%s <b>%d</b> %s</div>' , __ ( 'There are a total of ' , 'wp-courseware' ) , $ questionCount , __ ( 'questions available in the question pool.' , 'wp-courseware' ) ) ; printf ( '</div>' ) ; printf ( '</div>' ) ; printf ( '<div class="wpcw_tb_option_wrap wpcw_tb_option_wrap_active" id="wpcw_tb_option_wrap_question_tags">' ) ; printf ( '<label class="wpcw_bold"><input type="radio" name="wpcw_tb_random_question_type" value="question_tags" checked/> %s</label>' , __ ( 'Randomly Select using Question Tags' , 'wp-courseware' ) ) ; printf ( '<div class="wpcw_tb_description">%s</div>' , __ ( 'If this option is selected, then number of questions you choose for each tag will be randomly displayed.' , 'wp-courseware' ) ) ; printf ( '<div class="wpcw_tb_option_selection">' ) ; printf ( '<div id="wpcw_tb_option_wrap_question_tags_list">' ) ; WPCW_showPage_thickbox_randomQuestion_tagSelectionLine ( 10 , true ) ; printf ( '</div>' ) ; printf ( '<hr/>' ) ; printf ( '<a href="#" id="wpcw_tb_option_wrap_question_tags_add">%s</a>' , __ ( '+ Add Another' , 'wp-courseware' ) ) ; printf ( '</div>' ) ; printf ( '</div>' ) ; printf ( '<br/><div class="wpcw_button_group">' ) ; printf ( '<a href="#new_question" class="button-primary" id="wpcw_tb_random_question_inner_insert">%s</a>' , __ ( 'Insert Random Question Selection' , 'wp-courseware' ) ) ; printf ( '</div>' ) ; printf ( '</div>' ) ; printf ( '</div>' ) ; }
Render the placeholder for the AJAX-loading
 Thickbox that allows the user to add a
 selection of random questions using a tag.
Render the placeholder for the AJAX - loading Thickbox that allows the user to add a selection of random questions using a tag .
// Choice A - Whole Quiz Pool // Label // How many questions are there?
 // Wraps the selection in a grey box // Shows how many questions are available. // .wpcw_tb_option_wrap // Choice B - Select using question tags... // Label // Wraps the selection in a grey box // List the main ones. // Create the add new line // .wpcw_tb_option_wrap // Insert button // #wpcw_tb_random_question_inner // #wpcw_tb_random_question