Fixing links to "My skills report"

Refs #2761
pull/2818/head
Angel Fernando Quiroz Campos 7 years ago
parent ff8f71314e
commit d7db618472
  1. 24
      main/mySpace/student.php
  2. 18
      main/mySpace/users.php

@ -28,6 +28,8 @@ $active = isset($_GET['active']) ? intval($_GET['active']) : 1;
$sleepingDays = isset($_GET['sleeping_days']) ? intval($_GET['sleeping_days']) : null;
$this_section = SECTION_TRACKING;
$webCodePath = api_get_path(WEB_CODE_PATH);
$interbreadcrumb[] = [
"url" => api_is_student_boss() ? "#" : "index.php",
"name" => get_lang('MySpace'),
@ -73,6 +75,8 @@ function get_users($from, $limit, $column, $direction)
$sleepingDays = isset($_GET['sleeping_days']) ? (int) $_GET['sleeping_days'] : null;
$sessionId = isset($_GET['id_session']) ? (int) $_GET['id_session'] : 0;
$webCodePath = api_get_path(WEB_CODE_PATH);
$lastConnectionDate = null;
if (!empty($sleepingDays)) {
$lastConnectionDate = api_get_utc_datetime(strtotime($sleepingDays.' days ago'));
@ -121,7 +125,7 @@ function get_users($from, $limit, $column, $direction)
);
}
$url = api_get_path(WEB_CODE_PATH).'mySpace/myStudents.php';
$url = $webCodePath.'mySpace/myStudents.php';
$all_datas = [];
foreach ($students as $student_data) {
@ -200,7 +204,7 @@ function get_users($from, $limit, $column, $direction)
if (api_is_drh() || api_is_platform_admin()) {
$lostPasswordLink = ' '.Display::url(
Display::return_icon('edit.png', get_lang('Edit')),
api_get_path(WEB_CODE_PATH).'mySpace/user_edit.php?user_id='.$student_id
$webCodePath.'mySpace/user_edit.php?user_id='.$student_id
);
}
@ -224,7 +228,7 @@ if (api_is_drh()) {
$menu_items = [
Display::url(
Display::return_icon('statistics.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH)."auth/my_progress.php"
$webCodePath."auth/my_progress.php"
),
Display::url(
Display::return_icon('user_na.png', get_lang('Students'), [], ICON_SIZE_MEDIUM),
@ -244,7 +248,7 @@ if (api_is_drh()) {
),
Display::url(
Display::return_icon('skills.png', get_lang('Skills'), [], ICON_SIZE_MEDIUM),
'skills.php'
$webCodePath.'social/my_skills_report.php'
),
];
@ -257,15 +261,19 @@ if (api_is_drh()) {
} elseif (api_is_student_boss()) {
$actionsLeft .= Display::url(
Display::return_icon('statistics.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH)."auth/my_progress.php"
$webCodePath."auth/my_progress.php"
);
$actionsLeft .= Display::url(
Display::return_icon('user_na.png', get_lang('Students'), [], ICON_SIZE_MEDIUM),
'#'
);
$actions .= Display::url(
Display::return_icon('skills.png', get_lang('Skills'), array(), ICON_SIZE_MEDIUM),
$webCodePath.'social/my_skills_report.php'
);
$actionsLeft .= Display::url(
Display::return_icon("statistics.png", get_lang('CompanyReport'), [], ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH)."mySpace/company_reports.php"
$webCodePath."mySpace/company_reports.php"
);
$actionsLeft .= Display::url(
Display::return_icon(
@ -274,7 +282,7 @@ if (api_is_drh()) {
[],
ICON_SIZE_MEDIUM
),
api_get_path(WEB_CODE_PATH)."gradebook/certificate_report.php"
$webCodePath."gradebook/certificate_report.php"
);
}
@ -338,7 +346,7 @@ if ($export_csv) {
$form = new FormValidator(
'search_user',
'get',
api_get_path(WEB_CODE_PATH).'mySpace/student.php'
$webCodePath.'mySpace/student.php'
);
$form = Tracking::setUserSearchForm($form);
$form->setDefaults($params);

@ -27,6 +27,8 @@ $active = isset($_GET['active']) ? intval($_GET['active']) : 1;
$sleepingDays = isset($_GET['sleeping_days']) ? intval($_GET['sleeping_days']) : null;
$status = isset($_GET['status']) ? Security::remove_XSS($_GET['status']) : null;
$webCodePath = api_get_path(WEB_CODE_PATH);
$this_section = SECTION_TRACKING;
$interbreadcrumb[] = [
@ -200,7 +202,7 @@ if (api_is_drh()) {
$menu_items = [
Display::url(
Display::return_icon('statistics.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH)."auth/my_progress.php"
$webCodePath."auth/my_progress.php"
),
Display::url(
Display::return_icon('user_na.png', get_lang('Students'), [], ICON_SIZE_MEDIUM),
@ -220,7 +222,7 @@ if (api_is_drh()) {
),
Display::url(
Display::return_icon('skills.png', get_lang('Skills'), [], ICON_SIZE_MEDIUM),
'skills.php'
$webCodePath.'social/my_skills_report.php'
),
];
@ -233,15 +235,19 @@ if (api_is_drh()) {
} elseif (api_is_student_boss()) {
$actionsLeft .= Display::url(
Display::return_icon('statistics.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH)."auth/my_progress.php"
$webCodePath."auth/my_progress.php"
);
$actionsLeft .= Display::url(
Display::return_icon('user_na.png', get_lang('Students'), [], ICON_SIZE_MEDIUM),
'#'
);
$actions .= Display::url(
Display::return_icon('skills.png', get_lang('Skills'), array(), ICON_SIZE_MEDIUM),
$webCodePath.'social/my_skills_report.php'
);
$actionsLeft .= Display::url(
Display::return_icon("statistics.png", get_lang("CompanyReport"), [], ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH)."mySpace/company_reports.php"
$webCodePath."mySpace/company_reports.php"
);
$actionsLeft .= Display::url(
Display::return_icon(
@ -250,7 +256,7 @@ if (api_is_drh()) {
[],
ICON_SIZE_MEDIUM
),
api_get_path(WEB_CODE_PATH)."gradebook/certificate_report.php"
$webCodePath."gradebook/certificate_report.php"
);
}
@ -315,7 +321,7 @@ if ($export_csv) {
$form = new FormValidator(
'search_user',
'get',
api_get_path(WEB_CODE_PATH).'mySpace/users.php'
$webCodePath.'mySpace/users.php'
);
$form->addElement(
'select',

Loading…
Cancel
Save