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
af7b2a03
Commit
af7b2a03
authored
Mar 12, 2024
by
Manoj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
question changes
parent
62a211f0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
264 additions
and
346 deletions
+264
-346
ApplicationController.php
admin/application/controllers/ApplicationController.php
+9
-2
add.php
admin/application/views/questions/add.php
+159
-247
view.php
admin/application/views/questions/view.php
+96
-97
No files found.
admin/application/controllers/ApplicationController.php
View file @
af7b2a03
...
...
@@ -571,6 +571,14 @@ class ApplicationController extends CI_Controller
$this
->
session
->
set_flashdata
(
'alert_danger'
,
'Record Deleted successfully!'
);
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
)
{
...
...
admin/application/views/questions/add.php
View file @
af7b2a03
<link
href=
"https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.css"
rel=
"stylesheet"
>
<script
src=
"https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.js"
></script>
<div
class=
"row align-items-center"
>
<div
class=
"col-sm-6"
>
<div
class=
"page-title-box"
>
<!-- <h4 class="font-size-18">Pages</h4> -->
<!DOCTYPE html>
<html
lang=
"en"
>
</div>
</div>
<div
class=
"col-sm-6"
>
<div
class=
"float-right d-none d-md-block"
>
<!-- 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 -->
<!-- <a class="btn btn-primary waves-effect waves-light" href="
<?php
echo
base_url
();
?>
Pages/get_pages">
<i class="mdi mdi-plus mr-2"></i>
</a> -->
</div>
</div>
</div>
<br>
<?php
if
(
validation_errors
())
{
?>
<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
validation_errors
();
?>
</div>
<?php
}
?>
<?php
if
(
$this
->
session
->
flashdata
(
'check_email_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>
<strong>
Success!
</strong>
<?php
echo
$this
->
session
->
flashdata
(
'check_email_alert_danger'
);
?>
</div>
<?php
}
?>
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
<h4
class=
"card-title"
>
Add Question
</h4><bR>
<form
action=
"
<?php
echo
base_url
();
?>
ApplicationController/questionAdd"
method=
"post"
enctype=
"multipart/form-data"
id=
"registration_form"
>
<div
class=
"row"
>
<div
class=
"form-group col-md-4"
>
<label
class=
"tx-medium"
>
Academic Year
<span
class=
"text-danger"
>
*
</span>
</label>
<select
name=
"academic"
id=
"academic"
class=
"form-control select2 modal-select"
>
<option
value=
""
>
--Select--
</option>
<?php
foreach
(
$academic_year
as
$row
)
{
?>
<option
value=
"
<?php
echo
$row
->
id
?>
"
>
<?php
echo
$row
->
year
?>
</option>
<head>
<!-- Title -->
<title>
Question
</title>
<!-- Meta -->
<?php
}
?>
</select>
<style>
.custom-card
{
margin-top
:
120px
;
}
</style>
</div>
<div
class=
"form-group col-md-4"
>
<label
class=
"tx-medium"
>
Exam Type
<span
class=
"text-danger"
>
*
</span>
</label>
</head>
<select
name=
"exam_type"
id=
"exam_type"
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>
<body>
<?php
}
?>
</select>
<div
class=
"row p-5 custom-card"
>
<div
class=
"col-lg-12"
>
<div
class=
"card "
>
<div
class=
"card-body"
>
<h2
class=
"card-title"
>
Add Question
</h2><bR>
<form
action=
"
<?php
echo
base_url
();
?>
ApplicationController/questionAdd"
method=
"post"
enctype=
"multipart/form-data"
id=
"registration_form"
>
</div>
<div
class=
"row"
>
<div
class=
"form-group col-md-4"
>
<label
class=
"tx-medium"
>
Academic Year
<span
class=
"text-danger"
>
*
</span>
</label>
<div
class=
"form-group col-md-4"
>
<label
class=
"tx-medium"
>
Category
<span
class=
"text-danger"
>
*
</span>
</label>
<select
name=
"academic"
id=
"academic"
class=
"form-control select2 modal-select"
>
<option
value=
""
>
--Select--
</option>
<?php
foreach
(
$academic_year
as
$row
)
{
?>
<option
value=
"
<?php
echo
$row
->
id
?>
"
>
<?php
echo
$row
->
year
?>
</option>
<select
name=
"category"
id=
"category"
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
}
?>
</select>
<?php
}
?>
</select>
</div>
<div
class=
"form-group col-md-4"
>
<label
class=
"tx-medium"
>
Exam Type
<span
class=
"text-danger"
>
*
</span>
</label>
</div>
<select
name=
"exam_type"
id=
"exam_type"
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
}
?>
</select>
<div
class=
"form-group col-md-12"
>
<label
class=
"required"
>
Question
</label>
<!-- <textarea name="email_content" id="email_content" rows="5" autocomplete="off" class="form-control" placeholder=""></textarea> -->
<textarea
name=
"question"
id=
"summernote"
autocomplete=
"off"
class=
"form-control"
placeholder=
" Question"
></textarea>
</div>
<?php
if
(
form_error
(
'question'
))
{
?>
<div
class=
"text-danger alert-dismissible fade show mt-1"
role=
"alert"
>
<?php
echo
form_error
(
'question'
);
?>
</div>
<?php
}
?>
<div
class=
"form-group col-md-4"
>
<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
(
$category
as
$row
)
{
?>
<option
value=
"
<?php
echo
$row
->
id
?>
"
>
<?php
echo
$row
->
category
?>
</option>
<?php
}
?>
</select>
</div>
</div>
<div
class=
"form-group col-md-3"
>
<label
class=
"required"
>
Option A
</label>
<!-- <input name="subject" id="subject" type="text" class="form-control" placeholder="Subject" value="
<?php
echo
$email_subject
;
?>
"> -->
<input
name=
"option_a"
id=
"option_a"
type=
"text"
class=
"form-control"
placeholder=
"Option A"
value=
""
>
<?php
if
(
form_error
(
'option_a'
))
{
?>
<div
class=
"text-danger alert-dismissible fade show mt-1"
role=
"alert"
>
<?php
echo
form_error
(
'option_a'
);
?>
</div>
<?php
}
?>
</div>
<div
class=
"form-group col-md-3"
>
<label
class=
"required"
>
Option B
</label>
<input
name=
"option_b"
id=
"option_b"
type=
"text"
class=
"form-control"
placeholder=
"Option B"
value=
""
>
<?php
if
(
form_error
(
'option_b'
))
{
?>
<div
class=
"text-danger alert-dismissible fade show mt-1"
role=
"alert"
>
<?php
echo
form_error
(
'option_b'
);
?>
</div>
<?php
}
?>
</div>
<div
class=
"form-group col-md-3"
>
<label
class=
"required"
>
Option C
</label>
<input
name=
"option_c"
id=
"option_c"
type=
"text"
class=
"form-control"
placeholder=
"Option C"
value=
""
>
<?php
if
(
form_error
(
'option_c'
))
{
?>
<div
class=
"text-danger alert-dismissible fade show mt-1"
role=
"alert"
>
<?php
echo
form_error
(
'option_c'
);
?>
</div>
<?php
}
?>
</div>
<div
class=
"form-group col-md-3"
>
<label
class=
"required"
>
Option D
</label>
<input
name=
"option_d"
id=
"option_d"
type=
"text"
class=
"form-control"
placeholder=
"Option D"
value=
""
>
<?php
if
(
form_error
(
'option_d'
))
{
?>
<div
class=
"text-danger alert-dismissible fade show mt-1"
role=
"alert"
>
<?php
echo
form_error
(
'option_d'
);
?>
</div>
<?php
}
?>
</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> -->
<textarea
name=
"question"
id=
"summernote"
autocomplete=
"off"
class=
"form-control"
placeholder=
" Question"
></textarea>
<div
class=
"form-group col-md-3"
>
<label
class=
"tx-medium"
>
Answer
<span
class=
"text-danger"
>
*
</span>
</label>
<?php
if
(
form_error
(
'question'
))
{
?>
<div
class=
"text-danger alert-dismissible fade show mt-1"
role=
"alert"
>
<?php
echo
form_error
(
'question'
);
?>
</div>
<?php
}
?>
<select
name=
"answer"
id=
"answer"
class=
"form-control select2 modal-select"
>
<option
value=
""
>
--Select Answer--
</option>
<option
value=
"a"
>
A
</option>
<option
value=
"b"
>
B
</option>
<option
value=
"c"
>
C
</option>
<option
value=
"d"
>
D
</option>
</select>
</div>
</div>
<div
class=
"form-group col-md-3 mt-3"
>
<label>
Option A
</label>
<!-- <input name="subject" id="subject" type="text" class="form-control" placeholder="Subject" value="
<?php
echo
$email_subject
;
?>
"> -->
<input
name=
"option_a"
id=
"option_a"
type=
"text"
class=
"form-control"
placeholder=
"Option A"
value=
""
>
<?php
if
(
form_error
(
'option_a'
))
{
?>
<div
class=
"text-danger alert-dismissible fade show mt-1"
role=
"alert"
>
<?php
echo
form_error
(
'option_a'
);
?>
</div>
<?php
}
?>
</div>
<div
class=
"form-group col-md-3 mt-3"
>
<label>
Option B
</label>
<input
name=
"option_b"
id=
"option_b"
type=
"text"
class=
"form-control"
placeholder=
"Option B"
value=
""
>
<?php
if
(
form_error
(
'option_b'
))
{
?>
<div
class=
"text-danger alert-dismissible fade show mt-1"
role=
"alert"
>
<?php
echo
form_error
(
'option_b'
);
?>
</div>
<?php
}
?>
</div>
<div
class=
"form-group col-md-3 mt-3"
>
<label>
Option C
</label>
<input
name=
"option_c"
id=
"option_c"
type=
"text"
class=
"form-control"
placeholder=
"Option C"
value=
""
>
<?php
if
(
form_error
(
'option_c'
))
{
?>
<div
class=
"text-danger alert-dismissible fade show mt-1"
role=
"alert"
>
<?php
echo
form_error
(
'option_c'
);
?>
</div>
<?php
}
?>
</div>
<div
class=
"form-group col-md-3 mt-3"
>
<label>
Option D
</label>
<input
name=
"option_d"
id=
"option_d"
type=
"text"
class=
"form-control"
placeholder=
"Option D"
value=
""
>
<?php
if
(
form_error
(
'option_d'
))
{
?>
<div
class=
"text-danger alert-dismissible fade show mt-1"
role=
"alert"
>
<?php
echo
form_error
(
'option_d'
);
?>
</div>
<?php
}
?>
</div>
<div
class=
"form-group col-md-3 mt-3"
>
<label
class=
"tx-medium"
>
Answer
<span
class=
"text-danger"
>
*
</span>
</label>
<select
name=
"answer"
id=
"answer"
class=
"form-control select2 modal-select"
>
<option
value=
""
>
--Select Answer--
</option>
<option
value=
"a"
>
A
</option>
<option
value=
"b"
>
B
</option>
<option
value=
"c"
>
C
</option>
<option
value=
"d"
>
D
</option>
</select>
</div>
</div>
<div
class=
"form-group mt-3 col-md-4"
>
<div
class=
""
>
<button
name=
"submit"
type=
"submit"
class=
"btn btn-primary waves-effect waves-light mr-1"
>
Submit
</button>
<a
href=
"
<?php
echo
base_url
(
'ApplicationController/faculty'
);
?>
"
class=
"btn btn-secondary waves-effect"
>
Cancel
</a>
</div>
</div>
</div>
</form>
<div
class=
"form-group mt-3 col-md-4"
>
<div
class=
""
>
<button
name=
"submit"
type=
"submit"
class=
"btn btn-primary waves-effect waves-light mr-1"
>
Submit
</button>
<a
href=
"
<?php
echo
base_url
(
'ApplicationController/viewQuestion'
);
?>
"
class=
"btn btn-secondary waves-effect"
>
Cancel
</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<body>
<script>
$
(
document
).
ready
(
function
()
{
$
(
'#summernote'
).
summernote
();
});
$
(
document
).
ready
(
function
()
{
$
(
'#registration_form'
).
validate
({
rules
:
{
facultyname
:
{
required
:
true
},
mobile
:
{
required
:
true
,
number
:
true
},
email
:
{
required
:
true
,
email
:
true
},
Password
:
{
required
:
true
},
confirm_password
:
{
required
:
true
,
equalTo
:
"#Password"
// Ensure it matches the password field
}
},
messages
:
{
facultyname
:
{
required
:
"Please enter your name"
},
mobile
:
{
required
:
"Please enter your mobile number"
,
number
:
"Please enter a valid mobile number"
},
email
:
{
required
:
"Please enter your email address"
,
email
:
"Please enter a valid email address"
},
Password
:
{
required
:
"Please enter a password"
},
confirm_password
:
{
required
:
"Please confirm your password"
,
equalTo
:
"Passwords do not match"
}
},
errorElement
:
'span'
,
errorPlacement
:
function
(
error
,
element
)
{
error
.
addClass
(
'invalid-feedback'
);
element
.
closest
(
'.form-group'
).
append
(
error
);
},
highlight
:
function
(
element
,
errorClass
,
validClass
)
{
$
(
element
).
addClass
(
'is-invalid'
);
},
unhighlight
:
function
(
element
,
errorClass
,
validClass
)
{
$
(
element
).
removeClass
(
'is-invalid'
);
}
});
});
let
pwd1
=
document
.
getElementById
(
'login_pass'
),
eye1
=
document
.
querySelector
(
'.showPwd1'
);
eye1
.
addEventListener
(
'click'
,
function
()
{
toggleType1
();
})
function
toggleType1
()
{
if
(
eye1
.
classList
.
contains
(
'closed'
))
{
pwd1
.
type
=
'password'
;
}
else
{
pwd1
.
type
=
'text'
;
}
eye1
.
classList
.
toggle
(
'closed'
);
}
//end of password toggle
//start of confirm password toggle
let
pwd2
=
document
.
getElementById
(
'login_pass2'
);
eye2
=
document
.
querySelector
(
'.showPwd2'
);
eye2
.
addEventListener
(
'click'
,
function
()
{
toggleType2
();
})
function
toggleType2
()
{
if
(
eye2
.
classList
.
contains
(
'closed'
))
{
pwd2
.
type
=
'password'
;
}
else
{
pwd2
.
type
=
'text'
;
}
eye2
.
classList
.
toggle
(
'closed'
);
}
</script>
</body>
<style
type=
"text/css"
>
.required
:after
{
content
:
" *"
!important
;
color
:
red
!important
;
</html>
<script>
function
edit
(
id
,
name
)
{
$
(
'#tution_name_err'
).
text
(
' '
)
$
(
'#id'
).
val
(
id
)
$
(
'#tution_name'
).
val
(
name
)
$
(
'#formTitle'
).
text
(
'Edit Tution'
)
$
(
"#tutionModal"
).
modal
(
'show'
);
}
function
deletetution
(
id
,
status
)
{
$
(
'#tutionId'
).
val
(
id
)
$
(
'#tutionStatus'
).
val
(
status
)
$
(
"#statusModal"
).
show
();
}
</style>
\ No newline at end of file
$
(
'#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/view.php
View file @
af7b2a03
<!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
)
?>
<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 -->
<a
href=
"
<?php
echo
base_url
();
?>
ApplicationController/questionAdd"
type=
"button"
class=
"btn btn-primary"
id=
"open-modal"
>
+ New Question
</a>
</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>
<th
class=
"wd-15p"
>
Exam Type
</th>
<th
class=
"wd-15p"
>
Category
</th>
<th
class=
"wd-15p"
>
Question
</th>
<th
class=
"wd-15p"
>
Action
</th>
</tr>
</thead>
<tbody>
<?php
foreach
(
$records
as
$row
)
{
?>
<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
(
$category
as
$cat
)
{
?>
<?=
(
$row
->
category
==
$cat
->
id
)
?
$cat
->
category
:
''
?>
<?php
}
?>
</td>
<td>
<?=
$row
->
question
;
?>
</td>
<td>
<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>
<?php
}
?>
</tbody>
</table>
</div>
</div>
<?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>
<?php
}
?>
<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%;"
>
<thead>
<tr>
<th
class=
"wd-20p"
>
S.No
</th>
<th
class=
"wd-25p"
>
Academic Year
</th>
<th
class=
"wd-15p"
>
Exam Type
</th>
<th
class=
"wd-15p"
>
Category
</th>
<th
class=
"wd-15p"
>
Question
</th>
<th
class=
"wd-15p"
>
Action
</th>
</tr>
</thead>
<tbody>
<?php
foreach
(
$records
as
$row
)
{
?>
<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
(
$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>
</td>
</tr>
<?php
}
?>
</tbody>
</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
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