id); if ($group) { if (isteacheredit($course->id) or $course->groupmode == VISIBLEGROUPS) { if (! $group = get_record("groups", "id", $group)) { error('Specified group could not be found!', "groups.php?id=$course->id"); } } else { error('Sorry, you don\'t have access to view this group', "view.php?id=$course->id"); } } else if (! $group = get_current_group($course->id, 'full')) { error('You are not currently in a group!', "view.php?id=$course->id"); } if (isteacheredit($course->id) or (isteacher($course->id) and ismember($group->id) ) ) { if (isset($edit)) { if ($edit == "on") { $USER->groupediting = true; } else if ($edit == "off") { $USER->groupediting = false; } } } else { $USER->groupediting = false; } /// Print the headers of the page $strgroup = get_string('group'); $strgroups = get_string('groups'); $loggedinas = "
".user_login_string($course, $USER)."
"; if (isteacheredit($course->id) or $course->groupmode == VISIBLEGROUPS) { print_header("$strgroup : $group->name", "$course->fullname", "wwwroot/course/view.php?id=$course->id\">$course->shortname -> id\">$strgroups -> $group->name", "", "", true, update_group_button($course->id), $loggedinas); } else { print_header("$strgroup : $group->name", "$course->fullname", "wwwroot/course/view.php?id=$course->id\">$course->shortname -> $strgroup -> $group->name", "", "", true, "", $loggedinas); } /// Display the current group information if ($USER->groupediting) { // Make an editing form for group information print_heading($group->name); echo '