Commit af7b2a03 by Manoj

question changes

parent 62a211f0
......@@ -572,6 +572,14 @@ class ApplicationController extends CI_Controller
redirect('ApplicationController/faculty');
}
public function deleteQuestion($id)
{
$delete = $this->mcommon->common_delete('question', array('id' => $id));
$this->session->set_flashdata('alert_danger', 'Record Deleted successfully!');
redirect('ApplicationController/viewQuestion');
}
public function draftformdetails()
{
......@@ -2342,6 +2350,7 @@ class ApplicationController extends CI_Controller
{
if(isset($_POST['submit'])){
$academic = $this->input->post('academic');
$exam_type = $this->input->post('exam_type');
$category = $this->input->post('category');
......@@ -2365,8 +2374,6 @@ class ApplicationController extends CI_Controller
);
$insert = $this->mcommon->common_insert('question', $insert_array);
if ($insert) {
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Question</title>
</head>
<body>
<!-- Mirrored from akademi.dexignlab.com/codeigniter/demo/student by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 06 Mar 2024 10:51:33 GMT -->
<!-- Added by HTTrack -->
<meta http-equiv="content-type" content="text/html;charset=UTF-8" /><!-- /Added by HTTrack -->
<!-- <div class="page-header mt-5"> -->
<head>
<div class="d-flex justify-content-between mb-2">
<div>
<h2 class=" tx-24 mg-b-5">Add New Question</h2>
</div>
<a class="btn btn-primary waves-effect waves-light" href="<?php echo base_url(); ?>ApplicationController/questionAdd">
<i class="mdi mdi-plus mr-2"></i> Add Question
</a>
</div>
<!-- Title -->
<title>List</title>
<!-- Meta -->
<!-- </div> -->
<!-- Row -->
<div class="row sidemenu-height">
<div class="col-lg-12">
</head>
<body>
<?php $segment = $this->uri->segment(2) ?>
<?php
if ($this->session->flashdata('alert_success')) {
?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<?php echo $this->session->flashdata('alert_success'); ?>
</div>
<?php
}
if ($this->session->flashdata('alert_danger')) {
?>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<?php echo $this->session->flashdata('alert_danger'); ?>
<div class="content-body">
<!-- row -->
<div class="container-fluid">
<!-- Row -->
<div class="row">
<div class="col-xl-12">
<div class="row">
<div class="col-xl-12">
<div class="page-title flex-wrap">
<div class="input-group search-area mb-md-0 mb-3">
<input type="text" class="form-control" placeholder="Search here...">
<span class="input-group-text"><a href="javascript:void(0)">
<svg width="15" height="15" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M17.5605 15.4395L13.7527 11.6317C14.5395 10.446 15 9.02625 15 7.5C15 3.3645 11.6355 0 7.5 0C3.3645 0 0 3.3645 0 7.5C0 11.6355 3.3645 15 7.5 15C9.02625 15 10.446 14.5395 11.6317 13.7527L15.4395 17.5605C16.0245 18.1462 16.9755 18.1462 17.5605 17.5605C18.1462 16.9747 18.1462 16.0252 17.5605 15.4395V15.4395ZM2.25 7.5C2.25 4.605 4.605 2.25 7.5 2.25C10.395 2.25 12.75 4.605 12.75 7.5C12.75 10.395 10.395 12.75 7.5 12.75C4.605 12.75 2.25 10.395 2.25 7.5V7.5Z" fill="#01A3FF" />
</svg>
</a></span>
</div>
<?php
}
?>
<div>
<!-- Button trigger modal -->
<a href="<?php echo base_url(); ?>ApplicationController/questionAdd" type="button" class="btn btn-primary" id="open-modal">
+ New Question
</a>
<div class="card custom-card">
<div class="card-body">
<div class="table-responsive">
<table id="dmstable" class="table table-striped table-bordered dt-responsive nowrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
</div>
</div>
</div>
<!--column-->
<div class="col-xl-12 wow fadeInUp" data-wow-delay="1.5s">
<div class="table-responsive full-data">
<table class="table-responsive-lg table display dataTablesCard student-tab dataTable no-footer" id="example-student">
<thead>
<tr>
<th class="wd-20p">S.No</th>
<th class="wd-25p">Academic Year</th>
......@@ -74,21 +68,20 @@
<tr>
<td><?= $row->id; ?></td>
<td><?php foreach ($academic_year as $year ) { ?>
<?= ($row->academic==$year->id) ? $year->year : '' ?>
<?php }?></td>
<td> <?php foreach ($exam_type as $exam ) { ?>
<?= ($row->exam_type==$exam->id) ? $exam->exam_type_name : '' ?>
<?php }?></td>
<td><?php foreach ($academic_year as $year) { ?>
<?= ($row->academic == $year->id) ? $year->year : '' ?>
<?php } ?></td>
<td> <?php foreach ($exam_type as $exam) { ?>
<?= ($row->exam_type == $exam->id) ? $exam->exam_type_name : '' ?>
<?php } ?></td>
<td>
<?php foreach ($category as $cat ) { ?>
<?= ($row->category==$cat->id) ? $cat->category : '' ?>
<?php }?></td>
<?php foreach ($category as $cat) { ?>
<?= ($row->category == $cat->id) ? $cat->category : '' ?>
<?php } ?></td>
<td><?= $row->question; ?></td>
<td>
<a href="<?= base_url('ApplicationController/questionEdit/' . $row->id) ?>" class="btn-sm btn-info"><i class="ti-pencil-alt"></i></a>
<a href="<?= base_url('ApplicationController/delete/' . $row->id) ?>" class="btn-sm btn-danger"><i class="ti-trash"></i></a>
<a href="<?= base_url('ApplicationController/questionEdit/' . $row->id) ?>" data-toggle="tooltip" id="edit" data-placement="top" title="Edit" data-original-title="Edit" class="btn btn-sm btn-info"><i class="ti ti-pencil"></i></a>
<a href="<?= base_url('ApplicationController/deleteQuestion/' . $row->id) ?>" data-toggle="tooltip" id="delete" data-placement="top" title="Delete" data-original-title="Edit" class="btn btn-sm btn-danger"><i class="ti ti-trash"></i></a>
</td>
</tr>
......@@ -99,14 +92,20 @@
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function() {
$('#dmstable').DataTable();
});
</script>
\ No newline at end of file
</body>
</html>
<script>
</script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment