Cleanups
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
if ($userid) {
|
||||
print ('<input type="hidden" name="userid" value="'.$userid.'"/>');
|
||||
}
|
||||
if ($course->id) {
|
||||
if ($courseid) {
|
||||
print ('<input type="hidden" name="courseid" value="'.$courseid.'" />');
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<form action="override.php" method="post">
|
||||
<form action="override.php" method="post">
|
||||
<input type="hidden" name="contextid" value="<?php echo $contextid; ?>">
|
||||
<input type="hidden" name="roleid" value="<?php echo $roleid; ?>">
|
||||
<?php
|
||||
if ($userid) {
|
||||
print ('<input type="hidden" name="userid" value="'.$userid.'"/>');
|
||||
}
|
||||
if ($course->id) {
|
||||
if ($courseid) {
|
||||
print ('<input type="hidden" name="courseid" value="'.$courseid.'" />');
|
||||
}?>
|
||||
<table class="override">
|
||||
|
||||
+11
-12
@@ -139,21 +139,20 @@
|
||||
**************************************/
|
||||
|
||||
if ($roleid) {
|
||||
|
||||
// this is the array holding capabilities of this role sorted till this context
|
||||
// This is the array holding capabilities of this role sorted till this context
|
||||
$r_caps = role_context_capabilities($roleid, $context);
|
||||
|
||||
// this is the available capabilities assignable in this context
|
||||
$capabilities = fetch_context_capabilities($context);
|
||||
|
||||
print_simple_box_start("center");
|
||||
|
||||
include_once('override.html');
|
||||
|
||||
print_simple_box_end();
|
||||
|
||||
// Get the capabilities assignable in this context
|
||||
if ($capabilities = fetch_context_capabilities($context)) {
|
||||
print_simple_box_start("center");
|
||||
include_once('override.html');
|
||||
print_simple_box_end();
|
||||
} else {
|
||||
notice(get_string('nocapabilitiesincontext', 'moodle'),
|
||||
$CFG->wwwroot.'/admin/roles/override.php?contextid='.$contextid);
|
||||
}
|
||||
}
|
||||
|
||||
print_footer($course);
|
||||
|
||||
?>
|
||||
?>
|
||||
Reference in New Issue
Block a user