From aa5e1eb6f09aed79b41a487dd4f149008b68d961 Mon Sep 17 00:00:00 2001 From: Tim Steiner <tsteiner2@unl.edu> Date: Thu, 8 Mar 2012 18:06:07 +0000 Subject: [PATCH] Display the list of course groups in the "Additional Info" of a course request's view page. --- .../views/scripts/view/course-info.phtml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/application/modules/courses/views/scripts/view/course-info.phtml b/application/modules/courses/views/scripts/view/course-info.phtml index db450644..e7c30478 100644 --- a/application/modules/courses/views/scripts/view/course-info.phtml +++ b/application/modules/courses/views/scripts/view/course-info.phtml @@ -214,6 +214,30 @@ <td><?php echo $this->request->getOwnerModel()->getFirstName() . ' ' . $this->request->getOwnerModel()->getLastName(); ?></td> </tr> <?php } ?> + + + <?php + $courseGroups = array(); + foreach ($course->getCrosslistings() as $crosslisting) { + foreach ($crosslisting['courseGroups'] as $courseGroup) { + $courseGroups[] = $courseGroup['name']; + } + } + ?> + <tr> + <th>Course Groups</th> + <td> + <?php if (count($courseGroups) == 0) { ?> + <em>None</em> + <?php } else { ?> + <ul> + <?php foreach ($courseGroups as $courseGroup) { ?> + <li><?php echo $courseGroup; ?></li> + <?php } ?> + </ul> + <?php } ?> + </td> + </tr> </table> -- GitLab