Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apps.acj
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Franklin
apps.acj
Commits
d13c2d96
Commit
d13c2d96
authored
Mar 16, 2024
by
Manoj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes
parent
4ad13f39
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
302 additions
and
63 deletions
+302
-63
QuestionController.php
admin/application/controllers/QuestionController.php
+66
-10
menu.php
admin/application/views/base/menu.php
+1
-0
add.php
admin/application/views/essay_question/add.php
+15
-15
edit.php
admin/application/views/essay_question/edit.php
+16
-15
view.php
admin/application/views/essay_question/view.php
+4
-0
questionCategory.php
admin/application/views/masters/questionCategory.php
+170
-0
add.php
admin/application/views/questions/add.php
+14
-12
edit.php
admin/application/views/questions/edit.php
+16
-11
view.php
admin/application/views/questions/view.php
+0
-0
No files found.
admin/application/controllers/QuestionController.php
View file @
d13c2d96
...
...
@@ -3,6 +3,62 @@ defined('BASEPATH') or exit('No direct script access allowed');
class
QuestionController
extends
CI_Controller
{
public
function
questionCategory
()
{
$view_data
[
'records'
]
=
$this
->
mcommon
->
records_all
(
'question_category'
);
$data
=
array
(
'title'
=>
'Question Category'
,
'page'
=>
'Question Category'
,
'content'
=>
$this
->
load
->
view
(
'masters/questionCategory'
,
$view_data
,
true
),
);
$this
->
load
->
view
(
'base/base_template'
,
$data
);
}
public
function
addEditQuestionCategory
()
{
$question_category
=
$this
->
input
->
post
(
'question_category'
);
$id
=
$this
->
input
->
post
(
'id'
);
if
(
$id
)
{
$update_array
=
array
(
'question_category'
=>
$question_category
,
'status'
=>
1
,
);
$update
=
$this
->
mcommon
->
common_edit
(
'question_category'
,
$update_array
,
array
(
'id'
=>
$id
));
if
(
$update
)
{
$this
->
session
->
set_flashdata
(
'alert_success'
,
'Question Category Updated successfully!'
);
}
else
{
$this
->
session
->
set_flashdata
(
'alert_danger'
,
'Something went wrong'
);
}
}
else
{
$user_array
=
array
(
'question_category'
=>
$question_category
,
'status'
=>
1
,
);
$insert
=
$this
->
mcommon
->
common_insert
(
'question_category'
,
$user_array
);
if
(
$insert
)
{
$this
->
session
->
set_flashdata
(
'alert_success'
,
'Question Category Added successfully!'
);
}
else
{
$this
->
session
->
set_flashdata
(
'alert_danger'
,
'Something went wrong'
);
}
}
redirect
(
'QuestionController/questionCategory'
);
}
public
function
viewQuestion
()
{
...
...
@@ -10,7 +66,7 @@ class QuestionController extends CI_Controller
$view_data
[
'records'
]
=
$this
->
mcommon
->
records_all
(
'question'
);
$view_data
[
'exam_type'
]
=
$this
->
mcommon
->
records_all
(
'exam_type'
,
array
(
'status'
,
1
));
$view_data
[
'academic_year'
]
=
$this
->
mcommon
->
records_all
(
'accadamic_year'
,
array
(
'status'
,
1
));
$view_data
[
'
schedule'
]
=
$this
->
mcommon
->
records_all
(
'exam_schedule
'
,
array
(
'status'
,
1
));
$view_data
[
'
question_category'
]
=
$this
->
mcommon
->
records_all
(
'question_category
'
,
array
(
'status'
,
1
));
$view_data
[
'category'
]
=
$this
->
mcommon
->
records_all
(
'section_category'
,
array
(
'status'
,
1
));
$data
=
array
(
'title'
=>
'View Question '
,
...
...
@@ -27,7 +83,7 @@ class QuestionController extends CI_Controller
$academic
=
$this
->
input
->
post
(
'academic'
);
$exam_type
=
$this
->
input
->
post
(
'exam_type'
);
$category
=
$this
->
input
->
post
(
'category'
);
$
schedule
=
$this
->
input
->
post
(
'schedule
'
);
$
question_category
=
$this
->
input
->
post
(
'question_category
'
);
$question
=
$this
->
input
->
post
(
'question'
);
$option_a
=
$this
->
input
->
post
(
'option_a'
);
$option_b
=
$this
->
input
->
post
(
'option_b'
);
...
...
@@ -52,7 +108,7 @@ class QuestionController extends CI_Controller
'academic'
=>
$academic
,
'exam_type'
=>
$exam_type
,
'category'
=>
$category
,
'
schedule_id'
=>
$schedule
,
'
question_category'
=>
$question_category
,
'question'
=>
$question
,
'option_a'
=>
$option_a
,
'option_b'
=>
$option_b
,
...
...
@@ -78,7 +134,7 @@ class QuestionController extends CI_Controller
$view_data
[
'exam_type'
]
=
$this
->
mcommon
->
records_all
(
'exam_type'
,
array
(
'status'
,
1
));
$view_data
[
'academic_year'
]
=
$this
->
mcommon
->
records_all
(
'accadamic_year'
,
array
(
'status'
,
1
));
$view_data
[
'category'
]
=
$this
->
mcommon
->
records_all
(
'section_category'
,
array
(
'status'
,
1
));
$view_data
[
'
schedule'
]
=
$this
->
mcommon
->
records_all
(
'exam_schedule
'
,
array
(
'status'
,
1
));
$view_data
[
'
question_category'
]
=
$this
->
mcommon
->
records_all
(
'question_category
'
,
array
(
'status'
,
1
));
$data
=
array
(
'title'
=>
'Add Question'
,
...
...
@@ -98,7 +154,7 @@ class QuestionController extends CI_Controller
$academic
=
$this
->
input
->
post
(
'academic'
);
$exam_type
=
$this
->
input
->
post
(
'exam_type'
);
$category
=
$this
->
input
->
post
(
'category'
);
$
schedule
=
$this
->
input
->
post
(
'schedule
'
);
$
question_category
=
$this
->
input
->
post
(
'question_category
'
);
$question
=
$this
->
input
->
post
(
'question'
);
$option_a
=
$this
->
input
->
post
(
'option_a'
);
$option_b
=
$this
->
input
->
post
(
'option_b'
);
...
...
@@ -111,7 +167,7 @@ class QuestionController extends CI_Controller
'academic'
=>
$academic
,
'exam_type'
=>
$exam_type
,
'category'
=>
$category
,
'
schedule_id'
=>
$schedule
,
'
question_category'
=>
$question_category
,
'question'
=>
$question
,
'option_a'
=>
$option_a
,
'option_b'
=>
$option_b
,
...
...
@@ -137,7 +193,7 @@ class QuestionController extends CI_Controller
$view_data
[
'exam_type'
]
=
$this
->
mcommon
->
records_all
(
'exam_type'
,
array
(
'status'
,
1
));
$view_data
[
'academic_year'
]
=
$this
->
mcommon
->
records_all
(
'accadamic_year'
,
array
(
'status'
,
1
));
$view_data
[
'category'
]
=
$this
->
mcommon
->
records_all
(
'section_category'
,
array
(
'status'
,
1
));
$view_data
[
'
schedule'
]
=
$this
->
mcommon
->
records_all
(
'exam_schedule
'
,
array
(
'status'
,
1
));
$view_data
[
'
question_category'
]
=
$this
->
mcommon
->
records_all
(
'question_category
'
,
array
(
'status'
,
1
));
$data
=
array
(
'title'
=>
'Edit Question'
,
'page'
=>
'Edit Question'
,
...
...
@@ -169,7 +225,7 @@ class QuestionController extends CI_Controller
$view_data
[
'records'
]
=
$this
->
mcommon
->
records_all
(
'question'
);
$view_data
[
'exam_type'
]
=
$this
->
mcommon
->
records_all
(
'exam_type'
,
array
(
'status'
,
1
));
$view_data
[
'academic_year'
]
=
$this
->
mcommon
->
records_all
(
'accadamic_year'
,
array
(
'status'
,
1
));
$view_data
[
'
schedule'
]
=
$this
->
mcommon
->
records_all
(
'exam_schedule
'
,
array
(
'status'
,
1
));
$view_data
[
'
question_category'
]
=
$this
->
mcommon
->
records_all
(
'question_category
'
,
array
(
'status'
,
1
));
$view_data
[
'category'
]
=
$this
->
mcommon
->
records_all
(
'section_category'
,
array
(
'status'
,
1
));
$data
=
array
(
'title'
=>
'View Question '
,
...
...
@@ -216,7 +272,7 @@ class QuestionController extends CI_Controller
$view_data
[
'exam_type'
]
=
$this
->
mcommon
->
records_all
(
'exam_type'
,
array
(
'status'
,
1
));
$view_data
[
'academic_year'
]
=
$this
->
mcommon
->
records_all
(
'accadamic_year'
,
array
(
'status'
,
1
));
$view_data
[
'category'
]
=
$this
->
mcommon
->
records_all
(
'section_category'
,
array
(
'status'
,
1
));
$view_data
[
'
schedule'
]
=
$this
->
mcommon
->
records_all
(
'exam_schedule
'
,
array
(
'status'
,
1
));
$view_data
[
'
question_category'
]
=
$this
->
mcommon
->
records_all
(
'question_category
'
,
array
(
'status'
,
1
));
$data
=
array
(
'title'
=>
'Add Question'
,
...
...
@@ -267,7 +323,7 @@ class QuestionController extends CI_Controller
$view_data
[
'exam_type'
]
=
$this
->
mcommon
->
records_all
(
'exam_type'
,
array
(
'status'
,
1
));
$view_data
[
'academic_year'
]
=
$this
->
mcommon
->
records_all
(
'accadamic_year'
,
array
(
'status'
,
1
));
$view_data
[
'category'
]
=
$this
->
mcommon
->
records_all
(
'section_category'
,
array
(
'status'
,
1
));
$view_data
[
'
schedule'
]
=
$this
->
mcommon
->
records_all
(
'exam_schedule
'
,
array
(
'status'
,
1
));
$view_data
[
'
question_category'
]
=
$this
->
mcommon
->
records_all
(
'question_category
'
,
array
(
'status'
,
1
));
$data
=
array
(
'title'
=>
'Edit Question'
,
'page'
=>
'Edit Question'
,
...
...
admin/application/views/base/menu.php
View file @
d13c2d96
...
...
@@ -23,6 +23,7 @@
<li><a
href=
"
<?php
echo
base_url
();
?>
ApplicationController/examType"
>
Exam Type
</a></li>
<li><a
href=
"
<?php
echo
base_url
();
?>
ApplicationController/sectionCategory"
>
Section Category
</a></li>
<li><a
href=
"
<?php
echo
base_url
();
?>
ApplicationController/examSchedule"
>
Exam Schedule
</a></li>
<li><a
href=
"
<?php
echo
base_url
();
?>
QuestionController/questionCategory"
>
Question Category
</a></li>
</ul>
...
...
admin/application/views/essay_question/add.php
View file @
d13c2d96
...
...
@@ -41,13 +41,14 @@
</select>
</div>
<div
class=
"form-group col-md-3"
>
<label
class=
"tx-medium"
>
Exam Type
<span
class=
"text-danger"
>
*
</span>
</label>
<label
class=
"tx-medium"
>
Question Category
<span
class=
"text-danger"
>
*
</span>
</label>
<select
name=
"
exam_type"
id=
"exam_type
"
class=
"form-control select2 modal-select"
>
<select
name=
"
question_category"
id=
"question_category
"
class=
"form-control select2 modal-select"
>
<option
value=
""
>
--Select--
</option>
<?php
foreach
(
$
exam_type
as
$row
)
{
?>
<option
value=
"
<?php
echo
$row
->
id
?>
"
>
<?php
echo
$row
->
exam_type_name
?>
</option>
<?php
foreach
(
$
question_category
as
$row
)
{
?>
<option
value=
"
<?php
echo
$row
->
id
?>
"
>
<?php
echo
$row
->
question_category
?>
</option>
<?php
}
?>
</select>
...
...
@@ -55,12 +56,12 @@
</div>
<div
class=
"form-group col-md-3"
>
<label
class=
"tx-medium"
>
Category
<span
class=
"text-danger"
>
*
</span>
</label>
<label
class=
"tx-medium"
>
Exam Type
<span
class=
"text-danger"
>
*
</span>
</label>
<select
name=
"
category"
id=
"category
"
class=
"form-control select2 modal-select"
>
<select
name=
"
exam_type"
id=
"exam_type
"
class=
"form-control select2 modal-select"
>
<option
value=
""
>
--Select--
</option>
<?php
foreach
(
$
category
as
$row
)
{
?>
<option
value=
"
<?php
echo
$row
->
id
?>
"
>
<?php
echo
$row
->
category
?>
</option>
<?php
foreach
(
$
exam_type
as
$row
)
{
?>
<option
value=
"
<?php
echo
$row
->
id
?>
"
>
<?php
echo
$row
->
exam_type_name
?>
</option>
<?php
}
?>
</select>
...
...
@@ -68,20 +69,19 @@
</div>
<div
class=
"form-group col-md-3"
>
<label
class=
"tx-medium"
>
Schedule
<span
class=
"text-danger"
>
*
</span>
</label>
<select
name=
"
schedule"
id=
"schedule
"
class=
"form-control select2 modal-select"
>
<label
class=
"tx-medium"
>
Category
<span
class=
"text-danger"
>
*
</span>
</label>
<select
name=
"
category"
id=
"category
"
class=
"form-control select2 modal-select"
>
<option
value=
""
>
--Select--
</option>
<?php
foreach
(
$
schedule
as
$row
)
{
?>
<option
value=
"
<?php
echo
$row
->
id
?>
"
>
<?php
echo
$row
->
exam_schedule
?>
</option>
<?php
foreach
(
$
category
as
$row
)
{
?>
<option
value=
"
<?php
echo
$row
->
id
?>
"
>
<?php
echo
$row
->
category
?>
</option>
<?php
}
?>
</select>
</div>
<div
class=
"form-group col-md-12 mt-3"
>
<label>
Question
</label>
<!-- <textarea name="email_content" id="email_content" rows="5" autocomplete="off" class="form-control" placeholder=""></textarea> -->
...
...
admin/application/views/essay_question/edit.php
View file @
d13c2d96
...
...
@@ -40,6 +40,21 @@
</select>
</div>
<div
class=
"form-group col-md-3"
>
<label
class=
"tx-medium"
>
Question Category
<span
class=
"text-danger"
>
*
</span>
</label>
<select
name=
"question_category"
id=
"question_category"
class=
"form-control select2 modal-select"
>
<option
value=
""
>
--Select--
</option>
<?php
foreach
(
$question_category
as
$row
)
{
?>
<option
<?=
$default
[
'question_category'
]
==
$row
->
id
?
'selected '
:
''
?>
value=
"
<?php
echo
$row
->
id
?>
"
>
<?php
echo
$row
->
question_category
?>
</option>
<?php
}
?>
</select>
</div>
<div
class=
"form-group col-md-3"
>
<label
class=
"tx-medium"
>
Exam Type
<span
class=
"text-danger"
>
*
</span>
</label>
...
...
@@ -65,21 +80,7 @@
</select>
</div>
<div
class=
"form-group col-md-3"
>
<label
class=
"tx-medium"
>
Schedule
<span
class=
"text-danger"
>
*
</span>
</label>
<select
name=
"schedule"
id=
"schedule"
class=
"form-control select2 modal-select"
>
<option
value=
""
>
--Select--
</option>
<?php
foreach
(
$schedule
as
$row
)
{
?>
<option
<?=
$default
[
'schedule_id'
]
==
$row
->
id
?
'selected '
:
''
?>
value=
"
<?php
echo
$row
->
id
?>
"
>
<?php
echo
$row
->
exam_schedule
?>
</option>
<?php
}
?>
</select>
</div>
<div
class=
"form-group col-md-12 mt-3"
>
<label>
Question
</label>
<!-- <textarea name="email_content" id="email_content" rows="5" autocomplete="off" class="form-control" placeholder=""></textarea> -->
...
...
admin/application/views/essay_question/view.php
View file @
d13c2d96
...
...
@@ -54,6 +54,7 @@
<tr>
<th
class=
"wd-20p"
>
S.No
</th>
<th
class=
"wd-25p"
>
Academic Year
</th>
<th
class=
"wd-15p"
>
Question Category
</th>
<th
class=
"wd-15p"
>
Exam Type
</th>
<th
class=
"wd-15p"
>
Category
</th>
<th
class=
"wd-15p"
>
Question
</th>
...
...
@@ -71,6 +72,9 @@
<td>
<?php
foreach
(
$academic_year
as
$year
)
{
?>
<?=
(
$row
->
academic
==
$year
->
id
)
?
$year
->
year
:
''
?>
<?php
}
?>
</td>
<td>
<?php
foreach
(
$question_category
as
$qc
)
{
?>
<?=
(
$row
->
question_category
==
$qc
->
id
)
?
$qc
->
question_category
:
''
?>
<?php
}
?>
</td>
<td>
<?php
foreach
(
$exam_type
as
$exam
)
{
?>
<?=
(
$row
->
exam_type
==
$exam
->
id
)
?
$exam
->
exam_type_name
:
''
?>
<?php
}
?>
</td>
...
...
admin/application/views/masters/questionCategory.php
0 → 100644
View file @
d13c2d96
<!DOCTYPE html>
<html
lang=
"en"
>
<!-- 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 -->
<head>
<!-- Title -->
<title>
Question Category
</title>
<!-- Meta -->
</head>
<body>
<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>
<div>
<!-- Button trigger modal -->
<button
type=
"button"
class=
"btn btn-primary"
id=
"open-modal"
>
+ New Question Category
</button>
</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"
>
Question Category
</th>
<th
class=
"wd-15p"
>
Action
</th>
</tr>
</thead>
<tbody>
<?php
$i
=
1
;
foreach
(
$records
as
$key
=>
$row
){
?>
<tr>
<td>
<?=
$i
?>
</td>
<td>
<?=
$row
->
question_category
?>
</td>
<td>
<a
data-toggle=
"tooltip"
id=
"edit"
data-placement=
"top"
title=
"Edit"
data-original-title=
"Edit"
onclick=
"edit('
<?php
echo
$row
->
id
;
?>
', '
<?php
echo
$row
->
question_category
;
?>
')"
class=
"btn btn-sm btn-info"
><i
class=
"ti ti-pencil"
></i></a>
<a
data-toggle=
"tooltip"
data-placement=
"top"
title=
"Delete"
data-original-title=
"Delete"
onclick=
"deletetution('
<?php
echo
$row
->
id
;
?>
','
<?php
echo
$row
->
status
;
?>
')"
class=
"btn btn-sm
<?php
echo
$row
->
status
==
1
?
'btn-primary'
:
'btn-danger'
?>
text-white"
>
<?php
echo
$row
->
status
==
1
?
'Active'
:
'In-Active'
?>
</a>
</td>
</tr>
<?php
$i
++
;
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Modal -->
<div
class=
"modal fade"
id=
"tutionModal"
tabindex=
"-1"
aria-labelledby=
"exampleModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog modal-dialog-center"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<h1
class=
"modal-title fs-5"
id=
"exampleModalLabel"
>
Add Tution Category
</h1>
<button
type=
"button"
class=
"btn-close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
></button>
</div>
<div
class=
"modal-body"
>
<form
method=
"POST"
id=
"tutionForm"
action=
"
<?php
echo
base_url
(
'QuestionController/addEditQuestionCategory'
);
?>
"
>
<input
type=
"hidden"
id=
'id'
name=
'id'
>
<div
class=
"form-group"
>
<label
class=
"tx-medium"
>
Question Category
<span
class=
"text-danger"
>
*
</span></label>
<input
type=
"text"
class=
"form-control"
id=
"question_category"
name=
"question_category"
placeholder=
"Question Category"
>
<!-- <p class="text-danger mt-2" id="tution_name_err"></p> -->
</div>
<div
class=
"modal-footer"
>
<button
type=
"submit"
class=
"btn ripple btn-primary"
id=
"save"
>
Save
</button>
<button
type=
"button"
class=
"btn ripple btn-secondary"
id=
"closemodel"
data-bs-dismiss=
"modal"
>
Close
</button>
</div>
</form>
</div>
</div>
</div>
</div>
<div
class=
"modal show"
id=
"statusModal"
style=
"display: none;"
aria-modal=
"true"
role=
"dialog"
>
<div
class=
"modal-dialog "
role=
"document"
>
<div
class=
"modal-content modal-content-demo"
>
<div
class=
"modal-header"
>
<h6
class=
"modal-title"
id=
"formTitle"
>
Change Status
</h6>
</div>
<div
class=
"modal-body"
>
<form
method=
"POST"
action=
"
<?php
echo
base_url
(
'ApplicationController/commonStatusChange/'
)
?>
"
id=
"tutionForm"
>
<input
type=
"hidden"
id=
'rowId'
name=
'id'
>
<input
type=
"hidden"
id=
'table'
name=
'table'
value=
"question_category"
>
<input
type=
"hidden"
id=
'rowStatus'
name=
'status'
>
<div
class=
"form-group"
>
<h4>
Are You Sure you want to change the status?
</h4>
</div>
<div
class=
"modal-footer"
>
<button
type=
"submit"
class=
"btn ripple btn-primary"
>
Yes
</button>
<button
type=
"button"
class=
"btn ripple btn-secondary closemodel"
id=
"closemodel"
data-bs-dismiss=
"modal"
>
Close
</button>
</div>
</form>
</div>
</div>
</div>
</div>
</body>
</html>
<script>
function
edit
(
id
,
question_category
)
{
$
(
'#id'
).
val
(
id
)
$
(
'#question_category'
).
val
(
question_category
)
$
(
'#formTitle'
).
text
(
'Edit Question Category'
)
$
(
"#tutionModal"
).
modal
(
'show'
);
}
function
deletetution
(
id
,
status
)
{
$
(
'#rowId'
).
val
(
id
)
$
(
'#rowStatus'
).
val
(
status
)
$
(
"#statusModal"
).
show
();
}
$
(
'#open-modal'
).
on
(
'click'
,
function
()
{
$
(
"#tutionModal"
).
modal
(
'show'
);
});
$
(
'.closemodel'
).
on
(
'click'
,
function
()
{
$
(
"#statusModal"
).
hide
();
});
</script>
\ No newline at end of file
admin/application/views/questions/add.php
View file @
d13c2d96
...
...
@@ -41,13 +41,14 @@
</select>
</div>
<div
class=
"form-group col-md-3"
>
<label
class=
"tx-medium"
>
Exam Type
<span
class=
"text-danger"
>
*
</span>
</label>
<label
class=
"tx-medium"
>
Question Category
<span
class=
"text-danger"
>
*
</span>
</label>
<select
name=
"
exam_type"
id=
"exam_type
"
class=
"form-control select2 modal-select"
>
<select
name=
"
question_category"
id=
"question_category
"
class=
"form-control select2 modal-select"
>
<option
value=
""
>
--Select--
</option>
<?php
foreach
(
$
exam_type
as
$row
)
{
?>
<option
value=
"
<?php
echo
$row
->
id
?>
"
>
<?php
echo
$row
->
exam_type_name
?>
</option>
<?php
foreach
(
$
question_category
as
$row
)
{
?>
<option
value=
"
<?php
echo
$row
->
id
?>
"
>
<?php
echo
$row
->
question_category
?>
</option>
<?php
}
?>
</select>
...
...
@@ -55,12 +56,12 @@
</div>
<div
class=
"form-group col-md-3"
>
<label
class=
"tx-medium"
>
Category
<span
class=
"text-danger"
>
*
</span>
</label>
<label
class=
"tx-medium"
>
Exam Type
<span
class=
"text-danger"
>
*
</span>
</label>
<select
name=
"
category"
id=
"category
"
class=
"form-control select2 modal-select"
>
<select
name=
"
exam_type"
id=
"exam_type
"
class=
"form-control select2 modal-select"
>
<option
value=
""
>
--Select--
</option>
<?php
foreach
(
$
category
as
$row
)
{
?>
<option
value=
"
<?php
echo
$row
->
id
?>
"
>
<?php
echo
$row
->
category
?>
</option>
<?php
foreach
(
$
exam_type
as
$row
)
{
?>
<option
value=
"
<?php
echo
$row
->
id
?>
"
>
<?php
echo
$row
->
exam_type_name
?>
</option>
<?php
}
?>
</select>
...
...
@@ -68,18 +69,19 @@
</div>
<div
class=
"form-group col-md-3"
>
<label
class=
"tx-medium"
>
Schedule
<span
class=
"text-danger"
>
*
</span>
</label>
<label
class=
"tx-medium"
>
Category
<span
class=
"text-danger"
>
*
</span>
</label>
<select
name=
"
schedule"
id=
"schedule
"
class=
"form-control select2 modal-select"
>
<select
name=
"
category"
id=
"category
"
class=
"form-control select2 modal-select"
>
<option
value=
""
>
--Select--
</option>
<?php
foreach
(
$
schedule
as
$row
)
{
?>
<option
value=
"
<?php
echo
$row
->
id
?>
"
>
<?php
echo
$row
->
exam_schedule
?>
</option>
<?php
foreach
(
$
category
as
$row
)
{
?>
<option
value=
"
<?php
echo
$row
->
id
?>
"
>
<?php
echo
$row
->
category
?>
</option>
<?php
}
?>
</select>
</div>
<div
class=
"form-group col-md-12 mt-3"
>
...
...
admin/application/views/questions/edit.php
View file @
d13c2d96
...
...
@@ -40,6 +40,21 @@
</select>
</div>
<div
class=
"form-group col-md-3"
>
<label
class=
"tx-medium"
>
Question Category
<span
class=
"text-danger"
>
*
</span>
</label>
<select
name=
"question_category"
id=
"question_category"
class=
"form-control select2 modal-select"
>
<option
value=
""
>
--Select--
</option>
<?php
foreach
(
$question_category
as
$row
)
{
?>
<option
<?=
$default
[
'question_category'
]
==
$row
->
id
?
'selected '
:
''
?>
value=
"
<?php
echo
$row
->
id
?>
"
>
<?php
echo
$row
->
question_category
?>
</option>
<?php
}
?>
</select>
</div>
<div
class=
"form-group col-md-3"
>
<label
class=
"tx-medium"
>
Exam Type
<span
class=
"text-danger"
>
*
</span>
</label>
...
...
@@ -65,18 +80,8 @@
</select>
</div>
<div
class=
"form-group col-md-3"
>
<label
class=
"tx-medium"
>
Schedule
<span
class=
"text-danger"
>
*
</span>
</label>
<select
name=
"schedule"
id=
"schedule"
class=
"form-control select2 modal-select"
>
<option
value=
""
>
--Select--
</option>
<?php
foreach
(
$schedule
as
$row
)
{
?>
<option
<?=
$default
[
'schedule_id'
]
==
$row
->
id
?
'selected '
:
''
?>
value=
"
<?php
echo
$row
->
id
?>
"
>
<?php
echo
$row
->
exam_schedule
?>
</option>
<?php
}
?>
</select>
</div>
...
...
admin/application/views/questions/view.php
View file @
d13c2d96
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment