Exemple #1
0
 case 'deletegroup':
     redirect(groups_group_edit_url($courseid, $groupid, $groupingid, $html = false, $param = 'delete=1'));
     break;
 case 'removegroup':
     break;
 case 'showcreategroupform':
     // Allow groups to be created outside of groupings
     /*
     if (GROUP_NOT_IN_GROUPING == $groupingid) {
         print_error('errornotingrouping', 'group', groups_home_url($courseid), get_string('notingrouping', 'group'));
     }
     */
     redirect(groups_group_edit_url($courseid, null, $groupingid, false));
     break;
 case 'showcreateorphangroupform':
     redirect(groups_group_edit_url($courseid, null, null, false));
     break;
 case 'addgroupstogroupingform':
     break;
 case 'updategroups':
     //Currently reloading.
     break;
 case 'removemembers':
     break;
 case 'showaddmembersform':
     redirect(groups_members_add_url($courseid, $groupid, $groupingid, false));
     break;
 case 'updatemembers':
     //Currently reloading.
     break;
 default:
Exemple #2
0
}
echo '<td class="right">';
$formatmenu = array('0' => get_string('detailedless'), '1' => get_string('detailedmore'));
popup_form($baseurl . '&amp;mode=', $formatmenu, 'formatmenu', $fullmode, '', '', '', false, 'self', get_string('userlist'));
echo '</td></tr></table>';
if ($currentgroup and (!$isseparategroups or has_capability('moodle/site:accessallgroups', $context))) {
    /// Display info about the group
    if ($group = groups_get_group($currentgroup)) {
        //TODO:
        if (!empty($group->description) or !empty($group->picture) and empty($group->hidepicture)) {
            echo '<table class="groupinfobox"><tr><td class="left side picture">';
            print_group_picture($group, $course->id, true, false, false);
            echo '</td><td class="content">';
            echo '<h3>' . $group->name;
            if (has_capability('moodle/course:managegroups', $context)) {
                echo '&nbsp;<a title="' . get_string('editgroupprofile') . '" href="' . groups_group_edit_url($course->id, $group->id) . '">';
                echo '<img src="' . $CFG->pixpath . '/t/edit.gif" alt="' . get_string('editgroupprofile') . '" />';
                echo '</a>';
            }
            echo '</h3>';
            echo format_text($group->description);
            echo '</td></tr></table>';
        }
    }
}
/// Define a table showing a list of users in the current role selection
$tablecolumns = array('userpic', 'fullname');
$tableheaders = array(get_string('userpic'), get_string('fullname'));
if (!isset($hiddenfields['city'])) {
    $tablecolumns[] = 'city';
    $tableheaders[] = get_string('city');