|
|
|
|
@ -17,7 +17,7 @@ |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
// Name of the language file that needs to be included |
|
|
|
|
$language_file = 'group'; |
|
|
|
|
$language_file = array('group', 'admin'); |
|
|
|
|
|
|
|
|
|
require_once '../inc/global.inc.php'; |
|
|
|
|
$this_section = SECTION_COURSES; |
|
|
|
|
@ -28,6 +28,7 @@ api_protect_course_script(true); |
|
|
|
|
|
|
|
|
|
$nameTools = get_lang('GroupOverview'); |
|
|
|
|
$courseId = api_get_course_int_id(); |
|
|
|
|
$courseInfo = api_get_course_info(); |
|
|
|
|
|
|
|
|
|
/* Libraries */ |
|
|
|
|
include_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php'; |
|
|
|
|
@ -43,9 +44,13 @@ if (isset($_GET['action'])) { |
|
|
|
|
exit; |
|
|
|
|
break; |
|
|
|
|
case 'export_pdf': |
|
|
|
|
$overview = GroupManager::getOverview($courseId, $keyword); |
|
|
|
|
$content = GroupManager::getOverview($courseId, $keyword); |
|
|
|
|
$pdf = new PDF(); |
|
|
|
|
$pdf ->content_to_pdf($overview); |
|
|
|
|
$extra = '<div style="text-align:center"><h2>'.get_lang('GroupList').'</h2></div>'; |
|
|
|
|
$extra .= '<strong>'.get_lang('Course').': </strong>'.$courseInfo['title'].' ('.$courseInfo['code'].')'; |
|
|
|
|
|
|
|
|
|
$content = $extra.$content; |
|
|
|
|
$pdf->content_to_pdf($content, null, null, api_get_course_id()); |
|
|
|
|
break; |
|
|
|
|
case 'export': |
|
|
|
|
$groupId = isset($_GET['id']) ? intval($_GET['id']) : null; |
|
|
|
|
@ -85,6 +90,7 @@ if (isset($_GET['action'])) { |
|
|
|
|
|
|
|
|
|
/* Header */ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$interbreadcrumb[] = array('url' => 'group.php', 'name' => get_lang('Groups')); |
|
|
|
|
if (!isset ($_GET['origin']) || $_GET['origin'] != 'learnpath') { |
|
|
|
|
// So we are not in learnpath tool |
|
|
|
|
@ -95,6 +101,8 @@ if (!isset ($_GET['origin']) || $_GET['origin'] != 'learnpath') { |
|
|
|
|
api_not_allowed(true); |
|
|
|
|
} else { |
|
|
|
|
Display::display_header($nameTools, 'Group'); |
|
|
|
|
// Tool introduction |
|
|
|
|
Display::display_introduction_section(TOOL_GROUP); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
?> <link rel="stylesheet" type="text/css" href="<?php echo api_get_path(WEB_CSS_PATH); ?>default.css" /> <?php |
|
|
|
|
@ -126,10 +134,10 @@ echo '<div class="actions">'; |
|
|
|
|
echo '<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>'; |
|
|
|
|
|
|
|
|
|
$form = new FormValidator('search_groups', 'get', null, null, array('class' => 'form-search')); |
|
|
|
|
$form->addElement('text', 'keyword'); |
|
|
|
|
$form->addElement('button', 'submit', get_lang('Search')); |
|
|
|
|
$form->display(); |
|
|
|
|
echo '<a href="../user/user.php?'.api_get_cidreq().'">'. |
|
|
|
|
Display::return_icon('user.png', get_lang('GoTo').' '.get_lang('Users'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
|
|
|
|
|
|
|
|
echo GroupManager::getSearchForm(); |
|
|
|
|
echo '</div>'; |
|
|
|
|
|
|
|
|
|
echo GroupManager::getOverview($courseId, $keyword); |
|
|
|
|
|