]> git.mjollnir.org Git - moodle.git/commitdiff
Capability tweaks for rss_client block
authorvyshane <vyshane>
Wed, 13 Sep 2006 04:10:41 +0000 (04:10 +0000)
committervyshane <vyshane>
Wed, 13 Sep 2006 04:10:41 +0000 (04:10 +0000)
blocks/rss_client/block_rss_client.php
blocks/rss_client/db/access.php

index 369ea779e1a6bef574c2ac771a4071b972859fe9..565a14a3c7939ae095c98873479601c4a61e2054 100644 (file)
@@ -90,7 +90,8 @@
         
         $context = get_context_instance(CONTEXT_BLOCK, $this->instance->id);
         
-        if (has_capability('block/rss_client:createsharedfeeds', $context)) {
+        if (has_capability('block/rss_client:createsharedfeeds', $context)
+                    || has_capability('block/rss_client:createprivatefeeds', $context)) {
 
             $page = page_create_object($this->instance->pagetype, $this->instance->pageid);
             //if ($page->user_allowed_editing()) { // for SUBMITTERS_ALL_ACCOUNT_HOLDERS we're going to run into trouble later if we show it and then they don't have write access to the page.
index e5efb9ddaea4e42eeb79849a37b7c33365a758bd..012fd01e7a01467c340b1a70b06b21a13de1f21d 100644 (file)
@@ -55,8 +55,8 @@ $block_rss_client_capabilities = array(
             'guest' => CAP_PREVENT,
             'student' => CAP_PREVENT,
             'teacher' => CAP_PREVENT,
-            'editingteacher' => CAP_PREVENT,
-            'coursecreator' => CAP_PREVENT,
+            'editingteacher' => CAP_ALLOW,
+            'coursecreator' => CAP_ALLOW,
             'admin' => CAP_ALLOW
         )
     ),