<tr>
<th colspan="2"><?php echo $t->name ?></th>
</tr>
- <tr>
- <td valign="top">
- <p><?php echo $t->picture ?></p>
- <p><?php echo $t->description ?></p>
- </td>
- <td align="right">
- <p style="font-size: x-small"><?php
- if ($t->users) {
- foreach ($t->users as $user) {
- echo "<a href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$t->courseid\">$user->fullname</a><br />";
+ <tr><td class="generalboxcontent" bgcolor="<?php echo $THEME->cellcontent ?>">
+ <table>
+ <tr>
+ <td valign="top" width="120">
+ <p><?php echo $t->picture ?></p>
+ </td>
+ <td>
+ <p><?php echo $t->description ?></p>
+ <?php
+ if (!empty($t->linkeditprofile)) {
+ echo '<p style="font-size: small" align="right"><a href="'.$t->linkeditprofile->url.'">'.$t->linkeditprofile->text.'</a>...</p>';
+ }
+ ?>
+ </td>
+ </tr>
+ <tr bgcolor="<?php echo $THEME->cellcontent ?>">
+ <td colspan="2" align="left">
+ <p style="font-size: x-small"><?php
+ if ($t->users) {
+ $countusers = count($t->users);
+ foreach ($t->users as $user) {
+ echo "<a href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$t->courseid\">$user->fullname</a>";
+ $countusers--;
+ if ($countusers) {
+ echo ', ';
+ }
+ }
}
- }
- ?>
- </ul></p>
+ ?>
+ </p>
+ </td>
+ </tr>
+ <tr bgcolor="<?php echo $THEME->cellcontent ?>">
+ <td colspan="2" align="right">
+ <?php
+ if (!empty($t->linkfullprofile)) {
+ echo '<p style="font-size: small" align="right"><a href="'.$t->linkfullprofile->url.'">'.$t->linkfullprofile->text.'</a>...</p>';
+ }
+ ?>
+ </td>
+ </tr>
+ </table>
</td>
- </tr>
-</table>
+ </tr>
+ </table>
<br />
}
if (isteacheredit($course->id)) {
- if (isset($edit)) {
+ if (isset($_GET['edit'])) {
if ($edit == "on") {
$USER->groupsediting = true;
} else if ($edit == "off") {
$strgroup = get_string('group');
$strgroups = get_string('groups');
+ $streditgroupprofile = get_string('editgroupprofile');
+ $strgroupmemberssee = get_string('groupmemberssee');
$loggedinas = "<p class=\"logininfo\">".user_login_string($course, $USER)."</p>";
print_header("$course->shortname: $strgroups", "$course->fullname",
} else {
$isteacher = isteacher($course->id);
+ $isteacheredit = isteacheredit($course->id);
foreach ($groups as $group) {
$t = $group;
$t->picture = print_group_picture($group, $course->id, true, true, true);
$t->users[$key]->fullname = fullname($user, $isteacher);
}
}
+ if ($isteacheredit or ($isteacher and ismember($group->id))) {
+ $t->linkeditprofile->url = "group.php?id=$course->id&group=$group->id&edit=on";
+ $t->linkeditprofile->text = $streditgroupprofile;
+ }
+ $t->linkfullprofile->url = "group.php?id=$course->id&group=$group->id&edit=off";
+ $t->linkfullprofile->text = $strgroupmemberssee;
+
include('groups-summary.html');
}
}