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
38e9d7d1
Commit
38e9d7d1
authored
Mar 15, 2024
by
Hussain Mohamed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes
parent
fe1bf9ac
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
109 additions
and
6 deletions
+109
-6
ExamController.php
admin/application/controllers/ExamController.php
+19
-1
exam.php
admin/application/views/exam/exam.php
+39
-1
take_exam.php
admin/application/views/exam/take_exam.php
+0
-0
view_exam.php
admin/application/views/exam/view_exam.php
+51
-4
No files found.
admin/application/controllers/ExamController.php
View file @
38e9d7d1
...
...
@@ -36,8 +36,26 @@ class ExamController extends CI_Controller
$this
->
db
->
where
(
'es.status'
,
1
);
$this
->
db
->
group_by
(
'q.schedule_id'
);
$query
=
$this
->
db
->
get
();
return
$result
=
$query
->
result
();
return
$result
=
$query
->
result
();
}
public
function
takeExam
(
$id
)
{
$view_data
[
'questions'
]
=
$this
->
mcommon
->
records_all
(
'question'
,
array
(
'schedule_id'
=>
$id
));
$authId
=
1
;
date_default_timezone_set
(
'Asia/Calcutta'
);
$date
=
date
(
'Y-m-d h:i:s'
,
strtotime
(
"+40 minutes"
));
$time
=
date
(
'h:i:s'
,
strtotime
(
"+40 minutes"
));
$view_data
[
'time'
]
=
$time
;
$view_data
[
'date'
]
=
$date
;
$data
=
array
(
'title'
=>
'View Exam'
,
'page'
=>
'View Exam'
,
'content'
=>
$this
->
load
->
view
(
'exam/exam'
,
$view_data
,
true
),
);
$this
->
load
->
view
(
'base/base_template'
,
$data
);
}
}
...
...
admin/application/views/exam/exam.php
View file @
38e9d7d1
...
...
@@ -5,7 +5,18 @@
<div
class=
"content-body"
>
<div
class=
"container-fluid"
>
<!-- row -->
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-xl-12"
>
<div
class=
"page-title"
>
<h4><span
class=
"pull-right"
id=
"time"
>
<?=
$time
?>
</span></h4>
<div>
</div>
</div>
</div>
<div
class=
"col-xl-12"
>
<div
class=
"card"
>
<div
class=
"card-header"
>
...
...
@@ -95,4 +106,31 @@
<!--**********************************
Content body end
***********************************-->
<script>
function
updateTime
()
{
var
date
=
"
<?php
echo
$date
?>
"
;
var
currentTime
=
new
Date
(
date
);
// Subtract 40 minutes from the current time
//currentTime.setMinutes(currentTime.getMinutes() - 40);
currentTime
.
setSeconds
(
currentTime
.
getSeconds
()
+
1
);
// Format the time as HH:mm:ss
var
hours
=
currentTime
.
getHours
();
var
minutes
=
currentTime
.
getMinutes
();
var
seconds
=
currentTime
.
getSeconds
();
hours
=
(
hours
<
10
)
?
"0"
+
hours
:
hours
;
minutes
=
(
minutes
<
10
)
?
"0"
+
minutes
:
minutes
;
seconds
=
(
seconds
<
10
)
?
"0"
+
seconds
:
seconds
;
var
formattedTime
=
hours
+
":"
+
minutes
+
":"
+
seconds
;
$
(
'#time'
).
text
(
formattedTime
);
}
setInterval
(()
=>
{
updateTime
();
},
1000
);
</script>
admin/application/views/exam/take_exam.php
0 → 100644
View file @
38e9d7d1
admin/application/views/exam/view_exam.php
View file @
38e9d7d1
...
...
@@ -74,19 +74,56 @@
</html>
<div
class=
"modal fade"
id=
"examModal"
tabindex=
"-1"
aria-labelledby=
"exampleModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog modal-
dialog-center
"
>
<div
class=
"modal fade
bd-example-modal-lg show
"
id=
"examModal"
tabindex=
"-1"
aria-labelledby=
"exampleModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog modal-
lg
"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"exampleModalLabel"
>
Take Exam
</h5>
<button
type=
"button"
class=
"btn-close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
></button>
</div>
<div
class=
"modal-body"
>
<h4
class=
"text-center"
>
Asian College of Journalism
</h4>
<h5>
English Entrance Examination
</h5>
<br>
<h5><b>
Total time allowed:
</b>
30 minutes
</h5>
<h5><b>
Total marks:
</b>
40 minutes
</h5>
<h5>
<b>
Please note:
</b>
There are eight sections of multiple-choice questions. Please read the
instructions in each section before you start answering the questions. There are no
negative marks
</h5>
<h4
class=
"text-center"
>
SECTION 1
</h4>
<h5
class=
"text-danger"
>
Complete these sentences with the correct definite and indefinite articles in the list.
However, if you think the sentence does not need any of these articles, select ‘No change’ (5
marks)
</h5>
<h4
class=
"text-center"
>
SECTION 2
</h4>
<h5
class=
"text-danger"
>
Choose the sentence with the correct active voice and with the same tense as the original
sentence. (5 marks)
</h5>
<h4
class=
"text-center"
>
SECTION 3
</h4>
<h5
class=
"text-danger"
>
Complete the sentences with the appropriate words (quantifiers) from the list. (5
marks)
</h5>
<h4
class=
"text-center"
>
SECTION 4
</h4>
<h5
class=
"text-danger"
>
Complete the sentences with the appropriate word from the list. (5 marks)
</h5>
<h4
class=
"text-center"
>
SECTION 5
</h4>
<h5
class=
"text-danger"
>
Select the grammatically correct version of the sentences below. (5 marks)
</h5>
<h4
class=
"text-center"
>
SECTION 6
</h4>
<h5
class=
"text-danger"
>
Complete the sentences with the appropriate comparative form from the list. (5 marks)
</h5>
<h4
class=
"text-center"
>
SECTION 7
</h4>
<h5
class=
"text-danger"
>
Choose the appropriate word to complete these proverbs/sayings. (5 marks)
</h5>
<h4
class=
"text-center"
>
SECTION 8
</h4>
<h5
class=
"text-danger"
>
Choose the one word or phrase from the list that would best retain the meaning of the
original sentence. (5 marks)
</h5>
</div>
<div
class=
"modal-footer"
>
<a
href=
"
<?=
base_url
(
'ExamController/takeExam/'
)
.
$row
->
id
?>
"
class=
"btn btn-primary"
>
Take Exam
</a>
<a
href=
"
javascript:startExam('
<?=
$row
->
id
?>
')
"
class=
"btn btn-primary"
>
Take Exam
</a>
</div>
</div>
</div>
...
...
@@ -99,4 +136,13 @@ function takeExam(id)
$
(
'#examModal'
).
modal
(
'show'
);
}
function
startExam
(
id
)
{
if
(
confirm
(
"are you sure want to start exam?"
)
===
true
)
{
var
url
=
"
<?=
base_url
(
'ExamController/takeExam/'
)
?>
"
+
id
;
window
.
location
=
url
;
}
}
</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