diff --git a/main/group/group.php b/main/group/group.php
index dae7474c67..a0d9aca426 100644
--- a/main/group/group.php
+++ b/main/group/group.php
@@ -188,6 +188,8 @@ if (api_is_allowed_to_edit(false, true)) {
echo ''.
Display::return_icon('user.png', get_lang('GoTo').' '.get_lang('Users'), '', ICON_SIZE_MEDIUM).'';
+
+ echo GroupManager::getSearchForm();
}
$group_cats = GroupManager::get_categories(api_get_course_id());
diff --git a/main/group/group_overview.php b/main/group/group_overview.php
index 7d13bc5d8f..7b73d6a874 100644
--- a/main/group/group_overview.php
+++ b/main/group/group_overview.php
@@ -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 = '
'.get_lang('GroupList').'
';
+ $extra .= ''.get_lang('Course').': '.$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 {
?> ';
echo ''.
Display::return_icon('export_excel.png', get_lang('ExportAsXLS'), '', ICON_SIZE_MEDIUM).'';
- $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 ''.
+ Display::return_icon('user.png', get_lang('GoTo').' '.get_lang('Users'), '', ICON_SIZE_MEDIUM).'';
+
+ echo GroupManager::getSearchForm();
echo '';
echo GroupManager::getOverview($courseId, $keyword);
diff --git a/main/inc/lib/groupmanager.lib.php b/main/inc/lib/groupmanager.lib.php
index 6322b7e1fa..69319229d4 100644
--- a/main/inc/lib/groupmanager.lib.php
+++ b/main/inc/lib/groupmanager.lib.php
@@ -2414,6 +2414,18 @@ class GroupManager
}
return $content;
+ }
+ /**
+ * Returns the search form
+ * @return string
+ */
+ public static function getSearchForm()
+ {
+ $url = api_get_path(WEB_CODE_PATH).'group/group_overview.php?'.api_get_cidreq();
+ $form = new FormValidator('search_groups', 'get', $url, null, array('class' => 'form-search'));
+ $form->addElement('text', 'keyword');
+ $form->addElement('button', 'submit', get_lang('Search'));
+ return $form->toHtml();
}
}