Commit cc6ae2a1 by Manoj

changes

parents 46038934 ac484f0e
......@@ -28,13 +28,15 @@ class ExamController extends CI_Controller
public function getExamQuestions()
{
$this->db->select('y.year, es.academic, es.exam_schedule, es.objective_date, es.objective_time, es.id,et.exam_type_name as name');
$this->db->select('y.year, es.academic,u.email,es.id as sid,ea.question_category,es.exam_schedule, es.objective_date, es.objective_time, es.id,et.exam_type_name as name');
$this->db->from('question as q');
$this->db->join('exam_schedule as es', 'es.id = q.schedule_id', 'left');
$this->db->join('accadamic_year as y', 'y.id = q.academic', 'left');
$this->db->join('exam_type as et', 'et.id = q.exam_type', 'left');
$this->db->join('exam_assigned as ea', 'ea.schedule = q.schedule_id', 'left');
$this->db->join('users as u', 'u.user_id = ea.user_id', 'left');
$this->db->where('es.status', 1);
$this->db->group_by('q.schedule_id');
$this->db->group_by('q.schedule_id,ea.user_id');
$query = $this->db->get();
return $result = $query->result();
}
......
......@@ -28,6 +28,7 @@
</div>
</div>
</div>
<!--column-->
<div class="col-xl-12 wow fadeInUp" data-wow-delay="1.5s">
<div class="table-responsive full-data">
......@@ -36,6 +37,8 @@
<tr>
<th class="wd-20p">S.No</th>
<th class="wd-25p">Academic Year</th>
<th class="wd-25p">Assigned User</th>
<th class="wd-25p">Schedule Name</th>
<th class="wd-15p">Exam Type</th>
<th class="wd-15p">Date</th>
<th class="wd-15p">Time</th>
......@@ -49,11 +52,13 @@
<tr>
<td><?= $i ?></td>
<td><?= $row->year ?></td>
<td><?= $row->email ?></td>
<td><?= $row->exam_schedule ?></td>
<td><?= $row->name ?></td>
<td><?= isset($row->date) ? date('d-m-Y',strtotime($row->objective_date)) :'' ?></td>
<td><?= isset($row->time) ? date('H:i a',strtotime($row->objective_time)) :'' ?></td>
<td><?= isset($row->objective_date) ? date('d-m-Y',strtotime($row->objective_date)) :'' ?></td>
<td><?= isset($row->objective_time) ? date('H:i a',strtotime($row->objective_time)) :'' ?></td>
<td>
<a href="javascript:takeExam('<?= $row->id ?>')" data-toggle="tooltip" id="edit" data-placement="top" title="Edit" data-original-title="Edit" class="btn btn-sm btn-info">View</a>
<a href="javascript:takeExam('<?= $row->user_id ?>','<?= $row->sid ?>','<?= $row->question_category ?>',)" data-toggle="tooltip" id="edit" data-placement="top" title="Edit" data-original-title="Edit" class="btn btn-sm btn-info">View</a>
</td>
</tr>
<?php $i++; } ?>
......@@ -82,6 +87,9 @@
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<input type="hidden" id="userId" value=""/>
<input type="hidden" id="Sid" value=""/>
<input type="hidden" id="Cat" value=""/>
<h4 class="text-center">Asian College of Journalism</h4>
<h5>English Entrance Examination</h5>
<br>
......@@ -130,10 +138,20 @@ original sentence. (5 marks)</h5>
</div>
<script>
//user,sid,cat
function takeExam(user,sid,cat)
{ $('#userId').val(cat);
$('#Sid').val(user);
$('#Cat').val(sid);
$('#examModal').modal('show');
}
function takeExam(id)
function close()
{
$('#examModal').modal('show');
$('#userId').val('');
$('#Sid').val('');
$('#Cat').val('');
$('#examModal').modal('hide');
}
function startExam(id)
......
......@@ -74,7 +74,7 @@
</div> -->
<div>
<button type="button" class="btn btn-primary waves-effect waves-light" onclick="getCheckedId(this)">Assing Test</button>
<button type="button" class="btn btn-primary waves-effect waves-light" onclick="getCheckedId(this)">Assing Exam</button>
</div>
</div>
......
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