 <link href="<?php echo base_url('css/select2.min.css');?>" rel="stylesheet" />
<script src="<?php echo base_url('js/select2.min.js');?>"></script>
<div class="container">

   
 <h3><?php echo $title;?></h3>
   
 

  <div class="row">
     <form method="post" action="<?php echo site_url('quiz/insert_quiz/');?>">
	
<div class="col-md-8">
<br> 
 <div class="login-panel panel panel-default">
		<div class="panel-body"> 
	
	
	
			<?php 
		if($this->session->flashdata('message')){
			echo $this->session->flashdata('message');	
		}
		?>	
		
		
		 			<div class="form-group">	 
					<label for="inputEmail" class="sr-only"><?php echo $this->lang->line('quiz_name');?></label> 
					<input type="text"  name="quiz_name"  class="form-control" placeholder="<?php echo $this->lang->line('quiz_name');?>"  required autofocus>
			</div>
				<div class="form-group">	 
					<label for="inputEmail"  ><?php echo $this->lang->line('description');?></label> 
					<textarea   name="description"  class="form-control tinymce_textarea" ></textarea>
			</div>
			
			<a href="#" data-toggle="collapse" data-target="#advance_options"><u><?php echo $this->lang->line('advance_options');?></u></a>
 
			<div id="advance_options" class="collapse">
			
			<div class="form-group">	 
					<label for="inputEmail"  ><?php echo $this->lang->line('start_date');?></label> 
					<input type="text" name="start_date"  value="<?php echo date('Y-m-d H:i:s',time());?>" class="form-control" placeholder="<?php echo $this->lang->line('start_date');?>"   required >
			</div>
				<div class="form-group">	 
					<label for="inputEmail"  ><?php echo $this->lang->line('end_date');?></label> 
					<input type="text" name="end_date"  value="<?php echo date('Y-m-d H:i:s',(time()+(60*60*24*365)));?>" class="form-control" placeholder="<?php echo $this->lang->line('end_date');?>"   required >
			</div>
				<div class="form-group">	 
					<label for="inputEmail"  ><?php echo $this->lang->line('duration');?></label> 
					<input type="text" name="duration"  value="10" class="form-control" placeholder="<?php echo $this->lang->line('duration');?>"  required  >
			</div>
				<div class="form-group">	 
					<label for="inputEmail"  ><?php echo $this->lang->line('maximum_attempts');?></label> 
					<input type="text" name="maximum_attempts"  value="10" class="form-control" placeholder="<?php echo $this->lang->line('maximum_attempts');?>"   required >
			</div>
				<div class="form-group">	 
					<label for="inputEmail"  ><?php echo $this->lang->line('pass_percentage');?></label> 
					<input type="text" name="pass_percentage" value="50" class="form-control" placeholder="<?php echo $this->lang->line('pass_percentage');?>"   required >
			</div>
				<div class="form-group">	 
					<label for="inputEmail"  >Marks Per Question</label> 
					<input type="text" name="correct_score"  value="1" class="form-control"    required >
			</div>
				<div class="form-group">	 
					<label for="inputEmail"  ></label> 
					<input type="hidden" name="incorrect_score"  value="0" class="form-control"   required  >
			</div>
				<div class="form-group">	 
					<label for="inputEmail"  ></label> 
					<input type="hidden" name="ip_address"  value="" class="form-control"    >
			</div>
				<div class="form-group">	 
					<label for="inputEmail" ></label> 
					<input type="hidden" name="view_answer"    value="1" checked > 
					<input type="hidden" name="view_answer"    value="0"  > 
			</div>
			<div class="form-group">	 
					
					<input type="hidden" name="with_login"    value="0"  > 
					<input type="hidden" name="with_login"    value="1" checked > 
			</div>
			
<div class="form-group">	 
					<label for="inputEmail" ></label> 
					<input type="hidden" name="show_chart_rank"    value="1" checked > 
					<input type="hidden" name="show_chart_rank"    value="0"  > 
</div>


			<?php 
			if($this->config->item('webcam')==true){
				?>
				<div class="form-group">	 
					<label for="inputEmail" ></label> 
					<input type="hidden" name="camera_req"    value="1"  > 
					<input type="hidden" name="camera_req"    value="0"  checked > 
			</div>
			<?php 
			}else{
				?>
				<input type="hidden" name="camera_req" value="0">
				
				<?php 
			}
			?>
<div class="form-group">	 
					<label   ></label>
					 <?php 
					foreach($group_list as $key => $val){
						?>
						
						 <input type="hidden" name="gids[]" value="<?php echo $val['gid'];?>" <?php if($key==0){ echo 'checked'; } ?> > 
						<?php 
					}
					?>
</div>


<div class="form-group">
  
					



<script type="text/javascript">
$(".js-example-basic-multiple").select2();
</script>
</div>

<div class="form-group">	 
					<label   ></label>
					<select name="quiz_template" style="display:none;">
					<?php 
					foreach($this->config->item('quiz_templates') as $qk=> $val){
					?>
					<option  value="<?php echo $val;?>"><?php echo $val;?></option>
					<?php 
					}
					?>
					 
					</select>
</div>

				<div class="form-group">	 
					<label for="inputEmail" ></label> 
					<input type="hidden" name="question_selection"    value="1"  > 
					<input type="hidden" name="question_selection"    value="0"  checked > 
			</div>
			
			
			
			
			<div class="form-group">	 
					<label for="inputEmail" ></label> 
					<input type="hidden" name="quiz_price" value="0" class="form-control" placeholder="<?php echo $this->lang->line('quiz_price');?>"  readonly=readonly  required >
		
			</div>

			
			
				<div class="form-group">	 
					<label for="inputEmail" ></label> 
					<input type="hidden" name="gen_certificate"    value="1"  > 
					<input type="hidden" name="gen_certificate"    value="0"  checked > 
			</div>

 </div><br><br>
 
	<button class="btn btn-success" type="submit"><?php echo $this->lang->line('next');?></button>
 
 <br><br><br>
 <?php echo $this->lang->line('open_quiz_warning');?>
		</div>
</div>
 
 
 
 
</div>
      </form>
</div>

 



</div>
