Skip to content

Commit

Permalink
Course/import.php should check for teacher
Browse files Browse the repository at this point in the history
  • Loading branch information
mjollnir_ committed Mar 2, 2005
1 parent 3615b2b commit 53dc7cc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions course/import.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@

require_login($course->id);

if (!isteacheredit($course->id)) {
error("You need to be a teacher or an admin to use this page");
}

if ($from = get_record("course","id",$fromcourse)) {
if (!empty($filename) && file_exists($CFG->dataroot.'/'.$filename) && !empty($SESSION->import_preferences)) {
$restore = backup_to_restore_array($SESSION->import_preferences);
Expand Down

0 comments on commit 53dc7cc

Please sign in to comment.