'.get_lang('AddCategory').' '; } else { //echo ''.Display::return_icon('edit_group.gif').' '.get_lang('PropModify').' '; echo Display::return_icon('settings.gif', get_lang('PropModify')) . ''.get_lang('PropModify').' '; } //echo ''.Display::return_icon('group_add_big.gif').' '.get_lang('NewGroupCreate').' '; echo Display::return_icon('group_add.gif', get_lang('NewGroupCreate')) . ''.get_lang('NewGroupCreate').' '; if( Database::count_rows(Database::get_course_table(TABLE_GROUP)) > 0) { //echo ''.Display::return_icon('group_view.gif').' '.get_lang('GroupOverview').' '; echo Display::return_icon('group.gif', get_lang('GroupOverview')) .''.get_lang('GroupOverview').' '; } } echo '
';
echo ' '.$category['title'].'';
$in_category = true;
}
else
{
echo '
';
echo ' '.$category['title'].'';
}
$group_list = GroupManager :: get_group_list($category['id']);
echo ' ('.count($group_list).' '.get_lang('ExistingGroups').')';
if (api_is_allowed_to_edit(false,true))
{
echo '
';
echo '
';
if ($index != 0)
{
echo '
';
}
if ($index != count($group_cats) - 1)
{
echo '
';
}
}
echo ''.$category['description'].'
'; } else { $group_list = GroupManager :: get_group_list(); $in_category = true; } echo '
';
$edit_actions .= '
';
$edit_actions .= '
';
$edit_actions .= '
';
$row[] = $edit_actions;
}
if (!empty($this_group['nbMember'])) {
$totalRegistered = $totalRegistered + $this_group['nbMember'];
}
$group_data[] = $row;
} // while loop
if (isset ($_GET['show_all']))
{
$paging_options = array ('per_page' => count($group_data));
}
else
{
$paging_options = array ();
}
$table = new SortableTableFromArray($group_data, 1);
isset($_GET['category'])?$my_cat = $_GET['category']: $my_cat = null;
$table->set_additional_parameters(array('category'=>$my_cat));
$column = 0;
if (api_is_allowed_to_edit(false,true) and count($group_list) > 1)
{
$table->set_header($column++,'', false);
}
$table->set_header($column++,get_lang('ExistingGroups'));
if (!api_is_allowed_to_edit(false,true)) // If self-registration allowed
{
$table->set_header($column++,get_lang('GroupSelfRegistration'));
}
$table->set_header($column++,get_lang('Registered'));
$table->set_header($column++,get_lang('Max'));
$table->set_header($column++,get_lang('GroupTutor'));
if (api_is_allowed_to_edit(false,true)) // only for course administrator
{
$table->set_header($column++,get_lang('Modify'), false);
$form_actions = array();
$form_actions['delete_selected'] = get_lang('Delete');
$form_actions['fill_selected'] = get_lang('FillGroup');
$form_actions['empty_selected'] = get_lang('EmptyGroup');
if (count($group_list) > 1)
{
$table->set_form_actions($form_actions,'group');
}
}
$table->display();
}
/*
elseif ($in_category)
{
echo get_lang('NoGroupsAvailable');
}
*/
echo '