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
669ba57c
Commit
669ba57c
authored
Mar 16, 2024
by
Manoj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changhes
parent
bab1caa6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
121 additions
and
2 deletions
+121
-2
ApplicationController.php
admin/application/controllers/ApplicationController.php
+29
-0
Completedlist.php
admin/application/views/masters/Completedlist.php
+92
-2
No files found.
admin/application/controllers/ApplicationController.php
View file @
669ba57c
...
...
@@ -646,6 +646,8 @@ class ApplicationController extends CI_Controller
$view_data
[
'records'
]
=
$query
->
result
();
$view_data
[
'page'
]
=
'Completed List'
;
$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'
=>
'Completed List'
,
...
...
@@ -2558,5 +2560,32 @@ class ApplicationController extends CI_Controller
}
public
function
assingExam
()
{
$user_ids
=
$this
->
input
->
post
(
'user_ids'
);
$schedule
=
$this
->
input
->
post
(
'schedule'
);
$question_category
=
$this
->
input
->
post
(
'question_category'
);
foreach
(
$user_ids
as
$id
)
{
$insert_array
=
array
(
'user_id'
=>
$id
,
'question_category'
=>
$question_category
,
'schedule'
=>
$schedule
,
);
$insert
=
$this
->
mcommon
->
common_insert
(
'exam_assigned'
,
$insert_array
);
// if( $insert){
// redirect('ApplicationController/completedformdetails');
// }
}
echo
json_encode
(
$insert
);
}
}
admin/application/views/masters/Completedlist.php
View file @
669ba57c
...
...
@@ -55,7 +55,7 @@
<div
class=
"card-header "
>
<div
class=
"row d-flex justify-content-start"
>
<div
class=
'col-md-2'
>
<
!-- <
div class='col-md-2'>
<select name="courseId" id="courseId" class="form-control filtercourse select2 ">
<option value="">-- Filter Course --</option>
<?php
foreach
(
$courses
as
$row
)
{
?>
...
...
@@ -71,6 +71,10 @@
<div class='col-md-4'></div>
<div>
<button type="button" class="btn btn-primary waves-effect waves-light" onclick="exportReportToExcel(this)">Export to Excel</button>
</div> -->
<div>
<button
type=
"button"
class=
"btn btn-primary waves-effect waves-light"
onclick=
"getCheckedId(this)"
>
Assing Test
</button>
</div>
</div>
...
...
@@ -116,7 +120,7 @@
<?php
foreach
(
$records
as
$i
=>
$row
)
{
?>
<tr>
<td><input
type=
"checkbox"
class=
"checkbox mr-2 shortList
"
name=
"short_list[]"
id=
"short_list
<?=
$i
;
?>
"
value=
"
<?=
$row
->
appid
;
?>
"
>
<?=
$i
+
1
?>
</td>
<td><input
type=
"checkbox"
class=
"checkbox mr-2 shortList
"
data-userId =
"
<?=
$row
->
user_id
?>
"
name=
"short_list[]"
id=
"short_list
<?=
$i
;
?>
"
value=
"
<?=
$row
->
appid
;
?>
"
>
<?=
$i
+
1
?>
</td>
<td>
<?=
$row
->
reference_no
?>
</td>
<td>
<?=
$row
->
application_no
?>
</td>
<td>
<?php
foreach
(
$courses
as
$course
){
if
(
$row
->
course_id
==
$course
->
id
){
echo
$course
->
short_name
?>
...
...
@@ -172,8 +176,57 @@
</div>
</div>
<div
class=
"modal fade"
id=
"assignModal"
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"
>
Assign Test
</h1>
<button
type=
"button"
class=
"btn-close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
></button>
</div>
<div
class=
"modal-body"
>
<form
method=
"POST"
id=
"feesForm"
action=
"
<?php
echo
base_url
(
'ApplicationController/addEditFees'
);
?>
"
>
<input
type=
"hidden"
id=
'id'
name=
'id[]'
>
<div
class=
"form-group col-md-12"
>
<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
value=
"
<?php
echo
$row
->
id
?>
"
>
<?php
echo
$row
->
question_category
?>
</option>
<?php
}
?>
</select>
</div>
<div
class=
"form-group col-md-12"
>
<label
class=
"tx-medium"
>
Exam 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
value=
"
<?php
echo
$row
->
id
?>
"
>
<?php
echo
$row
->
exam_schedule
?>
</option>
<?php
}
?>
</select>
</div>
<div
id=
"selectedAppIds"
style=
"display:none;"
></div>
<div
class=
"modal-footer"
>
<button
type=
"submit"
class=
"btn ripple btn-primary"
id=
"save"
>
Assign
</button>
</div>
</form>
</div>
</div>
</div>
</div>
</body>
</html>
...
...
@@ -341,4 +394,40 @@
}
});
}
function
getCheckedId
(){
$
(
'#assignModal'
).
modal
(
'show'
);
}
$
(
document
).
ready
(
function
()
{
$
(
'#feesForm'
).
submit
(
function
(
e
)
{
e
.
preventDefault
();
$
(
'#selectedAppIds'
).
empty
();
$
(
'input[name="short_list[]"]:checked'
).
each
(
function
()
{
var
userId
=
$
(
this
).
data
(
'userid'
);
$
(
'#selectedAppIds'
).
append
(
'<input type="hidden" name="user_ids[]" value="'
+
userId
+
'">'
);
});
var
formData
=
$
(
this
).
serialize
();
$
.
ajax
({
url
:
'
<?=
base_url
(
'ApplicationController/assingExam'
)
?>
'
,
type
:
'POST'
,
data
:
formData
,
success
:
function
(
response
)
{
$
(
'#assignModal'
).
modal
(
'hide'
);
window
.
location
.
href
=
'
<?=
base_url
(
"ApplicationController/completedformdetails"
)
?>
'
;
},
error
:
function
(
xhr
,
status
,
error
)
{
alert
(
"An error occurred: "
+
error
);
}
});
});
});
</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