public/wordpress/wp-content/plugins/wp-courseware/includes/legacy/pages/page-question-pool.php
/**
 * Fetch the form for showing actions at the bottom of the page for the QuestionPool.
 *
 * @since 1.0.0
 */
Fetch the form for showing actions at the bottom of the page for the QuestionPool.
Fetch the form for showing actions at the bottom of the page for the QuestionPool .
function WPCW_showPage_QuestionPool_actionForm( $class = 'default' ) {
	$formWrapper_end = sprintf( '<div id="wpcw_tbl_question_pool_bulk_actions" class="%s">', $class );
	$formWrapper_end .= sprintf( '<div id="wpcw_bulk_action_message_no_questions" class="wpcw_msg_error">%s</div>', __( 'Please select <b>at least 1 question</b> before continuing...', 'wp-courseware' ) );
	$formWrapper_end .= sprintf( '<div id="wpcw_bulk_action_message_no_tag_first" class="wpcw_msg_error">%s</div>', __( 'Please select the <b>first tag</b> before continuing...', 'wp-courseware' ) );
	$formWrapper_end .= sprintf( '<div id="wpcw_bulk_action_message_no_tag_second" class="wpcw_msg_error">%s</div>', __( 'Please select the <b>second tag</b> before continuing...', 'wp-courseware' ) );
	$formWrapper_end .= sprintf( '<label>%s</label>', __( 'Tag actions for selected questions?', 'wp-courseware' ) );
	$formWrapper_end .= sprintf( WPCW_forms_createDropdown( 'wpcw_bulk_action_actions', array(
		''            => __( '--- Select a tag action ---', 'wp-courseware' ),
		'add_tag'     => __( 'Add tag to selected questions', 'wp-courseware' ),
		'remove_tag'  => __( 'Remove tag from selected questions', 'wp-courseware' ),
		'replace_tag' => __( 'Replace all instances of tag', 'wp-courseware' ),
	), false, 'wpcw_tbl_question_pool_bulk_actions_chooser', false ) );
	$formWrapper_end .= sprintf( '<label class="wpcw_bulk_action_label wpcw_bulk_action_add_tag">%s:</label>', __( 'Add Tag', 'wp-courseware' ) );
	$formWrapper_end .= sprintf( '<label class="wpcw_bulk_action_label wpcw_bulk_action_remove_tag">%s:</label>', __( 'Remove Tag', 'wp-courseware' ) );
	$formWrapper_end .= sprintf( '<label class="wpcw_bulk_action_label wpcw_bulk_action_replace_tag">%s:</label>', __( 'Replace Tag', 'wp-courseware' ) );
	$formWrapper_end .= WPCW_questions_tags_getTagDropdown( __( 'Select a tag', 'wp-courseware' ),
		'wpcw_bulk_action_select_tag_a',    
		WPCW_arrays_getValue( $_POST, 'wpcw_bulk_action_select_tag_a' ),
		'wpcw_bulk_action_select_tag_a wpcw_bulk_action_select_tag wpcw_bulk_action_add_tag wpcw_bulk_action_remove_tag wpcw_bulk_action_replace_tag' 
	);
	$formWrapper_end .= sprintf( '<label class="wpcw_bulk_action_label wpcw_bulk_action_replace_tag">%s:</label>', __( 'With', 'wp-courseware' ) );
	$formWrapper_end .= WPCW_questions_tags_getTagDropdown( __( 'Select a tag', 'wp-courseware' ),
		'wpcw_bulk_action_select_tag_b',    
		WPCW_arrays_getValue( $_POST, 'wpcw_bulk_action_select_tag_b' ),
		'wpcw_bulk_action_select_tag_b wpcw_bulk_action_select_tag wpcw_bulk_action_replace_tag'
	);
	$formWrapper_end .= sprintf( '<input type="submit" class="button-primary" value="%s">', __( 'Update Questions', 'wp-courseware' ) );
	$formWrapper_end .= '</div>';
	return $formWrapper_end;
}
function WPCW_showPage_QuestionPool_actionForm ( $ class = 'default' ) { $ formWrapper_end = sprintf ( '<div id="wpcw_tbl_question_pool_bulk_actions" class="%s">' , $ class ) ; $ formWrapper_end .= sprintf ( '<div id="wpcw_bulk_action_message_no_questions" class="wpcw_msg_error">%s</div>' , __ ( 'Please select <b>at least 1 question</b> before continuing...' , 'wp-courseware' ) ) ; $ formWrapper_end .= sprintf ( '<div id="wpcw_bulk_action_message_no_tag_first" class="wpcw_msg_error">%s</div>' , __ ( 'Please select the <b>first tag</b> before continuing...' , 'wp-courseware' ) ) ; $ formWrapper_end .= sprintf ( '<div id="wpcw_bulk_action_message_no_tag_second" class="wpcw_msg_error">%s</div>' , __ ( 'Please select the <b>second tag</b> before continuing...' , 'wp-courseware' ) ) ; $ formWrapper_end .= sprintf ( '<label>%s</label>' , __ ( 'Tag actions for selected questions?' , 'wp-courseware' ) ) ; $ formWrapper_end .= sprintf ( WPCW_forms_createDropdown ( 'wpcw_bulk_action_actions' , array ( '' => __ ( '--- Select a tag action ---' , 'wp-courseware' ) , 'add_tag' => __ ( 'Add tag to selected questions' , 'wp-courseware' ) , 'remove_tag' => __ ( 'Remove tag from selected questions' , 'wp-courseware' ) , 'replace_tag' => __ ( 'Replace all instances of tag' , 'wp-courseware' ) , ) , false , 'wpcw_tbl_question_pool_bulk_actions_chooser' , false ) ) ; $ formWrapper_end .= sprintf ( '<label class="wpcw_bulk_action_label wpcw_bulk_action_add_tag">%s:</label>' , __ ( 'Add Tag' , 'wp-courseware' ) ) ; $ formWrapper_end .= sprintf ( '<label class="wpcw_bulk_action_label wpcw_bulk_action_remove_tag">%s:</label>' , __ ( 'Remove Tag' , 'wp-courseware' ) ) ; $ formWrapper_end .= sprintf ( '<label class="wpcw_bulk_action_label wpcw_bulk_action_replace_tag">%s:</label>' , __ ( 'Replace Tag' , 'wp-courseware' ) ) ; $ formWrapper_end .= WPCW_questions_tags_getTagDropdown ( __ ( 'Select a tag' , 'wp-courseware' ) , 'wpcw_bulk_action_select_tag_a' , WPCW_arrays_getValue ( $ _POST , 'wpcw_bulk_action_select_tag_a' ) , 'wpcw_bulk_action_select_tag_a wpcw_bulk_action_select_tag wpcw_bulk_action_add_tag wpcw_bulk_action_remove_tag wpcw_bulk_action_replace_tag' ) ; $ formWrapper_end .= sprintf ( '<label class="wpcw_bulk_action_label wpcw_bulk_action_replace_tag">%s:</label>' , __ ( 'With' , 'wp-courseware' ) ) ; $ formWrapper_end .= WPCW_questions_tags_getTagDropdown ( __ ( 'Select a tag' , 'wp-courseware' ) , 'wpcw_bulk_action_select_tag_b' , WPCW_arrays_getValue ( $ _POST , 'wpcw_bulk_action_select_tag_b' ) , 'wpcw_bulk_action_select_tag_b wpcw_bulk_action_select_tag wpcw_bulk_action_replace_tag' ) ; $ formWrapper_end .= sprintf ( '<input type="submit" class="button-primary" value="%s">' , __ ( 'Update Questions' , 'wp-courseware' ) ) ; $ formWrapper_end .= '</div>' ; return $ formWrapper_end ; }
Fetch the form for showing actions at the bottom of the page for the QuestionPool.
Fetch the form for showing actions at the bottom of the page for the QuestionPool .
// Start wrapper for bulk actions // Error messages - if no questions or tags have been selected. // Label - saying these are actions // Dropdown of actions // #### The starting labels for all 3 actions. // #### All 3 - Selector for Add/Remove/Replace tag - first box // Name // CSS Classes // ### Just 'Replace Tag' - the second label // Just 'Replace Tag' - the second dropdown // Name // Button - submit // End wrapper for bulk actions