Internal: Tracking: Rename mySpace folder to my_space (continued) - refs #4536

pull/4575/head
Yannick Warnier 3 years ago
parent 933fdb7fad
commit 2a5555120a
  1. 2
      assets/vue/components/layout/Sidebar.vue
  2. 2
      psalm.xml
  3. 4
      public/main/install/configuration.dist.php
  4. 4
      public/main/my_space/company_reports.php
  5. 6
      public/main/my_space/company_reports_resumed.php
  6. 8
      public/main/my_space/course.php
  7. 4
      public/main/my_space/current_courses.php
  8. 12
      public/main/my_space/myStudents.php
  9. 4
      public/main/my_space/session_admin_teachers.php
  10. 10
      public/main/my_space/student.php
  11. 4
      public/main/my_space/teachers.php
  12. 2
      public/main/my_space/user_edit.php
  13. 4
      public/main/my_space/users.php
  14. 2
      public/main/my_space/work_stats.php
  15. 2
      public/main/my_space/works_in_session_report.php
  16. 2
      public/main/search/load_search.php
  17. 2
      public/main/social/require_user_linking.php
  18. 2
      public/plugin/dashboard/block_daily/block_daily.class.php
  19. 2
      public/plugin/dashboard/block_session/block_session.class.php
  20. 8
      public/plugin/dashboard/block_student/block_student.class.php
  21. 4
      public/plugin/dashboard/block_teacher/block_teacher.class.php
  22. 6
      tests/behat/features/accessCompanyReports.feature
  23. 6
      tests/behat/features/companyReports.feature
  24. 4
      tests/behat/features/createUser.feature
  25. 2
      tests/scripts/fix_exercise_score_in_lp.php

@ -135,7 +135,7 @@ const items = ref([
},
{
label: t('Reporting'),
url: '/main/mySpace/index.php',
url: '/main/my_space/index.php',
},
],
},

@ -41,7 +41,7 @@
<directory name="public/main/link" />
<!-- <directory name="public/main/lp" />-->
<!-- <directory name="public/main/mySpace" />-->
<!-- <directory name="public/main/my_space" />-->
<directory name="public/main/notebook" />
<directory name="public/main/session" />
<directory name="public/main/social" />

