Display: Replace deprecated returnFontAwesomeIcon() with equivalent getMdiIcon() calls - refs BT#19231

pull/4014/head^2
Yannick Warnier 4 years ago
parent 83ebc6f072
commit c605a33f8d
  1. 2
      public/main/auth/courses.php
  2. 2
      public/main/exercise/admin.php
  3. 2
      public/main/exercise/exercise.class.php
  4. 4
      public/main/exercise/exercise_submit.php
  5. 4
      public/main/exercise/overview.php
  6. 2
      public/main/exercise/question_list_admin.inc.php
  7. 4
      public/main/forum/forumfunction.inc.php
  8. 4
      public/main/forum/viewthread.php
  9. 4
      public/main/gradebook/index.php
  10. 2
      public/main/inc/lib/AnnouncementManager.php
  11. 4
      public/main/inc/lib/Compilatio.php
  12. 4
      public/main/inc/lib/CoursesAndSessionsCatalog.class.php
  13. 2
      public/main/inc/lib/TicketManager.php
  14. 5
      public/main/inc/lib/agenda.lib.php
  15. 6
      public/main/inc/lib/api.lib.php
  16. 6
      public/main/inc/lib/career.lib.php
  17. 24
      public/main/inc/lib/course.lib.php
  18. 2
      public/main/inc/lib/javascript/chat/video.php
  19. 6
      public/main/inc/lib/message.lib.php
  20. 2
      public/main/inc/lib/social.lib.php
  21. 2
      public/main/social/group_invitation.php
  22. 8
      public/main/social/group_view.php
  23. 4
      public/main/social/groups.php
  24. 4
      public/main/survey/survey_invitation.php
  25. 6
      public/main/ticket/tickets.php
  26. 2
      public/main/tracking/courseLog.php
  27. 12
      public/main/work/work.lib.php
  28. 4
      public/main/work/work_list.php
  29. 2
      public/plugin/buycourses/src/buy_course_plugin.class.php
  30. 2
      public/plugin/buycourses/src/sales_report.php
  31. 14
      public/plugin/vchamilo/views/manage.php

