Display: Use new icons in various tools

pull/5036/head
Yannick Warnier 2 years ago
parent 730c172296
commit fdf140ab1f
  1. 3
      public/main/announcements/announcements.php
  2. 5
      public/main/auth/profile.php
  3. 13
      public/main/course_copy/copy_course_session.php
  4. 24
      public/main/course_copy/copy_course_session_selected.php
  5. 5
      public/main/course_progress/index.php
  6. 15
      public/main/dashboard/dashboard_controller.php
  7. 60
      public/main/dropbox/index.php
  8. 5
      public/main/exercise/TestCategory.php
  9. 6
      public/main/exercise/category.php
  10. 39
      public/main/exercise/exercise.class.php
  11. 5
      public/main/exercise/exercise_history.php
  12. 5
      public/main/exercise/exercise_question_reminder.php
  13. 5
      public/main/exercise/exercise_reminder.php
  14. 3
      public/main/exercise/exercise_show.php
  15. 5
      public/main/exercise/exercise_submit.php
  16. 70
      public/main/exercise/exercise_submit_modal.php
  17. 9
      public/main/exercise/export/aiken/aiken_import.inc.php
  18. 4
      public/main/exercise/live_stats.php
  19. 4
      public/main/exercise/qti2.php
  20. 3
      public/main/exercise/question_create.php
  21. 29
      public/main/exercise/question_list_admin.inc.php
  22. 20
      public/main/exercise/question_pool.php
  23. 3
      public/main/exercise/result.php
  24. 11
      public/main/exercise/stats.php
  25. 10
      public/main/exercise/tests_category.php
  26. 10
      public/main/exercise/upload_exercise.php
  27. 5
      public/main/glossary/index.php
  28. 16
      public/main/gradebook/gradebook_display_certificate.php
  29. 13
      public/main/gradebook/gradebook_edit_all.php
  30. 13
      public/main/gradebook/gradebook_view_result.php
  31. 8
      public/main/gradebook/lib/be/category.class.php
  32. 4
      public/main/gradebook/lib/fe/dataform.class.php
  33. 36
      public/main/gradebook/lib/fe/flatviewtable.class.php
  34. 8
      public/main/gradebook/lib/fe/gradebooktable.class.php
  35. 19
      public/main/gradebook/lib/fe/resulttable.class.php
  36. 17
      public/main/gradebook/user_stats.php
  37. 4
      public/main/help/faq.php
  38. 12
      public/main/inc/ajax/course_home.ajax.php
  39. 16
      public/main/inc/ajax/dropbox.ajax.php
  40. 20
      public/main/inc/ajax/link.ajax.php
  41. 52
      public/main/inc/ajax/model.ajax.php
  42. 5
      public/main/inc/ajax/session.ajax.php
  43. 30
      public/main/inc/ajax/work.ajax.php

