Addition of teacher admin features

This commit is contained in:
rkingdon 2003-05-13 16:37:47 +00:00
parent e9d3eca323
commit 16a0e6f05c
4 changed files with 100 additions and 23 deletions

View file

@ -78,7 +78,7 @@
if (!isteacher($course->id)) {
error("Only teachers can look at this page");
}
if (!isset($_GET['sid'])) {
if (empty($_GET['sid'])) {
error("Admin confirm delete: submission id missing");
}
@ -93,10 +93,11 @@
if (!isteacher($course->id)) {
error("Only teachers can look at this page");
}
if (!$sid = isset($_GET['sid'])) {
if (empty($_GET['sid'])) {
error("Admin delete: submission id missing");
}
if (!$submission = get_record("workshop_submissions", "id", $sid)) {
if (!$submission = get_record("workshop_submissions", "id", $_GET['sid'])) {
error("Admin delete: can not get submission record");
}
print_string("deleting", "workshop");