Added forum_role_assign and forum_role_unassign

This commit is contained in:
moodler
2006-09-13 08:11:34 +00:00
parent 3d1885af1e
commit d6cc763f73
+24
View File
@@ -3521,6 +3521,30 @@ function forum_update_subscriptions_button($courseid, $forumid) {
"<input type=\"submit\" value=\"$string\" /></form>";
}
/*
* This function gets run whenever a role is assigned to a user in a context
*
* @param integer $userid
* @param object $context
* @return bool
*/
function forum_role_assign($userid, $context) {
return forum_add_user_default_subscriptions($userid, $context);
}
/*
* This function gets run whenever a role is assigned to a user in a context
*
* @param integer $userid
* @param object $context
* @return bool
*/
function forum_role_unassign($userid, $context) {
return forum_remove_user_subscriptions($userid, $context);
}
function forum_add_user_default_subscriptions($userid, $context) {
/// Add subscriptions for new users