@ -5,6 +5,7 @@
use Chamilo\CoreBundle\Entity\AbstractResource;
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CourseBundle\Entity\CAnnouncement;
use Chamilo\CoreBundle\Component\Utils\ObjectIcon;
/**
* @author Frederik Vermeire <frederik.vermeire@pandora.be>, UGent Internship
@ -291,7 +292,7 @@ switch ($action) {
) {
$html .= Display::noDataView(
get_lang('Announcements'),
Display::return_icon('valves.png', '', [], 64),
Display::getMdiIcon(ObjectIcon::ANNOUNCEMENT, 'ch-tool-icon', null, ICON_SIZE_BIG, get_lang('Add an announcement')),
get_lang('Add an announcement'),
api_get_self().'?'.api_get_cidreq().'&action=add'
);

@ -3,6 +3,7 @@
use Chamilo\CoreBundle\Entity\User;
use ChamiloSession as Session;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
/**
* This file displays the user's profile,
@ -668,10 +669,10 @@ if ($allowSocialTool) {
if (isset($_GET['type']) && 'extended' === $_GET['type']) {
$actions .= '<a href="profile.php?type=reduced'.$show.'">'.
Display::return_icon('edit.png', get_lang('Edit normal profile'), '', 16).'</a>';
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_TINY, get_lang('Edit normal profile')).'</a>';
} else {
$actions .= '<a href="profile.php?type=extended'.$show.'">'.
Display::return_icon('edit.png', get_lang('Edit extended profile'), '', 16).'</a>';
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_TINY, get_lang('Edit extended profile')).'</a>';
}
}
}

@ -5,6 +5,7 @@ use Chamilo\CourseBundle\Component\CourseCopy\CourseBuilder;
use Chamilo\CourseBundle\Component\CourseCopy\CourseRestorer;
use Chamilo\CourseBundle\Component\CourseCopy\CourseSelectForm;
use ChamiloSession as Session;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
/**
* Copy resources from one course in a session to another one.
@ -92,7 +93,7 @@ function display_form()
// Link back to the documents overview
$actionsLeft = '<a href="../admin/index.php">'.
Display::return_icon('back.png', get_lang('Back to').' '.get_lang('Administration'), '', ICON_SIZE_MEDIUM).
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Back to').' '.get_lang('Administration')).
'</a>';
$html .= Display::toolbarAction('toolbar-copysession', [$actionsLeft]);
@ -398,10 +399,12 @@ if (Security::check_token('post') && (
$hiddenFields['sec_token'] = Security::get_token();
CourseSelectForm :: display_form($course, $hiddenFields, true);
echo '<div style="float:right"><a href="javascript:window.history.go(-1);">'.
Display::return_icon(
'back.png',
get_lang('Back').' '.get_lang('To').' '.get_lang('Administration'),
['style' => 'vertical-align:middle']
Display::getMdiIcon(
ActionIcon::BACK,
'ch-tool-icon',
'vertical-align:middle',
ICON_SIZE_SMALL,
get_lang('Back').' '.get_lang('To').' '.get_lang('Administration')
).
get_lang('Back').'</a></div>';
} else {

@ -5,6 +5,7 @@ use Chamilo\CourseBundle\Component\CourseCopy\CourseBuilder;
use Chamilo\CourseBundle\Component\CourseCopy\CourseRestorer;
use Chamilo\CourseBundle\Component\CourseCopy\CourseSelectForm;
use ChamiloSession as Session;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
/**
* Copy resources from one course in a session to another one.
@ -114,11 +115,12 @@ function displayForm()
// Actions
$html .= '<div class="actions">';
// Link back to the documents overview
$html .= '<a href="'.$returnLink.'">'.Display::return_icon(
'back.png',
get_lang('Back to').' '.get_lang('Backup'),
'',
ICON_SIZE_MEDIUM
$html .= '<a href="'.$returnLink.'">'.Display::getMdiIcon(
ActionIcon::BACK,
'ch-tool-icon',
null,
ICON_SIZE_MEDIUM,
get_lang('Back to').' '.get_lang('Backup')
).'</a>';
$html .= '</div>';
@ -383,12 +385,12 @@ if (('course_select_form' === $action) ||
CourseSelectForm :: display_form($course, $hiddenFields, true);
echo '<div style="float:right"><a href="javascript:window.history.go(-1);">'.
Display::return_icon(
'back.png',
get_lang('Back').' '.get_lang('To').' '.get_lang(
'PlatformAdmin'
),
['style' => 'vertical-align:middle']
Display::getMdiIcon(
ActionIcon::BACK,
'ch-tool-icon',
'vertical-align:middle',
ICON_SIZE_SMALL,
get_lang('Back').' '.get_lang('To').' '.get_lang('PlatformAdmin')
).
get_lang('Back').'</a></div>';
} else {

@ -3,11 +3,12 @@
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CourseBundle\Entity\CThematic;
use Chamilo\CourseBundle\Entity\CThematicAdvance;
use Chamilo\CourseBundle\Entity\CThematicPlan;
use ChamiloSession as Session;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ToolIcon;
require_once __DIR__.'/../inc/global.inc.php';
@ -655,7 +656,7 @@ switch ($action) {
if (api_is_allowed_to_edit(null, true)) {
$noData = Display::noDataView(
get_lang('Educational programming'),
Display::return_icon('course_progress.png', '', [], 64),
Display::getMdiIcon(ToolIcon::COURSE_PROGRESS, 'ch-tool-icon', null, ICON_SIZE_BIG),
get_lang('Add thematic'),
api_get_path(WEB_CODE_PATH).'course_progress/index.php?'.api_get_cidreq().'&action=thematic_add'
);

@ -11,6 +11,10 @@
*
* @todo move to main/inc/lib
*/
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ToolIcon;
class DashboardController
{
private $user_id;
@ -70,21 +74,16 @@ class DashboardController
$link_blocks_view = $link_list_view = null;
if ('list' == $view) {
$link_blocks_view = '<a href="'.api_get_self().'?view=blocks">'.
Display::return_icon('blocks.png', get_lang('Dashboard blocks'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon('monitor-dashboard', 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Dashboard blocks')).'</a>';
} else {
$link_list_view = '<a href="'.api_get_self().'?view=list">'.
Display::return_icon('edit.png', get_lang('Edit blocks'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Edit blocks')).'</a>';
}
$configuration_link = null;
if (api_is_platform_admin()) {
$configuration_link = '<a href="'.api_get_path(WEB_CODE_PATH).'admin/settings.php?category=Plugins">'
.Display::return_icon(
'settings.png',
get_lang('Configure Dashboard Plugin'),
'',
ICON_SIZE_MEDIUM
).'</a>';
.Display::getMdiIcon(ToolIcon::SETTINGS, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Configure Dashboard Plugin')).'</a>';
}
$actions = Display::toolbarAction('toolbar', [$link_blocks_view.$link_list_view.$configuration_link]);

@ -3,6 +3,9 @@
/* For licensing terms, see /license.txt */
// The file that contains all the initialisation stuff (and includes all the configuration stuff)
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
require_once 'dropbox_init.inc.php';
$_course = api_get_course_info();
@ -244,25 +247,25 @@ if ('add' != $action) {
if (0 == api_get_session_id()) {
if (0 != $view_dropbox_category_received && api_is_allowed_to_session_edit(false, true)) {
$actions .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.$viewSentCategory.'&view='.$view.'">'.
Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('root'), '', ICON_SIZE_MEDIUM).
Display::getMdiIcon(ActionIcon::UP, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Up').' '.get_lang('root')).
"</a>";
$actions .= get_lang('Category').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_received]['cat_name']).'</strong> ';
$movelist[0] = 'Root'; // move_received selectbox content
} else {
$actions .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory&view='.$view.'">'.
Display::return_icon('new_folder.png', get_lang('Add a new folder'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::CREATE_FOLDER, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Add a new folder')).'</a>';
}
echo Display::toolbarAction('dropbox', [$actions]);
} else {
if (api_is_allowed_to_session_edit(false, true)) {
if (0 != $view_dropbox_category_received && api_is_allowed_to_session_edit(false, true)) {
$actions .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category=0&view_sent_category='.$viewSentCategory.'&view='.$view.'">'.
Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('root'), '', ICON_SIZE_MEDIUM)."</a>";
Display::getMdiIcon(ActionIcon::UP, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Up').' '.get_lang('root'))."</a>";
$actions .= get_lang('Category').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_received]['cat_name']).'</strong> ';
$movelist[0] = 'Root'; // move_received selectbox content
} else {
$actions .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=addreceivedcategory&view='.$view.'">'.
Display::return_icon('new_folder.png', get_lang('Add a new folder'), '', ICON_SIZE_MEDIUM).
Display::getMdiIcon(ActionIcon::CREATE_FOLDER, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Add a new folder')).
'</a>';
}
echo Display::toolbarAction('dropbox', [$actions]);
@ -283,34 +286,34 @@ if ('add' != $action) {
if (0 == api_get_session_id()) {
if (empty($viewSentCategory)) {
$actions .= "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".
Display::return_icon('upload_file.png', get_lang('Share a new file'), '', ICON_SIZE_MEDIUM).
Display::getMdiIcon(ActionIcon::UPLOAD, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Share a new file')).
"</a>";
}
if (0 != $view_dropbox_category_sent) {
$actions .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'">'.
Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('root'), '', ICON_SIZE_MEDIUM).
Display::getMdiIcon(ActionIcon::UP, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Up').' '.get_lang('root')).
"</a>";
$actions .= get_lang('Category').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_sent]['cat_name']).'</strong> ';
} else {
$actions .= "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\">".
Display::return_icon('new_folder.png', get_lang('Add a new folder'), '', ICON_SIZE_MEDIUM)."</a>\n";
Display::getMdiIcon(ActionIcon::CREATE_FOLDER, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Add a new folder'))."</a>\n";
}
echo Display::toolbarAction('dropbox', [$actions]);
} else {
if (api_is_allowed_to_session_edit(false, true)) {
if (empty($viewSentCategory)) {
$actions .= "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=add\">".
Display::return_icon('upload_file.png', get_lang('Share a new file'), '', ICON_SIZE_MEDIUM).
Display::getMdiIcon(ActionIcon::UPLOAD, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Share a new file')).
"</a>";
}
if (0 != $view_dropbox_category_sent) {
$actions .= get_lang('You are in folder').': <strong>'.Security::remove_XSS($dropbox_categories[$view_dropbox_category_sent]['cat_name']).'</strong> ';
$actions .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category=0&view='.$view.'">'.
Display::return_icon('folder_up.png', get_lang('Up').' '.get_lang('root'), '', ICON_SIZE_MEDIUM).
Display::getMdiIcon(ActionIcon::UP, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Up').' '.get_lang('root')).
"</a>";
} else {
$actions .= "<a href=\"".api_get_self()."?".api_get_cidreq()."&view=".$view."&action=addsentcategory\">".
Display::return_icon('new_folder.png', get_lang('Add a new folder'), '', ICON_SIZE_MEDIUM)."</a>\n";
Display::getMdiIcon(ActionIcon::CREATE_FOLDER, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Add a new folder'))."</a>\n";
}
echo Display::toolbarAction('dropbox', [$actions]);
}
@ -414,19 +417,14 @@ if ('add' != $action) {
$_SESSION['_seen'][$_course['id']][TOOL_DROPBOX]
)
) {
$new_icon = '&nbsp;'.Display::return_icon(
'new_dropbox_message.png',
get_lang('New'),
'',
ICON_SIZE_SMALL
);
$new_icon = '&nbsp;'.Display::getMdiIcon(ActionIcon::ADD, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('New'));
}
}
$link_open = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'">';
$dropbox_file_data[] = $link_open.DocumentManager::build_document_icon_tag('file', $dropbox_file->title).'</a>';
$dropbox_file_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'&action=download">'.
Display::return_icon('save.png', get_lang('Download'), ['style' => 'float:right;'], ICON_SIZE_SMALL).
Display::getMdiIcon(ActionIcon::SAVE_FORM, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Download')).
'</a>'.$link_open.$dropbox_file->title.'</a>'.$new_icon.'<br />'.$dropbox_file->description;
$file_size = $dropbox_file->filesize;
$dropbox_file_data[] = format_file_size($file_size);
@ -442,11 +440,11 @@ if ('add' != $action) {
$action_icons = check_number_feedback($dropbox_file->id, $number_feedback).' '.get_lang('Feedback').'
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=viewfeedback&id='.$dropbox_file->id.'&'.$sort_params.'">'.
Display::return_icon('discuss.png', get_lang('Comment'), '', ICON_SIZE_SMALL).'</a>
Display::getMdiIcon(ActionIcon::COMMENT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Comment')).'</a>
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=movereceived&move_id='.$dropbox_file->id.'&'.$sort_params.'">'.
Display::return_icon('move.png', get_lang('Move'), '', ICON_SIZE_SMALL).'</a>
Display::getMdiIcon(ActionIcon::MOVE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Move')).'</a>
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletereceivedfile&id='.$dropbox_file->id.'&'.$sort_params.'" onclick="javascript: return confirmation(\''.$dropbox_file->title.'\');">'.
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')).
'</a>';
// This is a hack to have an additional row in a sortable table
@ -487,15 +485,15 @@ if ('add' != $action) {
$dropbox_category_data[] = $link_open.DocumentManager::build_document_icon_tag('folder', $category['cat_name']).'</a>';
$dropbox_category_data[] =
'<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&cat_id='.$category['cat_id'].'&action=downloadcategory&sent_received=received">'.
Display::return_icon('save_pack.png', get_lang('Save'), ['style' => 'float:right;'], ICON_SIZE_SMALL).'</a>'.$link_open.$category['cat_name'].'</a>';
Display::getMdiIcon(ActionIcon::SAVE_FORM, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Save')).'</a>'.$link_open.$category['cat_name'].'</a>';
$dropbox_category_data[] = '';
$dropbox_category_data[] = '';
$dropbox_category_data[] = '';
$dropbox_category_data[] =
'<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=editcategory&id='.$category['cat_id'].'">'.
Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletereceivedcategory&id='.$category['cat_id'].'" onclick="javascript: return confirmation(\''.Security::remove_XSS($category['cat_name']).'\');">'.
Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>';
Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete')).'</a>';
}
if (is_array($dropbox_category_data) && count($dropbox_category_data) > 0) {
$dropbox_data_recieved[] = $dropbox_category_data;
@ -602,7 +600,7 @@ if ('add' != $action) {
$link_open = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'">';
$dropbox_file_data[] = $link_open.DocumentManager::build_document_icon_tag('file', $dropbox_file->title).'</a>';
$dropbox_file_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&id='.$dropbox_file->id.'&action=download">'.
Display::return_icon('save.png', get_lang('Save'), ['style' => 'float:right;'], ICON_SIZE_SMALL).
Display::getMdiIcon(ActionIcon::SAVE_FORM, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Save')).
'</a>'.
$link_open.
$dropbox_file->title.
@ -625,16 +623,16 @@ if ('add' != $action) {
$action_icons = check_number_feedback($dropbox_file->id, $number_feedback).' '.get_lang('Feedback').'
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=viewfeedback&id='.$dropbox_file->id.'&'.$sort_params.'">'.
Display::return_icon('discuss.png', get_lang('Comment'), '', ICON_SIZE_SMALL).
Display::getMdiIcon(ActionIcon::COMMENT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Comment')).
'</a>
<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/update.php?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=update&id='.$dropbox_file->id.'&'.$sort_params.'">'.
Display::return_icon('upload_file.png', get_lang('Update'), '', ICON_SIZE_SMALL).
Display::getMdiIcon(ActionIcon::UPLOAD, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Update')).
'</a>
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=movesent&move_id='.$dropbox_file->id.'&'.$sort_params.'">'.
Display::return_icon('move.png', get_lang('Move'), '', ICON_SIZE_SMALL).'
Display::getMdiIcon(ActionIcon::MOVE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Move')).'
</a>
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletesentfile&id='.$dropbox_file->id.'&'.$sort_params.'" onclick="javascript: return confirmation(\''.$dropbox_file->title.'\');">'.
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')).
'</a>';
// This is a hack to have an additional row in a sortable table
if ('viewfeedback' == $action && isset($_GET['id']) && is_numeric($_GET['id']) && $dropbox_file->id == $_GET['id']) {
@ -665,14 +663,14 @@ if ('add' != $action) {
$link_open = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$category['cat_id'].'&view='.$view.'">';
$dropbox_category_data[] = $link_open.DocumentManager::build_document_icon_tag('folder', Security::remove_XSS($category['cat_name'])).'</a>';
$dropbox_category_data[] = '<a href="'.api_get_path(WEB_CODE_PATH).'dropbox/dropbox_download.php?'.api_get_cidreq().'&cat_id='.$category['cat_id'].'&action=downloadcategory&sent_received=sent">'.
Display::return_icon('save_pack.png', get_lang('Save'), ['style' => 'float:right;'], ICON_SIZE_SMALL).'</a>'.$link_open.Security::remove_XSS($category['cat_name']).'</a>';
Display::getMdiIcon(ActionIcon::SAVE_FORM, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Save')).'</a>'.$link_open.Security::remove_XSS($category['cat_name']).'</a>';
$dropbox_category_data[] = '';
$dropbox_category_data[] = '';
$dropbox_category_data[] = '';
$dropbox_category_data[] = '<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=editcategory&id='.$category['cat_id'].'">'.
Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>
<a href="'.api_get_self().'?'.api_get_cidreq().'&view_received_category='.$viewReceivedCategory.'&view_sent_category='.$viewSentCategory.'&view='.$view.'&action=deletesentcategory&id='.$category['cat_id'].'" onclick="javascript: return confirmation(\''.Security::remove_XSS($category['cat_name']).'\');">'.
Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>';
Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete')).'</a>';
}
if (is_array($dropbox_category_data) && count($dropbox_category_data) > 0) {
$dropbox_data_sent[] = $dropbox_category_data;

@ -5,6 +5,7 @@
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CourseBundle\Entity\CQuizQuestionCategory;
use ChamiloSession as Session;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
/**
* Class TestCategory.
@ -1127,12 +1128,12 @@ class TestCategory
if (!$sessionId) {
$links .= '<a
href="'.api_get_self().'?action=editcategory&id='.$id.'&'.api_get_cidreq().'">'.
Display::return_icon('edit.png', get_lang('Edit'), []).'</a>';
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>';
$links .= ' <a
href="'.api_get_self().'?'.api_get_cidreq().'&action=deletecategory&id='.$id.'" ';
$links .= 'onclick="return confirmDelete(\''.
self::protectJSDialogQuote(get_lang('DeleteCategoryAreYouSure').'['.$rowname).'] ?\', \'id_cat'.$id.'\');">';
$links .= Display::return_icon('delete.png', get_lang('Delete'), []).'</a>';
$links .= Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete')).'</a>';
}
$html .= Display::panel($content, $category->getTitle().$links);

@ -2,6 +2,8 @@
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
require_once __DIR__.'/../inc/global.inc.php';
if ('true' !== api_get_setting('exercise.allow_exercise_categories')) {
@ -98,7 +100,7 @@ switch ($action) {
exit;
} else {
$actions = '<a href="'.$url.'">'.
Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Back')).'</a>';
$content = Display::toolbarAction('toolbar', [$actions]);
$form->addElement('hidden', 'sec_token');
$form->setConstants(['sec_token' => $token]);
@ -122,7 +124,7 @@ switch ($action) {
exit;
} else {
$actions = '<a href="'.$url.'">'.
Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Back')).'</a>';
$content = Display::toolbarAction('toolbar', [$actions]);
$form->addElement('hidden', 'sec_token');
$form->setConstants(['sec_token' => $token]);

@ -3,7 +3,6 @@
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Component\Utils\ChamiloApi;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Entity\GradebookLink;
use Chamilo\CoreBundle\Entity\TrackEExercise;
use Chamilo\CoreBundle\Entity\TrackEExerciseConfirmation;
@ -13,6 +12,9 @@ use Chamilo\CourseBundle\Entity\CExerciseCategory;
use Chamilo\CourseBundle\Entity\CQuiz;
use Chamilo\CourseBundle\Entity\CQuizRelQuestionCategory;
use ChamiloSession as Session;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\StateIcon;
/**
* @author Olivier Brouckaert
@ -7245,7 +7247,7 @@ class Exercise
'<span id="counter_to_redirect" class="red_alert"></span>'
);
$html .= '</div>';
$icon = Display::getMdiIcon('clock-outline');
$icon = Display::getMdiIcon('clock-outline', 'ch-tool-icon');
$html .= '<div class="count_down">
'.get_lang('RemainingTimeToFinishExercise').'
'.$icon.'<span id="exercise_clock_warning"></span>
@ -8976,7 +8978,7 @@ class Exercise
// Test settings
$settings = Display::url(
Display::getMdiIcon('cog', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Configure')),
Display::getMdiIcon(ToolIcon::SETTINGS, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Configure')),
'exercise_admin.php?'.api_get_cidreq().'&exerciseId='.$exerciseId
);
@ -8987,7 +8989,7 @@ class Exercise
// Exercise results
$resultsLink = '<a href="exercise_report.php?'.api_get_cidreq().'&exerciseId='.$exerciseId.'">'.
Display::getMdiIcon('chart-box', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Results')).'</a>';
Display::getMdiIcon(ToolIcon::TRACKING, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Results')).'</a>';
if ($limitTeacherAccess) {
if (api_is_platform_admin()) {
@ -9034,7 +9036,7 @@ class Exercise
if (true === $allowClean) {
if (!$locked) {
$clean = Display::url(
Display::getMdiIcon('broom', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('CleanStudentResults')
Display::getMdiIcon(ActionIcon::RESET, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('CleanStudentResults')
),
'',
[
@ -9050,7 +9052,7 @@ class Exercise
]
);
} else {
$clean = Display::getMdiIcon('broom', 'ch-tool-icon-disabled', null, ICON_SIZE_SMALL, get_lang('ResourceLockedByGradebook')
$clean = Display::getMdiIcon(ActionIcon::RESET, 'ch-tool-icon-disabled', null, ICON_SIZE_SMALL, get_lang('ResourceLockedByGradebook')
);
}
}
@ -9059,12 +9061,12 @@ class Exercise
// Visible / invisible
// Check if this exercise was added in a LP
if ($exercise->exercise_was_added_in_lp) {
$visibility = Display::getMdiIcon('eye-off', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('AddedToLPCannotBeAccessed')
$visibility = Display::getMdiIcon(StateIcon::PRIVATE_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('AddedToLPCannotBeAccessed')
);
} else {
if (0 === $exerciseEntity->getActive()) {
$visibility = Display::url(
Display::getMdiIcon('eye-off', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Activate')
Display::getMdiIcon(StateIcon::PRIVATE_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Activate')
),
'exercise.php?'.api_get_cidreq(
).'&choice=enable&sec_token='.$token.'&exerciseId='.$exerciseId
@ -9072,7 +9074,7 @@ class Exercise
} else {
// else if not active
$visibility = Display::url(
Display::getMdiIcon('eye', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Deactivate')
Display::getMdiIcon(StateIcon::PUBLIC_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Deactivate')
),
'exercise.php?'.api_get_cidreq(
).'&choice=disable&sec_token='.$token.'&exerciseId='.$exerciseId
@ -9110,12 +9112,12 @@ class Exercise
// Check if this exercise was added in a LP
if ($exercise->exercise_was_added_in_lp) {
$visibility = Display::getMdiIcon('eye-off', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('AddedToLPCannotBeAccessed')
$visibility = Display::getMdiIcon(StateIcon::PRIVATE_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('AddedToLPCannotBeAccessed')
);
} else {
if (0 === $exerciseEntity->getActive() || 0 == $visibility) {
$visibility = Display::url(
Display::getMdiIcon('eye-off', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Activate')
Display::getMdiIcon(StateIcon::PRIVATE_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Activate')
),
'exercise.php?'.api_get_cidreq(
).'&choice=enable&sec_token='.$token.'&exerciseId='.$exerciseId
@ -9123,7 +9125,7 @@ class Exercise
} else {
// else if not active
$visibility = Display::url(
Display::getMdiIcon('eye', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Deactivate')
Display::getMdiIcon(StateIcon::PUBLIC_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Deactivate')
),
'exercise.php?'.api_get_cidreq(
).'&choice=disable&sec_token='.$token.'&exerciseId='.$exerciseId
@ -9137,7 +9139,7 @@ class Exercise
$actions .= $visibility;
$actions .= '<a href="exercise_report.php?'.api_get_cidreq().'&exerciseId='.$exerciseId.'">'.
Display::getMdiIcon('chart-box', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Results')).'</a>';
Display::getMdiIcon(ToolIcon::TRACKING, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Results')).'</a>';
$actions .= Display::url(
Display::getMdiIcon('disc', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Copy this exercise as a new one')),
'',
@ -9167,8 +9169,11 @@ class Exercise
]
);
} else {
$delete = Display::return_icon(
'delete_na.png',
$delete = Display::getMdiIcon(
ActionIcon::DELETE,
'ch-tool-icon-disabled',
null,
ICON_SIZE_SMALL,
get_lang(
'This option is not available because this activity is contained by an assessment, which is currently locked. To unlock the assessment, ask your platform administrator.'
)
@ -9389,7 +9394,7 @@ class Exercise
if ($isDrhOfCourse) {
$currentRow[] = '<a
href="exercise_report.php?'.api_get_cidreq().'&exerciseId='.$exerciseId.'">'.
Display::getMdiIcon('chart-box', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Results')).
Display::getMdiIcon(ToolIcon::TRACKING, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Results')).
'</a>';
}
if ($returnData) {
@ -9408,7 +9413,7 @@ class Exercise
if ($is_allowedToEdit && 'learnpath' !== $origin) {
$content .= Display::noDataView(
get_lang('Quiz'),
Display::return_icon('quiz.png', '', [], 64),
Display::getMdiIcon(ToolIcon::QUIZ, 'ch-tool-icon', null, ICON_SIZE_BIG),
get_lang('Create a new test'),
'exercise_admin.php?'.api_get_cidreq()
);

@ -8,6 +8,9 @@
* @author Denes Nagy, HotPotatoes integration
* @author Wolfgang Schneider, code/html cleanup
*/
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
require_once __DIR__.'/../inc/global.inc.php';
$this_section = SECTION_COURSES;
api_protect_course_script(true);
@ -50,7 +53,7 @@ if (isset($_GET['message'])) {
}
$actions = '<a href="exercise_report.php?'.api_get_cidreq().'&filter=2">'.
Display::return_icon('back.png', get_lang('Back to result list'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Back to result list')).'</a>';
echo Display::toolbarAction('toolbar', [$actions]);
?>

@ -3,6 +3,7 @@
/* For licensing terms, see /license.txt */
use ChamiloSession as Session;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
require_once __DIR__.'/../inc/global.inc.php';
$current_course_tool = TOOL_QUIZ;
@ -106,9 +107,9 @@ if (!$hideHeaderAndFooter) {
// I'm in a preview mode as course admin. Display the action menu.
if (!$hideHeaderAndFooter && api_is_course_admin()) {
$actions = '<a href="admin.php?'.api_get_cidreq().'&exerciseId='.$objExercise->iId.'">'.
Display::return_icon('back.png', get_lang('GoBackToQuestionList'), [], 32).'</a>';
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('GoBackToQuestionList')).'</a>';
$actions .= '<a href="exercise_admin.php?'.api_get_cidreq().'&modifyExercise=yes&exerciseId='.$objExercise->iId.'">'.
Display::return_icon('edit.png', get_lang('ModifyExercise'), [], 32).'</a>';
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('ModifyExercise')).'</a>';
echo Display::toolbarAction('toolbar', [$actions]);
}
echo Display::page_header($categoryObj->name);

@ -3,6 +3,7 @@
/* For licensing terms, see /license.txt */
use ChamiloSession as Session;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
/**
* Exercise reminder overview
@ -95,9 +96,9 @@ if (!$hideHeaderAndFooter) {
// I'm in a preview mode as course admin. Display the action menu.
if (!$hideHeaderAndFooter && api_is_course_admin()) {
$actions = '<a href="admin.php?'.api_get_cidreq().'&exerciseId='.$objExercise->getId().'">'.
Display::return_icon('back.png', get_lang('Go back to the questions list'), [], 32).'</a>';
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Go back to the questions list')).'</a>';
$actions .= '<a href="exercise_admin.php?'.api_get_cidreq().'&modifyTest=yes&exerciseId='.$objExercise->getId().'">'.
Display::return_icon('edit.png', get_lang('ModifyTest'), [], 32).'</a>';
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('ModifyTest')).'</a>';
echo Display::toolbarAction('toolbar', [$actions]);
}
echo Display::page_header(get_lang('Questions to be reviewed'));

@ -2,6 +2,7 @@
/* For licensing terms, see /license.txt */
use ChamiloSession as Session;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
/**
* Shows the exercise results.
@ -184,7 +185,7 @@ if ('export' != $action) {
echo Display::toolbarAction('toolbar', [
Display::url(
Display::return_icon('pdf.png', get_lang('Export')),
Display::getMdiIcon(ActionIcon::EXPORT_PDF, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Export')),
api_get_self().'?'.api_get_cidreq().'&id='.$id.'&action=export&'
),
]); ?>

@ -4,6 +4,7 @@
use ChamiloSession as Session;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\StateIcon;
/**
* Exercise submission
@ -1618,10 +1619,10 @@ if ($allowBlockCategory &&
$("#save_all_response").html(return_value.savedAnswerMessage);
window.location = "'.$script_php.'?'.$params.'";
} else {
$("#save_all_response").html(\''.Display::return_icon('accept.png').'\');
$("#save_all_response").html(\''.Display::getMdiIcon(StateIcon::COMPLETE, 'ch-tool-icon').'\');
}
} else {
$("#save_all_response").html(\''.Display::return_icon('wrong.gif').'\');
$("#save_all_response").html(\''.Display::getMdiIcon(StateIcon::INCOMPLETE, 'ch-tool-icon').'\');
}
}
});

@ -5,6 +5,9 @@
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CourseBundle\Entity\CQuizQuestion;
use ChamiloSession as Session;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ObjectIcon;
use Chamilo\CoreBundle\Component\Utils\StateIcon;
/**
* @author Julio Montoya <gugli100@gmail.com>
@ -118,26 +121,28 @@ echo '<div id="delineation-container">';
if (empty($choiceValue) && empty($hotSpot) && $loaded) {
$nextQuestion = $questionNum + 1;
$destinationId = isset($questionList[$nextQuestion]) ? $questionList[$nextQuestion] : -1;
$icon = Display::return_icon(
'reload.png',
'',
['style' => 'width:22px; height:22px; padding-left:0px;padding-right:5px;']
$icon = Display::getMdiIcon(
ActionIcon::REFRESH,
'ch-tool-icon',
'width:22px; height:22px; padding-left:0px;padding-right:5px;',
ICON_SIZE_SMALL
);
$links = '<a onclick="tryAgain();" href="#">'.get_lang('Try again').'</a>&nbsp;'.$icon.'&nbsp;';
// the link to finish the test
if (-1 == $destinationId) {
$links .= Display::return_icon(
'finish.gif',
'',
['style' => 'width:22px; height:22px; padding-left:0px;padding-right:5px;']
$links .= Display::getMdiIcon(
StateIcon::COMPLETE,
'ch-tool-icon',
'width:22px; height:22px; padding-left:0px;padding-right:5px;',
ICON_SIZE_SMALL
).'<a onclick="SendEx(-1);" href="#">'.get_lang('End of activity').'</a><br /><br />';
} else {
// the link to other question
if (in_array($destinationId, $questionList)) {
$num_value_array = array_keys($questionList, $destinationId);
$icon = Display::return_icon(
'quiz.png',
$icon = Display::getMdiIcon(
ObjectIcon::TEST,
'',
['style' => 'padding-left:0px;padding-right:5px;']
);
@ -390,20 +395,22 @@ if (isset($result['answer_destination'])) {
// the link to retry the question
if (isset($try) && 1 == $try) {
$num_value_array = array_keys($questionList, $questionId);
$links .= Display:: return_icon(
'reload.gif',
'',
['style' => 'padding-left:0px;padding-right:5px;']
$links .= Display::getMdiIcon(
ActionIcon::REFRESH,
'ch-tool-icon',
'padding-left:0px;padding-right:5px;',
ICON_SIZE_SMALL
).'<a onclick="SendEx('.$num_value_array[0].');" href="#">'.get_lang('Try again').'</a><br /><br />';
}
// the link to theory (a learning path)
if (!empty($lp)) {
$lp_url = api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?'.api_get_cidreq().'&action=view&lp_id='.$lp;
$links .= Display:: return_icon(
'theory.gif',
'',
['style' => 'padding-left:0px;padding-right:5px;']
$links .= Display::getMdiIcon(
ObjectIcon::DOCUMENT,
'ch-tool-icon',
'padding-left:0px;padding-right:5px;',
ICON_SIZE_SMALL
).'<a target="_blank" href="'.$lp_url.'">'.get_lang('Theory link').'</a><br />';
}
@ -411,10 +418,11 @@ $links .= '<br />';
// the link to an external website or link
if (!empty($url) && -1 != $url) {
$links .= Display:: return_icon(
'link.gif',
'',
['style' => 'padding-left:0px;padding-right:5px;']
$links .= Display::getMdiIcon(
ObjectIcon::LINK,
'ch-tool-icon',
'padding-left:0px;padding-right:5px;',
ICON_SIZE_SMALL
).'<a target="_blank" href="'.$url.'">'.get_lang('Visit this link').'</a><br /><br />';
}
@ -423,19 +431,21 @@ $destinationId = isset($questionList[$nextQuestion]) ? $questionList[$nextQuesti
// the link to finish the test
if (-1 == $destinationId) {
$links .= Display:: return_icon(
'finish.gif',
'',
['style' => 'width:22px; height:22px; padding-left:0px;padding-right:5px;']
$links .= Display::getMdiIcon(
StateIcon::COMPLETE,
'ch-tool-icon',
'width:22px; height:22px; padding-left:0px;padding-right:5px;',
ICON_SIZE_SMALL
).'<a onclick="SendEx(-1);" href="#">'.get_lang('End of activity').'</a><br /><br />';
} else {
// the link to other question
if (in_array($destinationId, $questionList)) {
$num_value_array = array_keys($questionList, $destinationId);
$icon = Display::return_icon(
'quiz.png',
'',
['style' => 'padding-left:0px;padding-right:5px;']
$icon = Display::getMdiIcon(
ObjectIcon::TEST,
'ch-tool-icon',
'padding-left:0px;padding-right:5px;',
ICON_SIZE_SMALL
);
$links .= '<a onclick="SendEx('.$num_value_array[0].');" href="#">'.
get_lang('Question').' '.$num_value_array[0].'</a>&nbsp;';

@ -10,6 +10,8 @@
* @author César Perales <cesar.perales@gmail.com> Parse function for Aiken format
*/
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
/**
* This function displays the form for import of the zip file with qti2.
*
@ -20,12 +22,7 @@ function aiken_display_form()
$name_tools = get_lang('Import Aiken quiz');
$form = '<div class="actions">';
$form .= '<a href="exercise.php?show=test&'.api_get_cidreq().'">'.
Display::return_icon(
'back.png',
get_lang('Back to Tests tool'),
'',
ICON_SIZE_MEDIUM
).'</a>';
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Back to Tests tool')).'</a>';
$form .= '</div>';
$form_validator = new FormValidator(
'aiken_upload',

@ -1,6 +1,8 @@
<?php
/* See license terms in /license.txt */
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
require_once __DIR__.'/../inc/global.inc.php';
$this_section = SECTION_COURSES;
@ -109,7 +111,7 @@ $(function() {
<?php
$actions = '<a href="exercise_report.php?exerciseId='.(int) ($_GET['exerciseId']).'&'.api_get_cidreq().'">'.
Display::return_icon('back.png', get_lang('Go back to the questions list'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Go back to the questions list')).'</a>';
$actions = Display::toolbarAction('exercise_report', [$actions]);
echo Display::grid_html('live_stats');

@ -9,6 +9,8 @@
*
* @version $Id: qti2.php 2010-03-12 12:14:25Z $
*/
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
require_once __DIR__.'/../inc/global.inc.php';
api_protect_course_script(true);
@ -35,7 +37,7 @@ function displayForm()
{
$form = '<div class="actions">';
$form .= '<a href="'.api_get_path(WEB_CODE_PATH).'exercise/exercise.php?show=test&'.api_get_cidreq().'">'.
Display::return_icon('back.png', get_lang('BackToTestsList'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('BackToTestsList')).'</a>';
$form .= '</div>';
$formValidator = new FormValidator(
'qti_upload',

@ -4,6 +4,7 @@
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CourseBundle\Entity\CQuiz;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
require_once __DIR__.'/../inc/global.inc.php';
@ -107,7 +108,7 @@ if ($form->validate()) {
} else {
Display::display_header($nameTools);
$actions = '<a href="exercise.php?show=test">'.
Display::return_icon('back.png', get_lang('BackToTestsList'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('BackToTestsList')).'</a>';
echo Display::toolbarAction('toolbar', [$actions]);
$form->display();

@ -3,6 +3,7 @@
/* For licensing terms, see /license.txt */
use ChamiloSession as Session;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
/**
* @author Olivier Brouckaert & Julio Montoya & Hubert Borderiou 21-10-2011 (Question by category)
@ -193,33 +194,18 @@ if (!$inATest) {
}
$clone_link = Display::url(
Display::return_icon(
'cd.png',
get_lang('Copy'),
[],
ICON_SIZE_TINY
),
Display::getMdiIcon(ActionIcon::COPY_CONTENT, 'ch-tool-icon', null, ICON_SIZE_TINY, get_lang('Copy')),
api_get_self().'?'.api_get_cidreq().'&clone_question='.$id.'&page='.$page,
['class' => 'btn btn--plain btn-sm']
);
$edit_link = CALCULATED_ANSWER == $objQuestionTmp->selectType() && $objQuestionTmp->isAnswered()
? Display::span(
Display::return_icon(
'edit_na.png',
get_lang('Question edition is not available because the question has been already answered. However, you can copy and modify it.'),
[],
ICON_SIZE_TINY
),
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon-disabled', null, ICON_SIZE_TINY, get_lang('Question edition is not available because the question has been already answered. However, you can copy and modify it.')),
['class' => 'btn btn--plain btn-sm']
)
: Display::url(
Display::return_icon(
'edit.png',
get_lang('Edit'),
[],
ICON_SIZE_TINY
),
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_TINY, get_lang('Edit')),
api_get_self().'?'.api_get_cidreq().'&'
.http_build_query([
'type' => $objQuestionTmp->selectType(),
@ -231,12 +217,7 @@ if (!$inATest) {
$delete_link = null;
if (true == $objExercise->edit_exercise_in_lp) {
$delete_link = Display::url(
Display::return_icon(
'delete.png',
get_lang('Remove from test'),
[],
ICON_SIZE_TINY
),
Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_TINY, get_lang('Remove from test')),
api_get_self().'?'.api_get_cidreq().'&'
.http_build_query([
'id' => $exerciseId,

@ -5,6 +5,8 @@ use Chamilo\CoreBundle\Entity\ExtraField as ExtraFieldEntity;
use Chamilo\CoreBundle\Framework\Container;
use ChamiloSession as Session;
use Knp\Component\Pager\Paginator;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ObjectIcon;
/**
* Question Pool
@ -1027,12 +1029,12 @@ Display::display_header($nameTools, 'Exercise');
$actions = '';
if (isset($fromExercise) && $fromExercise > 0) {
$actions .= '<a href="admin.php?'.api_get_cidreq().'&exerciseId='.$fromExercise.'">'.
Display::return_icon('back.png', get_lang('Go back to the questions list'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Go back to the questions list')).'</a>';
} else {
$actions .= '<a href="exercise.php?'.api_get_cidreq().'">'.
Display::return_icon('back.png', get_lang('BackToTestsList'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('BackToTestsList')).'</a>';
$actions .= "<a href='admin.php?exerciseId=0'>".
Display::return_icon('add_question.gif', get_lang('New question'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::ADD, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('New question')).'</a>';
}
echo Display::toolbarAction('toolbar', [$actions]);
@ -1182,7 +1184,7 @@ function getLinkForQuestion(
if ($in_addA) {
$sessionIcon = '';
if (!empty($sessionId) && -1 != $sessionId) {
$sessionIcon = ' '.Display::return_icon('star.png', get_lang('Session'));
$sessionIcon = ' '.Display::getMdiIcon(ObjectIcon::STAR, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Session'));
}
$exerciseId = (int) $exerciseId;
$questionId = (int) $questionId;
@ -1237,11 +1239,11 @@ function get_action_icon_for_question(
}
if (isQuestionInActiveQuiz($in_questionid)) {
$res = Display::return_icon('delete_na.png', get_lang('ThisQuestionExistsInAnotherExercisesWarning'));
$res = Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon-disabled', null, ICON_SIZE_SMALL, get_lang('ThisQuestionExistsInAnotherExercisesWarning'));
} else {
$res = "<a href='".api_get_self()."?".
api_get_cidreq().$getParams."&delete=$in_questionid' onclick='return confirm_your_choice()'>";
$res .= Display::return_icon('delete.png', get_lang('Delete'));
$res .= Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete'));
$res .= "</a>";
}
@ -1252,7 +1254,7 @@ function get_action_icon_for_question(
$from_exercise,
$in_questionid,
$in_questiontype,
Display::return_icon('edit.png', get_lang('Edit')),
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')),
$in_session_id,
$in_exercise_id
);
@ -1263,7 +1265,7 @@ function get_action_icon_for_question(
if (!$myObjEx->hasQuestion($in_questionid)) {
$res = "<a href='".api_get_self().'?'.
api_get_cidreq().$getParams."&recup=$in_questionid&fromExercise=$from_exercise'>";
$res .= Display::return_icon('view_more_stats.gif', get_lang('InsertALinkToThisQuestionInTheExercise'));
$res .= Display::getMdiIcon(ActionIcon::VIEW_DETAILS, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('InsertALinkToThisQuestionInTheExercise'));
$res .= '</a>';
}
@ -1272,7 +1274,7 @@ function get_action_icon_for_question(
$url = api_get_self().'?'.api_get_cidreq().$getParams.
"&question_copy=$in_questionid&course_id=$in_selected_course&fromExercise=$from_exercise";
$res = Display::url(
Display::return_icon('cd.png', get_lang('Re-use a copy inside the current test')),
Display::getMdiIcon(ActionIcon::COPY_CONTENT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Re-use a copy inside the current test')),
$url
);

@ -3,6 +3,7 @@
/* For licensing terms, see /license.txt */
use ChamiloSession as Session;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
/**
* Shows the exercise results.
@ -84,7 +85,7 @@ if ($show_headers) {
if ('mobileapp' === $origin) {
$actions = '<a href="javascript:window.history.go(-1);">'.
Display::return_icon('back.png', get_lang('GoBackToQuestionList'), [], 32).'</a>';
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('GoBackToQuestionList')).'</a>';
echo Display::toolbarAction('toolbar', [$actions]);
}
}

@ -2,6 +2,8 @@
/* See license terms in /license.txt */
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
require_once __DIR__.'/../inc/global.inc.php';
$this_section = SECTION_COURSES;
@ -332,15 +334,10 @@ $interbreadcrumb[] = [
$tpl = new Template(get_lang('Report by question'));
$actions = '<a href="exercise_report.php?exerciseId='.$exerciseId.'&'.api_get_cidreq().'">'.
Display:: return_icon(
'back.png',
get_lang('Go back to the questions list'),
'',
ICON_SIZE_MEDIUM
)
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Go back to the questions list'))
.'</a>';
$actions .= Display::url(
Display::return_icon('pdf.png', get_lang('ExportToPDF'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon(ActionIcon::EXPORT_PDF, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('ExportToPDF')),
'stats.php?exerciseId='.$exerciseId.'&export_pdf=1&'.api_get_cidreq()
);
$actions = Display::toolbarAction('exercise_report', [$actions]);

@ -2,6 +2,8 @@
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
require_once __DIR__.'/../inc/global.inc.php';
/**
@ -254,18 +256,18 @@ function add_category_form($action)
function displayActionBar()
{
$actions = '<a href="'.api_get_path(WEB_CODE_PATH).'exercise/exercise.php?'.api_get_cidreq().'">'.
Display::return_icon('back.png', get_lang('Go back to the questions list'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Go back to the questions list')).'</a>';
$actions .= '<a href="'.api_get_self().'?action=addcategory&'.api_get_cidreq().'">'.
Display::return_icon('new_folder.png', get_lang('Add category'), null, ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::CREATE_FOLDER, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Add category')).'</a>';
$actions .= Display::url(
Display::return_icon('export_csv.png', get_lang('CSV export'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon(ActionIcon::EXPORT_CSV, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('CSV export')),
api_get_self().'?action=export_category&'.api_get_cidreq()
);
$actions .= Display::url(
Display::return_icon('import_csv.png', get_lang('Import from a CSV'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon(ActionIcon::IMPORT_ARCHIVE, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Import from a CSV')),
api_get_self().'?action=import_category&'.api_get_cidreq()
);

@ -3,6 +3,7 @@
/* For licensing terms, see /license.txt */
use ChamiloSession as Session;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
/**
* Upload quiz: This script shows the upload quiz feature.
@ -45,12 +46,7 @@ lp_upload_quiz_main();
function lp_upload_quiz_actions()
{
return '<a href="exercise.php?'.api_get_cidreq().'">'.
Display::return_icon(
'back.png',
get_lang('BackToTestsList'),
'',
ICON_SIZE_MEDIUM
).'</a>';
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('BackToTestsList')).'</a>';
}
function lp_upload_quiz_main()
@ -67,7 +63,7 @@ function lp_upload_quiz_main()
$form->addElement('header', get_lang('Import quiz from Excel'));
$form->addElement('file', 'user_upload_quiz', get_lang('File upload'));
$label = Display::return_icon('export_excel.png', get_lang('Download the Excel Template')).
$label = Display::getMdiIcon(ActionIcon::EXPORT_SPREADSHEET, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Download the Excel Template')).
get_lang('Download the Excel Template');
$link = '<a href="../exercise/quiz_template.xls">'.$label.'</a>';
$form->addElement('label', '', $link);

@ -5,6 +5,7 @@
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CourseBundle\Entity\CGlossary;
use ChamiloSession as Session;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
/**
* @author Christian Fasanando, initial version
@ -127,7 +128,7 @@ switch ($action) {
'add_glossary',
[
Display::url(
Display::return_icon('back.png', get_lang('Back'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Back')),
api_get_self().'?'.api_get_cidreq()
),
]
@ -225,7 +226,7 @@ switch ($action) {
'edit_glossary',
[
Display::url(
Display::return_icon('back.png', get_lang('Back'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Back')),
api_get_self().'?'.api_get_cidreq()
),
]

@ -3,6 +3,8 @@
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ObjectIcon;
require_once __DIR__.'/../inc/global.inc.php';
$current_course_tool = TOOL_GRADEBOOK;
@ -272,11 +274,11 @@ if (!empty($cats)) {
$actions = '';
$actions .= Display::url(
Display::return_icon('tuning.png', get_lang('Generate certificates'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon(ObjectIcon::CERTIFICATE, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Generate certificates')),
$url.'&action=generate_all_certificates'
);
$actions .= Display::url(
Display::return_icon('delete.png', get_lang('Delete all certificates'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Delete all certificates')),
$url.'&action=delete_all_certificates'
);
@ -284,19 +286,19 @@ $hideCertificateExport = api_get_setting('hide_certificate_export_link');
if (count($certificate_list) > 0 && 'true' !== $hideCertificateExport) {
$actions .= Display::url(
Display::return_icon('pdf.png', get_lang('Export all certificates to PDF'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon(ActionIcon::EXPORT_PDF, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Export all certificates to PDF')),
$url.'&action=export_all_certificates'
);
if ($allowCustomCertificate) {
$actions .= Display::url(
Display::return_icon('file_zip.png', get_lang('ExportAllCertificatesToZIP'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon(ActionIcon::EXPORT_ARCHIVE, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('ExportAllCertificatesToZIP')),
$url.'&action=export_all_certificates_zip'
);
}
$actions .= Display::url(
Display::return_icon('notification_mail.png', get_lang('Send messageCertificateNotifications'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon(ActionIcon::SEND_MESSAGE, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Send messageCertificateNotifications')),
$url.'&action=show_notification_form'
);
}
@ -336,14 +338,14 @@ if (0 == count($certificate_list)) {
$url .= '&action=export';
$pdf = Display::url(
Display::return_icon('pdf.png', get_lang('Download')),
Display::getMdiIcon(ActionIcon::EXPORT_PDF, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Download')),
$url,
['target' => '_blank']
);
echo $pdf.PHP_EOL;
echo '<a onclick="return confirmation();" href="gradebook_display_certificate.php?sec_token='.$token.'&'.api_get_cidreq().'&action=delete&cat_id='.$categoryId.'&certificate_id='.$valueCertificate['id'].'">
'.Display::return_icon('delete.png', get_lang('Delete')).'
'.Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Delete')).'
</a>'.PHP_EOL;
echo '</td></tr>';
}

@ -5,6 +5,8 @@
/**
* @author Julio Montoya - fixes in order to use gradebook models + some code cleaning
*/
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
require_once __DIR__.'/../inc/global.inc.php';
$this_section = SECTION_COURSES;
$current_course_tool = TOOL_GRADEBOOK;
@ -280,11 +282,12 @@ if (!isset($_GET['exportpdf']) && !isset($_GET['export_certificate'])) {
}
$actions = '<a href="'.Category::getUrl().'&selectcat='.$my_selectcat.'">
'.Display::return_icon(
'back.png',
get_lang('Assessment home'),
'',
ICON_SIZE_MEDIUM
'.Display::getMdiIcon(
ActionIcon::BACK,
'ch-tool-icon',
null,
ICON_SIZE_MEDIUM,
get_lang('Assessment home')
).'
</a>';

@ -2,6 +2,8 @@
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
require_once __DIR__.'/../inc/global.inc.php';
require_once __DIR__.'/lib/fe/exportgradebook.php';
@ -147,11 +149,12 @@ if (isset($_GET['action'])) {
Display::display_header();
$items[] = [
'url' => $backUrl,
'content' => Display::return_icon(
'back.png',
get_lang('Back'),
[],
ICON_SIZE_MEDIUM
'content' => Display::getMdiIcon(
ActionIcon::BACK,
'ch-tool-icon',
null,
ICON_SIZE_MEDIUM,
get_lang('Back')
),
];
echo Display::actions($items);

@ -5,6 +5,7 @@
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\GradebookCategory;
use ChamiloSession as Session;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
/**
* Class Category
@ -2143,12 +2144,7 @@ class Category implements GradebookItem
);
$exportToPDF = Display::url(
Display::return_icon(
'pdf.png',
get_lang('Export to PDF'),
[],
ICON_SIZE_MEDIUM
),
Display::getMdiIcon(ActionIcon::EXPORT_PDF, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Export to PDF')),
"$url&action=export"
);

@ -2,6 +2,8 @@
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
/**
* Extends FormValidator with import and export forms.
*
@ -90,7 +92,7 @@ class DataForm extends FormValidator
$this->addElement(
'radio',
'file_type',
Display::return_icon('info3.gif', get_lang('To export, you must lock the evaluation.')),
Display::getMdiIcon(ActionIcon::VIEW_DETAILS, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('To export, you must lock the evaluation.')),
'PDF (Portable Document Format)',
'pdf',
['disabled']

@ -6,6 +6,7 @@ set_time_limit(0);
use CpChart\Cache as pCache;
use CpChart\Data as pData;
use CpChart\Image as pImage;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
/**
* Class FlatViewTable
@ -349,19 +350,21 @@ class FlatViewTable extends SortableTable
.'?selectcat='.Security::remove_XSS($_GET['selectcat'])
.'&offset='.(($this->offset) - GRADEBOOK_ITEM_LIMIT)
.(isset($_GET['search']) ? '&search='.Security::remove_XSS($_GET['search']) : '').'">'
.Display::return_icon(
'action_prev.png',
get_lang('Previous page'),
[],
ICON_SIZE_MEDIUM
.Display::getMdiIcon(
ActionIcon::PREVIOUS,
'ch-tool-icon',
null,
ICON_SIZE_MEDIUM,
get_lang('Previous page')
)
.'</a>';
} else {
$header .= Display::return_icon(
'action_prev_na.png',
get_lang('Previous page'),
[],
ICON_SIZE_MEDIUM
$header .= Display::getMdiIcon(
ActionIcon::PREVIOUS,
'ch-tool-icon-disabled',
null,
ICON_SIZE_MEDIUM,
get_lang('Previous page')
);
}
$header .= ' ';
@ -374,14 +377,15 @@ class FlatViewTable extends SortableTable
.'?selectcat='.Security::remove_XSS($_GET['selectcat'])
.'&offset='.($this->offset + GRADEBOOK_ITEM_LIMIT)
.(isset($_GET['search']) ? '&search='.Security::remove_XSS($_GET['search']) : '').'">'
.Display::return_icon('action_next.png', get_lang('Next page'), [], ICON_SIZE_MEDIUM)
.Display::getMdiIcon(ActionIcon::NEXT, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Next page'))
.'</a>';
} else {
$header .= Display::return_icon(
'action_next_na.png',
get_lang('Next page'),
[],
ICON_SIZE_MEDIUM
$header .= Display::getMdiIcon(
ActionIcon::NEXT,
'ch-tool-icon-disabled',
null,
ICON_SIZE_MEDIUM,
get_lang('Next page')
);
}
$header .= '</td>';

@ -3,6 +3,7 @@
/* For licensing terms, see license.txt */
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\StateIcon;
use ChamiloSession as Session;
use CpChart\Cache as pCache;
use CpChart\Data as pData;
@ -694,8 +695,11 @@ class GradebookTable extends SortableTable
]
);
} else {
$label = Display::return_icon(
'warning.png',
$label = Display::getMdiIcon(
StateIcon::WARNING,
'ch-tool-icon',
null,
ICON_SIZE_SMALL,
sprintf(get_lang('The sum of all weights of activities must be %s'), $categoryWeight)
);
$total = Display::label($totalWeight.' / '.$categoryWeight, 'warning');

@ -1,6 +1,9 @@
<?php
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ToolIcon;
/**
* Class ResultTable
* Table to display results for an evaluation.
@ -208,7 +211,7 @@ class ResultTable extends SortableTable
$row,
3,
Display::url(
Display::return_icon('delete.png', get_lang('Delete')),
Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete')),
$url.'&action=delete_attempt&result_attempt_id='.$data['id']
)
);
@ -235,27 +238,27 @@ class ResultTable extends SortableTable
if (!empty($item['percentage_score'])) {
$editColumn .=
Display::url(
Display::return_icon('add.png', get_lang('AddAttempt'), '', '22'),
Display::getMdiIcon(ActionIcon::ADD, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('AddAttempt')),
$baseUrl.'&action=add_attempt&editres='.$item['result_id']
);
} else {
$editColumn .= '<a href="'.api_get_self().'?editres='.$item['result_id'].'&selecteval='.$this->evaluation->get_id().'&'.api_get_cidreq().'">'.
Display::return_icon('edit.png', get_lang('Edit'), '', '22').'</a>';
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>';
}
} else {
$editColumn .= '<a href="'.api_get_self().'?editres='.$item['result_id'].'&selecteval='.$this->evaluation->get_id().'&'.api_get_cidreq().'">'.
Display::return_icon('edit.png', get_lang('Edit'), '', '22').'</a>';
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>';
}
$editColumn .= ' <a href="'.api_get_self().'?delete_mark='.$item['result_id'].'&selecteval='.$this->evaluation->get_id().'&'.api_get_cidreq().'">'.
Display::return_icon('delete.png', get_lang('Delete'), '', '22').'</a>';
Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete')).'</a>';
}
if (null == $this->evaluation->get_course_code()) {
$editColumn .= '&nbsp;<a href="'.api_get_self().'?resultdelete='.$item['result_id'].'&selecteval='.$this->evaluation->get_id().'" onclick="return confirmationuser();">';
$editColumn .= Display::return_icon('delete.png', get_lang('Delete'));
$editColumn .= Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete'));
$editColumn .= '</a>';
$editColumn .= '&nbsp;<a href="user_stats.php?userid='.$item['id'].'&selecteval='.$this->evaluation->get_id().'&'.api_get_cidreq().'">';
$editColumn .= Display::return_icon('statistics.gif', get_lang('Statistics'));
$editColumn .= Display::getMdiIcon(ToolIcon::TRACKING, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Statistics'));
$editColumn .= '</a>';
}
@ -266,7 +269,7 @@ class ResultTable extends SortableTable
if (null != $doc_url) {
$editColumn .= '&nbsp;<a href="'.$doc_url.'" target="_blank">';
$editColumn .= Display::return_icon('link.gif', get_lang('Open document')).'</a>';
$editColumn .= Display::getMdiIcon(ToolIcon::LINK, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Open document')).'</a>';
}
}

@ -2,6 +2,8 @@
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
require_once __DIR__.'/../inc/global.inc.php';
api_block_anonymous_users();
@ -105,11 +107,12 @@ if (!empty($categoryId)) {
'name' => get_lang('List View'),
];
$actions .= '<a href=gradebook_flatview.php?selectcat='.$categoryId.'&'.api_get_cidreq().'>'.
Display::return_icon(
'back.png',
get_lang('Back to').' '.get_lang('List View'),
'',
ICON_SIZE_MEDIUM
Display::getMdiIcon(
ActionIcon::BACK,
'ch-tool-icon',
null,
ICON_SIZE_MEDIUM,
get_lang('Back to').' '.get_lang('List View')
).
'</a>';
}
@ -120,11 +123,11 @@ if (!empty($evaluationId)) {
'name' => get_lang('Assessment details'),
];
$actions .= '<a href="gradebook_view_result.php?selecteval='.$evaluationId.'&'.api_get_cidreq().'">
'.Display::return_icon('back.png', get_lang('Back toScore'), '', ICON_SIZE_MEDIUM).'</a>';
'.Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Back toScore')).'</a>';
}
$actions .= '<a href="'.api_get_self().'?exportpdf=&userid='.$userId.'&selectcat='.$category[0]->get_id().'&'.api_get_cidreq().'" target="_blank">
'.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 .= '</div>';

@ -4,13 +4,15 @@
/**
* This script displays a help window.
*/
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
require_once __DIR__.'/../inc/global.inc.php';
$help_name = isset($_GET['open']) ? Security::remove_XSS($_GET['open']) : null;
Display::display_header(get_lang('Frequently Asked Question'));
if (api_is_platform_admin()) {
echo '&nbsp;<a href="faq.php?edit=true">'.Display::return_icon('edit.png').'</a>';
echo '&nbsp;<a href="faq.php?edit=true">'.Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL).'</a>';
}
echo Display::page_header(get_lang('Frequently Asked Question'));

@ -6,6 +6,8 @@
/**
* Responses to AJAX calls.
*/
use Chamilo\CoreBundle\Component\Utils\ObjectIcon;
$action = $_GET['a'];
switch ($action) {
@ -105,17 +107,17 @@ switch ($action) {
if (empty($lp_item['modified_on'])) {
$lp_date = api_get_local_time($lp_item['created_on']);
$image = 'new.gif';
$image = ObjectIcon::STAR;
$label = get_lang('Course added');
} else {
$lp_date = api_get_local_time($lp_item['modified_on']);
$image = 'moderator_star.png';
$image = ObjectIcon::STAR_EMPTY;
$label = get_lang('Learning path updated');
}
$icons = '';
if (strtotime($last_date) < strtotime($lp_date)) {
$icons = Display::return_icon($image, get_lang('Since your latest visit').': '.$label.' - '.$lp_date);
$icons = Display::getMdiIcon($image, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Since your latest visit').': '.$label.' - '.$lp_date);
}
if (!empty($lp_item['published_on'])) {
@ -252,7 +254,7 @@ switch ($action) {
}
if (strtotime($last_date) < strtotime($lp_date)) {
$icons = Display::return_icon($image, get_lang('Since your latest visit').': '.$label.' - '.$lp_date);
$icons = Display::getMdiIcon($image, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Since your latest visit').': '.$label.' - '.$lp_date);
}
if (!empty($lp_item['published_on'])) {
@ -391,7 +393,7 @@ switch ($action) {
}
$icons = '';
if (strtotime($last_date) < strtotime($lp_date)) {
$icons = Display::return_icon($image, get_lang('Since your latest visit').': '.$label.' - '.$lp_date);
$icons = Display::getMdiIcon($image, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Since your latest visit').': '.$label.' - '.$lp_date);
}
if (!empty($lp_item['published_on'])) {
$date = substr($lp_item['published_on'], 0, 10);

@ -4,6 +4,8 @@
/**
* Responses to AJAX calls for the document upload.
*/
use Chamilo\CoreBundle\Component\Utils\StateIcon;
require_once __DIR__.'/../global.inc.php';
require_once api_get_path(SYS_CODE_PATH).'dropbox/dropbox_functions.inc.php';
@ -61,13 +63,19 @@ switch ($action) {
$json['url'] = api_get_path(WEB_CODE_PATH).'dropbox/index.php?'.api_get_cidreq();
$json['size'] = format_file_size($result->filesize);
$json['type'] = api_htmlentities($file['type']);
$json['result'] = Display::return_icon(
'accept.png',
$json['result'] = Display::getMdiIcon(
StateIcon::COMPLETE,
'ch-tool-icon',
null,
ICON_SIZE_SMALL,
get_lang('Uploaded.')
);
} else {
$json['result'] = Display::return_icon(
'exclamation.png',
$json['result'] = Display::getMdiIcon(
StateIcon::WARNING,
'ch-tool-icon',
null,
ICON_SIZE_SMALL,
get_lang('Error')
);
}

@ -4,6 +4,8 @@
/**
* Responses to AJAX calls.
*/
use Chamilo\CoreBundle\Component\Utils\StateIcon;
require_once __DIR__.'/../global.inc.php';
api_protect_course_script(true);
@ -17,18 +19,20 @@ switch ($action) {
$result = \Link::checkUrl($url);
if ($result) {
echo Display::return_icon(
'check-circle.png',
get_lang('Validate'),
echo Display::getMdiIcon(
StateIcon::COMPLETE,
'ch-tool-icon',
null,
ICON_SIZE_TINY
ICON_SIZE_TINY,
get_lang('Validate')
);
} else {
echo Display::return_icon(
'closed-circle.png',
get_lang('Wrong'),
echo Display::getMdiIcon(
StateIcon::WARNING,
'ch-tool-icon',
null,
ICON_SIZE_TINY
ICON_SIZE_TINY,
get_lang('Wrong')
);
}
}

@ -4,6 +4,10 @@
use Chamilo\CoreBundle\Framework\Container;
use ChamiloSession as Session;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ToolIcon;
use Chamilo\CoreBundle\Component\Utils\ObjectIcon;
use Chamilo\CoreBundle\Component\Utils\StateIcon;
require_once __DIR__.'/../global.inc.php';
@ -1861,7 +1865,7 @@ switch ($action) {
$result = [];
if (!empty($sessions)) {
$pdfIcon = Display::return_icon('pdf.png', get_lang('CertificateOfAchievement'), [], ICON_SIZE_SMALL);
$pdfIcon = Display::getMdiIcon(ActionIcon::EXPORT_PDF, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('CertificateOfAchievement'));
foreach ($sessions as $session) {
$sessionEntity = api_get_session_entity($session['id']);
if (api_drh_can_access_all_session_content()) {
@ -1904,11 +1908,11 @@ switch ($action) {
['target' => '_blank']
);
$detailButtons[] = Display::url(
Display::return_icon('works.png', get_lang('WorksReport')),
Display::getMdiIcon(ObjectIcon::ASSIGNMENT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('WorksReport')),
api_get_path(WEB_CODE_PATH).'my_space/works_in_session_report.php?session='.$session['id']
);
$detailButtons[] = Display::url(
Display::return_icon('2rightarrow.png'),
Display::getMdiIcon(ActionIcon::VIEW_DETAILS, 'ch-tool-icon', null, ICON_SIZE_SMALL,),
api_get_path(WEB_CODE_PATH).'my_space/course.php?sid='.$session['id']
);
@ -2259,19 +2263,21 @@ switch ($action) {
);
if (!empty($item['certif_min_score']) && !empty($item['document_id'])) {
$item['certificates'] = Display::return_icon(
'accept.png',
get_lang('With Certificate'),
[],
ICON_SIZE_SMALL
$item['certificates'] = Display::getMdiIcon(
StateIcon::COMPLETE,
'ch-tool-icon',
null,
ICON_SIZE_SMALL,
get_lang('With Certificate')
);
$item['has_certificates'] = '1';
} else {
$item['certificates'] = Display::return_icon(
'warning.png',
get_lang('No certificate'),
[],
ICON_SIZE_SMALL
$item['certificates'] = Display::getMdiIcon(
StateIcon::WARNING,
'ch-tool-icon',
null,
ICON_SIZE_SMALL,
get_lang('No certificate')
);
$item['has_certificates'] = '0';
}
@ -2390,12 +2396,18 @@ switch ($action) {
$result = $obj->getAllGrid($sidx, $sord, $start, $limit);
$new_result = [];
if (!empty($result)) {
$checkIcon = Display::return_icon(
'check-circle.png',
$checkIcon = Display::getMdiIcon(
ActionIcon::ACCEPT,
'ch-tool-icon',
null,
ICON_SIZE_SMALL,
get_lang('Yes')
);
$timesIcon = Display::return_icon(
'closed-circle.png',
$timesIcon = Display::getMdiIcon(
ActionIcon::REJECT,
'ch-tool-icon',
null,
ICON_SIZE_SMALL,
get_lang('No')
);
foreach ($result as $item) {
@ -2569,11 +2581,11 @@ switch ($action) {
)) {
$url = 'class.php?action=remove_class_from_course&id='.$group['id'].'&'.api_get_cidreq(
).'&id_session='.api_get_session_id();
$icon = Display::return_icon('delete.png', get_lang('Remove'));
$icon = Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Remove'));
} else {
$url = 'class.php?action=add_class_to_course&id='.$group['id'].'&'.api_get_cidreq(
).'&type=not_registered';
$icon = Display::return_icon('add.png', get_lang('Add'));
$icon = Display::getMdiIcon(ActionIcon::ADD, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Add'));
}
switch ($group['group_type']) {
@ -2592,7 +2604,7 @@ switch ($action) {
if ($isAllow) {
if ($obj->allowTeachers() && $group['author_id'] == $currentUserId) {
$group['actions'] .= Display::url(
Display::return_icon('statistics.png', get_lang('Statistics')),
Display::getMdiIcon(ToolIcon::TRACKING, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Statistics')),
$urlUserGroup.'&id='.$group['id']
).'&nbsp;';
}

@ -3,6 +3,7 @@
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
/**
* Responses to AJAX calls.
@ -329,12 +330,12 @@ switch ($action) {
."</small></div>";
$row[] = Display::url(
Display::return_icon('save.png', get_lang('Download')),
Display::getMdiIcon(ActionIcon::SAVE_FORM, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Download')),
$downloadUrl
)
.PHP_EOL
.Display::url(
Display::return_icon('delete.png', get_lang('Delete')),
Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete')),
$deleteUrl,
[
'class' => 'delete_document',

@ -3,6 +3,7 @@
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CoreBundle\Component\Utils\StateIcon;
/**
* Responses to AJAX calls.
@ -125,8 +126,11 @@ switch ($action) {
$json['url'] = $url;
$json['size'] = '';
//$json['type'] = api_htmlentities($result['filetype']);
$json['result'] = Display::return_icon(
'accept.png',
$json['result'] = Display::getMdiIcon(
StateIcon::COMPLETE,
'ch-tool-icon',
null,
ICON_SIZE_SMALL,
get_lang('Uploaded..')
);
} else {
@ -200,18 +204,20 @@ switch ($action) {
}
if (isset($result['url'])) {
$json['result'] = Display::return_icon(
'accept.png',
get_lang('Uploaded..'),
[],
ICON_SIZE_TINY
$json['result'] = Display::getMdiIcon(
StateIcon::COMPLETE,
'ch-tool-icon',
null,
ICON_SIZE_TINY,
get_lang('Uploaded..')
);
} else {
$json['result'] = Display::return_icon(
'exclamation.png',
get_lang('Error'),
[],
ICON_SIZE_TINY
$json['result'] = Display::getMdiIcon(
StateIcon::WARNING,
'ch-tool-icon',
null,
ICON_SIZE_TINY,
get_lang('Error')
);
}

Loading…
Cancel
Save