From: moodler Date: Sat, 7 Feb 2004 12:51:22 +0000 (+0000) Subject: Some more work on the groups pages (not finished yet) X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=a6c7a9fbf84da12ab0e1d8036d863060624efee8;p=moodle.git Some more work on the groups pages (not finished yet) --- diff --git a/course/groups-summary.html b/course/groups-summary.html index 6ea2ba218e..1b801b50c4 100644 --- a/course/groups-summary.html +++ b/course/groups-summary.html @@ -2,21 +2,49 @@ name ?> - - -

picture ?>

-

description ?>

- - -

users) { - foreach ($t->users as $user) { - echo "wwwroot/user/view.php?id=$user->id&course=$t->courseid\">$user->fullname
"; + + + + + + + + + + + + +
+

picture ?>

+
+

description ?>

+ linkeditprofile)) { + echo '

'.$t->linkeditprofile->text.'...

'; + } + ?> +
+

users) { + $countusers = count($t->users); + foreach ($t->users as $user) { + echo "wwwroot/user/view.php?id=$user->id&course=$t->courseid\">$user->fullname"; + $countusers--; + if ($countusers) { + echo ', '; + } + } } - } - ?> -

+ ?> +

+
+ linkfullprofile)) { + echo '

'.$t->linkfullprofile->text.'...

'; + } + ?> +
- - + +
diff --git a/course/groups.php b/course/groups.php index fb72fb707f..ba847a0ff6 100644 --- a/course/groups.php +++ b/course/groups.php @@ -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 = "

".user_login_string($course, $USER)."

"; 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'); } }