@ -631,7 +631,7 @@ $_configuration['gradebook_badge_sidebar'] = [
// Block access to any user to "my progress" page
//$_configuration['block_my_progress_page'] = false;
// Add user extra fields in report: main/mySpace/exercise_category_report.php
// Add user extra fields in report: main/my_space/exercise_category_report.php
//$_configuration['exercise_category_report_user_extra_fields'] = ['fields' => ['skype', 'rssfeeds']];
// Order sessions by position in user session list (UserManager::get_sessions_by_category)
@ -1397,7 +1397,7 @@ $_configuration['auth_password_links'] = [
// VALUES (2, 13, 'popular_courses', 'Popular course', 1, 1, NOW());
// $_configuration['popular_courses_handpicked'] = false;
// Default items per page in main/mySpace/users.php
// Default items per page in main/my_space/users.php
// $_configuration['my_space_users_items_per_page'] = 10;
// Add teachers column in course list.

@ -231,7 +231,7 @@ if (api_is_student_boss()) {
);
$actions .= Display::url(
Display::return_icon('user.png', get_lang('Learners'), [], ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'mySpace/student.php'
api_get_path(WEB_CODE_PATH).'my_space/student.php'
);
$actions .= Display::url(
Display::return_icon('statistics.png', get_lang('Corporate report'), [], ICON_SIZE_MEDIUM),
@ -254,7 +254,7 @@ if (!empty($actions)) {
}
$content .= Display::url(
get_lang("Corporate reportResumed"),
api_get_path(WEB_CODE_PATH).'mySpace/company_reports_resumed.php',
api_get_path(WEB_CODE_PATH).'my_space/company_reports_resumed.php',
[
'class' => 'btn btn--success',
]

@ -90,11 +90,11 @@ if (api_is_student_boss()) {
);
$actions .= Display::url(
Display::return_icon('user.png', get_lang('Learners'), [], ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'mySpace/student.php'
api_get_path(WEB_CODE_PATH).'my_space/student.php'
);
$actions .= Display::url(
Display::return_icon('statistics.png', get_lang('Corporate report'), [], ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'mySpace/company_reports.php'
api_get_path(WEB_CODE_PATH).'my_space/company_reports.php'
);
$actions .= Display::url(
Display::return_icon(
@ -116,7 +116,7 @@ if (!empty($actions)) {
if (!api_is_student_boss()) {
$content .= Display::url(
get_lang("Corporate report"),
api_get_path(WEB_CODE_PATH)."mySpace/company_reports.php",
api_get_path(WEB_CODE_PATH)."my_space/company_reports.php",
[
'class' => 'btn btn--success',
]

@ -100,16 +100,16 @@ if (api_is_platform_admin(true, true)) {
);
$menu_items[] = Display::url(
Display::return_icon('session.png', get_lang('Sessions'), [], ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'mySpace/session.php'
api_get_path(WEB_CODE_PATH).'my_space/session.php'
);
$menu_items[] = Display::url(
get_lang('Question stats'),
api_get_path(WEB_CODE_PATH).'mySpace/question_stats_global.php'
api_get_path(WEB_CODE_PATH).'my_space/question_stats_global.php'
);
$menu_items[] = Display::url(
get_lang('Detailed questions stats'),
api_get_path(WEB_CODE_PATH).'mySpace/question_stats_global_detail.php'
api_get_path(WEB_CODE_PATH).'my_space/question_stats_global_detail.php'
);
if (api_can_login_as($user_id)) {
$link = '<a
@ -388,7 +388,7 @@ $table->set_header(7, get_lang('Assignments'), false);
$table->set_header(8, get_lang('Attendances'), false);
$table->set_header(9, get_lang('Details'), false);
$form = new FormValidator('search_course', 'get', api_get_path(WEB_CODE_PATH).'mySpace/course.php');
$form = new FormValidator('search_course', 'get', api_get_path(WEB_CODE_PATH).'my_space/course.php');
$form->addElement('text', 'keyword', get_lang('Keyword'));
$form->addButtonSearch(get_lang('Search'));
$form->addElement('hidden', 'sid', $sessionId);

@ -242,8 +242,8 @@ foreach ($array as $row_table) {
}
echo '<div class="actions">';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'mySpace">'.Display::return_icon('back.png', get_lang('Back'), [], 32).'</a>';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'mySpace/current_courses.php?export=1">'.Display::return_icon('export_excel.png', get_lang('Current coursesReport'), [], 32).'</a> ';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'my_space/index.php">'.Display::return_icon('back.png', get_lang('Back'), [], 32).'</a>';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'my_space/current_courses.php?export=1">'.Display::return_icon('export_excel.png', get_lang('Current coursesReport'), [], 32).'</a> ';
echo '</div>';
echo '<div style="overflow:auto;">';
echo $table->toHtml();

@ -508,7 +508,7 @@ switch ($action) {
$bossList = UserManager::getStudentBossList($studentId);
if (!empty($bossList)) {
$url = api_get_path(WEB_CODE_PATH).'mySpace/myStudents.php?student='.$studentId;
$url = api_get_path(WEB_CODE_PATH).'my_space/myStudents.php?student='.$studentId;
$link = Display::url($url, $url);
foreach ($bossList as $boss) {
@ -733,7 +733,7 @@ $actions .= '<a href="'.api_get_self().'?'.Security::remove_XSS($_SERVER['QUERY_
$actions .= Display::url(
Display::return_icon('attendance.png', get_lang('Access details'), '', ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'mySpace/access_details_session.php?user_id='.$studentId
api_get_path(WEB_CODE_PATH).'my_space/access_details_session.php?user_id='.$studentId
);
$email = $user->getEmail();
if (!empty($email)) {
@ -786,7 +786,7 @@ if (SkillModel::isAllowed($studentId, false)) {
null,
ICON_SIZE_MEDIUM
),
api_get_path(WEB_CODE_PATH).'mySpace/myStudents.php?action=all_attendance&student='.$studentId
api_get_path(WEB_CODE_PATH).'my_space/myStudents.php?action=all_attendance&student='.$studentId
);
}
@ -1507,7 +1507,7 @@ if (empty($details)) {
if (!empty($sId)) {
$sessionAction .= Display::url(
Display::return_icon('pdf.png', get_lang('ExportToPDF'), [], ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'mySpace/session.php?'
api_get_path(WEB_CODE_PATH).'my_space/session.php?'
.http_build_query(
[
'student' => $studentId,
@ -1519,7 +1519,7 @@ if (empty($details)) {
);
$sessionAction .= Display::url(
Display::return_icon('pdf.png', get_lang('CertificateOfAchievement'), [], ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'mySpace/session.php?'
api_get_path(WEB_CODE_PATH).'my_space/session.php?'
.http_build_query(
[
'student' => $studentId,
@ -1818,7 +1818,7 @@ if (empty($details)) {
}
$link = Display::url(
Display::return_icon('2rightarrow.png', get_lang('Details')),
$codePath.'mySpace/lp_tracking.php?cid='.$courseId.'&course='.$courseCode.$from.'&origin='.$origin
$codePath.'my_space/lp_tracking.php?cid='.$courseId.'&course='.$courseCode.$from.'&origin='.$origin
.'&lp_id='.$lp_id.'&student_id='.$studentId.'&sid='.$sessionId
);
echo Display::tag('td', $link);

@ -99,7 +99,7 @@ function get_users($from, $limit, $column, $direction)
}
$all_datas = [];
$url = api_get_path(WEB_CODE_PATH).'mySpace/myStudents.php';
$url = api_get_path(WEB_CODE_PATH).'my_space/myStudents.php';
foreach ($students as $student_data) {
$student_id = $student_data['user_id'];
$student_data = api_get_user_info($student_id);
@ -260,7 +260,7 @@ if ($export_csv) {
}
}
$form = new FormValidator('search_user', 'get', api_get_path(WEB_CODE_PATH).'mySpace/session_admin_teachers.php');
$form = new FormValidator('search_user', 'get', api_get_path(WEB_CODE_PATH).'my_space/session_admin_teachers.php');
$form->addElement('text', 'keyword', get_lang('Keyword'));
$form->addButtonSearch(get_lang('Search'));

@ -126,7 +126,7 @@ function get_users($from, $limit, $column, $direction)
);
}
$url = $webCodePath.'mySpace/myStudents.php';
$url = $webCodePath.'my_space/myStudents.php';
$all_datas = [];
foreach ($students as $student_data) {
@ -207,7 +207,7 @@ function get_users($from, $limit, $column, $direction)
if (api_is_drh() || api_is_platform_admin()) {
$lostPasswordLink = '&nbsp;'.Display::url(
Display::return_icon('edit.png', get_lang('Edit')),
$webCodePath.'mySpace/user_edit.php?user_id='.$student_id
$webCodePath.'my_space/user_edit.php?user_id='.$student_id
);
}
@ -271,12 +271,12 @@ if (api_is_drh()) {
);
$actionsLeft .= Display::url(
Display::return_icon('statistics.png', get_lang('Corporate report'), [], ICON_SIZE_MEDIUM),
$webCodePath.'mySpace/company_reports.php'
$webCodePath.'my_space/company_reports.php'
);
$actionsLeft .= Display::url(
Display::return_icon('calendar-user.png', get_lang('MyStudentsSchedule'), [], ICON_SIZE_MEDIUM),
$webCodePath.'mySpace/calendar_plan.php'
$webCodePath.'my_space/calendar_plan.php'
);
$actionsLeft .= Display::url(
@ -356,7 +356,7 @@ if ($export_csv) {
$form = new FormValidator(
'search_user',
'get',
$webCodePath.'mySpace/student.php'
$webCodePath.'my_space/student.php'
);
$form = Tracking::setUserSearchForm($form);
$form->setDefaults($params);

@ -112,7 +112,7 @@ function get_users($from, $limit, $column, $direction)
);
}
$all_datas = [];
$url = api_get_path(WEB_CODE_PATH).'mySpace/myStudents.php';
$url = api_get_path(WEB_CODE_PATH).'my_space/myStudents.php';
foreach ($students as $student_data) {
$student_id = $student_data['user_id'];
$student_data = api_get_user_info($student_id);
@ -274,7 +274,7 @@ if ($export_csv) {
}
}
$form = new FormValidator('search_user', 'get', api_get_path(WEB_CODE_PATH).'mySpace/teachers.php');
$form = new FormValidator('search_user', 'get', api_get_path(WEB_CODE_PATH).'my_space/teachers.php');
$form = Tracking::setUserSearchForm($form);
$form->setDefaults($params);

@ -172,7 +172,7 @@ if ($form->validate()) {
}
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH)."mySpace/student.php",
'url' => api_get_path(WEB_CODE_PATH)."my_space/student.php",
"name" => get_lang('User list'),
];

@ -252,7 +252,7 @@ if (api_is_drh()) {
);
$actionsLeft .= Display::url(
Display::return_icon('statistics.png', get_lang("Corporate report"), [], ICON_SIZE_MEDIUM),
$webCodePath.'mySpace/company_reports.php'
$webCodePath.'my_space/company_reports.php'
);
$actionsLeft .= Display::url(
Display::return_icon(
@ -332,7 +332,7 @@ if ($export_csv) {
$form = new FormValidator(
'search_user',
'get',
$webCodePath.'mySpace/users.php'
$webCodePath.'my_space/users.php'
);
$form->addSelect(
'status',

@ -68,7 +68,7 @@ function get_users($from, $number_of_items, $column, $direction)
null,
false
);
$url = $webCodePath.'mySpace/myStudents.php';
$url = $webCodePath.'my_space/myStudents.php';
$workList = getWorkListTeacher(0, 100, null, null, null);

@ -145,7 +145,7 @@ if (isset($_GET['export']) && $session && ($coursesInfo && $usersInfo)) {
}
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'mySpace/index.php',
'url' => api_get_path(WEB_CODE_PATH).'my_space/index.php',
'name' => get_lang('Reporting'),
];

@ -1153,7 +1153,7 @@ if ($userToLoad) {
$button .= '<br /><br />';
$userReportButton = Display::url(
get_lang('Diagnostic Validate LearningPath'),
api_get_path(WEB_CODE_PATH).'mySpace/myStudents.php?student='.$userToLoad,
api_get_path(WEB_CODE_PATH).'my_space/myStudents.php?student='.$userToLoad,
['class' => 'btn btn--primary']
);
}

@ -85,7 +85,7 @@ $content .= '<div class="row">';
foreach ($usersAssigned as $userAssigned) {
$userAssigned = api_get_user_info($userAssigned['user_id']);
$userPicture = isset($userAssigned["avatar_medium"]) ? $userAssigned["avatar_medium"] : $userAssigned["avatar"];
$studentLink = api_get_path(WEB_CODE_PATH).'mySpace/myStudents.php?student='.$userAssigned['user_id'];
$studentLink = api_get_path(WEB_CODE_PATH).'my_space/myStudents.php?student='.$userAssigned['user_id'];
$content .= '
<div class="col-sm-4 col-md-3">

@ -123,7 +123,7 @@ class BlockDaily extends Block
$content .= $data_table;
if (!empty($course_data)) {
$content .= '<div style="text-align:right;margin-top:10px;">
<a href="'.api_get_path(WEB_CODE_PATH).'mySpace/course.php">'.get_lang('See more').'</a></div>';
<a href="'.api_get_path(WEB_CODE_PATH).'my_space/course.php">'.get_lang('See more').'</a></div>';
}
//$content .= '</div>';
return $content;

@ -130,7 +130,7 @@ class BlockSession extends Block
}
if (count($sessions) > 0) {
$content .= '<div style="text-align:right;margin-top:10px;"><a href="'.api_get_path(WEB_CODE_PATH).'mySpace/session.php">'.get_lang('See more').'</a></div>';
$content .= '<div style="text-align:right;margin-top:10px;"><a href="'.api_get_path(WEB_CODE_PATH).'my_space/session.php">'.get_lang('See more').'</a></div>';
}
return $content;

@ -135,7 +135,7 @@ class BlockStudent extends Block
$content = $students_table;
if (count($students) > 0) {
$content .= '<div style="text-align:right;margin-top:10px;"><a href="'.api_get_path(WEB_CODE_PATH).'mySpace/index.php?view=admin&display=useroverview">'.get_lang('See more').'</a></div>';
$content .= '<div style="text-align:right;margin-top:10px;"><a href="'.api_get_path(WEB_CODE_PATH).'my_space/index.php?view=admin&display=useroverview">'.get_lang('See more').'</a></div>';
}
return $content;
@ -168,7 +168,7 @@ class BlockStudent extends Block
if (!empty($results_faults_avg)) {
$attendances_faults_avg = '<a
title="'.get_lang('Go to learner details').'"
href="'.api_get_path(WEB_CODE_PATH).'mySpace/myStudents.php?student='.$student_id.'">'.
href="'.api_get_path(WEB_CODE_PATH).'my_space/myStudents.php?student='.$student_id.'">'.
$results_faults_avg['faults'].'/'.$results_faults_avg['total'].' ('.$results_faults_avg['percent'].'%)</a>';
} else {
$attendances_faults_avg = '0%';
@ -200,7 +200,7 @@ class BlockStudent extends Block
}
if (!empty($weight)) {
$evaluations_avg = '<a title="'.get_lang('Go to learner details').'" href="'.api_get_path(WEB_CODE_PATH).'mySpace/myStudents.php?student='.$student_id.'">'.round($score, 2).'/'.round($weight, 2).'('.round($score / $weight * 100, 2).' %)</a>';
$evaluations_avg = '<a title="'.get_lang('Go to learner details').'" href="'.api_get_path(WEB_CODE_PATH).'my_space/myStudents.php?student='.$student_id.'">'.round($score, 2).'/'.round($weight, 2).'('.round($score / $weight * 100, 2).' %)</a>';
}
if (0 == $i % 2) {
@ -225,7 +225,7 @@ class BlockStudent extends Block
if (count($students) > 0) {
$content .= '<div style="text-align:right;margin-top:10px;">
<a href="'.api_get_path(WEB_CODE_PATH).'mySpace/index.php?view=admin&display=yourstudents">'.get_lang('See more').'</a>
<a href="'.api_get_path(WEB_CODE_PATH).'my_space/index.php?view=admin&display=yourstudents">'.get_lang('See more').'</a>
</div>';
}
//$content .= '</div>';

@ -125,7 +125,7 @@ class BlockTeacher extends Block
if (count($teachers) > 0) {
$content .= '<div style="text-align:right;margin-top:10px;">
<a href="'.api_get_path(WEB_CODE_PATH).'mySpace/index.php?view=admin">'.get_lang('See more').'</a></div>';
<a href="'.api_get_path(WEB_CODE_PATH).'my_space/index.php?view=admin">'.get_lang('See more').'</a></div>';
}
return $content;
@ -179,7 +179,7 @@ class BlockTeacher extends Block
}
$content .= $teachers_table;
if (count($teachers) > 0) {
$content .= '<div style="text-align:right;margin-top:10px;"><a href="'.api_get_path(WEB_CODE_PATH).'mySpace/teachers.php">'.get_lang('See more').'</a></div>';
$content .= '<div style="text-align:right;margin-top:10px;"><a href="'.api_get_path(WEB_CODE_PATH).'my_space/teachers.php">'.get_lang('See more').'</a></div>';
}
return $content;

@ -11,12 +11,12 @@ Feature: Access to portal reports as admin
Scenario: Access the company report
Given I am a platform administrator
And I am on "/main/mySpace/company_reports.php"
And I am on "/main/my_space/company_reports.php"
Then I should not see "not authorized"
Scenario: Access the resumed version of the company report
Given I am a platform administrator
And I am on "/main/mySpace/company_reports_resumed.php"
And I am on "/main/my_space/company_reports_resumed.php"
Then I should not see "not authorized"
Scenario: See the company reports link on the admin page
@ -37,4 +37,4 @@ Feature: Access to portal reports as admin
Scenario: See the company reports link on the admin page
Given I am a platform administrator
And I am on "/main/admin/teachers_time_by_session_report.php"
Then I should not see "not authorized"
Then I should not see "not authorized"

@ -11,12 +11,12 @@ Feature: Access to portal reports as admin
Scenario: Access the company report
Given I am a platform administrator
And I am on "/main/mySpace/company_reports.php"
And I am on "/main/my_space/company_reports.php"
Then I should not see "not authorized"
Scenario: Access the resumed version of the company report
Given I am a platform administrator
And I am on "/main/mySpace/company_reports_resumed.php"
And I am on "/main/my_space/company_reports_resumed.php"
Then I should not see "not authorized"
Scenario: See the company reports link on the admin page
@ -37,4 +37,4 @@ Feature: Access to portal reports as admin
Scenario: See the company reports link on the admin page
Given I am a platform administrator
And I am on "/main/admin/teachers_time_by_session_report.php"
Then I should not see "not authorized"
Then I should not see "not authorized"

@ -138,7 +138,7 @@ Feature: Users management as admin
Scenario: HRM logs as teacher
Given I am not logged
Then I am logged as "hrm"
And I am on "/main/mySpace/teachers.php"
And I am on "/main/my_space/teachers.php"
And wait the page to be loaded when ready
Then I should see "teacher lastname"
Then I follow "teacher lastname"
@ -150,7 +150,7 @@ Feature: Users management as admin
Scenario: HRM logs as student
Given I am not logged
Then I am logged as "hrm"
And I am on "/main/mySpace/student.php"
And I am on "/main/my_space/student.php"
And wait the page to be loaded when ready
Then I should see "student lastname"
Then I follow "student lastname"

@ -45,7 +45,7 @@ if (!empty($items)) {
$courseCode = $item['code'];
$sessionId = $item['session_id'];
$url = api_get_path(WEB_CODE_PATH)."mySpace/myStudents.php?student=$userId&details=true&course=$courseCode&origin=&id_session=$sessionId";
$url = api_get_path(WEB_CODE_PATH)."my_space/myStudents.php?student=$userId&details=true&course=$courseCode&origin=&id_session=$sessionId";
echo "Check user page: ". Display::url($url, $url);
echo '<br />';

Loading…
Cancel
Save