├── .htaccess ├── README.md ├── assets ├── css │ ├── admin.css │ ├── examiner.css │ ├── login.css │ ├── main.css │ ├── manage-exam.css │ ├── student.css │ ├── student_home.css │ └── take-exam.css ├── images │ ├── admin.png │ ├── delete.svg │ ├── demo.gif │ ├── examiner_female.png │ ├── examiner_female_2.jpg │ ├── examiner_female_3.jpg │ ├── examiner_male.png │ ├── examiner_male_2.jpg │ ├── magnifying-glass.svg │ ├── menu-icon.svg │ ├── padlock.svg │ ├── pencil-edit-button.svg │ ├── plus.svg │ ├── student_female.png │ ├── student_female_2.jpg │ ├── student_female_3.jpg │ ├── student_female_3.webp │ ├── student_female_4.JPG │ ├── student_male.jpg │ ├── student_male_2.jpg │ ├── unilag-logo.png │ ├── unilag-logo.webp │ └── users.svg └── js │ └── date.js ├── bugs.txt ├── controllers ├── register-course.php ├── register-user.php ├── set-exam.php ├── set-questions.php └── submit-exam.php ├── helpers ├── connect.php ├── init.php ├── logout.php └── timeout.php ├── index.php ├── models ├── cbt_dump.sql ├── course-examiner.csv ├── course-student.csv ├── courses.csv ├── examination.csv ├── examiners.csv ├── questions.csv ├── schema.sql └── students.csv └── views ├── admin_home.php ├── examiner_home.php ├── login.php ├── manage-exam.php ├── student.php ├── student_home.php ├── take-exam.php └── test.php /.htaccess: -------------------------------------------------------------------------------- 1 | RewriteEngine On 2 | RewriteRule ^cbe-software/([^/]*)$ /cbe-software/index.php?page=$1 [L] -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Computer-Based Examination Software 2 | 3 | [Online Examination System](http://cbe-test.atwebpages.com/) implemented as the final project for my Computer Engineering Bachelor's Degree. 4 | 5 | ## Ta](ble of Content 6 | * [Demo](#demo) 7 | * [Features](#features) 8 | * [Built Using](#built-using) 9 | * [Design Inspiration](#design-inspo) 10 | * [Feedback](#feedback) 11 | * [Author](#author) 12 | 13 | 14 | 15 | ## Demo 16 | ![Game Demo](assets/images/demo.gif) 17 | 18 | ## Features 19 | * ### General Features 20 | - Cross-platform 21 | - Responsive 22 | - Accessible 23 | - Supports objective questions 24 | 25 | 26 | * ### User-specific features 27 | * #### Student 28 | 29 | - Resumption capability for students 30 | - Automatic grading 31 | - Question randomization 32 | 33 | * #### Examiner 34 | 35 | - Manage exams and set questions for assigned courses. 36 | - Activate exams. 37 | - Set exam time and instruction. 38 | - View all exam results of exams for assigned courses. 39 | 40 | * #### Administrator 41 | 42 | - Register users and courses. 43 | - View users and courses. 44 | - Modify and delete users/courses (TODO) 45 | 46 | 47 |
48 | 49 | ## Built Using: 50 | - HTML 51 | - CSS 52 | - JavaScript 53 | - Bootstrap 54 | - PHP 55 | - MySQL 56 | 57 | ## Design Inspiration 58 | The user interface of this project was inspired by [Abhinav Bassi](https://www.behance.net/abhibassi). 59 | 60 | ## Feedback 61 | Any questions or suggestions? Notice any bugs or glitches? Feel free to send me an [email](mailto:karenokonkwo29@gmail.com). 62 | 63 | ## Author 64 | Karen Chioma Okonkwo (2019). 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /assets/css/admin.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css?family=Patua+One|Be+Vietnam&display=swap'); 2 | * { 3 | box-sizing: border-box; 4 | } 5 | 6 | body { 7 | font-family: 'Be Vietnam', sans-serif; 8 | } 9 | 10 | .wrapper { 11 | display: flex; 12 | width: 100%; 13 | } 14 | 15 | .sidebar-header { 16 | font-family: 'Patua One', Verdana, Geneva, Tahoma, sans-serif; 17 | font-size: 1.8em; 18 | font-weight: 600; 19 | text-align: center; 20 | color: rgb(131, 136, 143); 21 | margin: 2em; 22 | } 23 | 24 | #sidebar { 25 | width: 300px; 26 | background-color: #191F25; 27 | height: 100vh; 28 | overflow-y: scroll; 29 | position: fixed; 30 | top: 0; 31 | left: 0; 32 | z-index: 999; 33 | transition: all 0.3s; 34 | } 35 | 36 | #sidebar.active { 37 | margin-left: -300px; 38 | } 39 | 40 | .components { 41 | margin: 20px auto 50px; 42 | } 43 | 44 | .components a:hover, .components .active a { 45 | background-color: #FFBD59; 46 | color: black; 47 | } 48 | 49 | .components a { 50 | font-size: 1.2em; 51 | color: white; 52 | display: block; 53 | padding: 1em; 54 | } 55 | 56 | .components a:hover { 57 | text-decoration: none; 58 | } 59 | 60 | .btn.logout { 61 | width: 50%; 62 | } 63 | 64 | .btn.logout:hover { 65 | background-color: rgb(255, 189, 89, 0.8); 66 | } 67 | 68 | .btn.logout a { 69 | text-decoration: none; 70 | color: black; 71 | } 72 | 73 | .menu { 74 | width: 40px; 75 | } 76 | 77 | main { 78 | background-color: rgba(247, 178, 76, 0.1); 79 | width: calc(100% - 300px); 80 | padding: 10px 30px; 81 | position: absolute; 82 | top: 0; 83 | right: 0; 84 | min-height: 100vh; 85 | } 86 | 87 | main.active { 88 | width: 100%; 89 | } 90 | 91 | main .tab-content { 92 | display: none; 93 | margin: 20px auto; 94 | } 95 | 96 | main .tab-content.show { 97 | display: block; 98 | } 99 | 100 | .home { 101 | display: flex; 102 | flex-direction: column; 103 | justify-content: center; 104 | align-items: center; 105 | text-align: center; 106 | } 107 | 108 | .home .avatar { 109 | width: 200px; 110 | width: 200px; 111 | } 112 | 113 | .home .welcome-message { 114 | font-family: 'Patua One', Verdana, Geneva, Tahoma, sans-serif; 115 | color: #8F4747; 116 | font-size: 2.5em; 117 | font-weight: 500; 118 | } 119 | 120 | .home .time { 121 | margin: 5px; 122 | font-size: 1.5em; 123 | } 124 | 125 | .tab-content:not(:first-of-type) header { 126 | display: flex; 127 | justify-content: space-between; 128 | border-bottom: 1px #ddd solid; 129 | padding-bottom: 10px; 130 | height: 100%; 131 | } 132 | 133 | .tab-content:not(:first-of-type) h1 { 134 | font-weight: 500; 135 | font-size: 2em; 136 | } 137 | 138 | header .left>* { 139 | vertical-align: middle; 140 | } 141 | 142 | .tab-content:not(:first-of-type) header form, header .left>*, button.add-users { 143 | display: inline-block; 144 | } 145 | 146 | .tab-content:not(:first-of-type) .search input[type=text] { 147 | background: url(../images/magnifying-glass.svg) no-repeat 10px 10px; 148 | background-size: 1em 1em; 149 | width: 150px; 150 | border: 1px solid #8F4747; 151 | padding: 0.3em 1em 0.3em 2.3em; 152 | border-radius: 20px; 153 | transition: all 0.7s ease 0s; 154 | font-size: 0.9em; 155 | } 156 | 157 | .tab-content:not(:first-of-type) .search input[type=text] { 158 | width: 220px; 159 | } 160 | 161 | .tab-content:not(:first-of-type) button.add { 162 | background: url(../images/plus.svg) 5px 4px no-repeat; 163 | background-size: 1.5em 1.5em; 164 | padding: 0.3em 1em 0.3em 2.3em; 165 | margin: 0 1em; 166 | border-radius: 15px; 167 | font-size: 0.8em; 168 | font-weight: 600; 169 | color: white; 170 | background-color: #8F4747; 171 | border: 2px solid #8F4747; 172 | text-transform: capitalize; 173 | cursor: pointer; 174 | } 175 | 176 | .user-image { 177 | width: 40px; 178 | border-radius: 50%; 179 | } 180 | 181 | img.user-action, .menu { 182 | width: 40px; 183 | padding: 5px; 184 | cursor: pointer; 185 | margin: 20px 10px 0px; 186 | display: none; 187 | } 188 | 189 | .modal-body { 190 | padding: 40px; 191 | } 192 | 193 | .modal .btn-save { 194 | background-color: #8F4747; 195 | color: white; 196 | } 197 | 198 | @media (max-width: 768px) { 199 | #sidebar { 200 | margin-left: -300px; 201 | } 202 | #sidebar.active { 203 | margin-left: 0; 204 | } 205 | main { 206 | width: 100%; 207 | } 208 | img.user-action, .menu { 209 | display: block; 210 | } 211 | } 212 | 213 | /* 214 | @media (min-width: 769px) { 215 | #sidebar { 216 | margin-left: 0; 217 | } 218 | } */ -------------------------------------------------------------------------------- /assets/css/examiner.css: -------------------------------------------------------------------------------- 1 | .results { 2 | text-align: center; 3 | } 4 | 5 | .show .tab-flex-cont { 6 | min-height: 90vh; 7 | display: flex; 8 | align-items: center; 9 | justify-content: center; 10 | } 11 | 12 | /* This is a name you want to change later */ 13 | 14 | .actual-tab-content { 15 | width: 100%; 16 | } 17 | 18 | .tab-content div:nth-last-of-type(2) { 19 | flex: 1; 20 | } 21 | 22 | .exam-item, .result-item { 23 | background-color: white; 24 | min-height: 80px; 25 | height: auto; 26 | margin: 15px auto; 27 | width: 90%; 28 | display: flex; 29 | justify-content: space-between; 30 | } 31 | 32 | .exam-item>*, .result-item>* { 33 | padding: 0 10px; 34 | } 35 | 36 | .exam-item .course-code, .result-item .course-code { 37 | color: white; 38 | font-size: 1.2em; 39 | font-weight: 500; 40 | text-align: center; 41 | width: 100px; 42 | line-height: 80px; 43 | vertical-align: middle; 44 | } 45 | 46 | .exam-item:nth-of-type(odd) .course-code, .result-cont:nth-of-type(odd) .course-code { 47 | background-color: #8F4747; 48 | } 49 | 50 | .exam-item:nth-of-type(even) .course-code, .result-cont:nth-of-type(even) .course-code { 51 | background-color: #D49E4E; 52 | } 53 | 54 | .exam-item .course-name, .result-item .course-name { 55 | flex-grow: 3; 56 | font-size: 1.6em; 57 | } 58 | 59 | .edit-exam, .create-exam { 60 | background-color: white; 61 | border: none; 62 | color: blue; 63 | cursor: pointer; 64 | } 65 | 66 | .edit-exam:hover { 67 | background-color: rgb(81, 81, 124); 68 | color: white; 69 | } 70 | 71 | .create-exam:hover { 72 | background-color: blue; 73 | color: white; 74 | } 75 | 76 | .edit-exam span, .create-exam span { 77 | font-size: 1.2em; 78 | margin: 0 4px; 79 | } 80 | 81 | .result-cont { 82 | margin: 20px auto; 83 | } 84 | 85 | .result-item { 86 | box-shadow: 1px 1px 2px 1px #ccc; 87 | min-height: 40px; 88 | cursor: pointer; 89 | margin: 20px auto 0; 90 | } 91 | 92 | .result-item:hover { 93 | box-shadow: 1px 1px 2px 1.3px #bbb; 94 | } 95 | 96 | .result-item .course-name { 97 | margin: 3px 0 5px; 98 | } 99 | 100 | .result-item .collapse-icon { 101 | font-size: 1.4em; 102 | vertical-align: middle; 103 | } 104 | 105 | .result-item .course-code { 106 | line-height: 40px; 107 | } 108 | 109 | .result-details { 110 | width: 90%; 111 | background-color: #f0ede8; 112 | margin: 0 auto 20px; 113 | padding: 20px; 114 | text-align: right; 115 | } -------------------------------------------------------------------------------- /assets/css/login.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #8f4747; 3 | width: 80%; 4 | margin: 0 auto; 5 | min-height: 100vh; 6 | display: flex; 7 | flex-direction: column; 8 | justify-content: center; 9 | } 10 | 11 | header { 12 | display: flex; 13 | justify-content: space-between; 14 | align-items: center; 15 | color: #ddd; 16 | text-align: center; 17 | flex-grow: 1; 18 | } 19 | 20 | header h1 { 21 | font-family: 'Patua One', Verdana, Geneva, Tahoma, sans-serif; 22 | font-size: 2.5em; 23 | font-weight: 500; 24 | } 25 | 26 | header img { 27 | width: 15em; 28 | padding: 10px; 29 | } 30 | 31 | main { 32 | flex-grow: 3; 33 | display: flex; 34 | flex-direction: column; 35 | justify-content: center; 36 | } 37 | 38 | main p { 39 | color: white; 40 | font-size: 3em; 41 | font-family: Verdana, Geneva, Tahoma, sans-serif; 42 | } 43 | 44 | main button { 45 | color: #8f4747; 46 | font-size: 2em; 47 | width: 20%; 48 | min-width: 170px; 49 | margin: 1em 0; 50 | padding: 5px; 51 | border-width: 0; 52 | border-radius: 5px; 53 | background-color: rgb(243, 222, 127); 54 | box-shadow: 2px 2px 3px #333; 55 | } 56 | 57 | /* Fix to the black background modal overlay problem */ 58 | 59 | .modal-backdrop { 60 | opacity: 0.5 !important; 61 | } 62 | 63 | /* Fix for vertically centering the modal */ 64 | 65 | .modal-dialog { 66 | transform: translate(0, -50%); 67 | top: 50%; 68 | margin: 0 auto; 69 | } 70 | 71 | .login-form .modal-header { 72 | text-align: center; 73 | background-color: #8f4747 !important; 74 | color: white; 75 | padding: 10px 0; 76 | margin: 10px 10px 0px; 77 | } 78 | 79 | .login-form p { 80 | text-align: center; 81 | } 82 | 83 | .login-form form { 84 | padding: 20px; 85 | } 86 | 87 | .login-form .form-group:last-of-type { 88 | margin-top: 30px; 89 | text-align: right; 90 | } 91 | 92 | .login-form .btn { 93 | background-color: #8f4747; 94 | color: white; 95 | } 96 | 97 | .login-form .btn.cls { 98 | background-color: #eee; 99 | color: red; 100 | } 101 | 102 | /* Media queries */ 103 | 104 | @media only screen and (max-width: 900px) { 105 | header h1 { 106 | font-size: 2.3em; 107 | } 108 | header img { 109 | width: 13em; 110 | } 111 | main p { 112 | font-size: 2.7em; 113 | } 114 | } 115 | 116 | @media only screen and (max-width: 800px) { 117 | main p { 118 | font-size: 2.5em; 119 | } 120 | main button { 121 | font-size: 1.8em; 122 | } 123 | } 124 | 125 | @media only screen and (max-width: 700px) { 126 | header h1 { 127 | font-size: 2em; 128 | } 129 | header img { 130 | width: 11em; 131 | } 132 | main p { 133 | font-size: 2.2em; 134 | } 135 | } 136 | 137 | @media only screen and (max-width:600px) { 138 | main p { 139 | font-size: 2em; 140 | } 141 | } 142 | 143 | @media only screen and (max-width:500px) { 144 | body { 145 | width: 90%; 146 | } 147 | header img { 148 | width: 9em; 149 | } 150 | main p { 151 | text-align: center; 152 | } 153 | main button { 154 | width: 100%; 155 | } 156 | } 157 | 158 | @media only screen and (max-width:300px) { 159 | header h1 { 160 | font-size: 1.5em; 161 | } 162 | } -------------------------------------------------------------------------------- /assets/css/main.css: -------------------------------------------------------------------------------- 1 | #index-page { 2 | font-size: 16px; 3 | } -------------------------------------------------------------------------------- /assets/css/manage-exam.css: -------------------------------------------------------------------------------- 1 | header h1 { 2 | /* font-weight: 600; 3 | font-size: 2.5em; */ 4 | color: #8F4747; 5 | } 6 | 7 | .tab-content.exam-details header { 8 | margin: 40px 0; 9 | /* text-align: center; */ 10 | } 11 | 12 | #examForm .form-group { 13 | margin: 40px 0; 14 | } 15 | 16 | #examForm label:not(.radio), #examForm legend { 17 | font-size: 1.3em; 18 | display: block; 19 | width: 100%; 20 | } 21 | 22 | #examForm .input-group-addon { 23 | font-size: 1.3em; 24 | } 25 | 26 | #examForm footer { 27 | width: 100%; 28 | text-align: center; 29 | } 30 | 31 | #examForm button[type=submit] { 32 | width: 100%; 33 | color: white; 34 | background-color: #8F4747; 35 | } -------------------------------------------------------------------------------- /assets/css/student.css: -------------------------------------------------------------------------------- 1 | .results { 2 | text-align: center; 3 | } 4 | 5 | .show .tab-flex-cont { 6 | min-height: calc(90vh - 45px); 7 | display: flex; 8 | align-items: center; 9 | justify-content: center; 10 | } 11 | 12 | /* This is a name you want to change later */ 13 | 14 | .actual-tab-content { 15 | width: 100%; 16 | } 17 | 18 | .tab-content div:nth-last-of-type(2) { 19 | flex: 1; 20 | } 21 | 22 | .exam-item, .result-item { 23 | background-color: white; 24 | min-height: 80px; 25 | height: auto; 26 | margin: 15px auto; 27 | width: 90%; 28 | display: flex; 29 | justify-content: space-between; 30 | } 31 | 32 | .exam-item>*, .result-item>* { 33 | padding: 0 10px; 34 | } 35 | 36 | .exam-item .course-code, .result-item .course-code { 37 | color: white; 38 | font-size: 1.2em; 39 | font-weight: 500; 40 | text-align: center; 41 | width: 100px; 42 | line-height: 80px; 43 | vertical-align: middle; 44 | } 45 | 46 | .exam-item:nth-of-type(odd) .course-code, .result-cont:nth-of-type(odd) .course-code { 47 | background-color: #8F4747; 48 | } 49 | 50 | .exam-item:nth-of-type(even) .course-code, .result-cont:nth-of-type(even) .course-code { 51 | background-color: #D49E4E; 52 | } 53 | 54 | .exam-item .course-name, .result-item .course-name { 55 | flex-grow: 3; 56 | font-size: 1.6em; 57 | } 58 | 59 | .start-exam { 60 | background-color: white; 61 | border: none; 62 | color: green; 63 | cursor: pointer; 64 | } 65 | 66 | .start-exam:hover { 67 | background-color: green; 68 | color: white; 69 | } 70 | 71 | .start-exam span { 72 | font-size: 1.2em; 73 | margin: 0 4px; 74 | } 75 | 76 | .result-cont { 77 | margin: 20px auto; 78 | } 79 | 80 | .result-item { 81 | box-shadow: 1px 1px 2px 1px #ccc; 82 | min-height: 40px; 83 | cursor: pointer; 84 | margin: 20px auto 0; 85 | } 86 | 87 | .result-item:hover { 88 | box-shadow: 1px 1px 2px 1.3px #bbb; 89 | } 90 | 91 | .result-item .course-name { 92 | margin: 3px 0 5px; 93 | } 94 | 95 | .result-item .collapse-icon { 96 | font-size: 1.4em; 97 | vertical-align: middle; 98 | } 99 | 100 | .result-item .course-code { 101 | line-height: 40px; 102 | } 103 | 104 | .result-details { 105 | width: 90%; 106 | background-color: #ece7df; 107 | margin: 0 auto 20px; 108 | padding: 20px; 109 | text-align: right; 110 | } -------------------------------------------------------------------------------- /assets/css/student_home.css: -------------------------------------------------------------------------------- 1 | body{ 2 | font-family: 'DM Serif Display', serif; 3 | } 4 | .container:first-of-type .row { 5 | display: flex; 6 | align-items: center; 7 | background-color: #8f4747; 8 | } 9 | 10 | .qPanel { 11 | display: none; 12 | } 13 | 14 | .qpanel.active { 15 | display: block; 16 | } 17 | 18 | #nav { 19 | margin: 10px; 20 | 21 | } 22 | .navbutton { 23 | cursor: pointer; 24 | padding: 5px; 25 | margin: 10px; 26 | border: 1px solid #bbb; 27 | border-radius: 3px; 28 | color: #8f4747; 29 | } 30 | 31 | .btn-prim { 32 | background-color: #8f4747; 33 | color: white; 34 | } 35 | 36 | .btn-primary { 37 | background-color: #8f4747; 38 | color: white; 39 | } 40 | 41 | .qButton{ 42 | cursor: pointer; 43 | padding: 6px 5px; 44 | min-width: 10px; 45 | min-height: 10px; 46 | border: 1px solid #bbb; 47 | border-radius: 3px; 48 | color: #8f4747;} 49 | 50 | .timer{ 51 | float: right; 52 | } 53 | 54 | .qButton.current{ 55 | color: white; 56 | background-color: #8f4747; 57 | } 58 | 59 | 60 | 61 | input[name="Submit_ans"]{ 62 | display: block; 63 | margin: 50px auto 20px; 64 | } 65 | -------------------------------------------------------------------------------- /assets/css/take-exam.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css?family=Patua+One|Be+Vietnam&display=swap'); 2 | * { 3 | box-sizing: border-box; 4 | } 5 | 6 | body { 7 | font-family: 'Be Vietnam', sans-serif; 8 | } 9 | 10 | .wrapper { 11 | display: flex; 12 | width: 100%; 13 | } 14 | 15 | .sidebar-header { 16 | font-family: 'Patua One', Verdana, Geneva, Tahoma, sans-serif; 17 | font-size: 1.8em; 18 | font-weight: 600; 19 | text-align: center; 20 | color: rgb(131, 136, 143); 21 | margin: 2em; 22 | } 23 | 24 | #sidebar { 25 | width: 300px; 26 | background-color: #191F25; 27 | height: 100vh; 28 | overflow-y: scroll; 29 | position: fixed; 30 | top: 0; 31 | left: 0; 32 | z-index: 999; 33 | transition: all 0.3s; 34 | font-family: 'Be Vietnam', sans-serif; 35 | } 36 | 37 | #sidebar.active { 38 | margin-left: -300px; 39 | } 40 | 41 | #sidebar .btn { 42 | width: 50%; 43 | } 44 | 45 | #sidebar .btn:hover { 46 | background-color: rgb(255, 189, 89, 0.8); 47 | } 48 | 49 | #sidebar .btn a { 50 | text-decoration: none; 51 | color: black; 52 | } 53 | 54 | .menu { 55 | width: 40px; 56 | } 57 | 58 | main { 59 | background-color: rgb(166, 42, 42, 0.1); 60 | width: calc(100% - 300px); 61 | padding: 10px 30px; 62 | position: absolute; 63 | top: 0; 64 | right: 0; 65 | min-height: 100vh; 66 | } 67 | 68 | main.active { 69 | width: 100%; 70 | } 71 | 72 | main .tab { 73 | display: none; 74 | margin: 20px auto; 75 | } 76 | 77 | main .tab.show { 78 | display: block; 79 | } 80 | 81 | @media (max-width: 768px) { 82 | #sidebar { 83 | margin-left: -300px; 84 | } 85 | #sidebar.active { 86 | margin-left: 0; 87 | } 88 | main { 89 | width: 100%; 90 | } 91 | } 92 | 93 | /* Specific Styles */ 94 | 95 | .timer { 96 | font-size: 1.3em; 97 | font-weight: 400; 98 | width: 100%; 99 | text-align: center; 100 | border-top: 1.5px solid #82878F; 101 | border-bottom: 1.5px solid #82878F; 102 | padding: 15px 0; 103 | color: white; 104 | } 105 | 106 | .question-no-list { 107 | list-style-type: none; 108 | color: white; 109 | font-size: 1em; 110 | padding: 15px 30px; 111 | text-align: center; 112 | display: flex; 113 | flex-wrap: wrap; 114 | border-bottom: 1.5px solid #82878F; 115 | } 116 | 117 | .question-no { 118 | font-weight: 600; 119 | background-color: #82878F; 120 | height: 1.5em; 121 | width: 1.5em; 122 | margin: 8px; 123 | border-radius: 5px; 124 | line-height: 1.5em; 125 | text-align: center; 126 | vertical-align: middle; 127 | cursor: pointer; 128 | } 129 | 130 | .question-no.active { 131 | background-color: rgb(255, 189, 89, 0.8); 132 | } 133 | 134 | .show .tab-flex-cont { 135 | min-height: 90vh; 136 | display: flex; 137 | align-items: center; 138 | align-items: center; 139 | justify-content: center; 140 | } 141 | 142 | .tab { 143 | width: 100%; 144 | font-family: 'Be Vietnam', sans-serif; 145 | } 146 | 147 | .tab div:nth-last-of-type(2) { 148 | flex: 1; 149 | } 150 | 151 | div.submit { 152 | margin-top: 50px; 153 | } 154 | 155 | .start-exam { 156 | display: block; 157 | background-color: white; 158 | border: none; 159 | color: green; 160 | cursor: pointer; 161 | padding: 3px 3px 5px 5px; 162 | text-align: center; 163 | margin: 15px auto; 164 | font-weight: 500; 165 | border-radius: 2px; 166 | } 167 | 168 | .start-exam:hover { 169 | background-color: green; 170 | color: white; 171 | } 172 | 173 | .start-exam span { 174 | font-size: 1.2em; 175 | margin: 0 4px; 176 | } 177 | 178 | .questions .tab-flex-cont, .questions .tab-content { 179 | width: 100%; 180 | } 181 | 182 | .tab header { 183 | display: flex; 184 | justify-content: space-between; 185 | margin-bottom: 40px; 186 | padding: 10px 20px; 187 | color: rgb(112, 56, 56); 188 | } 189 | 190 | .tab header h1 { 191 | font-weight: 700; 192 | color: #D49E4E; 193 | } 194 | 195 | #clockbox { 196 | text-align: right; 197 | } 198 | 199 | form { 200 | background-color: white; 201 | padding: 20px 30px; 202 | } 203 | 204 | .question-cont { 205 | margin-bottom: 10px; 206 | display: none; 207 | } 208 | 209 | .question-cont.show { 210 | display: block; 211 | } 212 | 213 | .question-cont>*:not(.options-group) { 214 | font-size: 1.05em; 215 | font-weight: bold; 216 | } 217 | 218 | .question-control { 219 | margin-top: 30px; 220 | display: flex; 221 | justify-content: space-around; 222 | } 223 | 224 | .question-control button { 225 | width: 100px; 226 | color: #8F4747; 227 | } 228 | 229 | .question-control button:not(:disabled):hover { 230 | background-color: #8F4747; 231 | color: white; 232 | } -------------------------------------------------------------------------------- /assets/images/admin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KarenOk/Computer-Based-Examination-Software/3443cd83a1f25cb70469c16a4f73785f5a5de3f8/assets/images/admin.png -------------------------------------------------------------------------------- /assets/images/delete.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /assets/images/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KarenOk/Computer-Based-Examination-Software/3443cd83a1f25cb70469c16a4f73785f5a5de3f8/assets/images/demo.gif -------------------------------------------------------------------------------- /assets/images/examiner_female.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KarenOk/Computer-Based-Examination-Software/3443cd83a1f25cb70469c16a4f73785f5a5de3f8/assets/images/examiner_female.png -------------------------------------------------------------------------------- /assets/images/examiner_female_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KarenOk/Computer-Based-Examination-Software/3443cd83a1f25cb70469c16a4f73785f5a5de3f8/assets/images/examiner_female_2.jpg -------------------------------------------------------------------------------- /assets/images/examiner_female_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KarenOk/Computer-Based-Examination-Software/3443cd83a1f25cb70469c16a4f73785f5a5de3f8/assets/images/examiner_female_3.jpg -------------------------------------------------------------------------------- /assets/images/examiner_male.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KarenOk/Computer-Based-Examination-Software/3443cd83a1f25cb70469c16a4f73785f5a5de3f8/assets/images/examiner_male.png -------------------------------------------------------------------------------- /assets/images/examiner_male_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KarenOk/Computer-Based-Examination-Software/3443cd83a1f25cb70469c16a4f73785f5a5de3f8/assets/images/examiner_male_2.jpg -------------------------------------------------------------------------------- /assets/images/magnifying-glass.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /assets/images/menu-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /assets/images/padlock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /assets/images/pencil-edit-button.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /assets/images/plus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /assets/images/student_female.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KarenOk/Computer-Based-Examination-Software/3443cd83a1f25cb70469c16a4f73785f5a5de3f8/assets/images/student_female.png -------------------------------------------------------------------------------- /assets/images/student_female_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KarenOk/Computer-Based-Examination-Software/3443cd83a1f25cb70469c16a4f73785f5a5de3f8/assets/images/student_female_2.jpg -------------------------------------------------------------------------------- /assets/images/student_female_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KarenOk/Computer-Based-Examination-Software/3443cd83a1f25cb70469c16a4f73785f5a5de3f8/assets/images/student_female_3.jpg -------------------------------------------------------------------------------- /assets/images/student_female_3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KarenOk/Computer-Based-Examination-Software/3443cd83a1f25cb70469c16a4f73785f5a5de3f8/assets/images/student_female_3.webp -------------------------------------------------------------------------------- /assets/images/student_female_4.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KarenOk/Computer-Based-Examination-Software/3443cd83a1f25cb70469c16a4f73785f5a5de3f8/assets/images/student_female_4.JPG -------------------------------------------------------------------------------- /assets/images/student_male.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KarenOk/Computer-Based-Examination-Software/3443cd83a1f25cb70469c16a4f73785f5a5de3f8/assets/images/student_male.jpg -------------------------------------------------------------------------------- /assets/images/student_male_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KarenOk/Computer-Based-Examination-Software/3443cd83a1f25cb70469c16a4f73785f5a5de3f8/assets/images/student_male_2.jpg -------------------------------------------------------------------------------- /assets/images/unilag-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KarenOk/Computer-Based-Examination-Software/3443cd83a1f25cb70469c16a4f73785f5a5de3f8/assets/images/unilag-logo.png -------------------------------------------------------------------------------- /assets/images/unilag-logo.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KarenOk/Computer-Based-Examination-Software/3443cd83a1f25cb70469c16a4f73785f5a5de3f8/assets/images/unilag-logo.webp -------------------------------------------------------------------------------- /assets/images/users.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /assets/js/date.js: -------------------------------------------------------------------------------- 1 | 2 | let days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; 3 | let greetingElem = document.querySelector(".greeting"); 4 | let timeElem = document.querySelector(".time"); 5 | let greeting, time; 6 | let date = new Date(); 7 | let hours = date.getHours(); 8 | 9 | if (hours >= 0 && hours < 12) { 10 | greeting = "Good morning,"; 11 | } else if (hours >= 12 && hours < 17) { 12 | greeting = "Good afternoon,"; 13 | } else { 14 | greeting = "Good evening,"; 15 | } 16 | 17 | time = `${days[date.getDay()]}
${date.toLocaleDateString()}
${date.toLocaleTimeString()}` 18 | 19 | greetingElem.innerHTML = greeting; 20 | timeElem.innerHTML = time; 21 | 22 | 23 | 24 | 25 | 26 | // var tday = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; 27 | // var tmonth = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", 28 | // "November", "December" 29 | // ]; 30 | 31 | // function GetClock() { 32 | // var d = new Date(); 33 | // var nday = d.getDay(), 34 | // nmonth = d.getMonth(), 35 | // ndate = d.getDate(), 36 | // nyear = d.getFullYear(); 37 | // var nhour = d.getHours(), 38 | // nmin = d.getMinutes(), 39 | // ap; 40 | // if (nhour == 0) { 41 | // ap = " AM"; 42 | // nhour = 12; 43 | // } else if (nhour < 12) { 44 | // ap = " AM"; 45 | // } else if (nhour == 12) { 46 | // ap = " PM"; 47 | // } else if (nhour > 12) { 48 | // ap = " PM"; 49 | // nhour -= 12; 50 | // } 51 | 52 | // if (nmin <= 9) nmin = "0" + nmin; 53 | 54 | // var clocktext = "" + tday[nday] + ",
" + tmonth[nmonth] + " " + ndate + ", " + nyear + "
" + 55 | // nhour + ":" + nmin + ap + ""; 56 | // document.getElementById('clockbox').innerHTML = clocktext; 57 | // } 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | // var tday = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; 68 | // var tmonth = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", 69 | // "November", "December" 70 | // ]; 71 | 72 | // function GetClock(d, format) { 73 | 74 | // // FORMATS 75 | // // -- text-br = text with line breaks 76 | // // -- text = text with line breaks 77 | // // -- d/m/y-gr = 23/45/1964 with greeting 78 | 79 | // var nday = d.getDay(), 80 | // nmonth = d.getMonth(), 81 | // ndate = d.getDate(), 82 | // nyear = d.getFullYear(); 83 | // var nhour = d.getHours(), 84 | // nmin = d.getMinutes(), 85 | // nsec = d.getSeconds(), 86 | // ap; 87 | // var greeting, clocktext; 88 | // if (nhour == 0) { 89 | // ap = " AM"; 90 | // nhour = 12; 91 | // } else if (nhour < 12) { 92 | // ap = " AM"; 93 | // } else if (nhour == 12) { 94 | // ap = " PM"; 95 | // } else if (nhour > 12) { 96 | // ap = " PM"; 97 | // nhour -= 12; 98 | // } 99 | 100 | // if (nmin <= 9) nmin = "0" + nmin; 101 | // if (nsec <= 9) nsec = "0" + nsec; 102 | 103 | // if (hours >= 0 && hours < 12) { 104 | // greeting = "Good morning,"; 105 | // } else if (hours >= 12 && hours < 17) { 106 | // greeting = "Good afternoon,"; 107 | // } else { 108 | // greeting = "Good evening,"; 109 | // } 110 | 111 | // if (format === "text") { 112 | // clocktext = "" + tday[nday] + ", " + tmonth[nmonth] + " " + ndate + ", " + nyear + "
" + 113 | // nhour + ":" + nmin + ap + ""; 114 | // } else if (format === "text-br") { 115 | // locktext = "" + tday[nday] + ",
" + tmonth[nmonth] + " " + ndate + ", " + nyear + "
" + 116 | // nhour + ":" + nmin + ap + ""; 117 | // } else if (format === "d/m/y-gr") { 118 | // // clocktext = `${tday[nday]}
${date.toLocaleDateString()}
${date.toLocaleTimeString()}` 119 | // clocktext = tday[nday] + "
" + ndate + "/" + (nmonth + 1) + "/" + nyear + "
" + nhour + ":" + nmin + ":" + nsec + ap + ""; 120 | // } 121 | 122 | // console.log(clocktext); 123 | 124 | // return clocktext; 125 | 126 | // } 127 | -------------------------------------------------------------------------------- /bugs.txt: -------------------------------------------------------------------------------- 1 | Login Form Reload 2 | 3 | FIXED - Session time out - only shows logout button 4 | 5 | Not Responsive -------------------------------------------------------------------------------- /controllers/register-course.php: -------------------------------------------------------------------------------- 1 |
"; 7 | 8 | $usertype = $_POST["user-type"]; 9 | $username = $_POST["username"]; 10 | $firstName = $_POST["fname"]; 11 | $lastName = $_POST["lname"]; 12 | $imageUrl = $_POST["img-url"]; 13 | $gender = $_POST["user-gender"]; 14 | $password = $_POST["password"]; 15 | $cpassword = $_POST["cpassword"]; 16 | $hashed_password = password_hash($password, PASSWORD_DEFAULT); 17 | 18 | if ($password !== $cpassword) { 19 | die("Password and Confirm Password don't match."); 20 | } 21 | 22 | if ($usertype === "administrator") { 23 | $sql = " INSERT INTO Administrator (username, firstName, lastName, imageUrl, pw) VALUES ('$username', '$firstName', '$lastName', '$imageUrl', '$hashed_password')"; 24 | 25 | } else if ($usertype === "examiner") { 26 | $sql = " INSERT INTO Examiner (username, firstName, lastName, imageUrl, gender, pw) VALUES ('$username', '$firstName', '$lastName', '$imageUrl', '$gender', '$hashed_password')"; 27 | 28 | } else if ($usertype === "student") { 29 | $sql = " INSERT INTO Student (username, firstName, lastName, imageUrl, gender, pw) VALUES ('$username', '$firstName', '$lastName', '$imageUrl', '$gender', '$hashed_password')"; 30 | 31 | } 32 | 33 | $result = mysqli_query($conn, $sql); 34 | 35 | // echo $sql; 36 | // echo "

"; 37 | 38 | if ($result) { 39 | header("location: ../index.php"); 40 | } else { 41 | echo "There was an error registering this user"; 42 | echo mysqli_connect_error($result); 43 | } 44 | } -------------------------------------------------------------------------------- /controllers/set-exam.php: -------------------------------------------------------------------------------- 1 |
"; 7 | 8 | $edit = $_POST["edit"]; 9 | $instruction = $_POST["instruction"]; 10 | $durationHr = $_POST["duration-hr"]; 11 | $durationMin = $_POST["duration-min"]; 12 | $durationSec = $_POST["duration-sec"]; 13 | $duration = $durationHr . ":" . $durationMin . ":" . $durationSec; 14 | $activated = $_POST["activated"]; 15 | $lastModified = $_POST["lastModified"]; 16 | 17 | if ($edit) { 18 | // If you're updating an already existing exam 19 | $examId = $_POST["examId"]; 20 | $sql = "UPDATE Exam 21 | SET 22 | instruction='$instruction', 23 | timeDuration = '$duration', 24 | activated = '$activated', 25 | lastModified = '$lastModified' 26 | WHERE 27 | examId = '$examId' 28 | "; 29 | 30 | } else { 31 | // If you're creating a new exam 32 | $courseId = $_POST["courseId"]; 33 | $createdAt = $_POST["createdAt"]; 34 | 35 | $sql = "INSERT INTO Exam (instruction, timeDuration, activated, createdAt, lastModified, courseId ) VALUES 36 | ('$instruction', '$duration', '$activated', '$createdAt', '$lastModified', '$courseId') 37 | "; 38 | 39 | } 40 | 41 | echo $sql; 42 | $result = mysqli_query($conn, $sql); 43 | 44 | if ($result) { 45 | header("location: ../index.php"); 46 | } else { 47 | echo "An error occured: "; 48 | echo mysqli_connect_error($result); 49 | } 50 | } -------------------------------------------------------------------------------- /controllers/set-questions.php: -------------------------------------------------------------------------------- 1 |
"; 9 | 10 | $question = $_POST["question"]; 11 | $option1 = $_POST["option-1"]; 12 | $option2 = $_POST["option-2"]; 13 | $option3 = $_POST["option-3"]; 14 | $option4 = $_POST["option-4"]; 15 | $option5 = $_POST["option-5"]; 16 | $correct_option = $_POST["correct-answer"]; 17 | $examId = $_POST["examId"]; 18 | 19 | echo $_POST[$correct_option]; 20 | echo "
"; 21 | 22 | $sql = "INSERT INTO Question (question, option1, option2, option3, option4, option5, answer, examId) VALUES 23 | ('$question', '$option1', '$option2', '$option3', '$option4', '$option5', '$_POST[$correct_option]', '$examId') 24 | "; 25 | 26 | echo $sql; 27 | 28 | $result = mysqli_query($conn, $sql); 29 | 30 | if ($result) { 31 | header("location: ../views/manage-exam.php?examid=$examId"); 32 | } else { 33 | echo "An error occured: "; 34 | echo mysqli_connect_error($result); 35 | } 36 | } -------------------------------------------------------------------------------- /controllers/submit-exam.php: -------------------------------------------------------------------------------- 1 | $answer) { 18 | // echo $index . " : " . $answer . "
"; 19 | // echo "Correct Answer:" . $_POST['correct_answer'][$index] . ""; 20 | // echo "


"; 21 | 22 | if (trim($answer) === trim($_POST['correct_answer'][$index])) { 23 | $score++; 24 | } 25 | } 26 | 27 | echo "

Your Score is: " . $score . "

"; 28 | $sql = "INSERT INTO Student_Result VALUES ($studentId, $examId, $score, $noOfQuestions, '$submitTime') ON DUPLICATE KEY UPDATE score=$score, submitTime='$submitTime';"; 29 | echo $sql; 30 | $result = mysqli_query($conn, $sql); 31 | 32 | if (!$result) { 33 | echo "There was an error processing your result: " . mysqli_error($conn); 34 | // die('Connect Error: ' . mysqli_connect_error()); 35 | // header("location: ../index.php"); 36 | 37 | } else { 38 | header("location: ../index.php#results"); 39 | } 40 | ; 41 | } -------------------------------------------------------------------------------- /helpers/connect.php: -------------------------------------------------------------------------------- 1 | connect_error) { 11 | die("Connection failed: " . $conn->connect_error); 12 | } 13 | -------------------------------------------------------------------------------- /helpers/init.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /helpers/logout.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | Home 24 | 25 | 27 | 28 | 29 | 30 | 40 | 41 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /models/cbt_dump.sql: -------------------------------------------------------------------------------- 1 | -- MySQL dump 10.13 Distrib 5.7.31, for Linux (x86_64) 2 | -- 3 | -- Host: localhost Database: CBT 4 | -- ------------------------------------------------------ 5 | -- Server version 5.7.31-0ubuntu0.18.04.1 6 | 7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 10 | /*!40101 SET NAMES utf8 */; 11 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; 12 | /*!40103 SET TIME_ZONE='+00:00' */; 13 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; 14 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 15 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 16 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; 17 | 18 | -- 19 | -- Table structure for table `Administrator` 20 | -- 21 | 22 | DROP TABLE IF EXISTS `Administrator`; 23 | /*!40101 SET @saved_cs_client = @@character_set_client */; 24 | /*!40101 SET character_set_client = utf8 */; 25 | CREATE TABLE `Administrator` ( 26 | `username` varchar(255) NOT NULL DEFAULT 'admin', 27 | `firstName` char(100) NOT NULL DEFAULT 'Admin', 28 | `lastName` char(100) NOT NULL DEFAULT 'Admin', 29 | `imageUrl` varchar(255) DEFAULT '/images/admin.png', 30 | `pw` varchar(255) NOT NULL DEFAULT '$2y$10$B9gGv1ohRO.KubkLY1gyGuwmc0.SNdBYMME8cYsuvVDpC6YdBwNny', 31 | PRIMARY KEY (`username`) 32 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 33 | /*!40101 SET character_set_client = @saved_cs_client */; 34 | 35 | -- 36 | -- Dumping data for table `Administrator` 37 | -- 38 | 39 | LOCK TABLES `Administrator` WRITE; 40 | /*!40000 ALTER TABLE `Administrator` DISABLE KEYS */; 41 | INSERT INTO `Administrator` VALUES ('admin','Admin','Admin','/images/admin.png','$2y$10$B9gGv1ohRO.KubkLY1gyGuwmc0.SNdBYMME8cYsuvVDpC6YdBwNny'); 42 | /*!40000 ALTER TABLE `Administrator` ENABLE KEYS */; 43 | UNLOCK TABLES; 44 | 45 | -- 46 | -- Table structure for table `Course` 47 | -- 48 | 49 | DROP TABLE IF EXISTS `Course`; 50 | /*!40101 SET @saved_cs_client = @@character_set_client */; 51 | /*!40101 SET character_set_client = utf8 */; 52 | CREATE TABLE `Course` ( 53 | `courseId` int(11) NOT NULL AUTO_INCREMENT, 54 | `courseTitle` varchar(255) NOT NULL, 55 | `courseCode` varchar(50) NOT NULL, 56 | PRIMARY KEY (`courseId`) 57 | ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; 58 | /*!40101 SET character_set_client = @saved_cs_client */; 59 | 60 | -- 61 | -- Dumping data for table `Course` 62 | -- 63 | 64 | LOCK TABLES `Course` WRITE; 65 | /*!40000 ALTER TABLE `Course` DISABLE KEYS */; 66 | INSERT INTO `Course` VALUES (1,'Electromagnetic Wave Theory','EEG 509'),(2,'Database Management','CPE 502'),(3,'Signals and Systems','EEG 203'),(4,'Computer Networking Fundamentals','CPE 510'); 67 | /*!40000 ALTER TABLE `Course` ENABLE KEYS */; 68 | UNLOCK TABLES; 69 | 70 | -- 71 | -- Table structure for table `Course_Examiner` 72 | -- 73 | 74 | DROP TABLE IF EXISTS `Course_Examiner`; 75 | /*!40101 SET @saved_cs_client = @@character_set_client */; 76 | /*!40101 SET character_set_client = utf8 */; 77 | CREATE TABLE `Course_Examiner` ( 78 | `id` int(11) NOT NULL AUTO_INCREMENT, 79 | `username` varchar(255) DEFAULT NULL, 80 | `courseId` int(11) DEFAULT NULL, 81 | PRIMARY KEY (`id`), 82 | KEY `username` (`username`), 83 | KEY `courseId` (`courseId`), 84 | CONSTRAINT `Course_Examiner_ibfk_1` FOREIGN KEY (`username`) REFERENCES `Examiner` (`username`), 85 | CONSTRAINT `Course_Examiner_ibfk_2` FOREIGN KEY (`courseId`) REFERENCES `Course` (`courseId`) 86 | ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1; 87 | /*!40101 SET character_set_client = @saved_cs_client */; 88 | 89 | -- 90 | -- Dumping data for table `Course_Examiner` 91 | -- 92 | 93 | LOCK TABLES `Course_Examiner` WRITE; 94 | /*!40000 ALTER TABLE `Course_Examiner` DISABLE KEYS */; 95 | INSERT INTO `Course_Examiner` VALUES (1,'jane_osoba',1),(2,'jane_osoba',2),(3,'ayo_ph',1),(4,'ayo_ph',2),(5,'ayo_ph',4); 96 | /*!40000 ALTER TABLE `Course_Examiner` ENABLE KEYS */; 97 | UNLOCK TABLES; 98 | 99 | -- 100 | -- Table structure for table `Course_Student` 101 | -- 102 | 103 | DROP TABLE IF EXISTS `Course_Student`; 104 | /*!40101 SET @saved_cs_client = @@character_set_client */; 105 | /*!40101 SET character_set_client = utf8 */; 106 | CREATE TABLE `Course_Student` ( 107 | `id` int(11) NOT NULL AUTO_INCREMENT, 108 | `username` varchar(15) DEFAULT NULL, 109 | `courseId` int(11) DEFAULT NULL, 110 | PRIMARY KEY (`id`), 111 | KEY `username` (`username`), 112 | KEY `courseId` (`courseId`), 113 | CONSTRAINT `Course_Student_ibfk_1` FOREIGN KEY (`username`) REFERENCES `Student` (`username`), 114 | CONSTRAINT `Course_Student_ibfk_2` FOREIGN KEY (`courseId`) REFERENCES `Course` (`courseId`) 115 | ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; 116 | /*!40101 SET character_set_client = @saved_cs_client */; 117 | 118 | -- 119 | -- Dumping data for table `Course_Student` 120 | -- 121 | 122 | LOCK TABLES `Course_Student` WRITE; 123 | /*!40000 ALTER TABLE `Course_Student` DISABLE KEYS */; 124 | INSERT INTO `Course_Student` VALUES (1,'150408502',1),(2,'150408502',2),(3,'150408502',3),(4,'130408502',2); 125 | /*!40000 ALTER TABLE `Course_Student` ENABLE KEYS */; 126 | UNLOCK TABLES; 127 | 128 | -- 129 | -- Table structure for table `Exam` 130 | -- 131 | 132 | DROP TABLE IF EXISTS `Exam`; 133 | /*!40101 SET @saved_cs_client = @@character_set_client */; 134 | /*!40101 SET character_set_client = utf8 */; 135 | CREATE TABLE `Exam` ( 136 | `examId` int(11) NOT NULL AUTO_INCREMENT, 137 | `instruction` varchar(255) DEFAULT NULL, 138 | `timeDuration` time NOT NULL, 139 | `activated` tinyint(1) NOT NULL DEFAULT '0', 140 | `createdAt` datetime NOT NULL, 141 | `lastModified` datetime NOT NULL, 142 | `courseId` int(11) DEFAULT NULL, 143 | PRIMARY KEY (`examId`), 144 | KEY `courseId` (`courseId`), 145 | CONSTRAINT `Exam_ibfk_1` FOREIGN KEY (`courseId`) REFERENCES `Course` (`courseId`) 146 | ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; 147 | /*!40101 SET character_set_client = @saved_cs_client */; 148 | 149 | -- 150 | -- Dumping data for table `Exam` 151 | -- 152 | 153 | LOCK TABLES `Exam` WRITE; 154 | /*!40000 ALTER TABLE `Exam` DISABLE KEYS */; 155 | INSERT INTO `Exam` VALUES (1,' Attempt all questions. You have 1 hour. If your time runs out, your answers are submitted automatically.','00:45:00',1,'0000-00-00 00:00:00','2019-12-31 04:05:38',1),(2,'Answer just 1 question in 45 minutes. If your time runs out, your answers are submitted automatically.','00:45:00',0,'0000-00-00 00:00:00','0000-00-00 00:00:00',2),(3,'You have 25 minutes. Do what you can. If your time runs out, your answers are submitted automatically.','00:25:00',0,'0000-00-00 00:00:00','0000-00-00 00:00:00',3),(4,' Answer just one question','00:10:00',1,'2019-12-06 17:33:42','2019-12-06 17:33:42',4); 156 | /*!40000 ALTER TABLE `Exam` ENABLE KEYS */; 157 | UNLOCK TABLES; 158 | 159 | -- 160 | -- Table structure for table `Examiner` 161 | -- 162 | 163 | DROP TABLE IF EXISTS `Examiner`; 164 | /*!40101 SET @saved_cs_client = @@character_set_client */; 165 | /*!40101 SET character_set_client = utf8 */; 166 | CREATE TABLE `Examiner` ( 167 | `username` varchar(255) NOT NULL, 168 | `firstName` char(100) NOT NULL, 169 | `lastName` char(100) NOT NULL, 170 | `imageUrl` varchar(255) DEFAULT NULL, 171 | `gender` varchar(50) DEFAULT NULL, 172 | `pw` varchar(255) NOT NULL, 173 | PRIMARY KEY (`username`) 174 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 175 | /*!40101 SET character_set_client = @saved_cs_client */; 176 | 177 | -- 178 | -- Dumping data for table `Examiner` 179 | -- 180 | 181 | LOCK TABLES `Examiner` WRITE; 182 | /*!40000 ALTER TABLE `Examiner` DISABLE KEYS */; 183 | INSERT INTO `Examiner` VALUES ('ayo_ph','Ayo','Popoola-Herbert','/images/examiner_male.png','male','$2y$10$7s3vhwb/S5k4TgDIvnud3eLVTKaE9XospRMiXHna.3eF8FX5JlLbe'),('jane_osoba','Jane','Osoba','/images/examiner_female.png','female','$2y$10$7s3vhwb/S5k4TgDIvnud3eLVTKaE9XospRMiXHna.3eF8FX5JlLbe'); 184 | /*!40000 ALTER TABLE `Examiner` ENABLE KEYS */; 185 | UNLOCK TABLES; 186 | 187 | -- 188 | -- Table structure for table `Question` 189 | -- 190 | 191 | DROP TABLE IF EXISTS `Question`; 192 | /*!40101 SET @saved_cs_client = @@character_set_client */; 193 | /*!40101 SET character_set_client = utf8 */; 194 | CREATE TABLE `Question` ( 195 | `questionId` int(11) NOT NULL AUTO_INCREMENT, 196 | `question` text NOT NULL, 197 | `option1` varchar(255) NOT NULL, 198 | `option2` varchar(255) NOT NULL, 199 | `option3` varchar(255) NOT NULL, 200 | `option4` varchar(255) NOT NULL, 201 | `option5` varchar(255) DEFAULT NULL, 202 | `answer` varchar(255) NOT NULL, 203 | `examId` int(11) DEFAULT NULL, 204 | PRIMARY KEY (`questionId`), 205 | KEY `examId` (`examId`), 206 | CONSTRAINT `Question_ibfk_1` FOREIGN KEY (`examId`) REFERENCES `Exam` (`examId`) 207 | ) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=latin1; 208 | /*!40101 SET character_set_client = @saved_cs_client */; 209 | 210 | -- 211 | -- Dumping data for table `Question` 212 | -- 213 | 214 | LOCK TABLES `Question` WRITE; 215 | /*!40000 ALTER TABLE `Question` DISABLE KEYS */; 216 | INSERT INTO `Question` VALUES (1,'What is Kirchoff\'s Voltage Law?','The sum of all voltages is zero.','It states that the total current around a closed loop must be zero.','It states that the total voltage around a closed loop must be zero.','A and C above','None of the above','It states that the total voltage around a closed loop must be zero.',1),(2,'What is Kirchoff\'s Current Law?','The sum of all voltages is zero.','It states that the total current around a closed loop must be zero.','It states that the total voltage around a closed loop must be zero.','A and C above','None of the above','It states that the total voltage around a closed loop must be zero.',1),(3,'What is Kirchoff\'s Voltage Law?','The sum of all voltages is zero.','It states that the total current around a closed loop must be zero.','It states that the total voltage around a closed loop must be zero.','A and C above','None of the above','It states that the total voltage around a closed loop must be zero.',1),(4,'What is Kirchoff\'s Current Law?','The sum of all voltages is zero.','It states that the total current around a closed loop must be zero.','It states that the total voltage around a closed loop must be zero.','A and C above','None of the above','It states that the total voltage around a closed loop must be zero.',1),(5,'What is Kirchoff\'s Voltage Law?','The sum of all voltages is zero.','It states that the total current around a closed loop must be zero.','It states that the total voltage around a closed loop must be zero.','A and C above','None of the above','It states that the total voltage around a closed loop must be zero.',1),(6,'What is Kirchoff\'s Current Law?','The sum of all voltages is zero.','It states that the total current around a closed loop must be zero.','It states that the total voltage around a closed loop must be zero.','A and C above','None of the above','It states that the total voltage around a closed loop must be zero.',1),(7,'What is Kirchoff\'s Voltage Law?','The sum of all voltages is zero.','It states that the total current around a closed loop must be zero.','It states that the total voltage around a closed loop must be zero.','A and C above','None of the above','It states that the total voltage around a closed loop must be zero.',1),(8,'Normalization solves the problem of?','Data redundancy','Insert anomaly','Delete anomaly','Update anomaly','All of the above','All of the above',2),(9,'MySQL is a type of _____ database?','relational','non-relational','object-oriented','heirachical','MongoDB','relational',2),(10,'Normalization solves the problem of?','Data redundancy','Insert anomaly','Delete anomaly','Update anomaly','All of the above','All of the above',2),(11,'MySQL is a type of _____ database?','relational','non-relational','object-oriented','heirachical','MongoDB','relational',2),(12,'Normalization solves the problem of?','Data redundancy','Insert anomaly','Delete anomaly','Update anomaly','All of the above','All of the above',2),(13,'MySQL is a type of _____ database?','relational','non-relational','object-oriented','heirachical','MongoDB','relational',2),(14,'Normalization solves the problem of?','Data redundancy','Insert anomaly','Delete anomaly','Update anomaly','All of the above','All of the above',2),(15,'MySQL is a type of _____ database?','relational','non-relational','object-oriented','heirachical','MongoDB','relational',2),(16,'Which of the following is an even signal?','x(t)=sin(wt)','y(t)=sin(wt+2)','z(t)=cos(wt)','A and B above','None of the above','z(t)=cos(wt)',3),(17,'How is the discrete time impulse function defined in terms of the step function?','d[n] = u[n+1] – u[n]','d[n] = u[n] – u[n-2]','d[n] = u[n] – u[n-1]','d[n] = u[n+1] – u[n-1]','d[n] = u[n+1] – u[n-12]','d[n] = u[n] – u[n-1]',3),(18,'A system with memory which anticipates future values of input is called _________ ','Non-causal System ','Non-anticipative System','Causal System','Static System ','Stable system','Non-causal System',3),(19,'Determine the nature of the system: y(n)=x(-n).','Causal','Non-causal','Causal for all positive values of n','Non-causal for negative values of n','None of the above','Non-causal',3),(20,'Which of the following is an even signal?','x(t)=sin(wt)','y(t)=sin(wt+2)','z(t)=cos(wt)','A and B above','None of the above','z(t)=cos(wt)',3),(21,'How is the discrete time impulse function defined in terms of the step function?','d[n] = u[n+1] – u[n]','d[n] = u[n] – u[n-2]','d[n] = u[n] – u[n-1]','d[n] = u[n+1] – u[n-1]','d[n] = u[n+1] – u[n-12]','d[n] = u[n] – u[n-1]',3),(22,'A system with memory which anticipates future values of input is called _________ ','Non-causal System ','Non-anticipative System','Causal System','Static System ','Stable system','Non-causal System',3),(23,'Determine the nature of the system: y(n)=x(-n).','Causal','Non-causal','Causal for all positive values of n','Non-causal for negative values of n','None of the above','Non-causal',3),(24,' What is an electric field?','A force surrounding a charge','An area with grass around electricity','A field with an electric fence','A force to reckon with','None of the above','A force surrounding a charge',4); 217 | /*!40000 ALTER TABLE `Question` ENABLE KEYS */; 218 | UNLOCK TABLES; 219 | 220 | -- 221 | -- Table structure for table `Student` 222 | -- 223 | 224 | DROP TABLE IF EXISTS `Student`; 225 | /*!40101 SET @saved_cs_client = @@character_set_client */; 226 | /*!40101 SET character_set_client = utf8 */; 227 | CREATE TABLE `Student` ( 228 | `username` varchar(15) NOT NULL, 229 | `firstName` char(100) NOT NULL, 230 | `lastName` char(100) NOT NULL, 231 | `imageUrl` varchar(255) DEFAULT NULL, 232 | `gender` varchar(50) DEFAULT NULL, 233 | `pw` varchar(255) NOT NULL, 234 | PRIMARY KEY (`username`) 235 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 236 | /*!40101 SET character_set_client = @saved_cs_client */; 237 | 238 | -- 239 | -- Dumping data for table `Student` 240 | -- 241 | 242 | LOCK TABLES `Student` WRITE; 243 | /*!40000 ALTER TABLE `Student` DISABLE KEYS */; 244 | INSERT INTO `Student` VALUES ('130408016','Feyisola','Adelaja','/images/student_female_2.jpg','female','$2y$10$pnqojnaPkOnCB4B79PFNrexxO2GRhV6PrcgP/1yayZNQ1DFXI48z6'),('130408502','Omi','Obi','/images/student_male.jpg','male','$2y$10$7s3vhwb/S5k4TgDIvnud3eLVTKaE9XospRMiXHna.3eF8FX5JlLbe'),('150408502','Karen','Okonkwo','/images/student_female_3.jpg','female','$2y$10$7s3vhwb/S5k4TgDIvnud3eLVTKaE9XospRMiXHna.3eF8FX5JlLbe'); 245 | /*!40000 ALTER TABLE `Student` ENABLE KEYS */; 246 | UNLOCK TABLES; 247 | 248 | -- 249 | -- Table structure for table `Student_Result` 250 | -- 251 | 252 | DROP TABLE IF EXISTS `Student_Result`; 253 | /*!40101 SET @saved_cs_client = @@character_set_client */; 254 | /*!40101 SET character_set_client = utf8 */; 255 | CREATE TABLE `Student_Result` ( 256 | `studentId` varchar(255) NOT NULL, 257 | `examId` int(11) NOT NULL, 258 | `score` int(11) NOT NULL, 259 | `scoreOverall` int(11) NOT NULL, 260 | `submitTime` datetime NOT NULL, 261 | PRIMARY KEY (`studentId`,`examId`), 262 | KEY `examId` (`examId`), 263 | CONSTRAINT `Student_Result_ibfk_1` FOREIGN KEY (`studentId`) REFERENCES `Student` (`username`), 264 | CONSTRAINT `Student_Result_ibfk_2` FOREIGN KEY (`examId`) REFERENCES `Exam` (`examId`) 265 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 266 | /*!40101 SET character_set_client = @saved_cs_client */; 267 | 268 | -- 269 | -- Dumping data for table `Student_Result` 270 | -- 271 | 272 | LOCK TABLES `Student_Result` WRITE; 273 | /*!40000 ALTER TABLE `Student_Result` DISABLE KEYS */; 274 | INSERT INTO `Student_Result` VALUES ('150408502',1,4,7,'2019-12-31 04:04:44'); 275 | /*!40000 ALTER TABLE `Student_Result` ENABLE KEYS */; 276 | UNLOCK TABLES; 277 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; 278 | 279 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 280 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 281 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 282 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 283 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 284 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 285 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 286 | 287 | -- Dump completed on 2020-10-21 13:26:22 288 | -------------------------------------------------------------------------------- /models/course-examiner.csv: -------------------------------------------------------------------------------- 1 | username, courseId 2 | "jane_osoba",1 3 | "jane_osoba",2 4 | "ayo_ph",1 5 | "ayo_ph",2 6 | "ayo_ph",4 -------------------------------------------------------------------------------- /models/course-student.csv: -------------------------------------------------------------------------------- 1 | matricNo, courseId 2 | "150408502",1 3 | "150408502",2 4 | "150408502",3 5 | "130408502",2 -------------------------------------------------------------------------------- /models/courses.csv: -------------------------------------------------------------------------------- 1 | courseTitle,courseCode 2 | "Electromagnetic Wave Theory","EEG 509" 3 | "Database Management","CPE 502" 4 | "Signals and Systems","EEG 203" 5 | "Computer Networking Fundamentals","CPE 510" -------------------------------------------------------------------------------- /models/examination.csv: -------------------------------------------------------------------------------- 1 | instruction,timeDuration,activated,createdAt,lastModified,courseId 2 | "Attempt all questions. You have 1 hour. If your time runs out, your answers are submitted automatically.","01:00:00",TRUE,NOW(),NOW(),1 3 | "Answer just 1 question in 45 minutes. If your time runs out, your answers are submitted automatically.","00:45:00",TRUE,NOW(),NOW(),2 4 | "You have 25 minutes. Do what you can. If your time runs out, your answers are submitted automatically.","00:25:00",TRUE,NOW(),NOW(),3 -------------------------------------------------------------------------------- /models/examiners.csv: -------------------------------------------------------------------------------- 1 | username,firstName,lastName,imageUrl,gender,password 2 | "jane_osoba","Jane","Osoba","/images/examiner_female.png","female","$2y$10$7s3vhwb/S5k4TgDIvnud3eLVTKaE9XospRMiXHna.3eF8FX5JlLbe" 3 | "ayo_ph","Ayo","Popoola-Herbert","/images/examiner_male.png","male","$2y$10$7s3vhwb/S5k4TgDIvnud3eLVTKaE9XospRMiXHna.3eF8FX5JlLbe" 4 | -------------------------------------------------------------------------------- /models/questions.csv: -------------------------------------------------------------------------------- 1 | question,option1,option2,option3,option4,option5,answer,examId 2 | "What is Kirchoff\'s Voltage Law?","The sum of all voltages is zero.","It states that the total current around a closed loop must be zero.","It states that the total voltage around a closed loop must be zero.","A and C above","None of the above","It states that the total voltage around a closed loop must be zero.",1 3 | "What is Kirchoff\'s Current Law?","The sum of all voltages is zero.","It states that the total current around a closed loop must be zero.","It states that the total voltage around a closed loop must be zero.","A and C above","None of the above","It states that the total voltage around a closed loop must be zero.",1 4 | "What is Kirchoff\'s Voltage Law?","The sum of all voltages is zero.","It states that the total current around a closed loop must be zero.","It states that the total voltage around a closed loop must be zero.","A and C above","None of the above","It states that the total voltage around a closed loop must be zero.",1 5 | "What is Kirchoff\'s Current Law?","The sum of all voltages is zero.","It states that the total current around a closed loop must be zero.","It states that the total voltage around a closed loop must be zero.","A and C above","None of the above","It states that the total voltage around a closed loop must be zero.",1 6 | "What is Kirchoff\'s Voltage Law?","The sum of all voltages is zero.","It states that the total current around a closed loop must be zero.","It states that the total voltage around a closed loop must be zero.","A and C above","None of the above","It states that the total voltage around a closed loop must be zero.",1 7 | "What is Kirchoff\'s Current Law?","The sum of all voltages is zero.","It states that the total current around a closed loop must be zero.","It states that the total voltage around a closed loop must be zero.","A and C above","None of the above","It states that the total voltage around a closed loop must be zero.",1 8 | "What is Kirchoff\'s Voltage Law?","The sum of all voltages is zero.","It states that the total current around a closed loop must be zero.","It states that the total voltage around a closed loop must be zero.","A and C above","None of the above","It states that the total voltage around a closed loop must be zero.",1 9 | "Normalization solves the problem of?","Data redundancy","Insert anomaly","Delete anomaly","Update anomaly","All of the above","All of the above",2 10 | "MySQL is a type of _____ database?","relational","non-relational","object-oriented","heirachical","MongoDB","relational",2 11 | "Normalization solves the problem of?","Data redundancy","Insert anomaly","Delete anomaly","Update anomaly","All of the above","All of the above",2 12 | "MySQL is a type of _____ database?","relational","non-relational","object-oriented","heirachical","MongoDB","relational",2 13 | "Normalization solves the problem of?","Data redundancy","Insert anomaly","Delete anomaly","Update anomaly","All of the above","All of the above",2 14 | "MySQL is a type of _____ database?","relational","non-relational","object-oriented","heirachical","MongoDB","relational",2 15 | "Normalization solves the problem of?","Data redundancy","Insert anomaly","Delete anomaly","Update anomaly","All of the above","All of the above",2 16 | "MySQL is a type of _____ database?","relational","non-relational","object-oriented","heirachical","MongoDB","relational",2 17 | "Which of the following is an even signal?","x(t)=sin(wt)","y(t)=sin(wt+2)","z(t)=cos(wt)","A and B above","None of the above","z(t)=cos(wt)",3 18 | "How is the discrete time impulse function defined in terms of the step function?","d[n] = u[n+1] – u[n]","d[n] = u[n] – u[n-2]","d[n] = u[n] – u[n-1]","d[n] = u[n+1] – u[n-1]","d[n] = u[n+1] – u[n-12]","d[n] = u[n] – u[n-1]",3 19 | "A system with memory which anticipates future values of input is called _________ ","Non-causal System ","Non-anticipative System","Causal System","Static System ","Stable system","Non-causal System",3 20 | "Determine the nature of the system: y(n)=x(-n).","Causal","Non-causal","Causal for all positive values of n","Non-causal for negative values of n","None of the above","Non-causal",3 21 | "Which of the following is an even signal?","x(t)=sin(wt)","y(t)=sin(wt+2)","z(t)=cos(wt)","A and B above","None of the above","z(t)=cos(wt)",3 22 | "How is the discrete time impulse function defined in terms of the step function?","d[n] = u[n+1] – u[n]","d[n] = u[n] – u[n-2]","d[n] = u[n] – u[n-1]","d[n] = u[n+1] – u[n-1]","d[n] = u[n+1] – u[n-12]","d[n] = u[n] – u[n-1]",3 23 | "A system with memory which anticipates future values of input is called _________ ","Non-causal System ","Non-anticipative System","Causal System","Static System ","Stable system","Non-causal System",3 24 | "Determine the nature of the system: y(n)=x(-n).","Causal","Non-causal","Causal for all positive values of n","Non-causal for negative values of n","None of the above","Non-causal",3 -------------------------------------------------------------------------------- /models/schema.sql: -------------------------------------------------------------------------------- 1 | CREATE DATABASE IF NOT EXISTS CBT; 2 | USE CBT; 3 | 4 | -- SET FOREIGN_KEY_CHECKS = 0; 5 | -- DROP TABLE Student; 6 | -- DROP TABLE Administrator; 7 | -- DROP TABLE Examiner; 8 | -- DROP TABLE Course_Examiner; 9 | -- DROP TABLE Course_Student; 10 | -- DROP TABLE Course; 11 | -- DROP TABLE Exam; 12 | -- DROP TABLE Question; 13 | -- DROP TABLE Student_Result; 14 | 15 | 16 | 17 | -- Create the required tables 18 | 19 | CREATE TABLE IF NOT EXISTS Student ( 20 | username VARCHAR(15) PRIMARY KEY NOT NULL, 21 | firstName CHAR(100) NOT NULL, 22 | lastName CHAR(100) NOT NULL, 23 | imageUrl VARCHAR(255), 24 | gender VARCHAR(50), 25 | pw VARCHAR(255) NOT NULL -- password 26 | ); 27 | 28 | 29 | CREATE TABLE IF NOT EXISTS Administrator ( 30 | username VARCHAR(255) PRIMARY KEY NOT NULL DEFAULT "admin", 31 | firstName CHAR(100) NOT NULL DEFAULT "Admin", 32 | lastName CHAR(100) NOT NULL DEFAULT "Admin", 33 | imageUrl VARCHAR(255) DEFAULT "/images/admin.png", 34 | pw VARCHAR(255) NOT NULL DEFAULT "$2y$10$B9gGv1ohRO.KubkLY1gyGuwmc0.SNdBYMME8cYsuvVDpC6YdBwNny" -- password 35 | ); 36 | 37 | 38 | CREATE TABLE IF NOT EXISTS Examiner ( 39 | username VARCHAR(255) PRIMARY KEY NOT NULL, 40 | firstName CHAR(100) NOT NULL, 41 | lastName CHAR(100) NOT NULL, 42 | imageUrl VARCHAR(255), 43 | gender VARCHAR(50), 44 | pw VARCHAR(255) NOT NULL -- password 45 | 46 | ); 47 | 48 | 49 | CREATE TABLE IF NOT EXISTS Course ( 50 | courseId INT PRIMARY KEY NOT NULL AUTO_INCREMENT, 51 | courseTitle VARCHAR(255) NOT NULL, 52 | courseCode VARCHAR(50) NOT NULL 53 | ); 54 | 55 | CREATE TABLE IF NOT EXISTS Exam ( 56 | examId INT PRIMARY KEY AUTO_INCREMENT, 57 | instruction VARCHAR(255), 58 | timeDuration TIME NOT NULL, 59 | activated BOOLEAN DEFAULT FALSE NOT NULL, 60 | createdAt DATETIME NOT NULL, 61 | lastModified DATETIME NOT NULL, 62 | courseId INT, 63 | FOREIGN KEY (courseId) REFERENCES Course(courseId) 64 | ); 65 | 66 | CREATE TABLE IF NOT EXISTS Question ( 67 | questionId INT PRIMARY KEY AUTO_INCREMENT, 68 | question TEXT NOT NULL, 69 | option1 VARCHAR(255) NOT NULL, 70 | option2 VARCHAR(255) NOT NULL, 71 | option3 VARCHAR(255) NOT NULL, 72 | option4 VARCHAR(255) NOT NULL, 73 | option5 VARCHAR(255), -- optional 74 | answer VARCHAR(255) NOT NULL, 75 | examId INT, 76 | FOREIGN KEY (examId) REFERENCES Exam(examId) 77 | ); 78 | 79 | 80 | CREATE TABLE IF NOT EXISTS Student_Result ( 81 | studentId VARCHAR(255) NOT NULL, 82 | examId INT NOT NULL, 83 | score INT NOT NULL, 84 | scoreOverall INT NOT NULL, 85 | submitTime DATETIME NOT NULL, 86 | FOREIGN KEY (studentId) REFERENCES Student(username), 87 | FOREIGN KEY (examId) REFERENCES Exam(examId), 88 | PRIMARY KEY (studentId, examId) 89 | ); 90 | 91 | 92 | 93 | -- Intermediary table for Course and Student 94 | CREATE TABLE IF NOT EXISTS Course_Student ( 95 | id INT PRIMARY KEY AUTO_INCREMENT, 96 | username VARCHAR(15) , 97 | courseId INT, 98 | FOREIGN KEY (username) REFERENCES Student(username), 99 | FOREIGN KEY (courseId) REFERENCES Course(courseId) 100 | ); 101 | 102 | -- Intermediary table for Course and Examiner 103 | CREATE TABLE IF NOT EXISTS Course_Examiner ( 104 | id INT PRIMARY KEY AUTO_INCREMENT, 105 | username VARCHAR(255), 106 | courseId INT, 107 | FOREIGN KEY (username) REFERENCES Examiner(username), 108 | FOREIGN KEY (courseId) REFERENCES Course(courseId) 109 | ); 110 | 111 | SHOW TABLES; 112 | 113 | -- DESCRIBE Student; 114 | -- DESCRIBE Administrator; 115 | -- DESCRIBE Examiner; 116 | -- DESCRIBE Course_Examiner; 117 | -- DESCRIBE Course_Student; 118 | -- DESCRIBE Course; 119 | -- DESCRIBE Exam; 120 | -- DESCRIBE Question; 121 | -- DESCRIBE Student_Result; 122 | 123 | 124 | -- Load Student Data from CSV file 125 | LOAD DATA 126 | LOCAL INFILE "/home/kars/Downloads/cbe-software/models/students.csv" 127 | INTO TABLE Student 128 | FIELDS TERMINATED BY "," 129 | OPTIONALLY ENCLOSED BY '"' 130 | LINES TERMINATED BY "\n" 131 | IGNORE 1 ROWS; 132 | -- SELECT * FROM Student; 133 | 134 | -- Load Examiner Data from CSV file 135 | LOAD DATA 136 | LOCAL INFILE "/home/kars/Downloads/cbe-software/models/examiners.csv" 137 | INTO TABLE Examiner 138 | FIELDS TERMINATED BY "," 139 | OPTIONALLY ENCLOSED BY '"' 140 | LINES TERMINATED BY "\n" 141 | IGNORE 1 ROWS; 142 | -- SELECT * FROM Examiner; 143 | 144 | INSERT INTO Administrator VALUES (); 145 | -- SELECT * FROM Administrator; 146 | 147 | -- Load Course Data from CSV file 148 | LOAD DATA 149 | LOCAL INFILE "/home/kars/Downloads/cbe-software/models/courses.csv" 150 | INTO TABLE Course 151 | FIELDS TERMINATED BY "," 152 | OPTIONALLY ENCLOSED BY '"' 153 | LINES TERMINATED BY "\n" 154 | IGNORE 1 ROWS 155 | (courseTitle, courseCode); 156 | -- SELECT * FROM Course; 157 | 158 | -- Load Exam Data from CSV file 159 | LOAD DATA 160 | LOCAL INFILE "/home/kars/Downloads/cbe-software/models/examination.csv" 161 | INTO TABLE Exam 162 | FIELDS TERMINATED BY "," 163 | OPTIONALLY ENCLOSED BY '"' 164 | LINES TERMINATED BY "\n" 165 | IGNORE 1 ROWS 166 | (instruction, timeDuration, activated, createdAt, lastModified, courseId) 167 | ; 168 | -- SELECT * FROM Exam; 169 | 170 | -- Load Question Data from CSV file 171 | LOAD DATA 172 | LOCAL INFILE "/home/kars/Downloads/cbe-software/models/questions.csv" 173 | INTO TABLE Question 174 | FIELDS TERMINATED BY "," 175 | OPTIONALLY ENCLOSED BY '"' 176 | LINES TERMINATED BY "\n" 177 | IGNORE 1 ROWS 178 | (question,option1,option2,option3,option4,option5,answer,examId); 179 | -- SELECT * FROM Question; 180 | 181 | LOAD DATA 182 | LOCAL INFILE "/home/kars/Downloads/cbe-software/models/course-examiner.csv" 183 | INTO TABLE Course_Examiner 184 | FIELDS TERMINATED BY "," 185 | OPTIONALLY ENCLOSED BY '"' 186 | LINES TERMINATED BY "\n" 187 | IGNORE 1 ROWS 188 | (username, courseId ); 189 | -- SELECT * FROM Course_Examiner; 190 | 191 | LOAD DATA 192 | LOCAL INFILE "/home/kars/Downloads/cbe-software/models/course-student.csv" 193 | INTO TABLE Course_Student 194 | FIELDS TERMINATED BY "," 195 | OPTIONALLY ENCLOSED BY '"' 196 | LINES TERMINATED BY "\n" 197 | IGNORE 1 ROWS 198 | (username, courseId ); 199 | -- SELECT * FROM Course_Student; 200 | 201 | 202 | 203 | -- The courses a student is offering 204 | SELECT Course.courseCode, courseTitle, instruction, timeDuration, activated, createdAt, lastModified, Exam.courseId 205 | FROM Course, Course_Student, Exam 206 | WHERE Course.courseId = Course_Student.id AND Course.courseId = Exam.courseId ; 207 | -------------------------------------------------------------------------------- /models/students.csv: -------------------------------------------------------------------------------- 1 | username,firstName,lastName,imageUrl,gender,password 2 | "150408502","Karen","Okonkwo","/images/student_female_3.jpg","female","$2y$10$7s3vhwb/S5k4TgDIvnud3eLVTKaE9XospRMiXHna.3eF8FX5JlLbe" 3 | "130408502","Omi","Obi","/images/student_male.jpg","male","$2y$10$7s3vhwb/S5k4TgDIvnud3eLVTKaE9XospRMiXHna.3eF8FX5JlLbe" 4 | "130408016","Feyisola","Adelaja","/images/student_female_2.jpg","female","$2y$10$pnqojnaPkOnCB4B79PFNrexxO2GRhV6PrcgP/1yayZNQ1DFXI48z6" -------------------------------------------------------------------------------- /views/admin_home.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Admin 8 | 9 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 45 | 46 | 47 |
48 | 49 |
50 | Admin avatar 51 |

52 | Good day, 53 |
54 | ! 55 |

56 |

57 |
58 | 59 | 60 |
61 |
62 |
63 | menu 64 |

Manage Users

65 |
66 |
67 | 70 | 71 |
72 |
73 |
74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 99 | 100 | 103 | 104 | 105 | 106 | 107 | 112 | 119 | 120 | 121 | 122 |
UsernameNameGenderUser TypeAssigned CoursesActions
' 101 | alt=''> 102 | 108 | EEG502
109 | CPE520
110 | GEG510
111 |
113 | Edit 115 | Delete 116 | Reset Password 118 |
123 |
124 | 125 | 126 | 201 | 202 |
203 | 204 | 205 | 206 |
207 |
208 |
209 | menu 210 |

Manage Courses

211 |
212 |
213 | 216 | 217 |
218 |
219 |
220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 239 | 240 | 241 | 242 | 247 | 251 | 259 | 260 | 263 | 264 | 306 | 307 | 308 |
Course Title Course Code Assigned
Students
Assigned
Examiners
Actions
243 | 150408502
244 | 130459604
245 | 190559604
246 |
248 | oluseyibo
249 | adelabu
250 |
252 | Edit 254 | Assign/Unassign Users 256 | Delete 258 |
309 |
310 | 311 | 312 | 313 | 348 | 349 |
350 | 351 |
352 | 353 | 354 | 355 | 356 | 357 |
358 | 359 | 360 | 361 | 364 | 365 | 368 | 369 | 370 | 371 | 419 | 420 | 421 | 422 | -------------------------------------------------------------------------------- /views/examiner_home.php: -------------------------------------------------------------------------------- 1 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Examiner 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 | 33 | 64 | 65 | 66 |
67 | 68 |
69 |
70 |
71 | 72 | Student avatar 74 |

75 | Good day, 76 |
77 | firstName . " " . $examinerObj->lastName ?> 78 |

79 |

80 |
81 |
82 |
83 | 84 | 85 |
86 |
87 |
88 | 89 | You have not been assigned any courses.
Contact the administrator. "; 99 | 100 | mysqli_data_seek($queryResult, 0); 101 | } else { 102 | $i = 0; 103 | while ($row = mysqli_fetch_assoc($queryResult)) { 104 | $sql = " SELECT examId FROM Exam e WHERE e.courseId='" . $row['courseId'] . "'"; 105 | $exam = mysqli_query($conn, $sql); 106 | 107 | // Determine if any exam has been created for it 108 | if (mysqli_num_rows($exam) > 0) { 109 | mysqli_data_seek($exam, 0); 110 | $exam = mysqli_fetch_object($exam); 111 | $examArr[] = $exam->examId; 112 | ?> 113 | 114 |
115 | 116 |
117 |

118 |
119 | 120 | 126 |
127 |
128 |
129 | 130 | 131 | 132 | 133 |
134 | 135 |
136 |

137 |
138 | 143 |
144 |
145 |
146 | 147 | 151 | 152 |
153 |
154 |
155 | 156 | 157 | 158 |
159 |
160 |
161 | No results to display."; 164 | echo "

Start by creating an exam.

"; 165 | 166 | } else { 167 | $i = 0; 168 | 169 | foreach ($examArr as $examId) { 170 | $sql = "SELECT c.courseCode, c.courseTitle FROM Exam e, Course c WHERE e.examId ='$examId' and e.courseId = c.courseId"; 171 | $courseResult = mysqli_query($conn, $sql); 172 | $i++; 173 | 174 | while ($courseRow = mysqli_fetch_assoc($courseResult)) { 175 | 176 | ?> 177 | 178 | 179 |
180 |
181 | 182 |
183 |

184 |
185 | 186 |
187 |
188 | 189 |
190 |
191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 |
Student Name Score Obtainable Score Submit Time
220 |
221 | 222 |
223 | 224 |
225 | 226 | 227 | 228 |
229 |
230 | 231 |
232 | 233 |
234 | 235 | 236 | 237 | 238 | 239 |
240 | 241 | 242 | 243 | 246 | 247 | 250 | 251 | 252 | 253 | 287 | 288 | 289 | 290 | 291 | 292 | 295 | 296 | 297 | 298 | -------------------------------------------------------------------------------- /views/login.php: -------------------------------------------------------------------------------- 1 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | Login 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 |
114 |

University
of
Lagos

115 | University of Lagos 116 |
117 | 118 |
119 |

Online Examination System

120 | 121 | 122 |
123 | 124 | 125 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 180 | 181 | 182 | 199 | 200 | 201 | 202 | 203 | -------------------------------------------------------------------------------- /views/manage-exam.php: -------------------------------------------------------------------------------- 1 | instruction; 46 | $duration = $exam->timeDuration; 47 | $durationSplit = explode(":", $duration); 48 | $activated = $exam->activated; 49 | $courseId = $exam->courseId; 50 | $examId = $exam->examId; 51 | $courseCode = $exam->courseCode; 52 | 53 | } else { 54 | // If there are no results, then the examiner shouldn't be managing the exam. Redirect. 55 | header("location: ../index.php"); 56 | } 57 | 58 | // Get Questions 59 | $sql = " 60 | SELECT * 61 | FROM Question q 62 | WHERE q.examId=$examId 63 | "; 64 | $questionsResult = mysqli_query($conn, $sql); 65 | 66 | } else { 67 | $sql = "SELECT courseCode 68 | FROM Course_Examiner ce, Course c 69 | WHERE ce.username='$username' and ce.courseId='$courseId' 70 | LIMIT 1"; 71 | $queryResult = mysqli_query($conn, $sql); 72 | 73 | if (mysqli_num_rows($queryResult) != 0) { 74 | mysqli_data_seek($queryResult, 0); 75 | $exam = mysqli_fetch_object($queryResult); 76 | 77 | // Set necessary variables 78 | $courseCode = $exam->courseCode; 79 | 80 | } else { 81 | // If there are no results, then the examiner shouldn't be managing the exam. Redirect. 82 | header("location: ../index.php"); 83 | } 84 | } 85 | 86 | ?> 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | Examiner 97 | 98 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 |
109 | 110 | 136 | 137 | 138 |
139 | 140 | 141 |
142 |
143 |
144 |
145 |

Exam For 146 | 147 |

148 | 149 |
150 | 151 |
152 |
153 |
154 | 155 | 157 |
158 | 159 | 160 |
161 | 162 | 163 | 165 | : 166 | 167 | 170 | : 171 | 172 | 175 |
176 | 177 |
178 |
179 | Activated: 180 | 181 |
182 |
183 | > 186 | 189 |
190 |
191 | > 194 | 197 |
198 |
199 |
200 |
201 | 202 | 203 | 204 | 205 | '; 208 | echo ''; 209 | 210 | } else { 211 | echo ''; 212 | 213 | } 214 | ?> 215 | 216 | 217 |
218 | 219 |
220 |
221 | 222 |
223 |
224 |
225 |
226 | 227 | 228 | 229 |
230 |
231 |
232 | Please create the exam first. "; 235 | echo "

Go the the Exam Details tab.

"; 236 | } else { 237 | ?> 238 |
239 |
240 | menu 241 |

Manage Questions for

242 |
243 |
244 | 248 | 250 |
251 |
252 |
253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 286 | 287 | 288 | 289 | 290 |
Question Option 1 Option 2 Option 3 Option 4 Option 5 Answer Actions
281 | Edit 283 | Delete 285 |
291 |
292 | 293 | 294 | 295 | 372 | 373 |
374 | 375 | 376 |
377 |
378 | 379 | 380 | 381 | 382 | 383 |
384 | 385 | 386 | 387 | 390 | 391 | 394 | 395 | 396 | 397 | 449 | 450 | 451 | 452 | -------------------------------------------------------------------------------- /views/student.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | Student 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 |
36 | 37 | 68 | 69 | 70 |
71 | 74 | 75 |
76 |
77 |
78 | 79 | Student avatar 81 |

82 | Good day, 83 |
84 | firstName . " " . $studentObj->lastName ?> 85 |

86 |

87 |
88 |
89 |
90 | 91 | 92 |
93 |
94 |
95 | 96 | You have no pending exams. "; 106 | 107 | mysqli_data_seek($queryResult, 0); 108 | } else { 109 | $i = 0; 110 | while ($info = mysqli_fetch_assoc($queryResult)) { 111 | ?> 112 | 113 |
114 | 115 |
116 |

117 |

118 | Duration: 119 | 120 |
121 | 125 |
126 |
127 |
128 | 129 | 133 | 134 | 135 | 136 |
137 |
138 |
139 | 140 | 141 | 142 |
143 |
144 |
145 | You have no results yet. "; 148 | echo "

Start by taking an exam.

"; 149 | 150 | mysqli_data_seek($examResults, 0); 151 | } else { 152 | $i = 0; 153 | 154 | while ($examResult = mysqli_fetch_assoc($examResults)) { 155 | $sql = "SELECT c.courseCode, c.courseTitle FROM Exam e, Course c WHERE e.examId = " . $examResult['examId'] . " and e.courseId = c.courseId"; 156 | $result = mysqli_query($conn, $sql); 157 | $i++; 158 | 159 | while ($row = mysqli_fetch_assoc($result)) { 160 | ?> 161 | 162 | 163 |
164 |
165 | 166 |
167 |

168 |
169 | 170 |
171 |
172 |
173 |

Score: out of 175 |

176 |

Submitted: 177 |

178 |
179 |
180 | 181 | 182 | 183 |
184 |
185 | 186 |
187 | 188 |
189 | 190 | 191 | 192 | 193 | 194 |
195 | 196 | 197 | 198 | 201 | 202 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 305 | -------------------------------------------------------------------------------- /views/student_home.php: -------------------------------------------------------------------------------- 1 | '15040850', "l_name" => $_SESSION['username']); 21 | $qid = 0; 22 | $qid = $qid++; 23 | $etaker = mysqli_query($link, "SELECT User.id, User.username, start_exam.course, start_exam.category, start_exam.exam_tag, start_exam.exam_duration, start_exam.question_limit 24 | FROM User, start_exam 25 | WHERE User.username = " . $b['registration'] . " AND User.user_type = 'student' 26 | ORDER BY User.id DESC LIMIT 1"); 27 | 28 | $etaker1 = mysqli_fetch_array($etaker); 29 | $etexamtag = $etaker1['exam_tag']; 30 | $etques = $etaker1['question_limit']; 31 | 32 | $select = mysqli_query($link, "SELECT * 33 | FROM " . $etaker1['course'] . "_" . $etaker1['category'] . " 34 | WHERE exam_tag='$etexamtag' 35 | LIMIT " . $etaker1['question_limit'] . ""); 36 | 37 | ?> 38 | 39 | 40 | 41 | 42 | 45 | CBE-Objective 46 | 47 | 48 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 64 | 80 | 81 |
82 |
83 | Time Left 86 |
87 | 88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |

96 |
97 |
98 |
99 |
100 | 101 | 102 | 103 | 116 | 117 |
118 | 119 | 120 |
121 |
123 | 124 |
125 | 126 | 127 | 128 | 129 | 130 | 131 |
132 |
133 | 134 | 135 |
139 | 142 |
143 | 144 | 145 | 146 | 147 | 148 | 149 |
150 |
151 | 152 |
153 | A. 154 | 155 |
156 | B. 157 | 158 |
159 | C. 160 | 161 |
162 | D. 163 | 164 |
165 | 167 | 170 | E. 171 | 172 |
173 | 174 | 175 | 176 |
177 |
178 | 182 | 183 | 184 |
185 | 201 | 202 | 203 | 204 | 205 |
207 | 208 | 209 |
210 |
211 |
212 |
213 | 214 | 327 |
328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | -------------------------------------------------------------------------------- /views/take-exam.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | Admin 59 | 60 | 61 | 63 | 64 | 65 | 66 |
67 | 68 | 108 | 109 | 110 | 111 |
112 | 113 |
114 | 115 |
116 | 117 |
118 |

instruction; ?>

119 |

Exam Duration: 120 | timeDuration; ?> 121 |

122 | 123 |
124 | 125 |
126 | 127 |
128 | 129 | 130 |
131 | 132 |
133 | 134 |
135 |
136 |
137 |

courseCode; ?>

138 |

courseTitle ?>

139 |
140 |
141 |
142 | 143 | 144 |
145 | 146 | 168 | 169 |
170 | Q: 171 | 172 |
173 |
174 | 180 |
181 |
182 | 188 |
189 |
190 | 196 |
197 |
198 | 204 |
205 |
206 | 212 |
213 | 214 | 216 | 217 |
218 |
219 | 223 | 224 | 225 | 226 | 227 | 228 | 229 |
230 | 231 | 232 | 233 |
234 | 235 |
236 | 237 |
238 | 239 |
240 | 241 |
242 | 243 |
244 | 245 | 246 | 247 | 248 | 249 |
250 | 251 | 252 | 255 | 256 | 259 | 260 | 261 | 262 | 485 | 486 | 487 | 488 | -------------------------------------------------------------------------------- /views/test.php: -------------------------------------------------------------------------------- 1 | 39 | 40 | 41 | 42 | 45 | 46 | 47 | 48 | 49 | 50 | --------------------------------------------------------------------------------