-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprevious-grades-student-script.php
More file actions
58 lines (46 loc) · 1.35 KB
/
previous-grades-student-script.php
File metadata and controls
58 lines (46 loc) · 1.35 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
<?php
include_once 'connection-script.php';
session_start();
$mail=$_SESSION['email'];
$query="SELECT * from student where semail='$mail'";
$result=mysql_query($query);
$row=mysql_fetch_assoc($result);
$id=$_POST['courses'];
echo '<h3>'.$id.'</h3>';
$answer=mysql_query("SELECT * from courses where courseid='$id'");
$final=mysql_fetch_assoc($answer);
echo '<h3>'.$final['coursename'].'</h3>';
$query1="SELECT * FROM finalsubmission where studentid='$row[studentid]' and courseid='$id'";
$result1=mysql_query($query1);
$num=mysql_num_rows($result1);
if($num==0)
{
echo "<h3> Whoa! This looks a pretty clean area. Either you are procrastinating or the teacher is. LOL! </h3>";
}
else
{
echo '<table id="table11" class="table-11">';
echo '<tr>';
echo '<th>Assignment No.</th>';
echo '<th>Submission Date</th>';
echo '<th>Total Points</th>';
echo '<th>Points Scored</th>';
echo '</tr>';
while($row=mysql_fetch_assoc($result1))
{
echo "<tr>";
echo "<td>".$row['assignmentno']."</td>";
echo '<th>Submission Date</th>';
$total=0;
$query2=mysql_query("SELECT * from `questions_assignment` where courseid='$id' and assignmentno='$row[assignmentno]'");
while($tuple=mysql_fetch_assoc($query2))
{
$total=$total+$tuple['marks'];
}
echo '<th>'.$total.'</th>';
echo "<td>".$row['totalmarks']."</td>";
echo "</tr>";
}
echo "</table>";
}
?>