Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'MDL-27735' of git://github.com/rwijaya/moodle

  • Loading branch information...
commit 46fc365c7710f832e9959ac9a4631a20b072c4f7 2 parents 6aabd59 + db8312d
@nebgor nebgor authored
View
12 mod/forum/db/access.php
@@ -333,5 +333,17 @@
'student' => CAP_ALLOW,
)
),
+ 'mod/forum:addquestion' => array(
+
+ 'riskbitmask' => RISK_SPAM,
+
+ 'captype' => 'write',
+ 'contextlevel' => CONTEXT_MODULE,
+ 'archetypes' => array(
+ 'teacher' => CAP_ALLOW,
+ 'editingteacher' => CAP_ALLOW,
+ 'manager' => CAP_ALLOW
+ )
+ ),
);
View
1  mod/forum/lang/en/forum.php
@@ -149,6 +149,7 @@
$string['forcessubscribe'] = 'This forum forces everyone to be subscribed';
$string['forum'] = 'Forum';
$string['forum:addnews'] = 'Add news';
+$string['forum:addquestion'] = 'Add question';
$string['forumauthorhidden'] = 'Author (hidden)';
$string['forumblockingalmosttoomanyposts'] = 'You are approaching the posting threshold. You have posted {$a->numposts} times in the last {$a->blockperiod} and the limit is {$a->blockafter} posts.';
$string['forumbodyhidden'] = 'This post cannot be viewed by you, probably because you have not posted in the discussion or the maximum editing time hasn\'t passed yet.';
View
2  mod/forum/lib.php
@@ -4824,6 +4824,8 @@ function forum_user_can_post_discussion($forum, $currentgroup=null, $unused=-1,
if ($forum->type == 'news') {
$capname = 'mod/forum:addnews';
+ } else if ($forum->type == 'qanda') {
+ $capname = 'mod/forum:addquestion';
} else {
$capname = 'mod/forum:startdiscussion';
}
View
2  mod/forum/version.php
@@ -26,7 +26,7 @@
defined('MOODLE_INTERNAL') || die();
-$module->version = 2011110600;
+$module->version = 2011110601;
$module->requires = 2011110200; // Requires this Moodle version
$module->cron = 60;
$module->component = 'mod_forum';
Please sign in to comment.
Something went wrong with that request. Please try again.