mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Some more work on the groups pages (not finished yet)
This commit is contained in:
parent
1eddd0d8f5
commit
a6c7a9fbf8
@ -2,21 +2,49 @@
|
||||
<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>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul></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 ', ';
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</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 />
|
||||
|
@ -20,7 +20,7 @@
|
||||
}
|
||||
|
||||
if (isteacheredit($course->id)) {
|
||||
if (isset($edit)) {
|
||||
if (isset($_GET['edit'])) {
|
||||
if ($edit == "on") {
|
||||
$USER->groupsediting = true;
|
||||
} else if ($edit == "off") {
|
||||
@ -36,6 +36,8 @@
|
||||
|
||||
$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",
|
||||
@ -53,6 +55,7 @@
|
||||
|
||||
} 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);
|
||||
@ -61,6 +64,13 @@
|
||||
$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');
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user