<form action="<?php echo $data['form_submit_url'];?>" method="post">



	<?php do_action('ulp_admin_before_quiz_special_settings');?>



	<div class="ulp-stuffbox">

		<h3 class="ulp-h3"><?php echo $data['post_title'] . __('- Special Settings', 'ulp');?></h3>

		<div class="inside">

			<div class="ulp-inside-item">

                	<div class="row">

                    	<div class="col-xs-6">

                        <h2><?php _e('Quiz Timeout', 'ulp');?></h2>

                        <p><?php _e('After a set amount of minutes, the quiz will end.', 'ulp');?></p>

                         <div class="input-group" style="  max-width: 400px;">

                         	<span class="input-group-addon" id="basic-addon1"><?php _e('Time', 'ulp');?></span>

                         	<input type="number" class="form-control" name="quiz_time" min="1" value="<?php echo $data['quiz_time'];?>" />

                            <div class="input-group-addon"> <?php _e('minutes', 'ulp');?></div>

                         </div>

                        </div>

                    </div>

             </div>

             <div class="ulp-line-break"></div>

             <div class="ulp-inside-item">

                	<div class="row">

                    	<div class="col-xs-6">

                        <h2><?php _e('Assessments', 'ulp');?></h2>

                        <p><?php _e('Determine if the grade will be percentage or point based. Here you can also establish the passing grade for the quiz and the number of reward points given to the user after passing the quiz', 'ulp');?></p>



                        <h4 style="margin-top:25px;"><?php _e('Grade based on', 'ulp')?></h4>

                        <div style="  max-width: 400px; margin-bottom:15px;">

                        	<select name="ulp_quiz_grade_type"  class="form-control m-bot15" onChange="ulpShowSelectorIf('#ulp_point_description', this.value, 'point');">

								<?php

                                    $values = array(

                                                        'percentage' => __('Percentage', 'ulp'),

                                                        'point' => __('Points', 'ulp')

                                    );

                                ?>

                                <?php foreach ($values as $k => $v):?>

                                    <?php $selected = ($data['ulp_quiz_grade_type']==$k) ? 'selected' : '';?>

                                    <option value="<?php echo $k;?>" <?php echo $selected;?> ><?php echo $v;?></option>

                                <?php endforeach;?>

                            </select>

														<div id="ulp_point_description"><?php

																_e('In order to give grade based on points, you must set a number of points for each of quiz questions.', 'ulp');

														?></div>

                        </div>



                        <h4><?php _e('Passing Grade', 'ulp')?></h4>

						<div class="input-group" style="  max-width: 400px;">

							<input type="number" class="form-control" value="<?php echo $data['ulp_quiz_grade_value'];?>" name="ulp_quiz_grade_value" min="0" />

                        </div>



						<h4 style="margin-top:25px;"><?php _e('Reward Points', 'ulp')?></h4>

                        <p><?php _e('Optional. Student can receive points if he completes the current Quiz', 'ulp');?></p>

						<div class="input-group" style="  max-width: 400px;">

							<input type="number" class="form-control" value="<?php echo $data['ulp_post_reward_points'];?>" min="0" name="ulp_post_reward_points" />

                            <div class="input-group-addon"><?php _e('points ', 'ulp');?></div>

                        </div>



                        </div>

                    </div>

             </div>

             <div class="ulp-line-break"></div>



             <div class="ulp-inside-item">

                	<div class="row">

                    	<div class="col-xs-6">

                        <h2><?php _e('Display options', 'ulp');?></h2>



                        <h4 style="margin-top:25px;"><?php _e('Hint Message', 'ulp')?></h4>

                        <p><?php _e('Show hint message for each question', 'ulp')?></p>

                        <div class="input-group" style="  max-width: 400px;">

                        	<label class="ulp_label_shiwtch" style="margin:10px 0 10px -10px;">

							   							 <?php $checked = ($data['ulp_quiz_show_hint']) ? 'checked' : '';?>

                               <input type="checkbox" class="ulp-switch" onClick="UltimateLearningPro.checkAndH(this, '#ulp_quiz_show_hint');" <?php echo $checked;?> />

                               <div class="switch" style="display:inline-block;"></div>

                           </label>

                           <input type="hidden" name="ulp_quiz_show_hint" value="<?php echo $data['ulp_quiz_show_hint'];?>" id="ulp_quiz_show_hint" />

                        </div>



                        <h4 style="margin-top:25px;"><?php _e('Explanation Message', 'ulp')?></h4>

                        <p><?php _e('Show explanation message for each question', 'ulp')?></p>

                        <div class="input-group" style="  max-width: 400px;">

                        	<label class="ulp_label_shiwtch" style="margin:10px 0 10px -10px;">

							   							 <?php $checked = ($data['ulp_quiz_show_explanation']) ? 'checked' : '';?>

                               <input type="checkbox" class="ulp-switch" onClick="UltimateLearningPro.checkAndH(this, '#ulp_quiz_show_explanation');" <?php echo $checked;?> />

                               <div class="switch" style="display:inline-block;"></div>

                           </label>

                           <input type="hidden" name="ulp_quiz_show_explanation" value="<?php echo $data['ulp_quiz_show_explanation'];?>" id="ulp_quiz_show_explanation" />

                        </div>



                        <h4 style="margin-top:25px;"><?php _e('Question Order', 'ulp')?></h4>

                        <p><?php _e('Show questions randomly every time', 'ulp')?></p>

                        <div class="input-group" style="  max-width: 400px;">

                          <label class="ulp_label_shiwtch" style="margin:10px 0 10px -10px;">

							 							 <?php $checked = ($data['ulp_quiz_display_questions_random']) ? 'checked' : '';?>

                             <input type="checkbox" class="ulp-switch" onClick="UltimateLearningPro.checkAndH(this, '#ulp_quiz_display_questions_random');" <?php echo $checked;?> />

                             <div class="switch" style="display:inline-block;"></div>

                         </label>

                         <input type="hidden" name="ulp_quiz_display_questions_random" value="<?php echo $data['ulp_quiz_display_questions_random'];?>" id="ulp_quiz_display_questions_random" />

                        </div>



                        <h4 style="margin-top:25px;"><?php _e('Answer Order', 'ulp')?></h4>

                        <p><?php _e('Multi choice answers appear in a random order every time', 'ulp')?></p>

                        <div class="input-group" style="  max-width: 400px;">

                          <label class="ulp_label_shiwtch" style="margin:10px 0 10px -10px;">

							 							 <?php $checked = ($data['ulp_quiz_display_answers_random']) ? 'checked' : '';?>

                             <input type="checkbox" class="ulp-switch" onClick="UltimateLearningPro.checkAndH(this, '#ulp_quiz_display_answers_random');" <?php echo $checked;?> />

                             <div class="switch" style="display:inline-block;"></div>

                         </label>

                         <input type="hidden" name="ulp_quiz_display_answers_random" value="<?php echo $data['ulp_quiz_display_answers_random'];?>" id="ulp_quiz_display_answers_random" />

                        </div>



                         <h4 style="margin-top:25px;"><?php _e("Previous Question button", 'ulp')?></h4>

                        <p><?php _e("Show previous question button (available only in default workflow)", 'ulp')?></p>

                        <div class="input-group" style="  max-width: 400px;">

                          <label class="ulp_label_shiwtch" style="margin:10px 0 10px -10px;">

							 							 <?php $checked = ($data['enable_back_button']) ? 'checked' : '';?>

                             <input type="checkbox" class="ulp-switch" onClick="UltimateLearningPro.checkAndH(this, '#enable_back_button');" <?php echo $checked;?> />

                             <div class="switch" style="display:inline-block;"></div>

                         </label>

                         <input type="hidden" name="enable_back_button" value="<?php echo $data['enable_back_button'];?>" id="enable_back_button" />



                        </div>





                        </div>

                    </div>

             </div>

             <div class="ulp-line-break"></div>



             <div class="ulp-inside-item">

                	<div class="row">

                    	<div class="col-xs-6">

                        <h2><?php _e('Additional Settings', 'ulp');?></h2>



                        <h4><?php _e("Quiz Workflow", 'ulp')?></h4>

                        <div style="  max-width: 400px;">

                        	<select name="quiz_workflow" class="form-control m-bot15">

								<?php

									$values = array(

														'default' => __('Default', 'ulp'),

														'result_message' => __('User can see correct/wrong message after each question', 'ulp')

									);

								?>

								<?php foreach ($values as $k => $v):?>

									<?php $selected = ($data['quiz_workflow']==$k) ? 'selected' : '';?>

									<option value="<?php echo $k;?>" <?php echo $selected;?> ><?php echo $v;?></option>

								<?php endforeach;?>

							</select>



                        </div>



                         <h4 style="margin-top:25px;"><?php _e("Retake Quiz", 'ulp')?></h4>

                         <p><?php _e('How many times a student can try to proceed the quiz', 'ulp')?></p>

                         <div class="input-group" style="  max-width: 400px;">

                            <span class="input-group-addon" id="basic-addon1"><?php _e('Max', 'ulp');?></span>

                         	<input type="number" class="form-control" name="retake_limit" min="1" value="<?php echo $data['retake_limit'];?>" />

                         </div>



                        </div>

                    </div>

             </div>

             <div class="ulp-line-break"></div>





			<?php do_action('ulp_admin_after_quiz_special_settings');?>





			<div class="ulp-inside-item" style="margin-top:40px;">

                        <div class="row">

                            <div class="col-xs-6">

							<input type="submit" name="submit" value="<?php _e('Save Changes', 'ulp');?>"  class="btn btn-primary pointer" />

							</div>

						</div>

             </div>



		</div>



	</div>



	<input type="hidden" name="post_id" value="<?php echo esc_sql($_GET ['id']);?>" />



</form>



<script>

jQuery(document).ready(function(){

	ulpShowSelectorIf('#ulp_point_description', '<?php echo $data['ulp_quiz_grade_type'];?>', 'point');

});

</script>

