From 7de9dff6c59a936c86933ea2a76c6fe89e82bd91 Mon Sep 17 00:00:00 2001 From: skodak Date: Thu, 29 May 2008 15:07:05 +0000 Subject: [PATCH] MDL-15042 fixed regression - thanks Howard --- lib/accesslib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/accesslib.php b/lib/accesslib.php index 361f36c4ff3..6b229763521 100755 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -5465,7 +5465,7 @@ function role_cap_duplicate($sourcerole, $targetrole) { $caps = $DB->get_records_sql("SELECT * FROM {role_capabilities} WHERE roleid = ? AND contextid = ?", - array($grade_category->id, $systemcontext->id)); + array($sourcerole->id, $systemcontext->id)); // adding capabilities foreach ($caps as $cap) { unset($cap->id);