public/wordpress/wp-content/plugins/wp-courseware/includes/legacy/pages/page-quiz-modify.php
/**
 * Show the forms where the quiz custom feedback can be edited.
 *
 * @since 1.0.0
 *
 * @param integer $quizID the ID of the quiz to be edited.
 * @param object $page The associated page object for showing messages.
 */
Show the forms where the quiz custom feedback can be edited.

@param integer $quizID the ID of the quiz to be edited.
@param object $page The associated page object for showing messages.
Show the forms where the quiz custom feedback can be edited . @param integer $quizID the ID of the quiz to be edited . @param object $page The associated page object for showing messages .
function WPCW_showPage_customFeedback_showEditForms( $quizID, $page ) {
	printf( '<h3>%s</h3>', __( 'Custom Feedback Messages', 'wp-courseware' ) );
	printf( '<p>(%s) %s</p>',
		__( 'Optional', 'wp-courseware' ),
		__( 'If you are using question tags within your quiz, you can create custom messages to display upon submission of the quiz based on a student\'s results for a particular tag.', 'wp-courseware' )
	);
	printf( '<p><em>%s</em></p>',
		__( 'Please note: The custom feedback messages do not display any grade information. Use the settings under <b>Result Settings</b> tab, then <b>Show Answers</b> - to customise the display of results.', 'wp-courseware' )
	);
	printf( '<div class="wpcw_button_group"><a href="#" class="button-secondary" id="wpcw_quiz_custom_feedback_add_new">%s</a></div><br/>', __( 'Add New Feedback Message', 'wp-courseware' ) );
	printf( '<div id="wpcw_quiz_custom_feedback_add_new_count">0</div>' );
	printf( '<div id="wpcw_quiz_custom_feedback_deletion_holder"></div>' );
	printf( '<div id="wpcw_quiz_custom_feedback_holder">' );
	$feedbackList = WPCW_quizzes_feedback_getFeedbackMessagesForQuiz( $quizID );
	if ( ! empty( $feedbackList ) ) {
		foreach ( $feedbackList as $feedbackItem ) {
			$fb = new WPCW_quiz_CustomFeedback( $quizID, $feedbackItem );
			echo $fb->generate_editForm();
		}
	}
	printf( '</div>' );
	$fb = new WPCW_quiz_CustomFeedback( $quizID, false );
	echo $fb->generate_editForm();
}
function WPCW_showPage_customFeedback_showEditForms ( $ quizID , $ page ) { printf ( '<h3>%s</h3>' , __ ( 'Custom Feedback Messages' , 'wp-courseware' ) ) ; printf ( '<p>(%s) %s</p>' , __ ( 'Optional' , 'wp-courseware' ) , __ ( 'If you are using question tags within your quiz, you can create custom messages to display upon submission of the quiz based on a student\'s results for a particular tag.' , 'wp-courseware' ) ) ; printf ( '<p><em>%s</em></p>' , __ ( 'Please note: The custom feedback messages do not display any grade information. Use the settings under <b>Result Settings</b> tab, then <b>Show Answers</b> - to customise the display of results.' , 'wp-courseware' ) ) ; printf ( '<div class="wpcw_button_group"><a href="#" class="button-secondary" id="wpcw_quiz_custom_feedback_add_new">%s</a></div><br/>' , __ ( 'Add New Feedback Message' , 'wp-courseware' ) ) ; printf ( '<div id="wpcw_quiz_custom_feedback_add_new_count">0</div>' ) ; printf ( '<div id="wpcw_quiz_custom_feedback_deletion_holder"></div>' ) ; printf ( '<div id="wpcw_quiz_custom_feedback_holder">' ) ; $ feedbackList = WPCW_quizzes_feedback_getFeedbackMessagesForQuiz ( $ quizID ) ; if ( ! empty ( $ feedbackList ) ) { foreach ( $ feedbackList as $ feedbackItem ) { $ fb = new WPCW_quiz_CustomFeedback ( $ quizID , $ feedbackItem ) ; echo $ fb -> generate_editForm ( ) ; } } printf ( '</div>' ) ; $ fb = new WPCW_quiz_CustomFeedback ( $ quizID , false ) ; echo $ fb -> generate_editForm ( ) ; }
Show the forms where the quiz custom feedback can be edited.
Show the forms where the quiz custom feedback can be edited .
// 1 - Heading Messages // 2 - Button to add a new message // 3 - Keep track of new messages and deletions // 4 - Holder for new messages // 5 - Render the existing forms to modify the custom messages. // Show an edit form for each custom feedback item. // 6 - Close holder // 7 - Render a hidden form that's used for a placeholder.