mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
Merge branch 'MDL-25589' of git://git.luns.net.uk/moodle
This commit is contained in:
commit
e1ce9a6670
2 changed files with 6 additions and 3 deletions
|
@ -101,7 +101,7 @@ if (empty($pending)) {
|
|||
$table = new html_table();
|
||||
$table->attributes['class'] = 'pendingcourserequests generaltable';
|
||||
$table->align = array('center', 'center', 'center', 'center', 'center', 'center', 'center');
|
||||
$table->head = array(' ', get_string('shortname'), get_string('fullname'),
|
||||
$table->head = array(get_string('shortname'), get_string('fullname'),
|
||||
get_string('requestedby'), get_string('summary'), get_string('requestreason'), get_string('action'));
|
||||
|
||||
foreach ($pending as $course) {
|
||||
|
|
|
@ -32,6 +32,7 @@ $PAGE->set_url('/course/request.php');
|
|||
/// Where we came from. Used in a number of redirects.
|
||||
$returnurl = $CFG->wwwroot . '/course/index.php';
|
||||
|
||||
|
||||
/// Check permissions.
|
||||
require_login();
|
||||
if (isguestuser()) {
|
||||
|
@ -40,7 +41,9 @@ if (isguestuser()) {
|
|||
if (empty($CFG->enablecourserequests)) {
|
||||
print_error('courserequestdisabled', '', $returnurl);
|
||||
}
|
||||
require_capability('moodle/course:request', get_context_instance(CONTEXT_SYSTEM));
|
||||
$context = get_context_instance(CONTEXT_SYSTEM);
|
||||
$PAGE->set_context($context);
|
||||
require_capability('moodle/course:request', $context);
|
||||
|
||||
/// Set up the form.
|
||||
$data = course_request::prepare();
|
||||
|
@ -67,4 +70,4 @@ echo $OUTPUT->header();
|
|||
echo $OUTPUT->heading($strtitle);
|
||||
// Show the request form.
|
||||
$requestform->display();
|
||||
echo $OUTPUT->footer();
|
||||
echo $OUTPUT->footer();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue