Display: Update icons set in course-groups tool

pull/5028/head
Yannick Warnier 2 years ago
parent 2e7437ee2d
commit c64ea583cc
  1. 23
      public/main/group/group.php
  2. 25
      public/main/group/group_category.php
  3. 22
      public/main/group/group_overview.php
  4. 61
      public/main/group/group_space.php
  5. 21
      public/main/group/settings.php
  6. 18
      public/main/inc/lib/groupmanager.lib.php

@ -4,6 +4,7 @@
use Chamilo\CoreBundle\Framework\Container;
use ChamiloSession as Session;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
/**
* Main page for the group module.
@ -201,27 +202,27 @@ 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-groups.png', get_lang('Create new group(s)'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::ADD, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Create new group(s)')).'</a>';
if (empty($sessionId) && 'true' === api_get_setting('allow_group_categories')) {
$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>';
Display::getMdiIcon(ActionIcon::CREATE_FOLDER, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('AddCategory')).'</a>';
}
$actionsLeft .= '<a href="import.php?'.api_get_cidreq().'&action=import">'.
Display::return_icon('import_csv.png', get_lang('Import'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::IMPORT_ARCHIVE, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Import')).'</a>';
$actionsLeft .= '<a href="group_overview.php?'.api_get_cidreq().'&action=export_all&type=csv">'.
Display::return_icon('export_csv.png', get_lang('CSV export'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::EXPORT_CSV, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('CSV export')).'</a>';
$actionsLeft .= '<a href="group_overview.php?'.api_get_cidreq().'&action=export_all&type=xls">'.
Display::return_icon('export_excel.png', get_lang('Excel export'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::EXPORT_SPREADSHEET, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Excel export')).'</a>';
$actionsLeft .= '<a href="group_overview.php?'.api_get_cidreq().'&action=export_pdf">'.
Display::return_icon('pdf.png', get_lang('Export to PDF'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::EXPORT_PDF, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Export to PDF')).'</a>';
$actionsLeft .= '<a href="group_overview.php?'.api_get_cidreq().'">'.
Display::return_icon('group_summary.png', get_lang('Groups overview'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon('view-dashboard', 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Groups overview')).'</a>';
}
$actionsRight = GroupManager::getSearchForm();
@ -263,11 +264,11 @@ if ('true' === api_get_setting('allow_group_categories')) {
// Edit
$actions .= '<a
href="group_category.php?'.api_get_cidreq().'&id='.$categoryId.'" title="'.get_lang('Edit').'">'.
Display::return_icon('edit.png', get_lang('Edit this category'), '', ICON_SIZE_SMALL).'</a>';
Display::getMdiIcon('edit', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit this category')).'</a>';
// Delete
$actions .= Display::url(
Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL),
Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete')),
'group.php?'.api_get_cidreq().'&action=delete_category&category_id='.$categoryId,
[
'onclick' => 'javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('Please confirm your choice'), ENT_QUOTES))."'".')) return false;',
@ -277,12 +278,12 @@ if ('true' === api_get_setting('allow_group_categories')) {
if (0 != $index) {
$actions .= ' <a
href="group.php?'.api_get_cidreq().'&action=swap_cat_order&id1='.$categoryId.'&id2='.$categories[$index - 1]['iid'].'">'.
Display::return_icon('up.png', '&nbsp;', '', ICON_SIZE_SMALL).'</a>';
Display::getMdiIcon(ActionIcon::UP, 'ch-tool-icon', null, ICON_SIZE_SMALL).'</a>';
}
if ($index != count($categories) - 1) {
$actions .= ' <a
href="group.php?'.api_get_cidreq().'&action=swap_cat_order&id1='.$categoryId.'&id2='.$categories[$index + 1]['iid'].'">'.
Display::return_icon('down.png', '&nbsp;', '', ICON_SIZE_SMALL).'</a>';
Display::getMdiIcon(ActionIcon::DOWN, 'ch-tool-icon', null, ICON_SIZE_SMALL).'</a>';
}
}

@ -2,6 +2,9 @@
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ToolIcon;
require_once __DIR__.'/../inc/global.inc.php';
$this_section = SECTION_COURSES;
@ -176,7 +179,7 @@ $group = [
$form->addGroup(
$group,
'',
Display::return_icon('user.png', get_lang('Registration')).' '.get_lang('Registration'),
Display::getMdiIcon(ToolIcon::MEMBER, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Registration')).' '.get_lang('Registration'),
null,
false
);
@ -198,7 +201,7 @@ $group = [
$form->addGroup(
$group,
'',
Display::return_icon('folder.png', get_lang('Documents')).' '.get_lang('Documents'),
Display::getMdiIcon(ToolIcon::DOCUMENT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Documents')).' '.get_lang('Documents'),
null,
false
);
@ -233,9 +236,7 @@ if ($allowDocumentGroupAccess) {
$form->addGroup(
$group,
'',
Display::return_icon(
'folder.png',
get_lang('DocumentsAccess')
Display::getMdiIcon(ToolIcon::DOCUMENT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('DocumentsAccess')
).'<span>'.get_lang('DocumentsAccess').'</span>',
null,
false
@ -260,7 +261,7 @@ $group = [
$form->addGroup(
$group,
'',
Display::return_icon('work.png', get_lang('Assignments'), [], ICON_SIZE_SMALL).' '.get_lang('Assignments'),
Display::getMdiIcon(ToolIcon::ASSIGNMENT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Assignments')).' '.get_lang('Assignments'),
'',
false
);
@ -278,7 +279,7 @@ $group = [
$form->addGroup(
$group,
'',
Display::return_icon('agenda.png', get_lang('Agenda')).' '.get_lang('Agenda'),
Display::getMdiIcon(ToolIcon::AGENDA, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Agenda')).' '.get_lang('Agenda'),
null,
false
);
@ -300,7 +301,7 @@ $group = [
$form->addGroup(
$group,
'',
Display::return_icon('announce.png', get_lang('Announcements')).' '.get_lang('Announcements'),
Display::getMdiIcon(ToolIcon::ANNOUNCEMENT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Announcements')).' '.get_lang('Announcements'),
null,
false
);
@ -318,7 +319,7 @@ $group = [
$form->addGroup(
$group,
'',
Display::return_icon('forum.png', get_lang('Group Forum')).' '.get_lang('Group Forum'),
Display::getMdiIcon(ToolIcon::FORUM, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Group Forum')).' '.get_lang('Group Forum'),
null,
false
);
@ -340,7 +341,7 @@ $group = [
$form->addGroup(
$group,
'',
Display::return_icon('wiki.png', get_lang('Wiki')).' '.get_lang('Wiki'),
Display::getMdiIcon(ToolIcon::WIKI, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Wiki')).' '.get_lang('Wiki'),
null,
false
);
@ -357,7 +358,7 @@ $group = [
$form->addGroup(
$group,
'',
Display::return_icon('chat.png', get_lang('Chat')).' '.get_lang('Chat'),
Display::getMdiIcon(ToolIcon::CHAT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Chat')).' '.get_lang('Chat'),
null,
false
);
@ -436,7 +437,7 @@ if ($form->validate()) {
Display::display_header($nameTools, 'Group');
$actions = '<a href="group.php">'.
Display::return_icon('back.png', get_lang('Back to Groups list'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Back to Groups list')).'</a>';
echo Display::toolbarAction('toolbar', [$actions]);
$defaults = $category;

@ -13,6 +13,10 @@
* @author Roan Embrechts, initial self-unsubscribe code, code cleaning, virtual course support
* @author Bart Mollet, code cleaning, use of Display-library, list of courseAdmin-tools, use of GroupManager
*/
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ToolIcon;
require_once __DIR__.'/../inc/global.inc.php';
$this_section = SECTION_COURSES;
$current_course_tool = TOOL_GROUP;
@ -127,32 +131,32 @@ if ('learnpath' !== $origin) {
}
$actions = '<a href="group_creation.php?'.api_get_cidreq().'">'.
Display::return_icon('add.png', get_lang('Create new group(s)'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::ADD, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Create new group(s)')).'</a>';
if ('true' === api_get_setting('allow_group_categories')) {
$actions .= '<a href="group_category.php?'.api_get_cidreq().'&action=add_category">'.
Display::return_icon('new_folder.png', get_lang('Add category'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::CREATE_CATEGORY, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Add category')).'</a>';
} else {
$actions .= '<a href="group_category.php?'.api_get_cidreq().'&id=2">'.
Display::return_icon('settings.png', get_lang('Edit settings'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::CONFIGURE, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Edit settings')).'</a>';
}
$actions .= '<a href="import.php?'.api_get_cidreq().'&action=import">'.
Display::return_icon('import_csv.png', get_lang('Import'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::IMPORT_ARCHIVE, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Import')).'</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>';
Display::getMdiIcon(ActionIcon::EXPORT_CSV, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Export')).'</a>';
$actions .= '<a href="group_overview.php?'.api_get_cidreq().'&action=export&type=xls">'.
Display::return_icon('export_excel.png', get_lang('Excel export'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::EXPORT_SPREADSHEET, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Excel export')).'</a>';
$actions .= '<a href="group_overview.php?'.api_get_cidreq().'&action=export_pdf">'.
Display::return_icon('pdf.png', get_lang('Export to PDF'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::EXPORT_PDF, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Export to PDF')).'</a>';
$actions .= '<a href="group.php?'.api_get_cidreq().'">'.
Display::return_icon('group.png', get_lang('Groups'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ToolIcon::GROUP, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Groups')).'</a>';
$actions .= '<a href="../user/user.php?'.api_get_cidreq().'">'.
Display::return_icon('user.png', get_lang('Go to').' '.get_lang('Users'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ToolIcon::MEMBER, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Go to').' '.get_lang('Users')).'</a>';
// Action links
echo Display::toolbarAction('actions', [$actions, GroupManager::getSearchForm()]);

@ -4,6 +4,8 @@
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ToolIcon;
/**
* This script shows the group space for one specific group, possibly displaying
@ -72,12 +74,7 @@ Display::display_header(
Display::display_introduction_section(TOOL_GROUP);
$actions = '<a href="'.api_get_path(WEB_CODE_PATH).'group/group.php?'.api_get_cidreq().'">'.
Display::return_icon(
'back.png',
get_lang('Back to Groups list'),
'',
ICON_SIZE_MEDIUM
).
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Back to Groups list')).
'</a>';
$confirmationMessage = addslashes(api_htmlentities(get_lang('Please confirm your choice'), ENT_QUOTES));
@ -110,7 +107,7 @@ if (api_is_allowed_to_edit(false, true) ||
) {
$edit_url = '<a
href="'.api_get_path(WEB_CODE_PATH).'group/settings.php?'.api_get_cidreq().'">'.
Display::return_icon('edit.png', get_lang('Edit this group'), '', ICON_SIZE_SMALL).
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit this group')).
'</a>';
}
@ -137,12 +134,7 @@ if (api_is_allowed_to_edit(false, true) ||
$actions_array[] = [
'url' => api_get_path(WEB_CODE_PATH).
'forum/viewforum.php?forum='.$forum->getIid().'&'.api_get_cidreq().'&origin=group',
'content' => Display::return_icon(
'forum.png',
get_lang('Forum').': '.$forum->getForumTitle(),
[],
32
),
'content' => Display::getMdiIcon(ToolIcon::FORUM, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Forum').': '.$forum->getForumTitle()),
];
}
}
@ -157,7 +149,7 @@ if (api_is_allowed_to_edit(false, true) ||
$url = Container::getRouter()->generate('chamilo_core_course_redirect_tool', $params).'?'.api_get_cidreq();
$actions_array[] = [
'url' => $url,
'content' => Display::return_icon('folder.png', get_lang('Documents'), [], 32),
'content' => Display::getMdiIcon(ToolIcon::DOCUMENT, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Documents')),
];
}
@ -174,7 +166,7 @@ if (api_is_allowed_to_edit(false, true) ||
// Link to a group-specific part of agenda
$actions_array[] = [
'url' => $url,
'content' => Display::return_icon('agenda.png', get_lang('Agenda'), [], 32),
'content' => Display::getMdiIcon(ToolIcon::AGENDA, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Agenda')),
];
}
@ -182,14 +174,14 @@ if (api_is_allowed_to_edit(false, true) ||
// Link to the works area of this group
$actions_array[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq(),
'content' => Display::return_icon('work.png', get_lang('Assignments'), [], 32),
'content' => Display::getMdiIcon(ToolIcon::ASSIGNMENT, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Assignments')),
];
}
if (GroupManager::TOOL_NOT_AVAILABLE != $groupEntity->getAnnouncementsState()) {
// Link to a group-specific part of announcements
$actions_array[] = [
'url' => api_get_path(WEB_CODE_PATH).'announcements/announcements.php?'.api_get_cidreq(),
'content' => Display::return_icon('announce.png', get_lang('Announcements'), [], 32),
'content' => Display::getMdiIcon(ToolIcon::ANNOUNCEMENT, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Announcements')),
];
}
@ -198,7 +190,7 @@ if (api_is_allowed_to_edit(false, true) ||
/*$actions_array[] = [
'url' => api_get_path(WEB_CODE_PATH).
'wiki/index.php?'.api_get_cidreq().'&action=show&title=index&sid='.api_get_session_id().'&group_id='.$groupEntity->getIid(),
'content' => Display::return_icon('wiki.png', get_lang('Wiki'), [], 32),
'content' => Display::getMdiIcon(ToolIcon::WIKI, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Wiki')),
];*/
}
@ -207,7 +199,7 @@ if (api_is_allowed_to_edit(false, true) ||
/*if (api_get_course_setting('allow_open_chat_window')) {
$actions_array[] = [
'url' => 'javascript: void(0);',
'content' => Display::return_icon('chat.png', get_lang('Chat'), [], 32),
'content' => Display::getMdiIcon(ToolIcon::CHAT, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Chat')),
'url_attributes' => [
'onclick' => " window.open('../chat/chat.php?".api_get_cidreq().'&toolgroup='.$groupEntity->getIid()."','window_chat_group_".api_get_course_id().'_'.api_get_group_id()."','height=380, width=625, left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no')",
],
@ -215,7 +207,7 @@ if (api_is_allowed_to_edit(false, true) ||
} else {
$actions_array[] = [
'url' => api_get_path(WEB_CODE_PATH).'chat/chat.php?'.api_get_cidreq().'&gid='.$groupEntity->getIid(),
'content' => Display::return_icon('chat.png', get_lang('Chat'), [], 32),
'content' => Display::getMdiIcon(ToolIcon::CHAT, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Chat')),
];
}*/
}
@ -226,7 +218,7 @@ if (api_is_allowed_to_edit(false, true) ||
if ($bbb->hasGroupSupport()) {
$actions_array[] = [
'url' => api_get_path(WEB_PLUGIN_PATH).'bbb/start.php?'.api_get_cidreq(),
'content' => Display::return_icon('bbb.png', get_lang('Videoconference'), [], 32),
'content' => Display::getMdiIcon(ToolIcon::VIDEOCONFERENCE, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Videoconference')),
];
}
}
@ -235,7 +227,7 @@ if (api_is_allowed_to_edit(false, true) ||
if ('true' === $enabled) {
$actions_array[] = [
'url' => api_get_path(WEB_PLUGIN_PATH).'zoom/start.php?'.api_get_cidreq(),
'content' => Display::return_icon('bbb.png', get_lang('VideoConference'), [], 32),
'content' => Display::getMdiIcon(ToolIcon::VIDEOCONFERENCE, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('VideoConference')),
];
}
@ -252,12 +244,7 @@ if (api_is_allowed_to_edit(false, true) ||
'url' => api_get_path(WEB_CODE_PATH).
'forum/viewforum.php?cid='.api_get_course_int_id().
'&forum='.$forum->getIid().'&gid='.$groupEntity->getIid().'&origin=group',
'content' => Display::return_icon(
'forum.png',
get_lang('Group Forum'),
[],
ICON_SIZE_MEDIUM
),
'content' => Display::getMdiIcon(ToolIcon::FORUM, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Group Forum')),
];
}
}
@ -268,7 +255,7 @@ if (api_is_allowed_to_edit(false, true) ||
// Link to the documents area of this group
$actions_array[] = [
'url' => api_get_path(WEB_CODE_PATH).'document/document.php?'.api_get_cidreq(),
'content' => Display::return_icon('folder.png', get_lang('Documents'), [], ICON_SIZE_MEDIUM),
'content' => Display::getMdiIcon(ToolIcon::DOCUMENT, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Documents')),
];
}
@ -280,7 +267,7 @@ if (api_is_allowed_to_edit(false, true) ||
// Link to a group-specific part of agenda
$actions_array[] = [
'url' => api_get_path(WEB_CODE_PATH).'calendar/agenda_js.php?'.api_get_cidreq().$groupFilter,
'content' => Display::return_icon('agenda.png', get_lang('Agenda'), [], 32),
'content' => Display::getMdiIcon(ToolIcon::AGENDA, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Agenda')),
];
}
@ -288,7 +275,7 @@ if (api_is_allowed_to_edit(false, true) ||
// Link to the works area of this group
$actions_array[] = [
'url' => api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq(),
'content' => Display::return_icon('work.png', get_lang('Assignments'), [], ICON_SIZE_MEDIUM),
'content' => Display::getMdiIcon(ToolIcon::ASSIGNMENT, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Assignments')),
];
}
@ -296,7 +283,7 @@ if (api_is_allowed_to_edit(false, true) ||
// Link to a group-specific part of announcements
$actions_array[] = [
'url' => api_get_path(WEB_CODE_PATH).'announcements/announcements.php?'.api_get_cidreq(),
'content' => Display::return_icon('announce.png', get_lang('Announcements'), [], ICON_SIZE_MEDIUM),
'content' => Display::getMdiIcon(ToolIcon::ANNOUNCEMENT, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Announcements')),
];
}
@ -305,7 +292,7 @@ if (api_is_allowed_to_edit(false, true) ||
$actions_array[] = [
'url' => api_get_path(WEB_CODE_PATH).'wiki/index.php?'.
api_get_cidreq().'&action=show&title=index&sid='.api_get_session_id().'&gid='.$group_id,
'content' => Display::return_icon('wiki.png', get_lang('Wiki'), [], 32),
'content' => Display::getMdiIcon(ToolIcon::WIKI, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Wiki')),
];
}
@ -314,12 +301,12 @@ if (api_is_allowed_to_edit(false, true) ||
if (api_get_course_setting('allow_open_chat_window')) {
$actions_array[] = [
'url' => "javascript: void(0);\" onclick=\"window.open('../chat/chat.php?".api_get_cidreq().'&toolgroup='.$group_id."','window_chat_group_".api_get_course_id().'_'.api_get_group_id()."','height=380, width=625, left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no') \"",
'content' => Display::return_icon('chat.png', get_lang('Chat'), [], 32),
'content' => Display::getMdiIcon(ToolIcon::CHAT, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Chat')),
];
} else {
$actions_array[] = [
'url' => api_get_path(WEB_CODE_PATH).'chat/chat.php?'.api_get_cidreq().'&toolgroup='.$group_id,
'content' => Display::return_icon('chat.png', get_lang('Chat'), [], 32),
'content' => Display::getMdiIcon(ToolIcon::CHAT, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Chat')),
];
}
}
@ -560,10 +547,10 @@ function email_filter($email)
function activeFilter($isActive)
{
if ($isActive) {
return Display::return_icon('accept.png', get_lang('active'), [], ICON_SIZE_TINY);
return Display::getMdiIcon('toggle-switch', 'ch-tool-icon', null, ICON_SIZE_TINY, get_lang('active'));
}
return Display::return_icon('error.png', get_lang('inactive'), [], ICON_SIZE_TINY);
return Display::getMdiIcon('toggle-switch-off', 'ch-tool-icon', null, ICON_SIZE_TINY, get_lang('inactive'));
}
if ('learnpath' != $origin) {

@ -4,6 +4,7 @@
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CourseBundle\Entity\CGroup;
use Chamilo\CoreBundle\Component\Utils\ToolIcon;
/**
* This script displays an area where teachers can edit the group properties and member list.
@ -123,7 +124,7 @@ $group = [
$form->addGroup(
$group,
'',
Display::return_icon('user.png', get_lang('Registration')).
Display::getMdiIcon(ToolIcon::MEMBER, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Registration')).
'<span>'.get_lang('Registration').'</span>',
null,
false
@ -146,7 +147,7 @@ $group = [
$form->addGroup(
$group,
'',
Display::return_icon('folder.png', get_lang('Documents')).'<span>'.get_lang('Documents').'</span>',
Display::getMdiIcon(ToolIcon::DOCUMENT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Documents')).'<span>'.get_lang('Documents').'</span>',
null,
false
);
@ -181,9 +182,7 @@ if ($allowDocumentGroupAccess) {
$form->addGroup(
$group,
'',
Display::return_icon(
'folder.png',
get_lang('DocumentsAccess')
Display::getMdiIcon(ToolIcon::DOCUMENT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('DocumentsAccess')
).'<span>'.get_lang('DocumentsAccess').'</span>',
null,
false
@ -219,7 +218,7 @@ $form->addElement('html', '<div class="col-md-6">');
$form->addGroup(
$group,
'',
Display::return_icon('works.png', get_lang('Assignments')).'<span>'.get_lang('Assignments').'</span>',
Display::getMdiIcon(ToolIcon::ASSIGNMENT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Assignments')).'<span>'.get_lang('Assignments').'</span>',
null,
false
);
@ -237,7 +236,7 @@ $form->addElement('html', '<div class="col-md-6">');
$form->addGroup(
$group,
'',
Display::return_icon('agenda.png', get_lang('Agenda')).'<span>'.get_lang('Agenda').'</span>',
Display::getMdiIcon(ToolIcon::AGENDA, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Agenda')).'<span>'.get_lang('Agenda').'</span>',
null,
false
);
@ -261,7 +260,7 @@ $group = [
$form->addGroup(
$group,
'',
Display::return_icon('announce.png', get_lang('Announcements')).'<span>'.get_lang('Announcements').'</span>',
Display::getMdiIcon(ToolIcon::ANNOUNCEMENT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Announcements')).'<span>'.get_lang('Announcements').'</span>',
null,
false
);
@ -279,7 +278,7 @@ $group = [
$form->addGroup(
$group,
'',
Display::return_icon('forum.png', get_lang('Group Forum')).'<span>'.get_lang('Group Forum').'</span>',
Display::getMdiIcon(ToolIcon::FORUM, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Group Forum')).'<span>'.get_lang('Group Forum').'</span>',
null,
false
);
@ -301,7 +300,7 @@ $group = [
$form->addGroup(
$group,
'',
Display::return_icon('wiki.png', get_lang('Wiki')).'<span>'.get_lang('Wiki').'</span>',
Display::getMdiIcon(ToolIcon::WIKI, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Wiki')).'<span>'.get_lang('Wiki').'</span>',
'',
false
);
@ -318,7 +317,7 @@ $group = [
$form->addGroup(
$group,
'',
Display::return_icon('chat.png', get_lang('Chat')).'<span>'.get_lang('Chat').'</span>',
Display::getMdiIcon(ToolIcon::CHAT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Chat')).'<span>'.get_lang('Chat').'</span>',
null,
false
);

@ -9,6 +9,8 @@ use Chamilo\CourseBundle\Entity\CGroup;
use Chamilo\CourseBundle\Entity\CGroupCategory;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Criteria;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ToolIcon;
/**
* This library contains some functions for group-management.
@ -2256,46 +2258,46 @@ class GroupManager
$edit_actions = '<a
href="'.$url.'settings.php?'.api_get_cidreq(true, false).'&gid='.$groupId.'"
title="'.get_lang('Edit').'">'.
Display::return_icon('edit.png', get_lang('Edit this group'), '', ICON_SIZE_SMALL).
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit this group')).
'</a>&nbsp;';
if (1 == $group->getStatus()) {
$edit_actions .= '<a
href="'.api_get_self().'?'.api_get_cidreq(true, false).'&category='.$category_id.'&action=set_invisible&group_id='.$groupId.'"
title="'.get_lang('Hide').'">'.
Display::return_icon('visible.png', get_lang('Hide'), '', ICON_SIZE_SMALL).'</a>&nbsp;';
Display::getMdiIcon('eye', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Hide')).'</a>&nbsp;';
} else {
$edit_actions .= '<a
href="'.api_get_self().'?'.api_get_cidreq(true, false).'&category='.$category_id.'&action=set_visible&group_id='.$groupId.'"
title="'.get_lang('Show').'">'.
Display::return_icon('invisible.png', get_lang('Show'), '', ICON_SIZE_SMALL).'</a>&nbsp;';
Display::getMdiIcon('eye-closed', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Show')).'</a>&nbsp;';
}
$edit_actions .= '<a
href="'.$url.'member_settings.php?'.api_get_cidreq(true, false).'&gid='.$groupId.'"
title="'.get_lang('Group members').'">'.
Display::return_icon('user.png', get_lang('Group members'), '', ICON_SIZE_SMALL).'</a>&nbsp;';
Display::getMdiIcon(ToolIcon::MEMBER, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Group members')).'</a>&nbsp;';
$edit_actions .= '<a
href="'.$url.'group_overview.php?action=export&type=xls&'.api_get_cidreq(true, false).'&id='.$groupId.'"
title="'.get_lang('Export users list').'">'.
Display::return_icon('export_excel.png', get_lang('Export'), '', ICON_SIZE_SMALL).'</a>&nbsp;';
Display::getMdiIcon(ActionIcon::EXPORT_SPREADSHEET, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Export')).'</a>&nbsp;';
if ($surveyGroupExists) {
$edit_actions .= Display::url(
Display::return_icon('survey.png', get_lang('ExportSurveyResults'), '', ICON_SIZE_SMALL),
Display::getMdiIcon(ToolIcon::SURVEY, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('ExportSurveyResults')),
$url.'group_overview.php?action=export_surveys&'.api_get_cidreq(true, false).'&id='.$groupId
).'&nbsp;';
}
$edit_actions .= '<a
href="'.api_get_self().'?'.api_get_cidreq(true, false).'&category='.$category_id.'&action=fill_one&group_id='.$groupId.'"
onclick="javascript: if(!confirm('."'".$confirmMessage."'".')) return false;" title="'.get_lang('FillGroup').'">'.
Display::return_icon('fill.png', get_lang('FillGroup'), '', ICON_SIZE_SMALL).'</a>&nbsp;';
Display::getMdiIcon(ActionIcon::FILL, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('FillGroup')).'</a>&nbsp;';
$edit_actions .= '<a
href="'.api_get_self().'?'.api_get_cidreq(true, false).'&category='.$category_id.'&action=delete_one&group_id='.$groupId.'"
onclick="javascript: if(!confirm('."'".$confirmMessage."'".')) return false;" title="'.get_lang('Delete').'">'.
Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>&nbsp;';
Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete')).'</a>&nbsp;';
$row[] = $edit_actions;
}

Loading…
Cancel
Save