@ -513,7 +513,7 @@ switch ($action) {
// if user registered as student // if user registered as student
if ($userRegisteredInCourse) { if ($userRegisteredInCourse) {
$course['already_registered_formatted'] = Display::url( $course['already_registered_formatted'] = Display::url(
Display::returnFontAwesomeIcon('external-link').' '. Display::getMdiIcon('external-link', 'mdi-tool-icon-button').' '.
get_lang('GoToCourse'), get_lang('GoToCourse'),
$courseUrl.$course['directory'].'/index.php?id_session=0', $courseUrl.$course['directory'].'/index.php?id_session=0',
['class' => 'btn btn-primary'] ['class' => 'btn btn-primary']

@ -336,7 +336,7 @@ if ($inATest) {
} }
if ($editQuestion && $objQuestion->existsInAnotherExercise()) { if ($editQuestion && $objQuestion->existsInAnotherExercise()) {
echo Display::return_message( echo Display::return_message(
Display::returnFontAwesomeIcon('exclamation-triangle"') Display::getMdiIcon('alert')
.get_lang('ThisQuestionExistsInAnotherTestsWarning'), .get_lang('ThisQuestionExistsInAnotherTestsWarning'),
'warning', 'warning',
false false

@ -7244,7 +7244,7 @@ class Exercise
'<span id="counter_to_redirect" class="red_alert"></span>' '<span id="counter_to_redirect" class="red_alert"></span>'
); );
$html .= '</div>'; $html .= '</div>';
$icon = Display::returnFontAwesomeIcon('clock-o'); $icon = Display::getMdiIcon('clock-outline');
$html .= '<div class="count_down"> $html .= '<div class="count_down">
'.get_lang('RemainingTimeToFinishExercise').' '.get_lang('RemainingTimeToFinishExercise').'
'.$icon.'<span id="exercise_clock_warning"></span> '.$icon.'<span id="exercise_clock_warning"></span>

@ -1165,7 +1165,7 @@ if ($time_control) {
} }
if ($showQuestionClock) { if ($showQuestionClock) {
$icon = Display::returnFontAwesomeIcon('clock-o'); $icon = Display::getMdiIcon('clock-outline');
echo '<div class="well" style="text-align: center"> echo '<div class="well" style="text-align: center">
'.get_lang('RemainingTimeToFinishQuestion').' '.get_lang('RemainingTimeToFinishQuestion').'
<div id="question_timer" class="label label-warning"></div> <div id="question_timer" class="label label-warning"></div>
@ -1304,7 +1304,7 @@ if ($allowBlockCategory &&
false, false,
true true
); );
$loading = Display::returnFontAwesomeIcon('spinner', null, true, 'fa-spin'); $loading = Display::getMdiIcon('loading', 'animate-spin');
echo '<script> echo '<script>
function addExerciseEvent(elm, evType, fn, useCapture) { function addExerciseEvent(elm, evType, fn, useCapture) {

@ -164,7 +164,7 @@ $quizCheckButtonEnabled = api_get_configuration_value('quiz_check_button_enable'
if ($quizCheckButtonEnabled) { if ($quizCheckButtonEnabled) {
$btnCheck = Display::button( $btnCheck = Display::button(
'quiz_check_request_button', 'quiz_check_request_button',
Display::returnFontAwesomeIcon('spinner', '', true, 'fa-spin hidden').' '.get_lang('TestYourBrowser'), Display::getMdiIcon('loading', 'animate-spin hidden').' '.get_lang('TestYourBrowser'),
[ [
'type' => 'button', 'type' => 'button',
'role' => 'button', 'role' => 'button',
@ -504,7 +504,7 @@ if ($quizCheckButtonEnabled) {
$html .= "<script> $html .= "<script>
$(function () { $(function () {
var btnTest = $('#quiz-check-request-button'), var btnTest = $('#quiz-check-request-button'),
iconBtnTest = btnTest.children('.fa.fa-spin'); iconBtnTest = btnTest.children('.animate-spin');
btnTest.on('click', function (e) { btnTest.on('click', function (e) {
e.preventDefault(); e.preventDefault();

@ -296,7 +296,7 @@ if (!$inATest) {
$title = strip_tags($title); $title = strip_tags($title);
$move = '&nbsp;'; $move = '&nbsp;';
if ($allowQuestionOrdering) { if ($allowQuestionOrdering) {
$move = Display::returnFontAwesomeIcon('arrows moved', 1, true); $move = Display::getMdiIcon('cursor-move');
} }
// Question name // Question name

@ -5208,7 +5208,7 @@ function getPostStatus(CForum $forum, array $row, bool $addWrapper = true): stri
} else { } else {
if ($showStatus) { if ($showStatus) {
$statusIcon .= Display::label( $statusIcon .= Display::label(
Display::returnFontAwesomeIcon($icon).$label, Display::getMdiIcon($icon).$label,
$buttonType $buttonType
); );
} }
@ -5393,7 +5393,7 @@ function getGiveRevisionButton(int $postId, CForumThread $threadInfo): string
function getReportButton(int $postId, CForumThread $threadInfo): string function getReportButton(int $postId, CForumThread $threadInfo): string
{ {
return Display::url( return Display::url(
Display::returnFontAwesomeIcon('flag'), Display::getMdiIcon('flag'),
api_get_path(WEB_CODE_PATH).'forum/viewthread.php?'. api_get_path(WEB_CODE_PATH).'forum/viewthread.php?'.
api_get_cidreq().'&action=report&post_id='.$postId. api_get_cidreq().'&action=report&post_id='.$postId.
'&forum='.$threadInfo->getForum()->getIid().'&thread='.$threadInfo->getIid(), '&forum='.$threadInfo->getForum()->getIid().'&thread='.$threadInfo->getIid(),

@ -659,7 +659,7 @@ foreach ($posts as $post) {
'AW:', 'AW:',
'Aw:', 'Aw:',
]; ];
$replace = '<span>'.Display::returnFontAwesomeIcon('mail-reply').'</span>'; $replace = '<span>'.Display::getMdiIcon('reply').'</span>';
$post['post_title'] = str_replace($search, $replace, Security::remove_XSS($post['post_title'])); $post['post_title'] = str_replace($search, $replace, Security::remove_XSS($post['post_title']));
// The post title // The post title
@ -678,7 +678,7 @@ foreach ($posts as $post) {
$repo = Container::getForumAttachmentRepository(); $repo = Container::getForumAttachmentRepository();
/** @var CForumAttachment $attachment */ /** @var CForumAttachment $attachment */
foreach ($attachments as $attachment) { foreach ($attachments as $attachment) {
$post['post_attachments'] .= Display::returnFontAwesomeIcon('paperclip'); $post['post_attachments'] .= Display::getMdiIcon('paperclip');
$url = $repo->getResourceFileDownloadUrl($attachment).'?'.api_get_cidreq(); $url = $repo->getResourceFileDownloadUrl($attachment).'?'.api_get_cidreq();
$post['post_attachments'] .= Display::url($attachment->getFilename(), $url); $post['post_attachments'] .= Display::url($attachment->getFilename(), $url);
$post['post_attachments'] .= '<span class="forum_attach_comment" >'.$attachment->getComment().'</span>'; $post['post_attachments'] .= '<span class="forum_attach_comment" >'.$attachment->getComment().'</span>';

@ -817,7 +817,7 @@ if (!empty($selectCat)) {
$certificate = Category::generateUserCertificate($category, $stud_id); $certificate = Category::generateUserCertificate($category, $stud_id);
if ('true' !== $hideCertificateExport && isset($certificate['pdf_url'])) { if ('true' !== $hideCertificateExport && isset($certificate['pdf_url'])) {
$actionsLeft .= Display::url( $actionsLeft .= Display::url(
Display::returnFontAwesomeIcon('file-pdf-o').get_lang('Download certificate in PDF'), Display::getMdiIcon('file-pdf-box').get_lang('Download certificate in PDF'),
$certificate['pdf_url'], $certificate['pdf_url'],
['class' => 'btn btn-default'] ['class' => 'btn btn-default']
); );
@ -834,7 +834,7 @@ if (!api_is_allowed_to_edit(null, true)) {
$allowButton = false === api_get_configuration_value('gradebook_hide_pdf_report_button'); $allowButton = false === api_get_configuration_value('gradebook_hide_pdf_report_button');
if ($allowButton) { if ($allowButton) {
$actionsLeft .= Display::url( $actionsLeft .= Display::url(
Display::returnFontAwesomeIcon('file-pdf-o').get_lang('Download report in PDF'), Display::getMdiIcon('file-pdf-box').get_lang('Download report in PDF'),
api_get_self().'?action=export_table&'.api_get_cidreq().'&category_id='.$selectCat, api_get_self().'?action=export_table&'.api_get_cidreq().'&category_id='.$selectCat,
['class' => 'btn btn-default'] ['class' => 'btn btn-default']
); );

@ -562,7 +562,7 @@ class AnnouncementManager
$url = $repo->getResourceFileDownloadUrl($attachment).'?'.api_get_cidreq(); $url = $repo->getResourceFileDownloadUrl($attachment).'?'.api_get_cidreq();
$html .= '<tr><td>'; $html .= '<tr><td>';
$html .= '<br/>'; $html .= '<br/>';
$html .= Display::returnFontAwesomeIcon('paperclip'); $html .= Display::getMdiIcon('paperclip');
$html .= '<a href="'.$url.' "> '.$attachment->getFilename().' </a>'; $html .= '<a href="'.$url.' "> '.$attachment->getFilename().' </a>';
$html .= ' - <span class="forum_attach_comment" >'.$attachment->getComment().'</span>'; $html .= ' - <span class="forum_attach_comment" >'.$attachment->getComment().'</span>';
if (api_is_allowed_to_edit(false, true)) { if (api_is_allowed_to_edit(false, true)) {

@ -407,7 +407,7 @@ class Compilatio
*/ */
public static function getProgressionAnalyseDocv31($status, $pour = 0, $text = []) public static function getProgressionAnalyseDocv31($status, $pour = 0, $text = [])
{ {
$loading = Display::returnFontAwesomeIcon('spinner', null, true, 'fa-spin'); $loading = Display::getMdiIcon('loading', 'animate-spin');
$loading .= '&nbsp;'; $loading .= '&nbsp;';
//$refreshReturn = Display::url('javascript:window.location.reload(false);', $loading); //$refreshReturn = Display::url('javascript:window.location.reload(false);', $loading);
switch ($status) { switch ($status) {
@ -588,7 +588,7 @@ class Compilatio
); );
break; break;
case 'ANALYSE_IN_QUEUE': case 'ANALYSE_IN_QUEUE':
$loading = Display::returnFontAwesomeIcon('spinner', null, true, 'fa-spin'); $loading = Display::getMdiIcon('loading', 'animate-spin');
$actionCompilatio .= $loading.'&nbsp;'.get_lang('Waiting for analysis'); $actionCompilatio .= $loading.'&nbsp;'.get_lang('Waiting for analysis');
break; break;
case 'BAD_FILETYPE': case 'BAD_FILETYPE':

@ -1154,7 +1154,7 @@ class CoursesAndSessionsCatalog
} }
return Display::url( return Display::url(
Display::returnFontAwesomeIcon('check').' '.$title, Display::getMdiIcon('check').' '.$title,
api_get_self().'?action='.$action.'&sec_token='.$stok. api_get_self().'?action='.$action.'&sec_token='.$stok.
'&course_code='.$course['code'].'&search_term='.$search_term.'&category_code='.$categoryCode, '&course_code='.$course['code'].'&search_term='.$search_term.'&category_code='.$categoryCode,
['class' => 'btn btn-success btn-sm', 'title' => $title, 'aria-label' => $title] ['class' => 'btn btn-success btn-sm', 'title' => $title, 'aria-label' => $title]
@ -1183,7 +1183,7 @@ class CoursesAndSessionsCatalog
'&search_term='.$search_term.'&category_code='.$categoryCode; '&search_term='.$search_term.'&category_code='.$categoryCode;
return Display::url( return Display::url(
Display::returnFontAwesomeIcon('sign-in').'&nbsp;'.$title, Display::getMdiIcon('login').'&nbsp;'.$title,
$url, $url,
['class' => 'btn btn-danger', 'title' => $title, 'aria-label' => $title] ['class' => 'btn btn-danger', 'title' => $title, 'aria-label' => $title]
); );

@ -1011,7 +1011,7 @@ class TicketManager
title="'.get_lang('History').'" title="'.get_lang('History').'"
alt="'.get_lang('History').'" alt="'.get_lang('History').'"
> >
'.Display::returnFontAwesomeIcon('history').' '.Display::getMdiIcon('history').'
</a> </a>
<div class="blackboard_hide" id="div_'.$row['ticket_id'].'">&nbsp;&nbsp;</div> <div class="blackboard_hide" id="div_'.$row['ticket_id'].'">&nbsp;&nbsp;</div>

@ -1645,9 +1645,8 @@ class Agenda
$attachmentList = $row->getAttachments(); $attachmentList = $row->getAttachments();
$event['attachment'] = ''; $event['attachment'] = '';
if (!empty($attachmentList)) { if (!empty($attachmentList)) {
$icon = Display::returnFontAwesomeIcon( $icon = Display::getMdiIcon(
'paperclip', 'paperclip'
'1'
); );
/** @var CCalendarEventAttachment $attachment */ /** @var CCalendarEventAttachment $attachment */
foreach ($attachmentList as $attachment) { foreach ($attachmentList as $attachment) {

@ -3173,17 +3173,17 @@ function api_display_tool_view_option()
$sourceurl = str_replace('&isStudentView=true', '', $sourceurl); $sourceurl = str_replace('&isStudentView=true', '', $sourceurl);
$sourceurl = str_replace('&isStudentView=false', '', $sourceurl); $sourceurl = str_replace('&isStudentView=false', '', $sourceurl);
$output_string .= '<a class="btn btn-primary btn-sm" href="'.$sourceurl.'&isStudentView=false" target="_self">'. $output_string .= '<a class="btn btn-primary btn-sm" href="'.$sourceurl.'&isStudentView=false" target="_self">'.
Display::returnFontAwesomeIcon('eye').' '.get_lang('Switch to teacher view').'</a>'; Display::getMdiIcon('eye').' '.get_lang('Switch to teacher view').'</a>';
} elseif ('teacherview' == $_SESSION['studentview']) { } elseif ('teacherview' == $_SESSION['studentview']) {
// Switching to teacherview // Switching to teacherview
$sourceurl = str_replace('&isStudentView=true', '', $sourceurl); $sourceurl = str_replace('&isStudentView=true', '', $sourceurl);
$sourceurl = str_replace('&isStudentView=false', '', $sourceurl); $sourceurl = str_replace('&isStudentView=false', '', $sourceurl);
$output_string .= '<a class="btn btn-default btn-sm" href="'.$sourceurl.'&isStudentView=true" target="_self">'. $output_string .= '<a class="btn btn-default btn-sm" href="'.$sourceurl.'&isStudentView=true" target="_self">'.
Display::returnFontAwesomeIcon('eye').' '.get_lang('Switch to student view').'</a>'; Display::getMdiIcon('eye').' '.get_lang('Switch to student view').'</a>';
} }
} else { } else {
$output_string .= '<a class="btn btn-default btn-sm" href="'.$sourceurl.'&isStudentView=true" target="_self">'. $output_string .= '<a class="btn btn-default btn-sm" href="'.$sourceurl.'&isStudentView=true" target="_self">'.
Display::returnFontAwesomeIcon('eye').' '.get_lang('Switch to student view').'</a>'; Display::getMdiIcon('eye').' '.get_lang('Switch to student view').'</a>';
} }
$output_string = Security::remove_XSS($output_string); $output_string = Security::remove_XSS($output_string);
$html = Display::tag('div', $output_string, ['class' => 'view-options']); $html = Display::tag('div', $output_string, ['class' => 'view-options']);

@ -903,13 +903,13 @@ class Career extends Model
$icon = ''; $icon = '';
switch ($iconData['Icon']) { switch ($iconData['Icon']) {
case 0: case 0:
$icon = Display::returnFontAwesomeIcon('times-circle', $size); $icon = Display::getMdiIcon('close-circle');
break; break;
case 1: case 1:
$icon = Display::returnFontAwesomeIcon('check-circle', $size); $icon = Display::getMdiIcon('check-circle');
break; break;
case 2: case 2:
$icon = Display::returnFontAwesomeIcon('info-circle', $size); $icon = Display::getMdiIcon('information');
break; break;
} }

@ -3524,13 +3524,13 @@ class CourseManager
$params['edit_actions'] .= api_get_path(WEB_CODE_PATH).'course_info/infocours.php?cid='.$course['real_id']; $params['edit_actions'] .= api_get_path(WEB_CODE_PATH).'course_info/infocours.php?cid='.$course['real_id'];
if ($load_dirs) { if ($load_dirs) {
$params['document'] = '<a id="document_preview_'.$courseId.'_0" class="document_preview btn btn-outline-secondary btn-sm" href="javascript:void(0);">' $params['document'] = '<a id="document_preview_'.$courseId.'_0" class="document_preview btn btn-outline-secondary btn-sm" href="javascript:void(0);">'
.Display::returnFontAwesomeIcon('folder-open').'</a>'; .Display::getMdiIcon('folder-open-outline').'</a>';
$params['document'] .= Display::div('', ['id' => 'document_result_'.$courseId.'_0', 'class' => 'document_preview_container']); $params['document'] .= Display::div('', ['id' => 'document_result_'.$courseId.'_0', 'class' => 'document_preview_container']);
} }
} else { } else {
if (Course::CLOSED != $course_info['visibility'] && $load_dirs) { if (Course::CLOSED != $course_info['visibility'] && $load_dirs) {
$params['document'] = '<a id="document_preview_'.$courseId.'_0" class="document_preview btn btn-outline-secondary btn-sm" href="javascript:void(0);">' $params['document'] = '<a id="document_preview_'.$courseId.'_0" class="document_preview btn btn-outline-secondary btn-sm" href="javascript:void(0);">'
.Display::returnFontAwesomeIcon('folder-open').'</a>'; .Display::getMdiIcon('folder-open-outline').'</a>';
$params['document'] .= Display::div('', ['id' => 'document_result_'.$courseId.'_0', 'class' => 'document_preview_container']); $params['document'] .= Display::div('', ['id' => 'document_result_'.$courseId.'_0', 'class' => 'document_preview_container']);
} }
} }
@ -3707,7 +3707,7 @@ class CourseManager
$params['edit_actions'] .= api_get_path(WEB_CODE_PATH).'course_info/infocours.php?cid='.$course_info['real_id']; $params['edit_actions'] .= api_get_path(WEB_CODE_PATH).'course_info/infocours.php?cid='.$course_info['real_id'];
if ($load_dirs) { if ($load_dirs) {
$params['document'] = '<a id="document_preview_'.$course_info['real_id'].'_0" class="document_preview btn btn-default btn-sm" href="javascript:void(0);">' $params['document'] = '<a id="document_preview_'.$course_info['real_id'].'_0" class="document_preview btn btn-default btn-sm" href="javascript:void(0);">'
.Display::returnFontAwesomeIcon('folder-open').'</a>'; .Display::getMdiIcon('folder-open-outline').'</a>';
$params['document'] .= Display::div( $params['document'] .= Display::div(
'', '',
[ [
@ -3719,7 +3719,7 @@ class CourseManager
} }
if ($load_dirs) { if ($load_dirs) {
$params['document'] = '<a id="document_preview_'.$course_info['real_id'].'_0" class="document_preview btn btn-default btn-sm" href="javascript:void(0);">' $params['document'] = '<a id="document_preview_'.$course_info['real_id'].'_0" class="document_preview btn btn-default btn-sm" href="javascript:void(0);">'
.Display::returnFontAwesomeIcon('folder-open').'</a>'; .Display::getMdiIcon('folder-open-outline').'</a>';
$params['document'] .= Display::div( $params['document'] .= Display::div(
'', '',
[ [
@ -4014,7 +4014,7 @@ class CourseManager
id="document_preview_'.$course_info['real_id'].'_'.$session_id.'" id="document_preview_'.$course_info['real_id'].'_'.$session_id.'"
class="document_preview btn btn-default btn-sm" class="document_preview btn btn-default btn-sm"
href="javascript:void(0);">'. href="javascript:void(0);">'.
Display::returnFontAwesomeIcon('folder-open').'</a>'; Display::getMdiIcon('folder-open-outline').'</a>';
$params['document'] .= Display::div('', [ $params['document'] .= Display::div('', [
'id' => 'document_result_'.$course_info['real_id'].'_'.$session_id, 'id' => 'document_result_'.$course_info['real_id'].'_'.$session_id,
'class' => 'document_preview_container', 'class' => 'document_preview_container',
@ -4790,7 +4790,7 @@ class CourseManager
if ($access_link && in_array('register', $access_link)) { if ($access_link && in_array('register', $access_link)) {
$my_course['register_button'] = Display::url( $my_course['register_button'] = Display::url(
get_lang('Subscribe').' '. get_lang('Subscribe').' '.
Display::returnFontAwesomeIcon('sign-in'), Display::getMdiIcon('login'),
api_get_path(WEB_COURSE_PATH).$course_info['path']. api_get_path(WEB_COURSE_PATH).$course_info['path'].
'/index.php?action=subscribe&sec_token='.$stok, '/index.php?action=subscribe&sec_token='.$stok,
[ [
@ -4806,7 +4806,7 @@ class CourseManager
) { ) {
$my_course['go_to_course_button'] = Display::url( $my_course['go_to_course_button'] = Display::url(
get_lang('Go to the course').' '. get_lang('Go to the course').' '.
Display::returnFontAwesomeIcon('share'), Display::getMdiIcon('share'),
api_get_path(WEB_COURSE_PATH).$course_info['path'].'/index.php', api_get_path(WEB_COURSE_PATH).$course_info['path'].'/index.php',
[ [
'class' => 'btn btn-default btn-sm', 'class' => 'btn btn-default btn-sm',
@ -4819,7 +4819,7 @@ class CourseManager
if ($access_link && in_array('unsubscribe', $access_link)) { if ($access_link && in_array('unsubscribe', $access_link)) {
$my_course['unsubscribe_button'] = Display::url( $my_course['unsubscribe_button'] = Display::url(
get_lang('Unsubscribe').' '. get_lang('Unsubscribe').' '.
Display::returnFontAwesomeIcon('sign-out'), Display::getMdiIcon('logout'),
api_get_path(WEB_CODE_PATH).'auth/courses.php?action=unsubscribe&unsubscribe='.$courseCode api_get_path(WEB_CODE_PATH).'auth/courses.php?action=unsubscribe&unsubscribe='.$courseCode
.'&sec_token='.$stok.'&category_code='.$categoryCode, .'&sec_token='.$stok.'&category_code='.$categoryCode,
[ [
@ -6137,7 +6137,7 @@ class CourseManager
} else { } else {
$params['right_actions'] .= $params['right_actions'] .=
'<a class="btn btn-default btn-sm" title="'.get_lang('Edit').'" href="'.api_get_path(WEB_CODE_PATH).'course_info/infocours.php?cid='.$course['real_id'].'">'. '<a class="btn btn-default btn-sm" title="'.get_lang('Edit').'" href="'.api_get_path(WEB_CODE_PATH).'course_info/infocours.php?cid='.$course['real_id'].'">'.
Display::returnFontAwesomeIcon('pencil').'</a>'; Display::getMdiIcon('pencil').'</a>';
} }
} else { } else {
if (Course::CLOSED != $course_info['visibility']) { if (Course::CLOSED != $course_info['visibility']) {
@ -6155,7 +6155,7 @@ class CourseManager
if (COURSEMANAGER == $course_info['status']) { if (COURSEMANAGER == $course_info['status']) {
$params['right_actions'] .= '<a $params['right_actions'] .= '<a
class="btn btn-default btn-sm" title="'.get_lang('Edit').'" href="'.api_get_path(WEB_CODE_PATH).'course_info/infocours.php?cid='.$course['real_id'].'">'. class="btn btn-default btn-sm" title="'.get_lang('Edit').'" href="'.api_get_path(WEB_CODE_PATH).'course_info/infocours.php?cid='.$course['real_id'].'">'.
Display::returnFontAwesomeIcon('pencil').'</a>'; Display::getMdiIcon('pencil').'</a>';
} }
} }
} }
@ -6358,7 +6358,7 @@ class CourseManager
} }
return Display::url( return Display::url(
Display::returnFontAwesomeIcon('info-circle', 'lg'), Display::getMdiIcon('information'),
$url, $url,
[ [
'class' => "$class btn btn-default btn-sm", 'class' => "$class btn btn-default btn-sm",
@ -6511,7 +6511,7 @@ class CourseManager
public static function getUrlMarker($courseId) public static function getUrlMarker($courseId)
{ {
if (UrlManager::getCountAccessUrlFromCourse($courseId) > 1) { if (UrlManager::getCountAccessUrlFromCourse($courseId) > 1) {
return '&nbsp;'.Display::returnFontAwesomeIcon( return '&nbsp;'.Display::getMdiIcon(
'link', 'link',
null, null,
null, null,

@ -54,7 +54,7 @@ $template->assign('navigator_is_firefox', $navigator['name'] == 'Mozilla');
$tpl = $template->get_template('chat/video.tpl'); $tpl = $template->get_template('chat/video.tpl');
$content = $template->fetch($tpl); $content = $template->fetch($tpl);
$templateHeader = Display::returnFontAwesomeIcon('video-camera', 'lg', true) $templateHeader = Display::getMdiIcon('video')
. $chatVideo->getRoomName(); . $chatVideo->getRoomName();
$template->assign('header', $templateHeader); $template->assign('header', $templateHeader);

@ -1182,7 +1182,7 @@ class MessageManager
// get file attachments by message id // get file attachments by message id
$list = []; $list = [];
if ($files) { if ($files) {
$attachIcon = Display::returnFontAwesomeIcon('paperclip'); $attachIcon = Display::getMdiIcon('paperclip');
$repo = Container::getMessageAttachmentRepository(); $repo = Container::getMessageAttachmentRepository();
foreach ($files as $file) { foreach ($files as $file) {
$size = format_file_size($file->getSize()); $size = format_file_size($file->getSize());
@ -1700,7 +1700,7 @@ class MessageManager
$btnLike = Display::button( $btnLike = Display::button(
'like', 'like',
Display::returnFontAwesomeIcon('thumbs-up', '', true) Display::getMdiIcon('thumb-up')
.PHP_EOL.'<span>'.$countLikes['likes'].'</span>', .PHP_EOL.'<span>'.$countLikes['likes'].'</span>',
[ [
'title' => get_lang('Like'), 'title' => get_lang('Like'),
@ -1717,7 +1717,7 @@ class MessageManager
$btnDislike = Display::button( $btnDislike = Display::button(
'like', 'like',
Display::returnFontAwesomeIcon('thumbs-down', '', true) Display::getMdiIcon('thumb-down')
.PHP_EOL.'<span>'.$countLikes['dislikes'].'</span>', .PHP_EOL.'<span>'.$countLikes['dislikes'].'</span>',
[ [
'title' => get_lang('Dislike'), 'title' => get_lang('Dislike'),

@ -2012,7 +2012,7 @@ class SocialManager extends UserManager
if ($canEdit) { if ($canEdit) {
$htmlDelete = Display::url( $htmlDelete = Display::url(
Display::returnFontAwesomeIcon('trash', '', true), Display::getMdiIcon('delete'),
'javascript:void(0)', 'javascript:void(0)',
[ [
'id' => 'message_'.$message['id'], 'id' => 'message_'.$message['id'],

@ -153,7 +153,7 @@ if (0 == count($nosessionUsersList)) {
$social_right_content .= Display::return_message(get_lang('You already invite all your contacts'), 'info'); $social_right_content .= Display::return_message(get_lang('You already invite all your contacts'), 'info');
} }
$social_right_content .= '<div>'; $social_right_content .= '<div>';
$social_right_content .= '<a href="search.php" class="btn btn-default btn-sm">'.Display::returnFontAwesomeIcon('search').' '.get_lang('Try and find some friends').'</a>'; $social_right_content .= '<a href="search.php" class="btn btn-default btn-sm">'.Display::getMdiIcon('magnify').' '.get_lang('Try and find some friends').'</a>';
$social_right_content .= '</div>'; $social_right_content .= '</div>';
$social_right_content .= '<br />'; $social_right_content .= '<br />';
} }

@ -193,7 +193,7 @@ if ($is_group_member || GROUP_PERMISSION_OPEN == $groupInfo['visibility']) {
$social_right_content .= '<a $social_right_content .= '<a
class="btn btn-default btn-sm" class="btn btn-default btn-sm"
href="group_view.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'. href="group_view.php?id='.$group_id.'&action=join&u='.api_get_user_id().'">'.
Display::returnFontAwesomeIcon('envelope').' '. Display::getMdiIcon('email').' '.
get_lang('You have been invited to join now').'</a>'; get_lang('You have been invited to join now').'</a>';
} }
$social_right_content .= '</div>'; $social_right_content .= '</div>';
@ -211,7 +211,7 @@ if ($is_group_member || GROUP_PERMISSION_OPEN == $groupInfo['visibility']) {
'action' => 'add_message_group', 'action' => 'add_message_group',
]); ]);
$create_thread_link = Display::url( $create_thread_link = Display::url(
Display::returnFontAwesomeIcon('commenting').' '. Display::getMdiIcon('comment-text').' '.
get_lang('You should create a topic'), get_lang('You should create a topic'),
$createThreadUrl, $createThreadUrl,
[ [
@ -231,7 +231,7 @@ if ($is_group_member || GROUP_PERMISSION_OPEN == $groupInfo['visibility']) {
'action' => 'add_message_group', 'action' => 'add_message_group',
]); ]);
$create_thread_link = Display::url( $create_thread_link = Display::url(
Display::returnFontAwesomeIcon('commenting').' '. Display::getMdiIcon('comment-text').' '.
get_lang('Create thread'), get_lang('Create thread'),
$createThreadUrl, $createThreadUrl,
[ [
@ -259,7 +259,7 @@ if ($is_group_member || GROUP_PERMISSION_OPEN == $groupInfo['visibility']) {
$member_content .= '<div class="group-tool">'; $member_content .= '<div class="group-tool">';
$member_content .= '<div class="pull-right">'; $member_content .= '<div class="pull-right">';
$member_content .= Display::url( $member_content .= Display::url(
Display::returnFontAwesomeIcon('pencil').' '.get_lang('Edit members list'), Display::getMdiIcon('pencil').' '.get_lang('Edit members list'),
'group_members.php?id='.$group_id, 'group_members.php?id='.$group_id,
['class' => 'btn btn-default btn-sm', 'title' => get_lang('Edit members list')] ['class' => 'btn btn-default btn-sm', 'title' => get_lang('Edit members list')]
); );

@ -104,7 +104,7 @@ if (is_array($results) && count($results) > 0) {
); );
$result['picture'] = '<img class="social-groups-image" src="'.$picture.'" />'; $result['picture'] = '<img class="social-groups-image" src="'.$picture.'" />';
$members = Display::returnFontAwesomeIcon('user').$count_users_group; $members = Display::getMdiIcon('account').$count_users_group;
$html = '<div class="row">'; $html = '<div class="row">';
$html .= '<div class="col-md-2">'; $html .= '<div class="col-md-2">';
$html .= $result['picture']; $html .= $result['picture'];
@ -156,7 +156,7 @@ foreach ($results as $result) {
$picture = $usergroup->get_picture_group($result['id'], $result['picture'], 80); $picture = $usergroup->get_picture_group($result['id'], $result['picture'], 80);
$result['picture'] = '<img class="social-groups-image" src="'.$picture.'" />'; $result['picture'] = '<img class="social-groups-image" src="'.$picture.'" />';
$members = Display::returnFontAwesomeIcon('user').$count_users_group; $members = Display::getMdiIcon('account').$count_users_group;
$html = '<div class="row">'; $html = '<div class="row">';
$html .= '<div class="col-md-2">'; $html .= '<div class="col-md-2">';

@ -161,7 +161,7 @@ foreach ($sentInvitations as $row) {
$link = SurveyUtil::generateFillSurveyLink($survey, $code, $course, $sessionId); $link = SurveyUtil::generateFillSurveyLink($survey, $code, $course, $sessionId);
$link = Display::input('text', 'copy_'.$id, $link, ['id' => 'copy_'.$id, 'class' => '']); $link = Display::input('text', 'copy_'.$id, $link, ['id' => 'copy_'.$id, 'class' => '']);
$link .= ' '.Display::url( $link .= ' '.Display::url(
Display::returnFontAwesomeIcon('copy').get_lang('Copy text'), Display::getMdiIcon('content-copy').get_lang('Copy text'),
'javascript:void()', 'javascript:void()',
['onclick' => "copyTextToClipBoard('copy_".$id."')", 'class' => 'btn btn-primary btn-sm'] ['onclick' => "copyTextToClipBoard('copy_".$id."')", 'class' => 'btn btn-primary btn-sm']
); );
@ -189,7 +189,7 @@ foreach ($sentInvitations as $row) {
$link = SurveyUtil::generateFillSurveyLink($survey, $code, $course, $sessionId); $link = SurveyUtil::generateFillSurveyLink($survey, $code, $course, $sessionId);
$link = Display::input('text', 'copy_'.$id, $link, ['id' => 'copy_'.$id, 'class' => '']); $link = Display::input('text', 'copy_'.$id, $link, ['id' => 'copy_'.$id, 'class' => '']);
$link .= ' '.Display::url( $link .= ' '.Display::url(
Display::returnFontAwesomeIcon('copy').get_lang('Copy text'), Display::getMdiIcon('content-copy').get_lang('Copy text'),
'javascript:void()', 'javascript:void()',
['onclick' => "copyTextToClipBoard('copy_".$id."')", 'class' => 'btn btn-primary btn-sm'] ['onclick' => "copyTextToClipBoard('copy_".$id."')", 'class' => 'btn btn-primary btn-sm']
); );

@ -44,10 +44,10 @@ $(function() {
function display_advanced_search_form () { function display_advanced_search_form () {
if ($("#advanced_search_form").css("display") == "none") { if ($("#advanced_search_form").css("display") == "none") {
$("#advanced_search_form").css("display","block"); $("#advanced_search_form").css("display","block");
$("#img_plus_and_minus").html(\'&nbsp;'.Display::returnFontAwesomeIcon('arrow-down').' '.get_lang('Advanced search').'\'); $("#img_plus_and_minus").html(\'&nbsp;'.Display::getMdiIcon('arrow-down-bold').' '.get_lang('Advanced search').'\');
} else { } else {
$("#advanced_search_form").css("display","none"); $("#advanced_search_form").css("display","none");
$("#img_plus_and_minus").html(\'&nbsp;'.Display::returnFontAwesomeIcon('arrow-right').' '.get_lang('Advanced search').'\'); $("#img_plus_and_minus").html(\'&nbsp;'.Display::getMdiIcon('arrow-right-bold').' '.get_lang('Advanced search').'\');
} }
} }
</script>'; </script>';
@ -221,7 +221,7 @@ if (!empty($projectId)) {
$advancedSearch = Display::url( $advancedSearch = Display::url(
'<span id="img_plus_and_minus">&nbsp;'. '<span id="img_plus_and_minus">&nbsp;'.
Display::returnFontAwesomeIcon('arrow-right').' '.get_lang('Advanced search'), Display::getMdiIcon('arrow-right-bold').' '.get_lang('Advanced search'),
'javascript://', 'javascript://',
[ [
'class' => 'btn btn-default advanced-parameters', 'class' => 'btn btn-default advanced-parameters',

@ -581,7 +581,7 @@ if ($nbStudents > 0) {
]; ];
$el = $form->addSelect( $el = $form->addSelect(
'since', 'since',
Display::returnFontAwesomeIcon('warning').get_lang('Remind learners inactive since'), Display::getMdiIcon('alert').get_lang('Remind learners inactive since'),
$options, $options,
['disable_js' => true, 'class' => 'col-sm-3'] ['disable_js' => true, 'class' => 'col-sm-3']
); );

@ -1310,7 +1310,7 @@ function getWorkListStudent(
if (null !== $count && !empty($count)) { if (null !== $count && !empty($count)) {
$urlView = api_get_path(WEB_CODE_PATH).'work/view.php?id='.$lastWork['iid'].'&'.api_get_cidreq(); $urlView = api_get_path(WEB_CODE_PATH).'work/view.php?id='.$lastWork['iid'].'&'.api_get_cidreq();
$feedback = '&nbsp;'.Display::url( $feedback = '&nbsp;'.Display::url(
Display::returnFontAwesomeIcon('comments-o'), Display::getMdiIcon('comment-multiple-outline'),
$urlView, $urlView,
['title' => get_lang('View')] ['title' => get_lang('View')]
); );
@ -1515,7 +1515,7 @@ function getAllWorkListStudent(
$urlView = api_get_path(WEB_CODE_PATH).'work/view.php?id='.$lastWork['iid'].'&'.$cidReq; $urlView = api_get_path(WEB_CODE_PATH).'work/view.php?id='.$lastWork['iid'].'&'.$cidReq;
$feedback = '&nbsp;'.Display::url( $feedback = '&nbsp;'.Display::url(
Display::returnFontAwesomeIcon('comments-o'), Display::getMdiIcon('comment-outline'),
$urlView, $urlView,
['title' => get_lang('View')] ['title' => get_lang('View')]
); );
@ -2173,7 +2173,7 @@ function get_work_user_list(
$blockEdition = api_get_configuration_value('block_student_publication_edition'); $blockEdition = api_get_configuration_value('block_student_publication_edition');
$blockScoreEdition = api_get_configuration_value('block_student_publication_score_edition'); $blockScoreEdition = api_get_configuration_value('block_student_publication_score_edition');
$loading = Display::returnFontAwesomeIcon('spinner', null, true, 'fa-spin'); $loading = Display::getMdiIcon('loading', 'animate-spin');
$router = Container::getRouter(); $router = Container::getRouter();
$studentDeleteOwnPublication = api_get_course_setting('student_delete_own_publication'); $studentDeleteOwnPublication = api_get_course_setting('student_delete_own_publication');
/** @var CStudentPublication $assignment */ /** @var CStudentPublication $assignment */
@ -2271,7 +2271,7 @@ function get_work_user_list(
$feedback .= ' '; $feedback .= ' ';
} }
$feedback .= Display::url( $feedback .= Display::url(
$count.' '.Display::returnFontAwesomeIcon('comments-o'), $count.' '.Display::getMdiIcon('comment-multiple-outline'),
$url.'view.php?'.api_get_cidreq().'&id='.$item_id $url.'view.php?'.api_get_cidreq().'&id='.$item_id
); );
} }
@ -2704,7 +2704,7 @@ function getAllWork(
$parentList = []; $parentList = [];
$blockEdition = api_get_configuration_value('block_student_publication_edition'); $blockEdition = api_get_configuration_value('block_student_publication_edition');
$blockScoreEdition = api_get_configuration_value('block_student_publication_score_edition'); $blockScoreEdition = api_get_configuration_value('block_student_publication_score_edition');
$loading = Display::returnFontAwesomeIcon('spinner', null, true, 'fa-spin'); $loading = Display::getMdiIcon('loading', 'animate-spin');
$qualification_exists = true; $qualification_exists = true;
$repo = Container::getStudentPublicationRepository(); $repo = Container::getStudentPublicationRepository();
while ($work = Database::fetch_array($result, 'ASSOC')) { while ($work = Database::fetch_array($result, 'ASSOC')) {
@ -2805,7 +2805,7 @@ function getAllWork(
$feedback .= ' '; $feedback .= ' ';
} }
$feedback .= Display::url( $feedback .= Display::url(
$count.' '.Display::returnFontAwesomeIcon('comments-o'), $count.' '.Display::getMdiIcon('comment-multiple-outline'),
$url.'view.php?'.$cidReq.'&id='.$item_id $url.'view.php?'.$cidReq.'&id='.$item_id
); );
} }

@ -71,8 +71,8 @@ $onlyOnePublication = api_get_configuration_value('allow_only_one_student_public
if (api_is_allowed_to_session_edit(false, true) && !empty($workId) && !api_is_invitee()) { if (api_is_allowed_to_session_edit(false, true) && !empty($workId) && !api_is_invitee()) {
$url = api_get_path(WEB_CODE_PATH).'work/upload.php?'.api_get_cidreq().'&id='.$workId; $url = api_get_path(WEB_CODE_PATH).'work/upload.php?'.api_get_cidreq().'&id='.$workId;
$actionsRight = Display::url( $actionsRight = Display::url(
Display::returnFontAwesomeIcon( Display::getMdiIcon(
' fa-upload' ' file-upload'
). ).
get_lang('Upload my assignment'), get_lang('Upload my assignment'),
$url, $url,

@ -358,7 +358,7 @@ class BuyCoursesPlugin extends Plugin
$productType = (int) $productType; $productType = (int) $productType;
$url = api_get_path(WEB_PLUGIN_PATH).'buycourses/src/process.php?i='.$productId.'&t='.$productType; $url = api_get_path(WEB_PLUGIN_PATH).'buycourses/src/process.php?i='.$productId.'&t='.$productType;
$html = '<a class="btn btn-success btn-sm" title="'.$this->get_lang('Buy').'" href="'.$url.'">'. $html = '<a class="btn btn-success btn-sm" title="'.$this->get_lang('Buy').'" href="'.$url.'">'.
Display::returnFontAwesomeIcon('shopping-cart').'</a>'; Display::getMdiIcon('cart').'</a>';
return $html; return $html;
} }

@ -150,7 +150,7 @@ $templateName = $plugin->get_lang('SalesReport');
$template = new Template($templateName); $template = new Template($templateName);
$toolbar = Display::url( $toolbar = Display::url(
Display::returnFontAwesomeIcon('file-excel-o'). Display::getMdiIcon('file-excel-outline').
get_lang('GenerateReport'), get_lang('GenerateReport'),
api_get_path(WEB_PLUGIN_PATH).'buycourses/src/export_report.php', api_get_path(WEB_PLUGIN_PATH).'buycourses/src/export_report.php',
['class' => 'btn btn-primary'] ['class' => 'btn btn-primary']

@ -62,26 +62,26 @@ foreach ($instances as $instance) {
if ($instance->visible) { if ($instance->visible) {
$status = '<a href="'.$thisurl.'?what=disableinstances&vids[]='.$instance->id.'" > $status = '<a href="'.$thisurl.'?what=disableinstances&vids[]='.$instance->id.'" >
'.Display::returnFontAwesomeIcon('toggle-on', 2).'</a>'; '.Display::getMdiIcon('toggle-switch').'</a>';
} else { } else {
$status = '<a href="'.$thisurl.'?what=enableinstances&vids[]='.$instance->id.'" > $status = '<a href="'.$thisurl.'?what=enableinstances&vids[]='.$instance->id.'" >
'.Display::returnFontAwesomeIcon('toggle-off', 2).'</a>'; '.Display::getMdiIcon('toggle-switch-off').'</a>';
} }
$cmd = '&nbsp;<a href="'.$thisurl.'?what=editinstance&vid='.$instance->id.'" title="'.$plugin->get_lang('edit').'"> $cmd = '&nbsp;<a href="'.$thisurl.'?what=editinstance&vid='.$instance->id.'" title="'.$plugin->get_lang('edit').'">
'.Display::returnFontAwesomeIcon('pencil', 2).'</a>'; '.Display::getMdiIcon('pencil').'</a>';
$cmd .= '&nbsp;<a href="'.$thisurl.'?what=snapshotinstance&vid='.$instance->id.'" title="'.$plugin->get_lang('snapshotinstance').'"> $cmd .= '&nbsp;<a href="'.$thisurl.'?what=snapshotinstance&vid='.$instance->id.'" title="'.$plugin->get_lang('snapshotinstance').'">
'.Display::returnFontAwesomeIcon('camera', 2).'</a>'; '.Display::getMdiIcon('camera').'</a>';
$cmd .= '<a href="'.$thisurl.'?what=upgrade&vids[]='.$instance->id.'" title="'.$plugin->get_lang('Upgrade Chamilo').'"> $cmd .= '<a href="'.$thisurl.'?what=upgrade&vids[]='.$instance->id.'" title="'.$plugin->get_lang('Upgrade Chamilo').'">
&nbsp;'.Display::returnFontAwesomeIcon('wrench', 2).' </a>'; &nbsp;'.Display::getMdiIcon('hammer-wrench').' </a>';
if (!$instance->visible) { if (!$instance->visible) {
$cmd .= '<a onclick="javascript:if(!confirm(\''.get_lang('Are you sure you want to delete').'\')) return false;" href="'.$thisurl.'?what=fulldeleteinstances&vids[]='.$instance->id.'" title="'.$plugin->get_lang('destroyinstances').'"> $cmd .= '<a onclick="javascript:if(!confirm(\''.get_lang('Are you sure you want to delete').'\')) return false;" href="'.$thisurl.'?what=fulldeleteinstances&vids[]='.$instance->id.'" title="'.$plugin->get_lang('destroyinstances').'">
&nbsp;'.Display::returnFontAwesomeIcon('remove', 2).' </a>'; &nbsp;'.Display::getMdiIcon('delete').' </a>';
} else { } else {
$cmd .= '<a onclick="javascript:if(!confirm(\''.get_lang('Are you sure you want to delete').'\')) return false;" href="'.$thisurl.'?what=deleteinstances&vids[]='.$instance->id.'" title="'.$plugin->get_lang('deleteinstances').'"> $cmd .= '<a onclick="javascript:if(!confirm(\''.get_lang('Are you sure you want to delete').'\')) return false;" href="'.$thisurl.'?what=deleteinstances&vids[]='.$instance->id.'" title="'.$plugin->get_lang('deleteinstances').'">
&nbsp;'.Display::returnFontAwesomeIcon('remove', 2).' </a>'; &nbsp;'.Display::getMdiIcon('delete').' </a>';
} }
$crondate = $instance->lastcron ? date('r', $instance->lastcron) : ''; $crondate = $instance->lastcron ? date('r', $instance->lastcron) : '';

Loading…
Cancel
Save