-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstructors.php
More file actions
41 lines (30 loc) · 1.41 KB
/
instructors.php
File metadata and controls
41 lines (30 loc) · 1.41 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
<?
require('functionlib.php');
session_start();
if (!isset($_SESSION["studentKey"])) { redirect('index.php'); die(); }
if ($_SESSION["signupStage"] <> 9) { redirect('index.php'); die(); }
if ($_SESSION["instructorFlag"] != 1) { redirect('home.php'); die(); }
require('config.php');
printhead("p { margin: 0 0 1em 0; }");
startbody();
$logresult = write_log($_SESSION["username"] . " opened the instructor tools panel");
printmenu_start();
echo '<p><strong>Instructor Tools</strong></p>';
$query = "SELECT i.`classKey`, c.`sectionNumber`, c.`classNumber`, c.`courseTitle` FROM `instructors` AS i LEFT JOIN `classes` AS c ON i.`classKey`=c.`classKey` WHERE i.`studentKey` = " . $_SESSION["studentKey"];
$result = myquery($query);
if (mysql_num_rows($result) == 0) die();
echo '<table>';
while ($row = mysql_fetch_array($result)) {
echo '<tr>';
echo '<td><strong>' . $row["classNumber"] . '</strong></td>';
echo '<td><strong>' . $row["courseTitle"] . ' (' . $row["sectionNumber"] . ')</strong></td>';
echo '</tr>';
echo '<tr><td> </td><td><a href="report.php?type=1&id=' . $row["classKey"] . '">Display List of Students and Number of Comments</a></td></tr>';
echo '<tr><td> </td><td><a href="report.php?type=2&id=' . $row["classKey"] . '">Display Each Student And The Content of Their Comments</a></td></tr>';
echo '<tr><td> </td><td> </td></tr>';
}
echo '</table>';
printmenu_end();
endbody();
mysql_close();
?>