Permalink
Browse files

Merge branch 'w30_MDL-34129_m23_enrolinfo' of git://github.com/skodak…

…/moodle into MOODLE_23_STABLE
  • Loading branch information...
2 parents bb9b19a + 7c87df6 commit 73a418e3c23db25ce2af37283f53f92f12ed786c @danpoltawski danpoltawski committed Jul 24, 2012
Showing with 28 additions and 0 deletions.
  1. +28 −0 enrol/index.php
View
@@ -84,6 +84,34 @@
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) {

0 comments on commit 73a418e

Please sign in to comment.