-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
executable file
·250 lines (238 loc) · 16.9 KB
/
Copy pathindex.php
File metadata and controls
executable file
·250 lines (238 loc) · 16.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
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
<?php
session_start();
include_once "./db/db.php";
$assignments = "SELECT PAID AS id, assignment_name AS name, assignment, assignment_instructions AS instruction,
assignment_file AS file, dueDate, courses.courseID AS courseID, courses.courseName AS courseName, levels.LevelID AS levelID,
levels.levelName AS levelName, modules.moduleID AS moduleID, modules.moduleName AS moduleName, post_assignment.lecturerID AS lecturerID,
departments.DeptName AS department FROM post_assignment INNER JOIN courses ON post_assignment.courseID = courses.courseID INNER JOIN levels
ON post_assignment.levelID = levels.LevelID INNER JOIN modules ON post_assignment.moduleID = modules.moduleID INNER JOIN departments ON
post_assignment.DeptID = departments.DeptID ORDER BY post_assignment.postDate DESC";
$result = mysqli_query($con, $assignments);
if (!isset($_SESSION['role'])) {
$assignments = "SELECT PAID AS id, assignment_name AS name, assignment, assignment_instructions AS instruction,
assignment_file AS file, dueDate, courses.courseID AS courseID, courses.courseName AS courseName, levels.LevelID AS levelID,
levels.levelName AS levelName, modules.moduleID AS moduleID, modules.moduleName AS moduleName, post_assignment.lecturerID AS lecturerID,
departments.DeptName AS department FROM post_assignment INNER JOIN courses ON post_assignment.courseID = courses.courseID INNER JOIN levels
ON post_assignment.levelID = levels.LevelID INNER JOIN modules ON post_assignment.moduleID = modules.moduleID INNER JOIN departments ON
post_assignment.DeptID = departments.DeptID ORDER BY post_assignment.postDate DESC";
$result = mysqli_query($con, $assignments);
} else {
if ($_SESSION['role'] == 3) {
$assignments = "SELECT PAID AS id, assignment_name AS name, assignment, assignment_instructions AS instruction,
assignment_file AS file, dueDate, courses.courseID AS courseID, courses.courseName AS courseName, levels.LevelID AS levelID,
levels.levelName AS levelName, modules.moduleID AS moduleID, modules.moduleName AS moduleName, post_assignment.lecturerID AS lecturerID,
departments.DeptName AS department FROM post_assignment INNER JOIN courses ON post_assignment.courseID = courses.courseID INNER JOIN levels
ON post_assignment.levelID = levels.LevelID INNER JOIN modules ON post_assignment.moduleID = modules.moduleID INNER JOIN departments ON
post_assignment.DeptID = departments.DeptID LEFT JOIN submit_assignment ON post_assignment.PAID = submit_assignment.PostAssID LEFT JOIN students ON
students.studentID = submit_assignment.studentID LEFT JOIN users ON users.UsersID = students.userID
WHERE levels.LevelID = $_SESSION[levelID] AND courses.courseID = $_SESSION[courseID] AND submit_assignment.PostAssID IS NULL ORDER BY post_assignment.postDate DESC";
$result = mysqli_query($con, $assignments);
} else if($_SESSION['role'] == 2) {
$assignments = "SELECT PAID AS id, assignment_name AS name, assignment, assignment_instructions AS instruction,
assignment_file AS file, dueDate, courses.courseID AS courseID, courses.courseName AS courseName, levels.LevelID AS levelID,
levels.levelName AS levelName, modules.moduleID AS moduleID, modules.moduleName AS moduleName, post_assignment.lecturerID AS lecturerID,
departments.DeptName AS department FROM post_assignment INNER JOIN courses ON post_assignment.courseID = courses.courseID INNER JOIN levels
ON post_assignment.levelID = levels.LevelID INNER JOIN modules ON post_assignment.moduleID = modules.moduleID INNER JOIN departments ON
post_assignment.DeptID = departments.DeptID WHERE post_assignment.lecturerID = $_SESSION[lecturerID] ORDER BY post_assignment.postDate DESC";
$result = mysqli_query($con, $assignments);
}
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title>OASS</title>
<meta http-equiv="" content="">
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css?h=e18d7e69fc31311546cd2bea033579c7">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700">
<link rel="stylesheet" href="assets/fonts/font-awesome.min.css?h=03ab36d1dde930b7d44a712f19075641">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,400">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/aos/2.1.1/aos.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.3.1/css/swiper.min.css">
<link rel="stylesheet" href="assets/css/styles.min.css?h=9a67bb7f22c4d4c23c08c071fb201838">
<link rel="stylesheet" href="./assets/css/styles.css">
<link rel="manifest" href="./assets/favicon/site.webmanifest">
<link rel="shortcut icon" href="./assets/favicon/favicon.ico" type="image/x-icon">
</head>
<body>
<div>
<nav class="navbar navbar-light navbar-expand-md navigation-clean-button">
<div class="container">
<a class="navbar-brand" href="index.php" style="color: rgba(86,198,90,0.67);">OASS</a>
<button data-toggle="collapse" class="navbar-toggler" data-target="#navcol-1" style="width: 45px;padding-right: 8px;padding-left: 8px;">
<span class="sr-only">Toggle navigation</span><span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" data-aos="fade" data-aos-once="true" id="navcol-1" style="background-color: rgba(255,255,255,0.05);width: 100%;padding: 5px;background-repeat: no-repeat;">
<ul class="nav navbar-nav mr-auto">
<li class="nav-item" role="presentation"><a class="nav-link active" data-bs-hover-animate="pulse" href="./index.php" style="color: rgba(86,198,90,0.67);cursor: pointer;" target="_top">Home</a></li>
<li class='nav-item' role='presentation'><a class='nav-link' href='#posts'>Assignments</a></li>
<li class="nav-item" role="presentation"><a class="nav-link" href="./public/about.php">About</a></li>
<li class="nav-item" role="presentation"><a class="nav-link" href="./public/contacts.php">Contacts</a></li>
</ul><span class="navbar-text actions" style="margin-left: 25%;">
<?php
echo (isset($_SESSION['role'])) ? "" : "<a class='login' href='./auth/login.php' style='width: 80px;height: 30px; border-radius: 10px; color: #ffffff; padding: 4px 8px;opacity: 0.86;filter: contrast(100%) saturate(138%);background-color: rgba(86,198,90,0.67);'>Log In</a>";
echo (isset($_SESSION['role'])) ? "<a href='./auth/log.php?role=$_SESSION[role]' class='btn btn-sm btn-outline-success ml-2'>dashboard</a>" : "";
?>
</span>
</div>
</div>
</nav>
</div>
<div class="simple-slider">
<div class="swiper-container">
<div class="swiper-wrapper" style="height: 89vh;">
<div id="welcome_container" class="pulse animated swiper-slide" style="height: 89vh;background: url('./assets/img/submission.jpg');background-repeat: no-repeat;width: 100%;background-position: center;background-size: cover;"><span id="welcome" class="text-center"><span><b>ONLINE ASSIGNMENT SUBMISSION SYSTEM</b></span><br>simplifying and digitizing the assignment submission process is what <b>O</b>nline <b>A</b>ssignment <b>S</b>ubmission <b>S</b>ystem aimed for,<br> enabling students to submit their assignments online and professors/lecturers/tutorial assistants to manage assignments efficiently.</span></div>
<div id="welcome_container" class="swiper-slide" style="height: 89vh;background: url('./assets/img/time.jpg');background-position: center;background-size: cover;width: 100%;background-repeat: no-repeat;"><span id="welcome">Streamline the grading process and enable timely feedback to students</span></div>
<div id="welcome_container" class="swiper-slide" style="height: 89vh;background: url('./assets/img/post.jpg');background-position: center;background-size: cover;background-repeat: no-repeat;"><span id="welcome">Lorem ipsum dolor sit amet consectetur adipisicing elit. Perspiciatis asperiores dolores tempore aspernatur repudiandae molestiae?</span></div>
</div>
<div class="swiper-pagination"></div>
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
</div>
</div>
<div class="features-clean">
<div class="container">
<div class="intro">
<h2 class="text-center">Features of <b>OASS</b></h2>
</div>
<div class="row features">
<div class="col-sm-6 col-lg-4 item"><i class="fa fa-lock icon" style="color: rgba(86,198,90,0.67);"></i>
<h3 class="name">secure authentication</h3>
<p class="description">A secure login system for students, professors/lecturers/tutorial assistants.</p>
</div>
<div class="col-sm-6 col-lg-4 item"><i class="fa fa-bell icon" style="color: rgba(86,198,90,0.67);"></i>
<h3 class="name">Assignment submission</h3>
<p class="description">Create a user-friendly form for students to upload assignment files.
<br>Capture assignment details like title, due date, and instructions.
</p>
</div>
<div class="col-sm-6 col-lg-4 item"><i class="fa fa-telegram icon" style="color: rgba(86,198,90,0.67);"></i>
<h3 class="name">Assignment posting</h3>
<p class="description">Design a form for professors/lecturers/tutorial assistants to create and post new assignments.
<br>Allow specification of deadlines and inclusion of instructional materials.
</p>
</div>
<div class="col-sm-6 col-lg-4 item"><i class="fa fa-sticky-note icon" style="color: rgba(86,198,90,0.67);"></i>
<h3 class="name">Grading and feedback</h3>
<p class="description">Develop a mechanism for professors/lecturers/tutorial assistants to assess assignments and provide feedback.
<br>Enable students to view their grades and feedback.
</p>
</div>
<div class="col-sm-6 col-lg-4 item"><i class="fa fa-signal icon" style="color: rgba(86,198,90,0.67);"></i>
<h3 class="name">Performance reporting</h3>
<p class="description">Implement a reporting module to generate performance reports for each student.
<br>Include information such as assignment submission status, grades, and overall performance.
</p>
</div>
<div class="col-sm-6 col-lg-4 item"><i class="fa fa-clock-o icon" style="color: rgba(86,198,90,0.67);"></i>
<h3 class="name">Deadline feature</h3>
<p class="description">Integrate a feature that allows professors/lecturers/tutorial assistants to set submission deadlines for assignments.</p>
</div>
</div>
</div>
</div>
<span id="posts"></span>
<?php if (isset($_SESSION['role']) && $_SESSION['role'] == 3) { ?>
<div class="container-fluid p-3 bg-light pt-5">
<div class="container text-center">
<h4 class="h3">Assignment posts</h4>
</div>
<div class="row d-flex justify-content-around p-5">
<?php
if ($result) {
if (mysqli_num_rows($result) > 0) {
$limit = 0;
while ($posts = mysqli_fetch_assoc($result)) {
if ($limit < 8) {
?>
<div class="card shadow-sm m-3 p-3" style="border: 2px solid lightgreen !important;">
<img src="assignment1.jpg" class="card-img-top" alt="">
<div class="card-body">
<h5 class="card-title" style="color: green;"><?php echo $posts['department'] ?></h5>
<p class="card-text"><?php echo $posts['courseName'] ?> <br> <?php echo $posts['levelName'] ?> | <?php echo $posts['moduleName'] ?></p>
<p class="card-text"><strong>Assignment : </strong> <?php echo $posts['name'] ?> <br> <strong>Due : </strong> <?php echo "<span class='text-primary'>$posts[dueDate]</span>"; ?></p>
<a href="./auth/log.php?pid=<?php echo $posts['id']; ?>" class="btn btn-sm btn-outline-dark">View Assignment</a>
</div>
</div>
<?php
$limit++;
}
}
}
} else {
echo mysqli_error($con);
}
?>
</div>
</div>
<?php } else {
?>
<div class="container-fluid p-3 bg-light pt-5">
<div class="container text-center">
<h4 class="h3">Assignment posts</h4>
</div>
<div class="row d-flex justify-content-around p-5">
<?php
if ($result) {
if (mysqli_num_rows($result) > 0) {
$limit = 0;
while ($posts = mysqli_fetch_assoc($result)) {
if ($limit < 8) {
?>
<div class="card shadow-sm m-3 p-3" style="border: 2px solid lightgreen !important;">
<img src="assignment1.jpg" class="card-img-top" alt="">
<div class="card-body">
<h5 class="card-title" style="color: green;"><?php echo $posts['department'] ?></h5>
<p class="card-text"><?php echo $posts['courseName'] ?> <br> <?php echo $posts['levelName'] ?> | <?php echo $posts['moduleName'] ?></p>
<p class="card-text"><strong>Assignment : </strong><?php echo $posts['name'] ?> <br> <strong>Due : </strong> <?php echo "<span class='text-primary'>$posts[dueDate]</span>"; ?></p>
<a href="./auth/log.php?pid=<?php echo $posts['id']; ?>" class="btn btn-sm btn-outline-dark">View Assignment</a>
</div>
</div>
<?php
$limit++;
}
}
}
} else {
echo mysqli_error($con);
}
?>
</div>
</div>
<?php
} ?>
<footer id="myFooter" style="background-color: rgba(86,198,90,0.67);">
<div class="container-fluid">
<div class="row text-center d-lg-flex justify-content-lg-center align-items-lg-center text-center">
<div class="col-12 col-sm-6 col-lg-3" style="background-color: rgba(86,198,90,0.67);">
<h5>Welcome</h5>
<ul>
<li><a href="index.php">Home</a></li>
<li><a href="./public/about.php">About Us</a></li>
<li><a href="./public/contacts.php">Contacts</a></li>
<li><a href="./auth/login.php">login</a></li>
</ul>
</div>
</div>
<div class="row social-networks">
<div class="col">
<a class="linkedin" href="https://linkedin.com/in/is-haka/" target="_blank"><i class="fa fa-linkedin"></i></a>
</div>
</div>
<div class="row footer-copyright" style="background-color: #0009.2;">
<div class="col">
<p>© <?= date("Y"); ?> Copyright ~ Designed By <a class="text-success" href="https://www.is-haka.github.io" target="_blank">Is-haka</a></p>
</div>
</div>
</div>
</footer>
<script src="assets/js/jquery.min.js?h=83e266cb1712b47c265f77a8f9e18451"></script>
<script src="assets/bootstrap/js/bootstrap.min.js?h=63715b63ee49d5fe4844c2ecae071373"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/aos/2.1.1/aos.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.3.1/js/swiper.jquery.min.js"></script>
<script src="assets/js/script.min.js?h=f362171b9da1523b13764bab15062702"></script>
</body>
</html>