mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
ROLES AND PERMISSIONS - FIRST CHECK-IN
======================================= WARNING: DEV IS CURRENTLY VERY UNSTABLE. This is a mega-checkin of the new Roles system. A lot of changes have been made in core and modules. Currently there are a lot of rough edges and known problems. We are working hard on these .. .the reason for getting this into HEAD at this stage is enable us to move faster (our branch was diverging from HEAD too much). Please keep an eye on http://docs.moodle.org/en/Roles for current status and information for developers on how to use the new Roles system.
This commit is contained in:
parent
394577c3e4
commit
bbbf2d4015
139 changed files with 40452 additions and 2001 deletions
|
@ -21,18 +21,16 @@
|
|||
|
||||
require_login($course->id, false, $cm);
|
||||
|
||||
if (!isteacher($course->id)) {
|
||||
error("This page is for teachers only");
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
||||
if (!has_capability('mod/forum:viewsubscribers', $context->id)) {
|
||||
error('You do not have the permission to view forum subscribers');
|
||||
}
|
||||
|
||||
unset($SESSION->fromdiscussion);
|
||||
|
||||
add_to_log($course->id, "forum", "view subscribers", "subscribers.php?id=$forum->id", $forum->id, $cm->id);
|
||||
|
||||
if ($edit != -1) {
|
||||
$USER->subscriptionsediting = $edit;
|
||||
}
|
||||
|
||||
$strsubscribeall = get_string("subscribeall", "forum");
|
||||
$strsubscribenone = get_string("subscribenone", "forum");
|
||||
$strsubscribers = get_string("subscribers", "forum");
|
||||
|
@ -41,8 +39,16 @@
|
|||
$navigation = "<a href=\"index.php?id=$course->id\">$strforums</a> ->
|
||||
<a href=\"view.php?f=$forum->id\">".format_string($forum->name,true)."</a> -> $strsubscribers";
|
||||
|
||||
print_header_simple("$strsubscribers", "", "$navigation",
|
||||
"", "", true, forum_update_subscriptions_button($course->id, $id));
|
||||
if (has_capability('mod/forum:managesubscriptions', $context->id)) {
|
||||
print_header_simple("$strsubscribers", "", "$navigation",
|
||||
"", "", true, forum_update_subscriptions_button($course->id, $id));
|
||||
if ($edit != -1) {
|
||||
$USER->subscriptionsediting = $edit;
|
||||
}
|
||||
} else {
|
||||
print_header_simple("$strsubscribers", "", "$navigation", "", "", true, '');
|
||||
unset($USER->subscriptionsediting);
|
||||
}
|
||||
|
||||
/// Check to see if groups are being used in this forum
|
||||
if ($groupmode = groupmode($course, $cm)) { // Groups are being used
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue