|
Server : Apache/2.4.41 (Ubuntu) System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64 User : www-data ( 33) PHP Version : 8.2.12 Disable Function : NONE Directory : /var/www/parasoffline.edukrypt.in/application/modules/admin/views/quiz/ |
Upload File : |
<?php
if(isset($message))
{
echo '<div class="alert alert-success" role="alert">'.$message.'</div>';
}
if( $this->session->flashdata('message') )
{
echo $this->session->flashdata('message');
}
// print_r($quiz_questions[0]->question);
?>
<div class="row">
<?php echo $this->session->flashdata('alert');?>
<div class="col-md-10">
<div class="box box-primary">
<div class="box-body">
<form action="<?php echo base_url(); ?>admin/folder/edit_option/<?php echo $this->uri->segment(4);?>" method="post"
enctype="multipart/form-data">
<input type="hidden" name="quiz_id" value="<?php echo $this->uri->segment(4);?>">
<div class="form-group">
<label for="question">Option:</label>
<textarea required class="form-control" id="option" name="option" rows="3"><?php echo (!empty($quiz_options[0]->options))? $quiz_options[0]->options:""; ?></textarea>
<?php form_error('option'); ?>
</div>
<button id="submit" type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
</div>
</div>
<script src="https://cdn.ckeditor.com/4.15.1/standard/ckeditor.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/vendors/kcfinder/ckfinder.js"></script>
<script type="text/javascript">
$(document).ready(function() {
if($('#option').length) {
CKEDITOR.replace('option');
}
/***********************************************************************************************************/
// var a = $('#mcq-questions').attr('mcq_id');
// alert(a);
/**********************************************************************************/
$(document).on('click', '#all_check_in', function() {
var all_check_in = $(this),
_check_in = $('._check_in');
if (typeof _check_in !== 'undefined' || _check_in !== null) {
if (all_check_in.prop('checked') == true) {
all_check_in.prop('checked', true);
all_check_in.parent().parent().css({
'background-color': '#000',
'color': '#fff'
});
_check_in.prop('checked', true);
_check_in.parent().parent().css({
'background-color': '#ccc'
});
} else {
all_check_in.prop('checked', false);
all_check_in.parent().parent().removeAttr('style');
_check_in.prop('checked', false);
_check_in.parent().parent().removeAttr('style');
}
}
});
$(document).on('click', '._check_in', function() {
var _check_in = $('._check_in');
_check_in.each(function() {
if ($(this).prop('checked') == true) {
$(this).parent().parent().css({
'background-color': '#ccc'
});
} else {
$(this).parent().parent().removeAttr('style');
}
});
});
/**********************************************************************************/
});
</script>