public/wordpress/wp-content/plugins/wp-courseware/includes/legacy/classes/export.php
/**
		 * Export custom feedback messages for a specific quiz.
		 */
Export custom feedback messages for a specific quiz.
Export custom feedback messages for a specific quiz .
public function export_content_handleQuizzes_customFeedbackMessages( $quizObj, $feedbackParentPath ) {
			$xml          = false;
			$feedbackPath = $feedbackParentPath . '/custom_feedback_msgs';
			global $fieldsToProcess_quiz_custom_feedback;
			$messageList = WPCW_quizzes_feedback_getFeedbackMessagesForQuiz( $quizObj->quiz_id );
			if ( ! empty( $messageList ) ) {
				$xml .= $this->export_startBlock( $feedbackPath, 'custom_feedback_msgs' );
				foreach ( $messageList as $singleMessage ) {
					$tagDetails                        = WPCW_questions_tags_getTagDetails( $singleMessage->qfeedback_tag_id );
					$singleMessage->qfeedback_tag_name = $tagDetails->question_tag_name;
					$xml .= $this->export_objectToXML( 'custom_feedback_msg', false, $singleMessage, $fieldsToProcess_quiz_custom_feedback, $feedbackPath . '/', '/custom_feedback_msg' );
				}
				$xml .= $this->export_endBlock( $feedbackPath, 'custom_feedback_msgs' );
			}
			return $xml;
		}
public function export_content_handleQuizzes_customFeedbackMessages ( $ quizObj , $ feedbackParentPath ) { $ xml = false ; $ feedbackPath = $ feedbackParentPath . '/custom_feedback_msgs' ; global $ fieldsToProcess_quiz_custom_feedback ; $ messageList = WPCW_quizzes_feedback_getFeedbackMessagesForQuiz ( $ quizObj -> quiz_id ) ; if ( ! empty ( $ messageList ) ) { $ xml .= $ this -> export_startBlock ( $ feedbackPath , 'custom_feedback_msgs' ) ; foreach ( $ messageList as $ singleMessage ) { $ tagDetails = WPCW_questions_tags_getTagDetails ( $ singleMessage -> qfeedback_tag_id ) ; $ singleMessage -> qfeedback_tag_name = $ tagDetails -> question_tag_name ; $ xml .= $ this -> export_objectToXML ( 'custom_feedback_msg' , false , $ singleMessage , $ fieldsToProcess_quiz_custom_feedback , $ feedbackPath . '/' , '/custom_feedback_msg' ) ; } $ xml .= $ this -> export_endBlock ( $ feedbackPath , 'custom_feedback_msgs' ) ; } return $ xml ; }
Export custom feedback messages for a specific quiz.
Export custom feedback messages for a specific quiz .
// Check for messages and render in the XML // Start msgs block // Show each single message // Add the name of the tag rather than the ID, so that this can be matched // up later on import. // End msgs block