Merge branch 'w30_MDL-34129_m23_enrolinfo' of git://github.com/skodak/moodle into MOODLE_23_STABLE

This commit is contained in:
Dan Poltawski
2012-07-24 13:41:45 +08:00
+28
View File
@@ -84,6 +84,34 @@ $PAGE->navbar->add(get_string('enrolmentoptions','enrol'));
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('enrolmentoptions','enrol'));
echo $OUTPUT->box_start('generalbox info');
$summary = file_rewrite_pluginfile_urls($course->summary, 'pluginfile.php', $context->id, 'course', 'summary', null);
echo format_text($summary, $course->summaryformat, array('overflowdiv'=>true), $course->id);
if (!empty($CFG->coursecontact)) {
$coursecontactroles = explode(',', $CFG->coursecontact);
foreach ($coursecontactroles as $roleid) {
$role = $DB->get_record('role', array('id'=>$roleid));
$roleid = (int) $roleid;
if ($users = get_role_users($roleid, $context, true)) {
foreach ($users as $teacher) {
$fullname = fullname($teacher, has_capability('moodle/site:viewfullnames', $context));
$namesarray[] = format_string(role_get_name($role, $context)).': <a href="'.$CFG->wwwroot.'/user/view.php?id='.
$teacher->id.'&amp;course='.SITEID.'">'.$fullname.'</a>';
}
}
}
if (!empty($namesarray)) {
echo "<ul class=\"teachers\">\n<li>";
echo implode('</li><li>', $namesarray);
echo "</li></ul>";
}
}
echo $OUTPUT->box_end();
//TODO: find if future enrolments present and display some info
foreach ($forms as $form) {