Пример #1
0
    Display::display_reduced_header();
}
$actions = '<a href="group_creation.php?' . api_get_cidreq() . '">' . Display::return_icon('add.png', get_lang('NewGroupCreate'), '', ICON_SIZE_MEDIUM) . '</a>';
if (api_get_setting('group.allow_group_categories') == 'true') {
    $actions .= '<a href="group_category.php?' . api_get_cidreq() . '&action=add_category">' . Display::return_icon('new_folder.png', get_lang('AddCategory'), '', ICON_SIZE_MEDIUM) . '</a>';
} else {
    $actions .= '<a href="group_category.php?' . api_get_cidreq() . '&id=2">' . Display::return_icon('settings.png', get_lang('PropModify'), '', ICON_SIZE_MEDIUM) . '</a>';
}
$actions .= '<a href="import.php?' . api_get_cidreq() . '&action=import">' . Display::return_icon('import_csv.png', get_lang('Import'), '', ICON_SIZE_MEDIUM) . '</a>';
$actions .= '<a href="group_overview.php?' . api_get_cidreq() . '&action=export_all&type=csv">' . Display::return_icon('export_csv.png', get_lang('Export'), '', ICON_SIZE_MEDIUM) . '</a>';
$actions .= '<a href="group_overview.php?' . api_get_cidreq() . '&action=export&type=xls">' . Display::return_icon('export_excel.png', get_lang('ExportAsXLS'), '', ICON_SIZE_MEDIUM) . '</a>';
$actions .= '<a href="group_overview.php?' . api_get_cidreq() . '&action=export_pdf">' . Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_MEDIUM) . '</a>';
$actions .= '<a href="group.php?' . api_get_cidreq() . '">' . Display::return_icon('group.png', get_lang('Groups'), '', ICON_SIZE_MEDIUM) . '</a>';
$actions .= '<a href="../user/user.php?' . api_get_cidreq() . '">' . Display::return_icon('user.png', get_lang('GoTo') . ' ' . get_lang('Users'), '', ICON_SIZE_MEDIUM) . '</a>';
// Action links
echo '<div class="actions">';
echo '<div class="row">';
echo '<div class="col-md-6">';
echo $actions;
echo '</div>';
echo '<div class="col-md-6">';
echo '<div class="pull-right">';
echo GroupManager::getSearchForm();
echo '</div>';
echo '</div>';
echo '</div>';
echo '</div>';
echo GroupManager::getOverview($courseId, $keyword);
if (!isset($_GET['origin']) || $_GET['origin'] != 'learnpath') {
    Display::display_footer();
}
Пример #2
0
Display::display_introduction_section(TOOL_GROUP);
$actionsLeft = '';
if (api_is_allowed_to_edit(false, true)) {
    $actionsLeft .= '<a href="group_creation.php?' . api_get_cidreq() . '">' . Display::return_icon('add.png', get_lang('NewGroupCreate'), '', ICON_SIZE_MEDIUM) . '</a>';
    if (api_get_setting('group.allow_group_categories') == 'true') {
        $actionsLeft .= '<a href="group_category.php?' . api_get_cidreq() . '&action=add_category">' . Display::return_icon('new_folder.png', get_lang('AddCategory'), '', ICON_SIZE_MEDIUM) . '</a>';
    } else {
        $actionsLeft .= '<a href="group_category.php?' . api_get_cidreq() . '&id=2">' . Display::return_icon('settings.png', get_lang('PropModify'), '', ICON_SIZE_MEDIUM) . '</a>';
    }
    $actionsLeft .= '<a href="import.php?' . api_get_cidreq() . '&action=import">' . Display::return_icon('import_csv.png', get_lang('Import'), '', ICON_SIZE_MEDIUM) . '</a>';
    $actionsLeft .= '<a href="group_overview.php?' . api_get_cidreq() . '&action=export_all&type=csv">' . Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), '', ICON_SIZE_MEDIUM) . '</a>';
    $actionsLeft .= '<a href="group_overview.php?' . api_get_cidreq() . '&action=export_all&type=xls">' . Display::return_icon('export_excel.png', get_lang('ExportAsXLS'), '', ICON_SIZE_MEDIUM) . '</a>';
    $actionsLeft .= '<a href="group_overview.php?' . api_get_cidreq() . '&action=export_pdf">' . Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_MEDIUM) . '</a>';
    $actionsLeft .= '<a href="group_overview.php?' . api_get_cidreq() . '">' . Display::return_icon('group_summary.png', get_lang('GroupOverview'), '', ICON_SIZE_MEDIUM) . '</a>';
}
$actionsRight = GroupManager::getSearchForm();
$toolbar = Display::toolbarAction('toolbar-groups', $content = array(0 => $actionsLeft, 1 => $actionsRight));
$group_cats = GroupManager::get_categories(api_get_course_id());
echo $toolbar;
echo UserManager::getUserSubscriptionTab(3);
/*  List all categories */
if (api_get_setting('group.allow_group_categories') == 'true') {
    $defaultCategory = ['id' => 0, 'iid' => 0, 'description' => '', 'title' => get_lang('DefaultGroupCategory')];
    $group_cats = array_merge([$defaultCategory], $group_cats);
    foreach ($group_cats as $index => $category) {
        $categoryId = $category['id'];
        $group_list = GroupManager::get_group_list($categoryId);
        $groupToShow = GroupManager::process_groups($group_list, $categoryId);
        if (empty($groupToShow)) {
            continue;
        }