MDL-21655 big scary enrolment and roles improvements - see tacker for list of changes, includes other minor fixes too

This commit is contained in:
Petr Skoda
2010-03-31 07:41:31 +00:00
parent d1d4813ff2
commit 4f0c2d0009
225 changed files with 2941 additions and 3097 deletions
+2 -8
View File
@@ -13,17 +13,11 @@
/// options to be filtered (In HTML form).
class censor_filter extends moodle_text_filter {
private function _canseecensor() {
$cansee = false;
$context = get_context_instance(CONTEXT_SYSTEM, SITEID);
if (has_capability('moodle/site:doanything', $context)) {
$cansee = true;
}
return $cansee;
return is_siteadmin(); //TODO: add proper access control
}
function hash(){
$cap = "mod/filter:censor";
$context = get_context_instance(CONTEXT_SYSTEM, SITEID);
if (has_capability('moodle/site:doanything', $context)) {
if (is_siteadmin()) { //TODO: add proper access control
$cap = "mod/filter:seecensor";
}
return $cap;