%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
<div class="main-wapper-inner">
<div class="top-menus">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<h3><?php echo $title;?></h3>
</div><!-- /input-group -->
</div>
</div><!-- /.col-lg-6 -->
</div><!-- /.row -->
<div class="home-inners">
<div class="container-fluid">
<div class="row">
<form method="post" action="<?php echo site_url('quiz/update_quiz/'.$quiz['quid']);?>">
<div class="col-md-12">
<div class="form-submit">
<?php
if($this->session->flashdata('message')){
echo $this->session->flashdata('message');
}
?>
<div class="form-group col-md-12">
<label for="inputEmail" >Quiz Name <span style="color:red;">*</span></label>
<input type="text" name="quiz_name" value="<?php echo $quiz['quiz_name'];?>" class="form-control" placeholder="<?php echo $this->lang->line('quiz_name');?>" required autofocus>
</div>
<div class="form-group col-md-12">
<label for="inputEmail" ><?php echo $this->lang->line('description');?></label>
<textarea name="description" class="form-control tinymce_textarea" ><?php echo $quiz['description'];?></textarea>
</div>
<div class="form-group col-md-6">
<label for="inputEmail" ><?php echo $this->lang->line('start_date');?> <span style="color:red;">*</span></label>
<input type="text" name="start_date" value="<?php echo date('Y-m-d H:i:s',$quiz['start_date']);?>" class="form-control" placeholder="<?php echo $this->lang->line('start_date');?>" required >
</div>
<div class="form-group col-md-6">
<label for="inputEmail" ><?php echo $this->lang->line('end_date');?> <span style="color:red;">*</span></label>
<input type="text" name="end_date" value="<?php echo date('Y-m-d H:i:s',$quiz['end_date']);?>" class="form-control" placeholder="<?php echo $this->lang->line('end_date');?>" required >
</div>
<div class="form-group col-md-6">
<label for="inputEmail" ><?php echo $this->lang->line('duration');?></label>
<input type="text" name="duration" value="<?php echo $quiz['duration'];?>" class="form-control" placeholder="<?php echo $this->lang->line('duration');?>" onkeyup="this.value=this.value.replace(/[^\d]/,'')" required >
</div>
<div class="form-group col-md-6">
<label for="inputEmail" ><?php echo $this->lang->line('maximum_attempts');?></label>
<input type="text" name="maximum_attempts" value="<?php echo $quiz['maximum_attempts'];?>" class="form-control" placeholder="<?php echo $this->lang->line('maximum_attempts');?>" onkeyup="this.value=this.value.replace(/[^\d]/,'')" required >
</div>
<div class="form-group col-md-6">
<label for="inputEmail" ><?php echo $this->lang->line('correct_score');?></label>
<input type="text" name="correct_score" value="<?php echo $quiz['correct_score'];?>" class="form-control" placeholder="<?php echo $this->lang->line('correct_score');?>" onkeyup="this.value=this.value.replace(/[^\d]/,'')" required >
</div>
<div class="form-group col-md-6">
<label for="inputEmail" ><?php echo $this->lang->line('incorrect_score');?></label>
<input type="text" name="incorrect_score" onkeyup="this.value=this.value.replace(/[^\d]/,'')" value="<?php echo $quiz['incorrect_score'];?>" class="form-control" placeholder="<?php echo $this->lang->line('incorrect_score');?>" required >
</div>
<div class="form-group col-md-6">
<label for="inputEmail" ><?php echo $this->lang->line('pass_percentage');?></label>
<input type="text" name="pass_percentage" value="<?php echo $quiz['pass_percentage'];?>" class="form-control" placeholder="<?php echo $this->lang->line('pass_percentage');?>" onkeyup="this.value=this.value.replace(/[^\d]/,'')" required >
</div>
<div class="form-group col-md-6">
<label for="inputEmail"><?php echo $this->lang->line('time_per_question');?></label> <br>
<input type="radio" name="time_per_question" value="1" <?php if($quiz['time_per_question']==1){ echo 'checked'; } ?> > <?php echo $this->lang->line('yes');?>
<input type="radio" name="time_per_question" value="0" <?php if($quiz['time_per_question']==0){ echo 'checked'; } ?> > <?php echo $this->lang->line('no');?>
</div>
<!--
<div class="form-group">
<label for="inputEmail" ><?php echo $this->lang->line('maximum_questions_each_subject');?></label>
<input type="text" name="maximum_eng_questions" class="form-control" placeholder="<?php echo $this->lang->line('maximum_questions_each_subject');?>" value="<?php echo $quiz['maximum_eng_questions'];?>" required >
</div>
-->
<!--<div class="form-group">
<label for="inputEmail" ><?php echo $this->lang->line('ip_address');?></label>
<input type="text" name="ip_address" value="<?php echo $quiz['ip_address'];?>" class="form-control" placeholder="<?php echo $this->lang->line('ip_address');?>" >
</div> -->
<div class="form-group col-md-6">
<label for="inputEmail" ><?php echo $this->lang->line('view_answer');?></label> <br>
<input type="radio" name="view_answer" value="1" <?php if($quiz['view_answer']==1){ echo 'checked'; } ?> > <?php echo $this->lang->line('yes');?>
<input type="radio" name="view_answer" value="0" <?php if($quiz['view_answer']==0){ echo 'checked'; } ?> > <?php echo $this->lang->line('no');?>
</div>
<div class="form-group col-md-6">
<label for="inputEmail"><?php echo $this->lang->line('total_ques');?></label>
<input type="text" name="maximum_questions" value="<?php echo $quiz['maximum_questions'];?>" class="form-control" placeholder="<?php echo $this->lang->line('total_ques');?>" onkeyup="this.value=this.value.replace(/[^\d]/,'')" required >
</div>
<div class="form-group col-md-6">
<label for="inputEmail" ><?php echo $this->lang->line('show_result');?></label> <br>
<input type="radio" name="show_result" value="1" <?php if($quiz['show_result']==1){ echo 'checked'; } ?> > <?php echo $this->lang->line('yes');?>
<input type="radio" name="show_result" value="0" <?php if($quiz['show_result']==0){ echo 'checked'; } ?> > <?php echo $this->lang->line('no');?>
</div>
<div class="form-group col-md-6">
<label for="inputEmail" ><?php echo $this->lang->line('maximum_all_sub_questions');?></label> <br/>
<input type="radio" name="maximum_all_sub_questions" value="1" <?php if($quiz['maximum_all_sub_questions']==1){ echo 'checked'; } ?>> <?php echo $this->lang->line('yes');?>
<input type="radio" name="maximum_all_sub_questions" value="0" <?php if($quiz['maximum_all_sub_questions']==0){ echo 'checked'; } ?>> <?php echo $this->lang->line('no');?>
</div>
<div class="form-group col-md-6">
<label for="inputEmail" ><?php echo $this->lang->line('form_display');?></label> <br>
<input type="radio" name="form_display" value="1" <?php if($quiz['form_display']==1){ echo 'checked'; } ?> > <?php echo $this->lang->line('yes');?>
<input type="radio" name="form_display" value="0" <?php if($quiz['form_display']==0){ echo 'checked'; } ?> > <?php echo $this->lang->line('no');?>
</div>
<div class="form-group col-md-6">
<label for="inputEmail" ><?php echo $this->lang->line('q_leaderboard');?></label> <br>
<input type="radio" name="display_leaderboard" value="1" <?php if($quiz['display_leaderboard']==1){ echo 'checked'; } ?> > <?php echo $this->lang->line('yes');?>
<input type="radio" name="display_leaderboard" value="0" <?php if($quiz['display_leaderboard']==0){ echo 'checked'; } ?> > <?php echo $this->lang->line('no');?>
</div>
<div class="form-group col-md-6">
<label for="inputEmail" >Quiz Type</label> <br>
<input type="radio" name="quiz_type" value="1" <?php if($quiz['quiz_type']==1){ echo 'checked'; } ?> >Quiz
<input type="radio" name="quiz_type" value="0" <?php if($quiz['quiz_type']==0){ echo 'checked'; } ?> > Practice Test
</div>
<?php
if($this->config->item('webcam')==true){
?>
<div class="form-group col-md-6">
<label for="inputEmail" ><?php echo $this->lang->line('capture_photo');?></label> <br>
<input type="radio" name="camera_req" value="1" <?php if($quiz['camera_req']==1){ echo 'checked'; } ?> > <?php echo $this->lang->line('yes');?>
<input type="radio" name="camera_req" value="0" <?php if($quiz['camera_req']==0){ echo 'checked'; } ?> > <?php echo $this->lang->line('no');?>
</div>
<?php
} else { ?>
<input type="hidden" name="camera_req" value="0">
<?php } ?>
<div class="form-group col-md-12">
<div class="row">
<label for ="groups"><?php echo $this->lang->line('select_group');?></label> <br>
<?php
$gArray = explode(',',$quiz['gids']);
foreach($group_list as $key => $val){
?>
<div class="col-sm-3">
<!-- <input type="radio" name="gids" value="<?php echo $val['gid'];?>" <?php if($val['gid']==$quiz['gids']){ echo 'checked'; } ?> >-->
<input type="checkbox" name="gids[]" value="<?php echo $val['gid'];?>" <?php if(in_array($val['gid'],$gArray)){ echo 'checked'; } ?> >
<?php echo $val['group_name'];?>
</div>
<?php } ?>
</div>
</div>
<!--
<div class="form-group">
<label for="inputEmail" ><?php echo $this->lang->line('generate_certificate');?></label> <br>
<input type="radio" name="gen_certificate" value="1" <?php if($quiz['gen_certificate']==1){ echo 'checked'; } ?> > <?php echo $this->lang->line('yes');?><br>
<input type="radio" name="gen_certificate" value="0" <?php if($quiz['gen_certificate']==0){ echo 'checked'; } ?> > <?php echo $this->lang->line('no');?>
</div>
<div class="form-group">
<label for="inputEmail" ><?php echo $this->lang->line('certificate_text');?></label>
<textarea name="certificate_text" class="form-control" style="height:250px;"><?php echo $quiz['certificate_text'];?></textarea><br>
<?php echo $this->lang->line('tags_use');?> <?php echo htmlentities("<br> <center></center> <b></b> <h1></h1> <h2></h2> <h3></h3> <font></font>");?><br>
{email}, {first_name}, {last_name}, {quiz_name}, {percentage_obtained}, {score_obtained}, {result}, {generated_date}, {result_id}, {qr_code}
<br><br>
<a href="<?php echo site_url('result/preview_certificate/'.$quiz['quid']);?>" target="preview_cert" class="btn btn-warning"><?php echo $this->lang->line('preview');?></a>
<span style="color:#ff0000"><?php echo $this->lang->line('preview_warning');?></span>
</div>
-->
<hr>
<div class="clearfix" style="margin:0 0 10px 0;"></div>
<?php
if($quiz['question_selection']=='0'){ ?>
<div class="col-md-12"><h4><?php echo $this->lang->line('questions_added_into_quiz');?></h4></div>
<a href="<?php echo site_url('quiz/add_question/'.$quiz['quid']);?>" class="btn btn-danger" ><?php echo $this->lang->line('add_question_into_quiz');?></a>
<table class="table table-bordered" style="margin-top:10px;">
<tr>
<th>#</th>
<th>Ques No.</th>
<th><?php echo $this->lang->line('question');?></th>
<th><?php echo $this->lang->line('question_type');?></th>
<th><?php echo $this->lang->line('category_name');?></th>
<th><?php echo $this->lang->line('level_name');?></th>
<th><?php echo $this->lang->line('action');?> </th>
</tr>
<?php if(count($questions)==0){?>
<tr>
<td colspan="6"><?php echo $this->lang->line('no_question_added');?></td>
</tr>
<?php
}
$k=1;
foreach($questions as $key => $val){
?>
<tr>
<td><?php echo $k;?></td>
<td><?php echo $val['qid'];?></td>
<td><?php echo substr(strip_tags($val['question']),0,50);?></td>
<td><?php echo $val['question_type'];?></td>
<td><?php echo $val['category_name'];?></td>
<td><?php echo $val['level_name'];?></td>
<td>
<a href="<?php echo site_url('quiz/remove_qid/'.$quiz['quid'].'/'.$val['qid']);?>" title="<?php echo $this->lang->line('remove_from_quiz');?>"><img src="<?php echo base_url('images/cross.png');?>"></a>
<?php
if($key==0){
?>
<img src="<?php echo base_url();?>images/empty.png" title="">
<?php
}else{ /*
?>
<a href="javascript:cancelmove('Up','<?php echo $quiz['quid'];?>','<?php echo $val['qid'];?>','<?php echo $key+1;?>');"><img src="<?php echo base_url();?>images/up.png" title="<?php echo $this->lang->line('up');?>"></a>
<?php */ }
if($key==(count(explode(',',$quiz['qids']))-1)){
?>
<?php
} else { /*
?>
<a href="javascript:cancelmove('Down','<?php echo $quiz['quid'];?>','<?php echo $val['qid'];?>','<?php echo $key+1;?>');"><img src="<?php echo base_url();?>images/down.png" title="<?php echo $this->lang->line('down');?>"></a>
<?php */
}
?>
</td>
</tr>
<?php $k++;
}
?>
</table>
<?php } else { ?>
<div class="col-md-12"><h4><?php echo $this->lang->line('questions_added_into_quiz');?></h4></div>
<?php
if(count($qcl)==0){
echo $this->lang->line('no_question_added').'<br><br>';
}
foreach($qcl as $k => $vall){
?>
<div class="form-group form-group-n col-md-12">
<select name="cid[]" id="cid_<?=$k?>" onchange="javascript:quiz_level_list('<?=$k?>');">
<option value="0"><?php echo $this->lang->line('select');?> <?php echo $this->lang->line('category_name');?></option>
<?php
foreach($category_list as $key => $val){
?>
<option value="<?php echo $val['cid'];?>" <?php if($val['cid']==$vall['cid']){ echo 'selected'; } ?> ><?php echo $val['category_name'];?></option>
<?php
}
?>
</select>
<select name="lid[]" id="lid_<?=$k?>">
<option value="0"><?php echo $this->lang->line('select');?> <?php echo $this->lang->line('level_name');?></option>
<?php
foreach($level_list as $key => $val){
?>
<option value="<?php echo $val['lid'];?>" <?php if($val['lid']==$vall['lid']){ echo 'selected'; } ?> ><?php echo $val['level_name'];?></option>
<?php
}
?>
</select>
<?php $total_list = array('1'=>'1','2'=>'2','3'=>'3','4'=>'4','5'=>'5','6'=>'6','7'=>'7','8'=>'8','9'=>'9','10'=>'10','11'=>'11','12'=>'12','13'=>'13','14'=>'14','15'=>'15','16'=>'16','17'=>'17','18'=>'18','19'=>'19','20'=>'20','25'=>'25','30'=>'30','35'=>'35','40'=>'40','45'=>'45','50'=>'50','60'=>'60','70'=>'70','75'=>'75','90'=>'90','100'=>'100'); ?>
<select name="tqpc[]">
<option value="0"><?php echo $this->lang->line('total_qus');?></option>
<?php foreach($total_list as $key => $val){ ?>
<option value="<?php echo $val;?>" <?php if($val==$vall['tqpc']){ echo 'selected'; } ?>><?php echo $val;?></option> <?php } ?>
</select>
<?php echo $this->lang->line('no_questions_added');?>
<select name="noq[]">
<option value="<?php echo $vall['noq'];?>"><?php echo $vall['noq'];?></option>
<option value="0">0</option>
</select>
Question Limit
<select name="limit_start[]">
<option value="">Limit Start</option>
<option value="0" <?php if($vall['limit_start']=='0'){ echo 'selected'; } ?>>0</option>
<?php foreach($total_list as $key => $val){ ?>
<option value="<?php echo $val;?>" <?php if($val==$vall['limit_start']){ echo 'selected'; } ?>><?php echo $val;?></option> <?php } ?>
</select>
<select name="limit_end[]">
<option value="0">Limit End</option>
<?php foreach($total_list as $key => $val){ ?>
<option value="<?php echo $val;?>" <?php if($val==$vall['limit_end']){ echo 'selected'; } ?>><?php echo $val;?></option> <?php } ?>
</select>
</div>
<hr>
<?php } ?>
<div class="form-group form-group-n col-md-12">
<select name="cid[]" id="cid" onchange="javascript:level_list();">
<option value="0"><?php echo $this->lang->line('select');?> <?php echo $this->lang->line('category_name');?></option>
<?php foreach($category_list as $key => $val){ ?>
<option value="<?php echo $val['cid'];?>" ><?php echo $val['category_name'];?></option>
<?php } ?>
</select>
<select name="lid[]" id="lid" onChange="no_q_available(this.value);">
<option value="0"><?php echo $this->lang->line('select');?> <?php echo $this->lang->line('level_name');?></option>
<?php /*foreach($level_list as $key => $val){ ?>
<option value="<?php echo $val['lid'];?>"><?php echo $val['level_name'];?></option> <?php } */ ?>
</select>
<?php $total_list = array('1'=>'1','2'=>'2','3'=>'3','4'=>'4','5'=>'5','6'=>'6','7'=>'7','8'=>'8','9'=>'9','10'=>'10','11'=>'11','12'=>'12','13'=>'13','14'=>'14','15'=>'15','16'=>'16','17'=>'17','18'=>'18','19'=>'19','20'=>'20','25'=>'25','30'=>'30','35'=>'35','40'=>'40','45'=>'45','50'=>'50','60'=>'60','70'=>'70','75'=>'75','90'=>'90','100'=>'100'); ?>
<select name="tqpc[]">
<option value="0"><?php echo $this->lang->line('select');?> <?php echo $this->lang->line('total_qus');?></option>
<?php foreach($total_list as $key => $val){ ?>
<option value="<?php echo $val;?>"><?php echo $val;?></option> <?php } ?>
</select>
Question Limit
<select name="limit_start[]">
<option value="">Limit Start</option>
<option value="0" <?php if($vall['limit_start']=='0'){ echo 'selected'; } ?>>0</option>
<?php foreach($total_list as $key => $val){ ?>
<option value="<?php echo $val;?>" <?php if($val==$vall['limit_start']){ echo 'selected'; } ?>><?php echo $val;?></option> <?php } ?>
</select>
<select name="limit_end[]">
<option value="0">Limit End</option>
<?php foreach($total_list as $key => $val){ ?>
<option value="<?php echo $val;?>" <?php if($val==$vall['limit_end']){ echo 'selected'; } ?>><?php echo $val;?></option> <?php } ?>
</select>
<br>
<br>
<?php echo $this->lang->line('no_questions_available');?> <span id="no_q_available"></span>
</div>
<?php } ?>
<div class="col-md-12">
<button class="btn btn-success button3" type="submit"><?php echo $this->lang->line('submit');?></button>
<a class="btn btn-default button6" href="<?=base_url('quiz')?>"><?php echo $this->lang->line('cancel');?></a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div id="warning_div" style="padding:10px; position:fixed;z-index:100;display:none;width:100%;border-radius:5px;height:200px; border:1px solid #dddddd;left:4px;top:70px;background:#ffffff;">
<center><b> <?php echo $this->lang->line('to_which_position');?></b><br><input type="text" style="width:30px" id="qposition" value=""><br><br>
<a href="javascript:cancelmove();" class="btn btn-danger" style="cursor:pointer;"><?php echo $this->lang->line('cancel');?></a>
<!--<a href="javascript:movequestion();" class="btn btn-info" style="cursor:pointer;"><?php echo $this->lang->line('move');?></a>-->
</center>
</div>