/*------------------------------------------------------------------------------
 * Module: klquizcfg.js  Version 1.0
 * K&L Quiz 2.0 Configuration File
 * Copyright (c) 2003-2004, K&L Design Productions, All Rights Reserved.
 *----------------------------------------------------------------------------*/
 
/*---------------------- IMPORTANT NOTICE TO WEB MASTER ------------------------
 * THE FOLLOWING COMMENTS ARE PROVIDED AS A GUIDANCE TO MAKING MODIFICAIONS TO
 * THIS FILE AND CAN BE DELETED PRIOR TO PUBLISHING IT
 *----------------------------------------------------------------------------*/
  
/*------------------------------------------------------------------------------
 * This file contains definition of the klQuiz configuration object. It provides
 * web master with ability to customize the textual elements of klQuiz, such as 
 * action buttons, transition screens, prompts, statistics; choose statistics
 * presented to users at different quiz stages; and affect the flow of the quiz 
 * by enabling/disabling transition screen.
 * 
 * Configuration object consists of:
 *  1. quizElements object that contains definitions of the IDs of HTML elements
 *     designated for klQuiz to present name, questions, answers, controls and 
 *     statstics
 *  2. quizNextAction object that contains strings for the quiz "Next Action" 
 *     button
 *  3. quizReset string that contains text for the quiz "Reset" button
 *  4. promptSelectAnswer string contains text for the prompt shown when a user
 *     attempts to submit an anwser without selecting one of the answer choices
 *  5. quizStatisticsString object that contains string for presenting quiz 
 *     statistics
 *  6. defaultResults object that contains strings displayed in the question and
 *     answers areas for default quiz results presentation
 *  7. transitionScreens object that contains text and style data for quiz 
 *     transition screens
 *
 * Additional information about each of the configuration object elements is
 * given below 
 *----------------------------------------------------------------------------*/
 
/* By default, the klQuiz configuration object is assigned to klQuizConfig
   variable. There can be more than one configuration objects assigned to 
   different variables. The name of the variable that contains klQuiz 
   configuration object is passed to the klQuiz with initialization function:
       klq = new klQuiz(klQuizConfig);
   or after quiz initialization using loadCfg() method:
       klq.loadCfg(klQuizConfig);
   This allows web masters to change the quiz configuration on the fly. Possible
   application is a multilingual support where a page contains a language 
   selector and different quiz configuration is loaded based on the selection.     
 */
