Display: Update icons in learning path and tracking tools - refs BT#20895

pull/4988/head
Yannick Warnier 1 year ago
parent 0e0dbbe7cb
commit 410a0551c1
  1. 113
      public/main/inc/lib/tracking.lib.php
  2. 83
      public/main/lp/learnpath.class.php
  3. 2
      public/main/lp/lp_add_author.php
  4. 7
      public/main/lp/lp_add_category.php
  5. 34
      public/main/lp/lp_report.php
  6. 5
      public/main/lp/my_list.php

@ -405,9 +405,7 @@ class Tracking
$extend_link = '';
if (!empty($inter_num)) {
$extend_link = Display::url(
Display::return_icon(
'visible.png',
get_lang('Hide attempt view')
Display::getMdiIcon('eye', 'ch-tool-icon', null, 22, get_lang('Hide attempt view')
),
api_get_self().'?action=stats&fold_id='.$my_item_id.$url_suffix
);
@ -478,13 +476,13 @@ class Tracking
// The extend button for this attempt has been clicked.
$extend_this_attempt = 1;
$extend_attempt_link = Display::url(
Display::return_icon('visible.png', get_lang('Hide attempt view')),
Display::getMdiIcon('eye', 'ch-tool-icon', null, 22, get_lang('Hide attempt view')),
api_get_self().'?action=stats&extend_id='.$my_item_id.'&fold_attempt_id='.$row['iv_id'].$url_suffix
);
if ($accessToPdfExport) {
$extend_attempt_link .= ' '.
Display::url(
Display::return_icon('pdf.png', get_lang('Export to PDF')),
Display::getMdiIcon('file-pdf-box', 'ch-tool-icon', null, 22, get_lang('Export to PDF')),
api_get_self().'?action=export_stats&extend_id='.$my_item_id.'&extend_attempt_id='.$row['iv_id'].$url_suffix,
['class' => 'export']
);
@ -492,13 +490,13 @@ class Tracking
} else { // Same case if fold_attempt_id is set, so not implemented explicitly.
// The extend button for this attempt has not been clicked.
$extend_attempt_link = Display::url(
Display::return_icon('invisible.png', get_lang('Extend attempt view')),
Display::getMdiIcon('eye-off', 'ch-tool-icon', null, 22, get_lang('Extend attempt view')),
api_get_self().'?action=stats&extend_id='.$my_item_id.'&extend_attempt_id='.$row['iv_id'].$url_suffix
);
if ($accessToPdfExport) {
$extend_attempt_link .= ' '.
Display::url(
Display::return_icon('pdf.png', get_lang('Export to PDF')),
Display::getMdiIcon('file-pdf-box', 'ch-tool-icon', null, 22, get_lang('Export to PDF')),
api_get_self().'?action=export_stats&extend_id='.$my_item_id.'&extend_attempt_id='.$row['iv_id'].$url_suffix,
['class' => 'export']
);
@ -553,9 +551,7 @@ class Tracking
if ('dir' !== $row['item_type']) {
if (!$is_allowed_to_edit && $result_disabled_ext_all) {
$view_score = Display::return_icon(
'invisible.png',
get_lang('Results hidden by the exercise setting')
$view_score = Display::getMdiIcon('eye-off', 'ch-tool-icon', null, 22, get_lang('Results hidden by the exercise setting')
);
} else {
switch ($row['item_type']) {
@ -716,14 +712,14 @@ class Tracking
// The extend button for this attempt has been clicked.
$extend_this_attempt = 1;
$extend_attempt_link = Display::url(
Display::return_icon('visible.png', get_lang('Hide attempt view')),
Display::getMdiIcon('eye', 'ch-tool-icon', null, 22, get_lang('Hide attempt view')),
api_get_self().'?action=stats&extend_id='.$my_item_id.'&fold_attempt_id='.$row['iv_id'].$url_suffix
);
} else {
// Same case if fold_attempt_id is set, so not implemented explicitly.
// The extend button for this attempt has not been clicked.
// The "Extend" button for this attempt has not been clicked.
$extend_attempt_link = Display::url(
Display::return_icon('invisible.png', get_lang('Extend attempt view')),
Display::getMdiIcon('eye-off', 'ch-tool-icon', null, 22, get_lang('Extend attempt view')),
api_get_self().'?action=stats&extend_id='.$my_item_id.'&extend_attempt_id='.$row['iv_id'].$url_suffix
);
}
@ -737,7 +733,7 @@ class Tracking
$extend_link = '';
if ($inter_num > 1) {
$extend_link = Display::url(
Display::return_icon('invisible.png', get_lang('Extend attempt view')),
Display::getMdiIcon('eye-off', 'ch-tool-icon', null, 22, get_lang('Extend attempt view')),
api_get_self().'?action=stats&extend_id='.$my_item_id.'&extend_attempt_id='.$row['iv_id'].$url_suffix
);
}
@ -958,9 +954,7 @@ class Tracking
$scoreItem = null;
if ('quiz' === $row['item_type']) {
if (!$is_allowed_to_edit && $result_disabled_ext_all) {
$scoreItem .= Display::return_icon(
'invisible.png',
get_lang('Results hidden by the exercise setting')
$scoreItem .= Display::getMdiIcon('eye-off', 'ch-tool-icon', null, 22, get_lang('Results hidden by the exercise setting')
);
} else {
$scoreItem .= ExerciseLib::show_score($score, $maxscore, false);
@ -1247,7 +1241,7 @@ class Tracking
$total_time = str_replace('NaN', '00'.$h.'00\'00"', $total_time);
if (!$is_allowed_to_edit && $result_disabled_ext_all) {
$final_score = Display::return_icon('invisible.png', get_lang('Results hidden by the exercise setting'));
$final_score = Display::getMdiIcon('eye-off', 'ch-tool-icon', null, 22, get_lang('Results hidden by the exercise setting'));
$finalScoreToCsv = get_lang('Results hidden by the exercise setting');
} else {
if (is_numeric($total_score)) {
@ -4647,11 +4641,12 @@ class Tracking
if ($show_courses) {
if (!empty($courses)) {
$html .= Display::page_subheader(
Display::return_icon(
'course.png',
get_lang('My courses'),
[],
ICON_SIZE_SMALL
Display::getMdiIcon(
'book-open-page-variant',
'ch-tool-icon',
null,
22,
get_lang('My courses')
).' '.get_lang('My courses')
);
@ -4780,11 +4775,11 @@ class Tracking
empty($_GET['session_id'])
) {
$detailsLink .= '<a href="#course_session_header">';
$detailsLink .= Display::return_icon('2rightarrow_na.png', get_lang('Details'));
$detailsLink .= Display::getMdiIcon('fast-forward-outline', 'ch-tool-icon', null, 22, get_lang('Details'));
$detailsLink .= '</a>';
} else {
$detailsLink .= '<a href="'.api_get_self().'?course='.$courseCode.$extra_params.'#course_session_header">';
$detailsLink .= Display::return_icon('2rightarrow.png', get_lang('Details'));
$detailsLink .= Display::getMdiIcon('fast-forward-outline', 'ch-tool-icon', null, 22, get_lang('Details'));
$detailsLink .= '</a>';
}
@ -4921,12 +4916,7 @@ class Tracking
);
}
$sessionIcon = Display::return_icon(
'session.png',
get_lang('Course sessions'),
[],
ICON_SIZE_SMALL
);
$sessionIcon = Display::getMdiIcon('google-classroom', 'ch-tool-icon', null, 22, get_lang('Course sessions'));
$anchor = Display::url('', '', ['name' => 'course_session_header']);
$html .= $anchor.Display::page_subheader(
@ -5022,18 +5012,13 @@ class Tracking
if (isset($_GET['session_id']) && $my_session_id == $_GET['session_id']) {
$icon = Display::url(
Display::return_icon(
'2rightarrow_na.png',
get_lang('Details')
Display::getMdiIcon('fast-forward-outline', 'ch-tool-icon', null, 22, get_lang('Details')
),
api_get_self().'?session_id='.$my_session_id.'#course_session_list'
);
} else {
$icon = Display::url(
Display::return_icon(
'2rightarrow.png',
get_lang('Details')
),
Display::getMdiIcon('fast-forward-outline', 'ch-tool-icon', null, 22, get_lang('Details')),
api_get_self().'?session_id='.$my_session_id.'#course_session_list'
);
}
@ -5251,16 +5236,14 @@ class Tracking
$_GET['session_id'] == $session_id_from_get
) {
$details = Display::url(
Display::return_icon('2rightarrow_na.png', get_lang('Details')),
Display::getMdiIcon('fast-forward-outline', 'ch-tool-icon', null, 22, get_lang('Details')),
'#course_session_data'
);
} else {
$url = api_get_self().
'?course='.$course_code.'&session_id='.$session_id_from_get.$extra_params.'#course_session_data';
$details = Display::url(
Display::return_icon(
'2rightarrow.png',
get_lang('Details')
Display::getMdiIcon('fast-forward-outline', 'ch-tool-icon', null, 22, get_lang('Details')
),
$url
);
@ -8801,7 +8784,7 @@ class TrackingCourseLog
$url = $urlBase.'&student='.$user['user_id'];
$user['link'] = '<center><a href="'.$url.'">
'.Display::return_icon('2rightarrow.png', get_lang('Details')).'
'.Display::getMdiIcon('fast-forward-outline', 'ch-tool-icon', null, 32, get_lang('Details')).'
</a></center>';
// store columns in array $users
@ -9015,7 +8998,7 @@ class TrackingCourseLog
<center>
<a
href="../my_space/myStudents.php?student='.$user['user_id'].'&details=true&cid='.$courseId.'&origin=tracking_course&sid='.$sessionId.'">
'.Display::return_icon('2rightarrow.png', get_lang('Details')).'
'.Display::getMdiIcon('fast-forward-outline', 'ch-tool-icon', null, 22, get_lang('Details')).'
</a>
</center>';
@ -9047,37 +9030,37 @@ class TrackingCourseLog
public static function actionsLeft($current, $sessionId = 0, $addWrapper = true)
{
$usersLink = Display::url(
Display::return_icon('user.png', get_lang('Report on learners'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon('account', 'ch-tool-icon', null, 32, get_lang('Report on learners')),
'courseLog.php?'.api_get_cidreq(true, false)
);
$groupsLink = Display::url(
Display::return_icon('group.png', get_lang('Group reporting'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon('account-group', 'ch-tool-icon', null, 32, get_lang('Group reporting')),
'course_log_groups.php?'.api_get_cidreq()
);
$resourcesLink = '';
/*$resourcesLink = Display::url(
Display::return_icon('tools.png', get_lang('Report on resource'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon('chart-box', 'ch-tool-icon', null, 32, get_lang('Report on resource')),
'course_log_resources.php?'.api_get_cidreq(true, false)
);*/
$courseLink = Display::url(
Display::return_icon('course.png', get_lang('Course report'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon('book-open-page-variant ', 'ch-tool-icon', null, 32, get_lang('Course report')),
'course_log_tools.php?'.api_get_cidreq(true, false)
);
$examLink = Display::url(
Display::return_icon('quiz.png', get_lang('Exam tracking'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon('chart-box', 'ch-tool-icon', null, 32, get_lang('Exam tracking')),
api_get_path(WEB_CODE_PATH).'tracking/exams.php?'.api_get_cidreq()
);
$eventsLink = Display::url(
Display::return_icon('security.png', get_lang('Audit report'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon('security', 'ch-tool-icon', null, 32, get_lang('Audit report')),
api_get_path(WEB_CODE_PATH).'tracking/course_log_events.php?'.api_get_cidreq()
);
$lpLink = Display::url(
Display::return_icon('scorms.png', get_lang('CourseLPsGenericStats'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon('map-marker-path', 'ch-tool-icon', null, 32, get_lang('CourseLPsGenericStats')),
api_get_path(WEB_CODE_PATH).'tracking/lp_report.php?'.api_get_cidreq()
);
@ -9090,7 +9073,7 @@ class TrackingCourseLog
$checkExport = $attendance->getAttendanceLogin($startDate, $endDate);
if (false !== $checkExport) {
$attendanceLink = Display::url(
Display::return_icon('attendance_list.png', get_lang('Logins'), '', ICON_SIZE_MEDIUM),
Display::getMdiIcon('av-timer', 'ch-tool-icon', null, 32, get_lang('Logins')),
api_get_path(WEB_CODE_PATH).'attendance/index.php?'.api_get_cidreq().'&action=calendar_logins'
);
}
@ -9099,61 +9082,51 @@ class TrackingCourseLog
switch ($current) {
case 'users':
$usersLink = Display::url(
Display::return_icon(
'user_na.png',
get_lang('Report on learners'),
[],
ICON_SIZE_MEDIUM
),
Display::getMdiIcon('account', 'ch-tool-icon-disabled', null, 32, get_lang('Report on learners')),
'#'
);
break;
case 'groups':
$groupsLink = Display::url(
Display::return_icon('group_na.png', get_lang('Group reporting'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon('account-group', 'ch-tool-icon-disabled', null, 32, get_lang('Group reporting')),
'#'
);
break;
case 'courses':
$courseLink = Display::url(
Display::return_icon('course_na.png', get_lang('Course report'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon('book-open-page-variant', 'ch-tool-icon-disabled', null, 32, get_lang('Course report')),
'#'
);
break;
case 'resources':
$resourcesLink = Display::url(
Display::return_icon(
'tools_na.png',
get_lang('Report on resource'),
[],
ICON_SIZE_MEDIUM
),
Display::getMdiIcon('package-variant-closed', 'ch-tool-icon-disabled', null, 32, get_lang('Report on resource')),
'#'
);
break;
case 'exams':
$examLink = Display::url(
Display::return_icon('quiz_na.png', get_lang('Exam tracking'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon('order-bool-ascending-variant', 'ch-tool-icon-disabled', null, 32, get_lang('Exam tracking')),
'#'
);
break;
case 'logs':
$eventsLink = Display::url(
Display::return_icon('security_na.png', get_lang('Audit report'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon('security', 'ch-tool-icon-disabled', null, 32, get_lang('Audit report')),
'#'
);
break;
case 'attendance':
if (!empty($sessionId)) {
$attendanceLink = Display::url(
Display::return_icon('attendance_list.png', get_lang('Logins'), '', ICON_SIZE_MEDIUM),
Display::getMdiIcon('av-timer', 'ch-tool-icon-disabled', null, 32, get_lang('Logins')),
'#'
);
}
break;
case 'lp':
$lpLink = Display::url(
Display::return_icon('scorms_na.png', get_lang('CourseLPsGenericStats'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon('map-marker-path', 'ch-tool-icon-disabled', null, 32, get_lang('CourseLPsGenericStats')),
'#'
);
break;

@ -4825,12 +4825,7 @@ class learnpath
/*if ($backToBuild) {
$back = Display::url(
Display::return_icon(
'back.png',
get_lang('GoBack'),
'',
ICON_SIZE_MEDIUM
),
Display::getMdiIcon('arrow-left-bold-box', 'ch-tool-icon', null, 32, get_lang('GoBack')),
"lp_controller.php?action=add_item&type=step&lp_id=$lpId&".api_get_cidreq()
);
}*/
@ -4847,12 +4842,7 @@ class learnpath
);
/*$actionsLeft .= Display::url(
Display::return_icon(
'upload_audio.png',
get_lang('Add audio'),
'',
ICON_SIZE_MEDIUM
),
Display::getMdiIcon('music-note-plus', 'ch-tool-icon', null, 32, get_lang('Add audio')),
'lp_controller.php?'.api_get_cidreq().'&'.http_build_query([
'action' => 'admin_view',
'lp_id' => $lpId,
@ -4898,18 +4888,8 @@ class learnpath
if ($allowExpand) {
/*$actionsLeft .= Display::url(
Display::return_icon(
'expand.png',
get_lang('Expand'),
['id' => 'expand'],
ICON_SIZE_MEDIUM
).
Display::return_icon(
'contract.png',
get_lang('Collapse'),
['id' => 'contract', 'class' => 'hide'],
ICON_SIZE_MEDIUM
),
Display::getMdiIcon('arrow-expand-all', 'ch-tool-icon', null, 32, get_lang('Expand')).
Display::getMdiIcon('arrow-collapse-all', 'ch-tool-icon', null, 32, get_lang('Collapse')),
'#',
['role' => 'button', 'id' => 'hide_bar_template']
);*/
@ -5865,22 +5845,12 @@ class learnpath
if (TOOL_LP_FINAL_ITEM !== $itemType) {
$return .= Display::url(
Display::return_icon(
'edit.png',
get_lang('Edit'),
[],
ICON_SIZE_SMALL
),
Display::getMdiIcon('pencil', 'ch-tool-icon', null, 22, get_lang('Edit')),
$url.'&action=edit_item&path_item='.$path
);
/*$return .= Display::url(
Display::return_icon(
'move.png',
get_lang('Move'),
[],
ICON_SIZE_SMALL
),
Display::getMdiIcon('arrow-right-bold', 'ch-tool-icon', null, 22, get_lang('Move')),
$url.'&action=move_item'
);*/
}
@ -5888,22 +5858,12 @@ class learnpath
// Commented for now as prerequisites cannot be added to chapters.
if ('dir' !== $itemType) {
$return .= Display::url(
Display::return_icon(
'accept.png',
get_lang('Prerequisites'),
[],
ICON_SIZE_SMALL
),
Display::getMdiIcon('graph', 'ch-tool-icon', null, 22, get_lang('Prerequisites')),
$url.'&action=edit_item_prereq'
);
}
$return .= Display::url(
Display::return_icon(
'delete.png',
get_lang('Delete'),
[],
ICON_SIZE_SMALL
),
Display::getMdiIcon('delete', 'ch-tool-icon', null, 22, get_lang('Delete')),
$url.'&action=delete_item'
);
@ -6541,17 +6501,14 @@ class learnpath
$return = '<ul class="mt-2 bg-white list-group lp_resource">';
$return .= '<li class="list-group-item lp_resource_element disable_drag">';
$return .= Display::return_icon('new_exercice.png');
$return .= Display::getMdiIcon('order-bool-ascending-variant', 'ch-tool-icon', null, 32, get_lang('New test'));
$return .= '<a
href="'.api_get_path(WEB_CODE_PATH).'exercise/exercise_admin.php?'.api_get_cidreq().'&lp_id='.$this->lp_id.'">'.
get_lang('New test').'</a>';
$return .= '</li>';
$previewIcon = Display::return_icon(
'preview_view.png',
get_lang('Preview')
);
$quizIcon = Display::return_icon('quiz.png', '', [], ICON_SIZE_TINY);
$previewIcon = Display::getMdiIcon('magnify-plus-outline', 'ch-tool-icon', null, 22, get_lang('Preview'));
$quizIcon = Display::getMdiIcon('order-bool-ascending-variant', 'ch-tool-icon', null, 16, get_lang('Exercise'));
$moveIcon = Display::getMdiIcon('cursor-move', 'ch-tool-icon', '', 16, get_lang('Move'));
$exerciseUrl = api_get_path(WEB_CODE_PATH).'exercise/overview.php?'.api_get_cidreq();
foreach ($exercises as $exercise) {
@ -6652,7 +6609,7 @@ class learnpath
get_lang('Add a link').'
</a>
</li>';
$linkIcon = Display::return_icon('links.png', '', [], ICON_SIZE_TINY);
$linkIcon = Display::getMdiIcon('file-link', 'ch-tool-icon', null, 16, get_lang('Link'));
foreach ($categorizedLinks as $categoryId => $links) {
$linkNodes = null;
/** @var CLink $link */
@ -6660,7 +6617,7 @@ class learnpath
$title = $link->getTitle();
$id = $link->getIid();
$linkUrl = Display::url(
Display::return_icon('preview_view.png', get_lang('Preview')),
Display::getMdiIcon('magnify-plus-outline', 'ch-tool-icon', null, 22, get_lang('Preview')),
api_get_path(WEB_CODE_PATH).'link/link_goto.php?'.api_get_cidreq().'&link_id='.$key,
['target' => '_blank']
);
@ -6721,11 +6678,11 @@ class learnpath
$return .= '<li class="list-group-item lp_resource_element">';
$works = getWorkListTeacher(0, 100, null, null, null);
if (!empty($works)) {
$icon = Display::return_icon('works.png', '', [], ICON_SIZE_TINY);
$icon = Display::getMdiIcon('inbox-full', 'ch-tool-icon',null, 16, get_lang('Student publication'));
foreach ($works as $work) {
$workId = $work['iid'];
$link = Display::url(
Display::return_icon('preview_view.png', get_lang('Preview')),
Display::getMdiIcon('magnify-plus-outline', 'ch-tool-icon', null, 22, get_lang('Preview')),
api_get_path(WEB_CODE_PATH).'work/work_list_all.php?'.api_get_cidreq().'&id='.$workId,
['target' => '_blank']
);
@ -6803,7 +6760,7 @@ class learnpath
// First add link
$return .= '<li class="list-group-item lp_resource_element disable_drag">';
$return .= Display::return_icon('new_forum.png');
$return .= Display::getMdiIcon('comment-quote ', 'ch-tool-icon', null, 32, get_lang('Create a new forum'));
$return .= Display::url(
get_lang('Create a new forum'),
api_get_path(WEB_CODE_PATH).'forum/index.php?'.api_get_cidreq().'&'.http_build_query([
@ -6831,7 +6788,7 @@ class learnpath
$forumId = $forum->getIid();
$title = Security::remove_XSS($forum->getForumTitle());
$link = Display::url(
Display::return_icon('preview_view.png', get_lang('Preview')),
Display::getMdiIcon('magnify-plus-outline', 'ch-tool-icon', null, 22, get_lang('Preview')),
api_get_path(WEB_CODE_PATH).'forum/viewforum.php?'.api_get_cidreq().'&forum='.$forumId,
['target' => '_blank']
);
@ -6844,7 +6801,7 @@ class learnpath
$return .= '<a class="moved" href="#">';
$return .= $moveIcon;
$return .= ' </a>';
$return .= Display::return_icon('forum.png', '', [], ICON_SIZE_TINY);
$return .= Display::getMdiIcon('comment-quote', 'ch-tool-icon', null, 16, get_lang('Forum'));
$moveLink = Display::url(
$title.' '.$link,
@ -6873,7 +6830,7 @@ class learnpath
foreach ($threads as $thread) {
$threadId = $thread->getIid();
$link = Display::url(
Display::return_icon('preview_view.png', get_lang('Preview')),
Display::getMdiIcon('magnify-plus-outline', 'ch-tool-icon', null, 22, get_lang('Preview')),
api_get_path(WEB_CODE_PATH).
'forum/viewthread.php?'.api_get_cidreq().'&forum='.$forumId.'&thread='.$threadId,
['target' => '_blank']
@ -6887,7 +6844,7 @@ class learnpath
$return .= '&nbsp;<a class="moved" href="#">';
$return .= $moveIcon;
$return .= ' </a>';
$return .= Display::return_icon('forumthread.png', get_lang('Thread'), [], ICON_SIZE_TINY);
$return .= Display::getMdiIcon('format-quote-open', 'ch-tool-icon', null, 16, get_lang('Thread'));
$return .= '<a
class="moved link_with_id"
data-id="'.$threadId.'"

@ -133,7 +133,7 @@ foreach ($_SESSION['oLP']->items as $item) {
$form->addCheckBox(
"itemSelected[$itemId]",
null,
Display::return_icon('lp_document.png', $itemName).$itemName.$authorName
Display::getMdiIcon('bookshelf', 'ch-tool-icon', null, 22, get_lang('Document')).$itemName.$authorName
);
$default['itemSelected'][$itemId] = false;
}

@ -81,12 +81,7 @@ if ($form->validate()) {
Display::display_header(get_lang('Create new learning path'), 'Path');
$actions = '<a href="lp_controller.php?'.api_get_cidreq().'">'.
Display::return_icon(
'back.png',
get_lang('ReturnToLearning paths'),
'',
ICON_SIZE_MEDIUM
).
Display::getMdiIcon('arrow-left-bold-box', 'ch-tool-icon', null, 32, get_lang('ReturnToLearning paths')).
'</a>';
echo Display::toolbarAction('toolbar', [$actions]);

@ -306,7 +306,7 @@ if (!empty($users)) {
$userGroupList = '';
if (!empty($groups)) {
$groupsByUser = GroupManager::getAllGroupPerUserSubscription($userId, $courseId, $sessionId);
$icon = Display::return_icon('group.png', get_lang('Group'));
$icon = Display::getMdiIcon('account-group', 'ch-tool-icon', null, 22, get_lang('Group'));
if (!empty($groupsByUser)) {
$groupUrl = api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(true, false);
foreach ($groupsByUser as $group) {
@ -318,7 +318,7 @@ if (!empty($users)) {
$classesToString = '';
if ($allowUserGroups) {
$classes = $userGroup->getUserGroupListByUser($userId, Usergroup::NORMAL_CLASS);
$icon = Display::return_icon('class.png', get_lang('Class'));
$icon = Display::getMdiIcon('account-group', 'ch-tool-icon', null, 22, get_lang('Class'));
if (!empty($classes)) {
$classUrl = api_get_path(WEB_CODE_PATH).'user/class.php?'.api_get_cidreq(true, false);
foreach ($classes as $class) {
@ -342,16 +342,19 @@ if (!empty($users)) {
$row[] = "$lpProgress %";
$row[] = is_numeric($lpScore) ? "$lpScore%" : $lpScore;
$row[] = $lpLastConnection;
$actions = Display::url(Display::return_icon('statistics.png', get_lang('Reporting')), $trackingUrl).'&nbsp;';
$actions = Display::url(
Display::getMdiIcon('chart-box', 'ch-tool-icon', null, 32, get_lang('Reporting')),
$trackingUrl
).'&nbsp;';
$actions .= Display::url(
Display::return_icon('2rightarrow.png', get_lang('Details')),
Display::getMdiIcon('fast-forward-outline', 'ch-tool-icon', null, 32, get_lang('Details')),
'javascript:void(0);',
['data-id' => $userId, 'class' => 'details']
).'&nbsp;';
$actions .= Display::url(
Display::return_icon('clean.png', get_lang('Reset')),
Display::getMdiIcon('broom', 'ch-tool-icon', null, 32, get_lang('Reset')),
'javascript:void(0);',
['data-id' => $userId, 'data-username' => $userInfo['username'], 'class' => 'delete_attempt']
);
@ -396,34 +399,19 @@ $interbreadcrumb[] = [
];
$actions = Display::url(
Display::return_icon(
'back.png',
get_lang('Back'),
[],
ICON_SIZE_MEDIUM
),
Display::getMdiIcon('arrow-left-bold-box', 'ch-tool-icon', null, 32, get_lang('Back')),
api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?'.api_get_cidreq()
);
if (!empty($users)) {
$actions .= Display::url(
Display::return_icon(
'pdf.png',
get_lang('ExportToPdf'),
[],
ICON_SIZE_MEDIUM
),
Display::getMdiIcon('file-pdf-box', 'ch-tool-icon', null, 32, get_lang('ExportToPdf')),
$url.'&export=pdf'
);
$userListToString = array_column($userList, 'username');
$userListToString = implode(', ', $userListToString);
$actions .= Display::url(
Display::return_icon(
'clean.png',
get_lang('Clean'),
[],
ICON_SIZE_MEDIUM
),
Display::getMdiIcon('broom', 'ch-tool-icon', null, 32, get_lang('Clean')),
'javascript:void(0);',
['data-users' => $userListToString, 'class' => 'delete_all']
);

@ -70,10 +70,7 @@ if (!empty($courses)) {
$params = '&cid='.$course->getId().'&sid='.$sessionId;
$link = api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?action=view'.$params.'&lp_id='.$id;
$icon = Display::url(
Display::return_icon(
'learnpath.png',
get_lang('Lp')
),
Display::getMdiIcon('map-marker-path', 'ch-tool-icon', null, 22, get_lang('Lp')),
$link
);

Loading…
Cancel
Save