adding capabilities

This commit is contained in:
toyomoyo
2006-09-05 08:50:23 +00:00
parent e778a40617
commit 3924b9884b
15 changed files with 116 additions and 42 deletions
+1 -4
View File
@@ -16,10 +16,7 @@
error("Could not find the course!");
}
if (!isteacher($course->id)) {
error("Only teachers can edit this!");
}
require_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $id));
/// If data submitted, then process and store.