var klQuizConfig = {
    /* Definitions of HTML element IDs designated for klQuiz script data
	   presentation. There is no need to change these values when the provided 
	   klQuiz HTML template is used. */   
    quizElements: {
	    name:    'klQuizName',    // ID of the HTML block element used for the quiz name area    
        question:'klQuizQuestion',// ID of the HTML block element used for the quiz question area
        answers: 'klQuizAnswers', // ID of the HTML block element used for the quiz answers area 
        controls:'klQuizControls',// ID of the HTML block element used for the quiz controls area
        stats:   'klQuizStats'},  // ID of the HTML block element used for the quiz statistics string
    /* CSS class names that contain style defintions for K&L Quiz Question Area during quiz 
	   flow, except transition screens (those are defined later) */
	questionAreaStyles: {
	    question: 'klQuizQAquestion',     // CSS class name applied during question presentation
	    explanation: 'klQuizQAexplanation',  // CSS class name applied during answer presentation
	    review: 'klQuizQAreview',       // CSS class name applied during quiz review
		repeat: 'klQuizQArepeat'},      // CSS class name applied during the repeat of wrong questions
	/* CSS class names that contain style definitions for K&L Quiz Answer Area during quiz
	   flow, except transition screens. Individual properties are the same as for 
	   questionAreaStyles defined above */
	answersAreaStyles: {
	    question: 'klQuizAAquestion',
		explanation: 'klQuizAAexplanation',
		review: 'klQuizAAreview',
		repeat: 'klQuizAArepeat'},
				  
    /* K&L Quiz "Next Action" Button Text Strings */
    quizNextAction: {  
        startQuiz:'Start Quiz',       // Prompt user to start quiz
	    selectAnswer:'Select Answer', // Prompt user to select answer
	    submitAnswer:'Submit Answer', // Prompt user to submit answer
	    nextQuestion: 'Next Question',// Prompt user to the next question
	    viewResults: 'View Results',  // Prompt user to proceed to results screen
	    reviewQuiz: 'Review Answers', // Prompt user to review the answers
	    reviewNext: 'Review Next',    // Prompt user to review the next question
	    toWrongRepeat: 'Continue',    // Prompt user to proceed to "Repeat Wrong Answers" screen
		startWrongRepeat: 'First Wrong Question', // Prompt user to start answering wrong questions
		nextWrongQuestion: 'Next Wrong Question', // Prompt user to proceed to the next wrong question
		toQuizEnd: 'Continue',        // Prompt user to proceed to "Quiz End" screen
        restartQuiz: 'Start Over'},   // Prompt user to restart the quiz		                  
	
	/* K*L Quiz "Reset" button text. 
	   To prevent creation of the "Reset" button set to null:
	       quizReset: null,
	*/
    quizReset: 'Reset Quiz', 
	
	/* K&L Quiz "Select Answer" message text.
	   To prevent creation of the prompt, set to null:
	       promptSelectAnswer: null,
	*/
    promptSelectAnswer: 'Please select an answer', 
	
	/* K&L Quiz Statistics String Text. The statistics strings contained in
	   this object are displayed in the K&L Quiz statistics area at different
	   stages of the quiz.
	   The following blocks are substituted with span elements containing 
	   the corresponding value. The <span> element IDs allow for individual 
	   styling.
	       [[QNUM]]   - current question number (element ID: klQStatQNUM)
           [[QTOTAL]] -	total number of questions (element ID: klQStatQTOTAL)
           [[QCORRECT]] - number of correctly answered questions (element ID: klQStatQCORRECT)
		   [[PERCENTCORRECT]] - percent of correctly answered questions (element ID: klQStatPERCENTCORRECT)
		   [[SCORE]] - quiz score (element ID: klQStatSCORE)
		   
	   [[SPACER]] block is replaces with a <span> element with class "spacer". It provides a
	   mechanism to add spacing between elements of the statistics string.  
	   [[NEWLINE]] block separates paragraphs of the stats string.
    */		   
	quizStatisticsString: {
	    // Statistics string that is displayed while user answers questions in 
		// "Grade Questions Upon Submission" mode
		gradeUponSubmission: 'Question: [[QNUM]]/[[QTOTAL]][[SPACER]]Correct Answers: [[QCORRECT]][[SPACER]]Percent Correct: [[PERCENTCORRECT]][[SPACER]]Quiz Score: [[SCORE]]',
		
		// Statistics string that is displayed while user answers questions in
        // "Grade Quiz Upon Completion" mode		
		gradeUponCompletion: 'Question: [[QNUM]]/[[QTOTAL]]',
		
		// Statistics string that is displayed upon quiz completion or when quiz 
		// results are being presented
		gradeQuiz: 'Total Questions: [[QTOTAL]][[SPACER]]Correct Answers: [[QCORRECT]][[SPACER]]Percent Correct: [[PERCENTCORRECT]][[SPACER]]Quiz Score: [[SCORE]]',
		
		// Statistics string that is displayed during quiz review
		reviewQuiz: 'Reviewing Question: [[QNUM]]/[[QTOTAL]][[SPACER]]Correct Answers: [[QCORRECT]][[SPACER]]Percent Correct: [[PERCENTCORRECT]][[SPACER]]Quiz Score: [[SCORE]]',
		
		// Statistics string that is displayed during the wrongRepeat transition screen
		wrongRepeatPrompt: 'Questions: [[QTOTAL]][[SPACER]]Correct Answers: [[QCORRECT]][[SPACER]]Percent Correct: [[PERCENTCORRECT]][[SPACER]]Quiz Score: [[SCORE]]',

		// Statistics string that is displayed when wrong questions are being answered
		// after the quiz was completed
		wrongRepeat: 'Repeating Question: [[QNUM]]/[[QTOTAL]][[SPACER]]Correct Answers: [[QCORRECT]][[SPACER]]Percent Correct: [[PERCENTCORRECT]][[SPACER]]Quiz Score: [[SCORE]]',
		
	    // Statistics string that is displayed at the end of the quiz
		quizEnd: 'Total Questions: [[QTOTAL]][[SPACER]]Correct Answers: [[QCORRECT]][[SPACER]]Percent Correct: [[PERCENTCORRECT]][[SPACER]]Quiz Score: [[SCORE]]'},
						  
	/* K&L Quiz Default Results Screen. The text contained in this object is
	   displayed in quiz question and answers areas when the quiz results are
	   set to default. 
	   Both the defaultResults texts and the transitionScreens text (nect object)
	   can contain the following pseudo-codes that are substituted by the script 
	   before being displayed:
           [[NEWLINE]]
               Breaks text into paragraphs.
           [[QTOTAL]]
               Replaced with the total number of questions in the quiz.
           [[QCORRECT]]
               Replaced with the number of questions answered correctly.
           [[PERCENTCORRECT]]
               Replaced with the percent of questions answered correctly.
           [[SCORE]]
               Replaced with the quiz score.
           [[SPAN=className]]Span element content[[/SPAN]]
               Used to encapsulate inline content within a span element with 
			   class attribute set to className. This feature can be used for
			   custom styling of the results text. [[NEWLINE]] pseudo-code is
			   not allowed within the [[SPAN]] pseudo-code.
           [[URL=http://www.somesite.com/page.html]]Link Text[[/URL]]
               Creates a link to a resource within the results text. Can be 
			   used to direct users to further pages depending on results. 
     */		   
	defaultResults: {
	    // Text displayed in the question area of the quiz. Can be an empty string
		questionAreaText: 'Thank You for Taking This Quiz',
		// CSS class name that defines styles for question area when results are displayed 
		questionAreaStyle: 'klQuizResultsQA',
		// Text displayed in the answers area of the quiz. Can be an empty string
		answersAreaText: 'You answered [[QCORRECT]] out of [[QTOTAL]] questions correctly ([[PERCENTCORRECT]]).[[NEWLINE]]You quiz score is [[SCORE]].',
        // CSS class name that defines styles for answers area when results are displayed
        answersAreaStyle: 'klQuizResultsAA'},
						  
    /* K&L Quiz Transition Screens.
	   The transition screens are strings of information displayed in quiz
	   question and answers areas and can be used to prompt user about upcoming
	   quiz stages where the "Next Action" button prompt may not be sufficient.
	   Each transition screen object consists of questionArea and answersArea
	   object with text and style properties that are set to strings with 
	   text that will be displayed in that area and CSS class name that will
	   be applied to that area respectively.
	 */
	transitionScreens: {
	    /* startQuiz contains data about the transition screen shown at the 
		   beginning of the quiz when the "Quiz Start" option is set to 
		   "Manual". The startQuiz can be set to null:
		       startQuiz: null,
			   reviewQuiz: ...
			to bypass this transition quiz, which will result in the same 
			behaviour as if the "Quiz Start" option was set to "Automatic"
		 */
	    startQuiz:  { 
		    questionArea: {
			    text: 'Start Quiz',
		        style:'klQuizStartQA'},						  
		    answersArea:  {
			    text: 'Start quiz by pressing START QUIZ button below. You will be using the same button to advance through the quiz. The button text will represent the action.',
		        style:'klQuizStartAA'}},
		
		/* reviewQuiz contains data about the transition screen shown in the
		   "Grade and review all questions after the quiz is complete" quiz 
		   flow mode when quiz results are not present. Set to null to skip
		   this transition screen:
		       reviewQuiz: null,
			   wrongRepeat: ... 
		 */
		reviewQuiz: {
		    questionArea: {
			    text: 'Proceed to Quiz Review',
		        style:'klQuizReviewQA'},
			answersArea:  {
			    text: 'Now you will be given an opportunity to go over your answers and learn which ones you got right.',
		        style:'klQuizReviewAA'}},
		
		/* wrongRepeat contains data about the transition screen shown before
		   repeating wrong answers in the quiz "Continue with wrong answers at 
		   the end of the quiz" flow mode. Set to null to skip this transition
		   screen:
		       wrongRepeat: null,
			   endQuiz: ...
		 */
		wrongRepeat:{
		    questionArea: {
			    text: 'Repeat Questions That Were Answered Wrong',
		        style:'klQuizWrongRepeatQA'},
			answersArea:  {
			    text: 'Now you will be given another try at questions that you got wrong. You can continue answering them until all questions are answered right or you can reset quiz at any time by clicking the RESET QUIZ button.',
		        style:'klQuizWrongRepeatAA'}},
		
		/* endQuiz contains data about the transition screen shown at the end 
           of the quiz. Set to null to skip this transition screen:
               endQuiz: null}}},
         */
        endQuiz: {
		    questionArea: {
			    text: 'End of Quiz.',
		        style:'klQuizEndQA'},
			answersArea:  {
			    text: 'Thank you for taking the quiz.',
		        style:'klQuizEndAA'}}},
    
	/* K&L Quiz result reporting.
	   The object contains two strings with quiz reporting instructions. 
	   Each reporting instruction is the URL of the server side script with query string
	   that contains quiz statistics data. The URL should either contain the absolute URL
	   of URL relative to the HTML page containing the quiz script.
	   The following pseudo-codes will be replaced by the script with actual values:
	       [[QUIZNAME]] - name of the quiz 
		   [[QTOTAL]] - total number of questions in the quiz.
           [[QCORRECT]] - number of questions answered correctly.
           [[PERCENTCORRECT]] - percent of questions answered correctly.
           [[SCORE]] - quiz score.
           [[FORM:form_name-element_name]] - this allows webmaster to pass additional 
		         information to the server side script. Such information can be placed within
				 HTML document containing the quiz using hidden form values. The quiz script
				 will replace this pseudo-code with the value of the element element_name in 
				 a form form_name:
				 <form name="form_name">
				 <input type="hidden" name="element_name" value="data" />
				 </form> 
	
	*/
    reportResults: {					   
        gradeQuiz: 'klquizverifyresults.php?when=GradeQuiz&quizName=[[QUIZNAME]]&questions=[[QTOTAL]]&correct=[[QCORRECT]]&percent=[[PERCENTCORRECT]]&score=[[SCORE]]&formvalue1=[[FORM:testData-shortInput]]&formvalue2=[[FORM:testData-longInput]]',
		endQuiz: 'klquizverifyresults.php?when=EndQuiz&quizName=[[QUIZNAME]]&questions=[[QTOTAL]]&correct=[[QCORRECT]]&percent=[[PERCENTCORRECT]]&score=[[SCORE]]'         					   
		},
	notify: null};
                       
/*File End*/

