diff --git a/public/documentation/installation_guide.html b/public/documentation/installation_guide.html index 2c01e5ab2f..d8bf1e0e68 100644 --- a/public/documentation/installation_guide.html +++ b/public/documentation/installation_guide.html @@ -725,9 +725,9 @@ If you have issues with files taking a long time to download, make sure you reco RewriteRule ^courses/([^/]+)/(.*)$ app/courses/$1/$2 [QSA,L] RewriteRule ^session/(\d{1,})/about/?$ main/session/about.php?session_id=$1 [L] RewriteRule ^course/(\d{1,})/about/?$ main/course_info/about.php?course_id=$1 [L] - RewriteRule ^badge/(\d{1,}) main/badge/issued.php?issue=$1 [L] - RewriteRule ^skill/(\d{1,})/user/(\d{1,}) main/badge/issued_all.php?skill=$1&user=$2 [L] - RewriteRule ^badge/(\d{1,})/user/(\d{1,}) main/badge/issued_all.php?skill=$1&user=$2 [L] + RewriteRule ^badge/(\d{1,}) main/skills/issued.php?issue=$1 [L] + RewriteRule ^skill/(\d{1,})/user/(\d{1,}) main/skills/issued_all.php?skill=$1&user=$2 [L] + RewriteRule ^badge/(\d{1,})/user/(\d{1,}) main/skills/issued_all.php?skill=$1&user=$2 [L] RewriteRule ^main/exercice/(.*)$ main/exercise/$1 [QSA,L] RewriteRule ^main/newscorm/(.*)$ main/lp/$1 [QSA,L] RewriteRule ^service/(\d{1,})$ plugin/buycourses/src/service_information.php?service_id=$1 [L] @@ -765,9 +765,9 @@ If you have issues with files taking a long time to download, make sure you reco rewrite ^/courses/([^/]+)/(.*)$ /app/courses/$1/$2 last; rewrite ^/session/([^/]+)/about/?$ /main/session/about.php?session_id=$1 last; rewrite ^/course/([^/]+)/about/?$ /main/course_info/about.php?course_id=$1 last; - rewrite ^/badge/(\d+) /main/badge/issued.php?issue=$1 last; - rewrite ^/skill/(\d+)/user/(\d+)$ /main/badge/issued_all.php?skill=$1&user=$2 last; - rewrite ^/badge/(\d+)/user/(\d+)$ /main/badge/issued_all.php?skill=$1&user=$2 last; + rewrite ^/badge/(\d+) /main/skills/issued.php?issue=$1 last; + rewrite ^/skill/(\d+)/user/(\d+)$ /main/skills/issued_all.php?skill=$1&user=$2 last; + rewrite ^/badge/(\d+)/user/(\d+)$ /main/skills/issued_all.php?skill=$1&user=$2 last; rewrite ^/main/exercice/(.*)$ /main/exercise/$1 last; rewrite ^/main/newscorm/(.*)$ /main/lp/$1 last; rewrite ^/service/(\d+)$ /plugin/buycourses/src/service_information.php?service_id=$1 last; @@ -884,15 +884,15 @@ If you have issues with files taking a long time to download, make sure you reco </rule> <rule name="rule 13v" stopProcessing="true"> <match url="^badge/(\d{1,})" /> - <action type="Rewrite" url="/main/badge/issued.php?issue={R:1}" /> + <action type="Rewrite" url="/main/skills/issued.php?issue={R:1}" /> </rule> <rule name="rule 14v" stopProcessing="true"> <match url="^skill/(\d{1,})/user/(\d{1,})" /> - <action type="Rewrite" url="/main/badge/issued_all.php?skill={R:1}&user={R:2}" /> + <action type="Rewrite" url="/main/skills/issued_all.php?skill={R:1}&user={R:2}" /> </rule> <rule name="rule 15v" stopProcessing="true"> <match url="^badge/(\d{1,})/user/(\d{1,})" /> - <action type="Rewrite" url="/main/badge/issued_all.php?skill={R:1}&user={R:2}" /> + <action type="Rewrite" url="/main/skills/issued_all.php?skill={R:1}&user={R:2}" /> </rule> <rule name="rule 16v" stopProcessing="true"> <match url="^main/exercice/(.*)$" /> diff --git a/public/documentation/installation_guide_es_ES.html b/public/documentation/installation_guide_es_ES.html index ad239bea42..fab6fb2048 100644 --- a/public/documentation/installation_guide_es_ES.html +++ b/public/documentation/installation_guide_es_ES.html @@ -873,9 +873,9 @@ servidor web y agregar esta línea. Debería ver una diferencia notable en el ti RewriteRule ^courses/([^/]+)/(.*)$ app/courses/$1/$2 [QSA,L] RewriteRule ^session/(\d{1,})/about/?$ main/session/about.php?session_id=$1 [L] RewriteRule ^course/(\d{1,})/about/?$ main/course_info/about.php?course_id=$1 [L] - RewriteRule ^badge/(\d{1,}) main/badge/issued.php?issue=$1 [L] - RewriteRule ^skill/(\d{1,})/user/(\d{1,}) main/badge/issued_all.php?skill=$1&user=$2 [L] - RewriteRule ^badge/(\d{1,})/user/(\d{1,}) main/badge/issued_all.php?skill=$1&user=$2 [L] + RewriteRule ^badge/(\d{1,}) main/skills/issued.php?issue=$1 [L] + RewriteRule ^skill/(\d{1,})/user/(\d{1,}) main/skills/issued_all.php?skill=$1&user=$2 [L] + RewriteRule ^badge/(\d{1,})/user/(\d{1,}) main/skills/issued_all.php?skill=$1&user=$2 [L] RewriteRule ^main/exercice/(.*)$ main/exercise/$1 [QSA,L] RewriteRule ^main/newscorm/(.*)$ main/lp/$1 [QSA,L] RewriteRule ^service/(\d{1,})$ plugin/buycourses/src/service_information.php?service_id=$1 [L] @@ -913,9 +913,9 @@ location @rewrite{ rewrite ^/courses/([^/]+)/work/(.*)$ /main/work/download.php?file=work/$2&cDir=$1 last; rewrite ^/courses/([^/]+)/(.*)$ /app/courses/$1/$2 last; rewrite ^/session/([^/]+)/about/?$ /main/session/about.php?session_id=$1 last; - rewrite ^/badge/(\d+) /main/badge/issued.php?issue=$1 last; - rewrite ^/skill/(\d+)/user/(\d+)$ /main/badge/issued_all.php?skill=$1&user=$2 last; - rewrite ^/badge/(\d+)/user/(\d+)$ /main/badge/issued_all.php?skill=$1&user=$2 last; + rewrite ^/badge/(\d+) /main/skills/issued.php?issue=$1 last; + rewrite ^/skill/(\d+)/user/(\d+)$ /main/skills/issued_all.php?skill=$1&user=$2 last; + rewrite ^/badge/(\d+)/user/(\d+)$ /main/skills/issued_all.php?skill=$1&user=$2 last; rewrite ^/main/exercice/(.*)$ /main/exercise/$1 last; rewrite ^/main/newscorm/(.*)$ /main/lp/$1 last; rewrite ^/service/(\d+)$ /plugin/buycourses/src/service_information.php?service_id=$1 last; @@ -1035,15 +1035,15 @@ location ^~ /tests/ { </rule> <rule name="rule 13v" stopProcessing="true"> <match url="^badge/(\d{1,})" /> - <action type="Rewrite" url="/main/badge/issued.php?issue={R:1}" /> + <action type="Rewrite" url="/main/skills/issued.php?issue={R:1}" /> </rule> <rule name="rule 14v" stopProcessing="true"> <match url="^skill/(\d{1,})/user/(\d{1,})" /> - <action type="Rewrite" url="/main/badge/issued_all.php?skill={R:1}&user={R:2}" /> + <action type="Rewrite" url="/main/skills/issued_all.php?skill={R:1}&user={R:2}" /> </rule> <rule name="rule 15v" stopProcessing="true"> <match url="^badge/(\d{1,})/user/(\d{1,})" /> - <action type="Rewrite" url="/main/badge/issued_all.php?skill={R:1}&user={R:2}" /> + <action type="Rewrite" url="/main/skills/issued_all.php?skill={R:1}&user={R:2}" /> </rule> <rule name="rule 16v" stopProcessing="true"> <match url="^main/exercice/(.*)$" /> diff --git a/public/documentation/installation_guide_fr_FR.html b/public/documentation/installation_guide_fr_FR.html index 63f3d27034..d8b4450104 100644 --- a/public/documentation/installation_guide_fr_FR.html +++ b/public/documentation/installation_guide_fr_FR.html @@ -786,9 +786,9 @@ ou, si vous travaillez avec Apache 2.4, la syntaxe est légèrement différente RewriteRule ^courses/([^/]+)/(.*)$ app/courses/$1/$2 [QSA,L] RewriteRule ^session/(\d{1,})/about/?$ main/session/about.php?session_id=$1 [L] RewriteRule ^course/(\d{1,})/about/?$ main/course_info/about.php?course_id=$1 [L] - RewriteRule ^badge/(\d{1,}) main/badge/issued.php?issue=$1 [L] - RewriteRule ^skill/(\d{1,})/user/(\d{1,}) main/badge/issued_all.php?skill=$1&user=$2 [L] - RewriteRule ^badge/(\d{1,})/user/(\d{1,}) main/badge/issued_all.php?skill=$1&user=$2 [L] + RewriteRule ^badge/(\d{1,}) main/skills/issued.php?issue=$1 [L] + RewriteRule ^skill/(\d{1,})/user/(\d{1,}) main/skills/issued_all.php?skill=$1&user=$2 [L] + RewriteRule ^badge/(\d{1,})/user/(\d{1,}) main/skills/issued_all.php?skill=$1&user=$2 [L] RewriteRule ^main/exercice/(.*)$ main/exercise/$1 [QSA,L] RewriteRule ^main/newscorm/(.*)$ main/lp/$1 [QSA,L] RewriteRule ^service/(\d{1,})$ plugin/buycourses/src/service_information.php?service_id=$1 [L] @@ -819,9 +819,9 @@ Ce sont uniquement les redirections à placer dans un bloc server{}, comme les a rewrite ^/courses/([^/]+)/work/(.*)$ /main/work/download.php?file=work/$2&cDir=$1 last; rewrite ^/courses/([^/]+)/(.*)$ /app/courses/$1/$2 last; rewrite ^/session/([^/]+)/about/?$ /main/session/about.php?session_id=$1 last; - rewrite ^/badge/(\d+) /main/badge/issued.php?issue=$1 last; - rewrite ^/skill/(\d+)/user/(\d+)$ /main/badge/issued_all.php?skill=$1&user=$2 last; - rewrite ^/badge/(\d+)/user/(\d+)$ /main/badge/issued_all.php?skill=$1&user=$2 last; + rewrite ^/badge/(\d+) /main/skills/issued.php?issue=$1 last; + rewrite ^/skill/(\d+)/user/(\d+)$ /main/skills/issued_all.php?skill=$1&user=$2 last; + rewrite ^/badge/(\d+)/user/(\d+)$ /main/skills/issued_all.php?skill=$1&user=$2 last; rewrite ^/main/exercice/(.*)$ /main/exercise/$1 last; rewrite ^/main/newscorm/(.*)$ /main/lp/$1 last; rewrite ^/service/(\d+)$ /plugin/buycourses/src/service_information.php?service_id=$1 last; @@ -834,8 +834,8 @@ Ce sont uniquement les redirections à placer dans un bloc server{}, comme les a location / { rewrite ^/courses/([^/]+)/$ /main/course_home/course_home.php?cDir=$1 last; rewrite ^/courses/([^/]+)/index.php$ /main/course_home/course_home.php?cDir=$1 last; - rewrite ^/skill/(\d+)/user/(\d+)$ /main/badge/issued_all.php?skill=$1&user=$2 last; - rewrite ^/badge/(\d+)/user/(\d+)$ /main/badge/issued_all.php?skill=$1&user=$2 last; + rewrite ^/skill/(\d+)/user/(\d+)$ /main/skills/issued_all.php?skill=$1&user=$2 last; + rewrite ^/badge/(\d+)/user/(\d+)$ /main/skills/issued_all.php?skill=$1&user=$2 last; try_files $uri @rewrite; } @@ -851,7 +851,7 @@ Ce sont uniquement les redirections à placer dans un bloc server{}, comme les a rewrite ^/courses/([^/]+)/$ /main/course_home/course_home.php?cDir=$1 last; rewrite ^/courses/([^/]+)/index.php$ /main/course_home/course_home.php?cDir=$1 last; rewrite ^/session/([^/]+)/about/?$ /main/session/about.php?session_id=$1 last; - rewrite ^/badge/([^/]+) /main/badge/issued.php?issue=$1 last; + rewrite ^/badge/([^/]+) /main/skills/issued.php?issue=$1 last; rewrite ^/main/exercice/(.+)$ /main/exercise/$1 last; rewrite ^/main/newscorm/(.+)$ /main/lp/$1 last; @@ -945,15 +945,15 @@ Ce sont uniquement les redirections à placer dans un bloc server{}, comme les a </rule> <rule name="rule 13v" stopProcessing="true"> <match url="^badge/(\d{1,})" /> - <action type="Rewrite" url="/main/badge/issued.php?issue={R:1}" /> + <action type="Rewrite" url="/main/skills/issued.php?issue={R:1}" /> </rule> <rule name="rule 14v" stopProcessing="true"> <match url="^skill/(\d{1,})/user/(\d{1,})" /> - <action type="Rewrite" url="/main/badge/issued_all.php?skill={R:1}&user={R:2}" /> + <action type="Rewrite" url="/main/skills/issued_all.php?skill={R:1}&user={R:2}" /> </rule> <rule name="rule 15v" stopProcessing="true"> <match url="^badge/(\d{1,})/user/(\d{1,})" /> - <action type="Rewrite" url="/main/badge/issued_all.php?skill={R:1}&user={R:2}" /> + <action type="Rewrite" url="/main/skills/issued_all.php?skill={R:1}&user={R:2}" /> </rule> <rule name="rule 16v" stopProcessing="true"> <match url="^main/exercice/(.*)$" /> diff --git a/public/main/admin/index.php b/public/main/admin/index.php index c02823e372..b4d8c519e2 100644 --- a/public/main/admin/index.php +++ b/public/main/admin/index.php @@ -271,19 +271,19 @@ if (api_is_platform_admin()) { $items = []; $items[] = [ - 'url' => 'skills_wheel.php', + 'url' => api_get_path(WEB_CODE_PATH).'skills/skills_wheel.php', 'label' => get_lang('Skills wheel'), ]; $items[] = [ - 'url' => 'skills_import.php', + 'url' => api_get_path(WEB_CODE_PATH).'skills/skills_import.php', 'label' => get_lang('Skills import'), ]; $items[] = [ - 'url' => 'skill_list.php', + 'url' => api_get_path(WEB_CODE_PATH).'skills/skill_list.php', 'label' => get_lang('Manage skills'), ]; $items[] = [ - 'url' => 'skill.php', + 'url' => api_get_path(WEB_CODE_PATH).'skills/skill.php', 'label' => get_lang('Manage skills levels'), ]; @@ -292,11 +292,11 @@ if (api_is_platform_admin()) { 'label' => get_lang('Skills ranking'), ]; $items[] = [ - 'url' => 'skills_gradebook.php', + 'url' => api_get_path(WEB_CODE_PATH).'skills/skills_gradebook.php', 'label' => get_lang('Skills and assessments'), ]; /*$items[] = array( - 'url' => api_get_path(WEB_CODE_PATH).'admin/skill_badge.php', + 'url' => api_get_path(WEB_CODE_PATH).'skills/skill_badge.php', 'label' => get_lang('Badges') );*/ $allow = api_get_configuration_value('gradebook_dependency'); diff --git a/public/main/admin/sub_language_ajax.inc.php b/public/main/admin/sub_language_ajax.inc.php index ea09a6327f..ee5fab3d6f 100644 --- a/public/main/admin/sub_language_ajax.inc.php +++ b/public/main/admin/sub_language_ajax.inc.php @@ -78,7 +78,7 @@ if (isset($new_language) && isset($language_variable) && isset($file_id)) { } if (isset($_REQUEST['skill'])) { - header('Location: '.api_get_path(WEB_CODE_PATH).'admin/skill_list.php'); + header('Location: '.api_get_path(WEB_CODE_PATH).'skills/skill_list.php'); exit; } } diff --git a/public/main/admin/user_information.php b/public/main/admin/user_information.php index 70194c7c4c..81cb600578 100644 --- a/public/main/admin/user_information.php +++ b/public/main/admin/user_information.php @@ -111,7 +111,7 @@ if (api_is_platform_admin()) { ICON_SIZE_MEDIUM, false ), - api_get_path(WEB_CODE_PATH).'badge/assign.php?user='.$userId + api_get_path(WEB_CODE_PATH).'skills/assign.php?user='.$userId ); } } diff --git a/public/main/admin/user_list.php b/public/main/admin/user_list.php index 1370639467..b6e8b7a08a 100644 --- a/public/main/admin/user_list.php +++ b/public/main/admin/user_list.php @@ -624,7 +624,7 @@ function modify_filter($user_id, $url_params, $row) 22, get_lang('Assign skill') ), - api_get_path(WEB_CODE_PATH).'badge/assign.php?'.http_build_query(['user' => $user_id]) + api_get_path(WEB_CODE_PATH).'skills/assign.php?'.http_build_query(['user' => $user_id]) ); } diff --git a/public/main/gradebook/get_badges.php b/public/main/gradebook/get_badges.php index 6ac1123839..c844fe28b8 100644 --- a/public/main/gradebook/get_badges.php +++ b/public/main/gradebook/get_badges.php @@ -29,7 +29,7 @@ if (empty($userSkills)) { $assertions = []; foreach ($userSkills as $skill) { $skillId = current($skill); - $assertionUrl = api_get_path(WEB_CODE_PATH).'badge/assertion.php?'; + $assertionUrl = api_get_path(WEB_CODE_PATH).'skills/assertion.php?'; $assertionUrl .= http_build_query([ 'user' => $userId, 'skill' => $skillId, diff --git a/public/main/inc/lib/SkillModel.php b/public/main/inc/lib/SkillModel.php index c7cd53fef4..c1e827c0ca 100644 --- a/public/main/inc/lib/SkillModel.php +++ b/public/main/inc/lib/SkillModel.php @@ -1770,7 +1770,7 @@ class SkillModel extends Model $gradeBookList[$gradebook['id']] = $gradebook['name']; } - $translateUrl = api_get_path(WEB_CODE_PATH).'admin/skill_translate.php?'; + $translateUrl = api_get_path(WEB_CODE_PATH).'skills/skill_translate.php?'; $translateNameButton = ''; $translateCodeButton = ''; $skillId = null; @@ -1835,7 +1835,7 @@ class SkillModel extends Model null, ICON_SIZE_MEDIUM ), - api_get_path(WEB_CODE_PATH).'admin/skill_list.php' + api_get_path(WEB_CODE_PATH).'skills/skill_list.php' ); return Display::toolbarAction('skills_toolbar', [$toolbar]); diff --git a/public/main/inc/lib/SkillRelUserModel.php b/public/main/inc/lib/SkillRelUserModel.php index 80bccfa7aa..623bd1bd64 100644 --- a/public/main/inc/lib/SkillRelUserModel.php +++ b/public/main/inc/lib/SkillRelUserModel.php @@ -145,7 +145,7 @@ class SkillRelUserModel extends Model */ public static function getAssertionUrl(SkillRelUser $skillIssue) { - $url = api_get_path(WEB_CODE_PATH).'badge/assertion.php?'; + $url = api_get_path(WEB_CODE_PATH).'skills/assertion.php?'; $url .= http_build_query([ 'user' => $skillIssue->getUser()->getId(), diff --git a/public/main/inc/lib/userportal.lib.php b/public/main/inc/lib/userportal.lib.php index 31be311104..26a8bf1068 100644 --- a/public/main/inc/lib/userportal.lib.php +++ b/public/main/inc/lib/userportal.lib.php @@ -217,7 +217,7 @@ class IndexManager if (($allowSkillsManagement && api_is_drh()) || api_is_platform_admin()) { $items[] = [ 'icon' => Display::return_icon('edit-skill.png', get_lang('My skills')), - 'link' => api_get_path(WEB_CODE_PATH).'admin/skills_wheel.php', + 'link' => api_get_path(WEB_CODE_PATH).'skills/skills_wheel.php', 'title' => get_lang('Manage skills'), ]; } diff --git a/public/main/mySpace/myStudents.php b/public/main/mySpace/myStudents.php index abb927827a..ef2d165a7d 100644 --- a/public/main/mySpace/myStudents.php +++ b/public/main/mySpace/myStudents.php @@ -774,7 +774,7 @@ if (SkillModel::isAllowed($studentId, false)) { null, ICON_SIZE_MEDIUM ), - api_get_path(WEB_CODE_PATH).'badge/assign.php?'.http_build_query(['user' => $studentId]) + api_get_path(WEB_CODE_PATH).'skills/assign.php?'.http_build_query(['user' => $studentId]) ); } diff --git a/public/main/session/resume_session.php b/public/main/session/resume_session.php index f28205e840..3b5f389bbc 100644 --- a/public/main/session/resume_session.php +++ b/public/main/session/resume_session.php @@ -215,7 +215,7 @@ if (0 === $session->getNbrCourses()) { if ($allowSkills) { $courseItem .= Display::url( Display::return_icon('skills.png', get_lang('Skills')), - $codePath.'admin/skill_rel_course.php?session_id='.$sessionId.'&course_id='.$courseId + $codePath.'skills/skill_rel_course.php?session_id='.$sessionId.'&course_id='.$courseId ); } $courseItem .= $orderButtons; diff --git a/public/main/badge/assertion.php b/public/main/skills/assertion.php similarity index 89% rename from public/main/badge/assertion.php rename to public/main/skills/assertion.php index 0efc0c9926..9af7ba386b 100644 --- a/public/main/badge/assertion.php +++ b/public/main/skills/assertion.php @@ -44,10 +44,10 @@ $json = [ 'identity' => $user['email'], ], 'issuedOn' => strtotime($userSkill['acquired_skill_at']), - 'badge' => api_get_path(WEB_CODE_PATH)."badge/class.php?id=$skillId", + 'badge' => api_get_path(WEB_CODE_PATH)."skills/class.php?id=$skillId", 'verify' => [ 'type' => 'hosted', - 'url' => api_get_path(WEB_CODE_PATH)."badge/assertion.php?".http_build_query([ + 'url' => api_get_path(WEB_CODE_PATH)."skills/assertion.php?".http_build_query([ 'user' => $userId, 'skill' => $skillId, 'course' => $courseId, diff --git a/public/main/badge/assign.php b/public/main/skills/assign.php similarity index 98% rename from public/main/badge/assign.php rename to public/main/skills/assign.php index 1c9745dad8..8bd06db8d4 100644 --- a/public/main/badge/assign.php +++ b/public/main/skills/assign.php @@ -319,7 +319,7 @@ if ($form->validate()) { $bossList = UserManager::getStudentBossList($userId); if (!empty($bossList)) { Display::addFlash(Display::return_message(get_lang('Message Sent'))); - $url = api_get_path(WEB_CODE_PATH).'badge/assign.php?user='.$userId.'&id='.$parentId; + $url = api_get_path(WEB_CODE_PATH).'skills/assign.php?user='.$userId.'&id='.$parentId; $link = Display::url($url, $url); $subject = get_lang('A student has obtained the number of sub-skills needed to validate the mother skill.'); $message = sprintf( @@ -405,7 +405,7 @@ if (api_is_drh()) { ]; } -$url = api_get_path(WEB_CODE_PATH).'badge/assign.php?user='.$userId; +$url = api_get_path(WEB_CODE_PATH).'skills/assign.php?user='.$userId; $disableSelect = ''; if ($disableList) { diff --git a/public/main/badge/class.php b/public/main/skills/class.php similarity index 80% rename from public/main/badge/class.php rename to public/main/skills/class.php index 020aee2ed8..f8d0b32ca3 100644 --- a/public/main/badge/class.php +++ b/public/main/skills/class.php @@ -19,8 +19,8 @@ if ($skill) { 'name' => $skill['name'], 'description' => $skill['description'], 'image' => api_get_path(WEB_UPLOAD_PATH)."badges/{$skill['icon']}", - 'criteria' => api_get_path(WEB_CODE_PATH)."badge/criteria.php?id=$skillId", - 'issuer' => api_get_path(WEB_CODE_PATH).'badge/issuer.php', + 'criteria' => api_get_path(WEB_CODE_PATH)."skills/criteria.php?id=$skillId", + 'issuer' => api_get_path(WEB_CODE_PATH).'skills/issuer.php', ]; } diff --git a/public/main/badge/criteria.php b/public/main/skills/criteria.php similarity index 100% rename from public/main/badge/criteria.php rename to public/main/skills/criteria.php diff --git a/public/main/badge/issued.php b/public/main/skills/issued.php similarity index 100% rename from public/main/badge/issued.php rename to public/main/skills/issued.php diff --git a/public/main/badge/issued_all.php b/public/main/skills/issued_all.php similarity index 100% rename from public/main/badge/issued_all.php rename to public/main/skills/issued_all.php diff --git a/public/main/badge/issuer.php b/public/main/skills/issuer.php similarity index 100% rename from public/main/badge/issuer.php rename to public/main/skills/issuer.php diff --git a/public/main/admin/skill.php b/public/main/skills/skill.php similarity index 98% rename from public/main/admin/skill.php rename to public/main/skills/skill.php index 12296e35b0..ecfd68744f 100644 --- a/public/main/admin/skill.php +++ b/public/main/skills/skill.php @@ -88,7 +88,7 @@ switch ($action) { } $tpl->assign('list', $list); -$view = $tpl->get_template('admin/skill.tpl'); +$view = $tpl->get_template('skills/skill.tpl'); $contentTemplate = $tpl->fetch($view); $tpl->assign('actions', $toolbarAction); $tpl->assign('content', $contentTemplate); diff --git a/public/main/admin/skill_badge.php b/public/main/skills/skill_badge.php similarity index 95% rename from public/main/admin/skill_badge.php rename to public/main/skills/skill_badge.php index f18da8207c..fca4fcca0b 100644 --- a/public/main/admin/skill_badge.php +++ b/public/main/skills/skill_badge.php @@ -35,7 +35,7 @@ $toolbar = Display::url( null, ICON_SIZE_MEDIUM ), - api_get_path(WEB_CODE_PATH).'admin/skill_list.php', + api_get_path(WEB_CODE_PATH).'skills/skill_list.php', ['title' => get_lang('Manage skills')] ); diff --git a/public/main/admin/skill_badge_create.php b/public/main/skills/skill_badge_create.php similarity index 97% rename from public/main/admin/skill_badge_create.php rename to public/main/skills/skill_badge_create.php index 6f3717e352..cadbb7aead 100644 --- a/public/main/admin/skill_badge_create.php +++ b/public/main/skills/skill_badge_create.php @@ -65,7 +65,7 @@ if ('POST' === $_SERVER['REQUEST_METHOD']) { Display::addFlash(Display::return_message(get_lang('Update successful'))); } - api_location(api_get_path(WEB_CODE_PATH).'admin/skill_list.php'); + api_location(api_get_path(WEB_CODE_PATH).'skills/skill_list.php'); } $interbreadcrumb[] = [ diff --git a/public/main/admin/skill_badge_list.php b/public/main/skills/skill_badge_list.php similarity index 90% rename from public/main/admin/skill_badge_list.php rename to public/main/skills/skill_badge_list.php index 05faaf2fb2..03aaa67132 100644 --- a/public/main/admin/skill_badge_list.php +++ b/public/main/skills/skill_badge_list.php @@ -26,7 +26,7 @@ $interbreadcrumb = [ 'name' => get_lang('Administration'), ], [ - 'url' => api_get_path(WEB_CODE_PATH).'admin/skill_badge.php', + 'url' => api_get_path(WEB_CODE_PATH).'skills/skill_badge.php', 'name' => get_lang('Badges'), ], ]; @@ -38,7 +38,7 @@ $toolbar = Display::url( null, ICON_SIZE_MEDIUM ), - api_get_path(WEB_CODE_PATH).'admin/skill_list.php', + api_get_path(WEB_CODE_PATH).'skills/skill_list.php', ['title' => get_lang('Manage skills')] ); diff --git a/public/main/admin/skill_create.php b/public/main/skills/skill_create.php similarity index 93% rename from public/main/admin/skill_create.php rename to public/main/skills/skill_create.php index 577fa8b6a6..6f3922cb7d 100644 --- a/public/main/admin/skill_create.php +++ b/public/main/skills/skill_create.php @@ -61,7 +61,7 @@ if ($createForm->validate()) { $extraFieldValue = new ExtraFieldValue('skill'); $extraFieldValue->saveFieldValues($skillValues); if ($created) { - $url = api_get_path(WEB_CODE_PATH).'admin/skill_edit.php?id='.$created; + $url = api_get_path(WEB_CODE_PATH).'skills/skill_edit.php?id='.$created; $link = Display::url($skillValues['name'], $url); Display::addFlash( Display::return_message(get_lang('The skill has been created').': '.$link, 'success', false) @@ -72,7 +72,7 @@ if ($createForm->validate()) { ); } - header('Location: '.api_get_path(WEB_CODE_PATH).'admin/skill_list.php'); + header('Location: '.api_get_path(WEB_CODE_PATH).'skills/skill_list.php'); exit; } diff --git a/public/main/admin/skill_edit.php b/public/main/skills/skill_edit.php similarity index 97% rename from public/main/admin/skill_edit.php rename to public/main/skills/skill_edit.php index 16313a29e7..4279751355 100644 --- a/public/main/admin/skill_edit.php +++ b/public/main/skills/skill_edit.php @@ -91,7 +91,7 @@ if ($editForm->validate()) { ); } - header('Location: '.api_get_path(WEB_CODE_PATH).'admin/skill_list.php'); + header('Location: '.api_get_path(WEB_CODE_PATH).'skills/skill_list.php'); exit; } diff --git a/public/main/admin/skill_example.csv b/public/main/skills/skill_example.csv similarity index 100% rename from public/main/admin/skill_example.csv rename to public/main/skills/skill_example.csv diff --git a/public/main/admin/skill_level.php b/public/main/skills/skill_level.php similarity index 96% rename from public/main/admin/skill_level.php rename to public/main/skills/skill_level.php index b517c45ed8..303ed678b2 100644 --- a/public/main/admin/skill_level.php +++ b/public/main/skills/skill_level.php @@ -54,7 +54,7 @@ if (!empty($item)) { $formToDisplay = ''; $interbreadcrumb[] = ['url' => 'index.php', 'name' => get_lang('Administration')]; -$interbreadcrumb[] = ['url' => api_get_path(WEB_CODE_PATH).'admin/skill.php', 'name' => get_lang('Manage skills levels')]; +$interbreadcrumb[] = ['url' => api_get_path(WEB_CODE_PATH).'skills/skill.php', 'name' => get_lang('Manage skills levels')]; $interbreadcrumb[] = ['url' => api_get_self(), 'name' => get_lang('Skill level')]; switch ($action) { @@ -157,7 +157,7 @@ switch ($action) { $tpl = new Template($action); $tpl->assign('form', $formToDisplay); $tpl->assign('list', $list); -$templateName = $tpl->get_template('admin/skill_level.tpl'); +$templateName = $tpl->get_template('skills/skill_level.tpl'); $contentTemplate = $tpl->fetch($templateName); $tpl->assign('actions', Display::toolbarAction('toolbar', [$toolbarAction])); $tpl->assign('content', $contentTemplate); diff --git a/public/main/admin/skill_list.php b/public/main/skills/skill_list.php similarity index 96% rename from public/main/admin/skill_list.php rename to public/main/skills/skill_list.php index 86f5a43cd2..6a1557e22e 100644 --- a/public/main/admin/skill_list.php +++ b/public/main/skills/skill_list.php @@ -123,7 +123,7 @@ switch ($action) { null, ICON_SIZE_MEDIUM ), - api_get_path(WEB_CODE_PATH).'admin/skill_create.php', + api_get_path(WEB_CODE_PATH).'skills/skill_create.php', ['title' => get_lang('Create skill')] ); @@ -134,7 +134,7 @@ switch ($action) { null, ICON_SIZE_MEDIUM ), - api_get_path(WEB_CODE_PATH).'admin/skills_wheel.php', + api_get_path(WEB_CODE_PATH).'skills/skills_wheel.php', ['title' => get_lang('Skills wheel')] ); @@ -145,7 +145,7 @@ switch ($action) { null, ICON_SIZE_MEDIUM ), - api_get_path(WEB_CODE_PATH).'admin/skills_import.php', + api_get_path(WEB_CODE_PATH).'skills/skills_import.php', ['title' => get_lang('Import skills from a CSV file')] ); diff --git a/public/main/admin/skill_profile.php b/public/main/skills/skill_profile.php similarity index 96% rename from public/main/admin/skill_profile.php rename to public/main/skills/skill_profile.php index a032a0e5af..d973b24aa7 100644 --- a/public/main/admin/skill_profile.php +++ b/public/main/skills/skill_profile.php @@ -45,7 +45,7 @@ if (!empty($item)) { $formToDisplay = $form->returnForm(); $interbreadcrumb[] = ['url' => 'index.php', 'name' => get_lang('Administration')]; -$interbreadcrumb[] = ['url' => api_get_path(WEB_CODE_PATH).'admin/skill.php', 'name' => get_lang('Manage skills levels')]; +$interbreadcrumb[] = ['url' => api_get_path(WEB_CODE_PATH).'skills/skill.php', 'name' => get_lang('Manage skills levels')]; $interbreadcrumb[] = ['url' => api_get_self(), 'name' => get_lang('Skill profile')]; $toolbar = null; @@ -166,7 +166,7 @@ switch ($action) { } $tpl->assign('list', $list); -$templateName = $tpl->get_template('admin/skill_profile.tpl'); +$templateName = $tpl->get_template('skills/skill_profile.tpl'); $contentTemplate = $tpl->fetch($templateName); if ($toolbar) { diff --git a/public/main/admin/skill_rel_course.php b/public/main/skills/skill_rel_course.php similarity index 100% rename from public/main/admin/skill_rel_course.php rename to public/main/skills/skill_rel_course.php diff --git a/public/main/admin/skill_translate.php b/public/main/skills/skill_translate.php similarity index 97% rename from public/main/admin/skill_translate.php rename to public/main/skills/skill_translate.php index bd2a774c76..a3703dd844 100644 --- a/public/main/admin/skill_translate.php +++ b/public/main/skills/skill_translate.php @@ -47,7 +47,7 @@ if (empty($originalName)) { Display::addFlash( Display::return_message(get_lang('Could not translate'), 'error') ); - header('Location: '.api_get_path(WEB_CODE_PATH).'admin/skill_edit.php?id='.$skill->getId()); + header('Location: '.api_get_path(WEB_CODE_PATH).'skills/skill_edit.php?id='.$skill->getId()); exit; } diff --git a/public/main/admin/skills.php b/public/main/skills/skills.php similarity index 100% rename from public/main/admin/skills.php rename to public/main/skills/skills.php diff --git a/public/main/admin/skills_gradebook.php b/public/main/skills/skills_gradebook.php similarity index 100% rename from public/main/admin/skills_gradebook.php rename to public/main/skills/skills_gradebook.php diff --git a/public/main/admin/skills_import.php b/public/main/skills/skills_import.php similarity index 100% rename from public/main/admin/skills_import.php rename to public/main/skills/skills_import.php diff --git a/public/main/admin/skills_profile.php b/public/main/skills/skills_profile.php similarity index 100% rename from public/main/admin/skills_profile.php rename to public/main/skills/skills_profile.php diff --git a/public/main/admin/skills_wheel.php b/public/main/skills/skills_wheel.php similarity index 100% rename from public/main/admin/skills_wheel.php rename to public/main/skills/skills_wheel.php diff --git a/public/main/template/default/skill/badge.html.twig b/public/main/template/default/skill/badge.html.twig index 57b19f9cd4..9a25a9209d 100644 --- a/public/main/template/default/skill/badge.html.twig +++ b/public/main/template/default/skill/badge.html.twig @@ -1,10 +1,10 @@
diff --git a/public/main/template/default/skill/badge_list.html.twig b/public/main/template/default/skill/badge_list.html.twig index f6025cf214..594a09ee8e 100644 --- a/public/main/template/default/skill/badge_list.html.twig +++ b/public/main/template/default/skill/badge_list.html.twig @@ -1,10 +1,10 @@
@@ -30,7 +30,7 @@ {{ skill.description }} - diff --git a/public/main/template/default/skill/drh_report.html.twig b/public/main/template/default/skill/drh_report.html.twig index e065b52021..9ece2117ed 100644 --- a/public/main/template/default/skill/drh_report.html.twig +++ b/public/main/template/default/skill/drh_report.html.twig @@ -4,7 +4,7 @@ {{ 'SkillsWheel' | trans }} {% if allow_drh_skills_management %} - + {{ 'ManageSkills' | trans }} {% endif %} diff --git a/public/main/template/default/skill/list.html.twig b/public/main/template/default/skill/list.html.twig index 1af73dbcf8..2783f50350 100644 --- a/public/main/template/default/skill/list.html.twig +++ b/public/main/template/default/skill/list.html.twig @@ -49,29 +49,29 @@
{{ 'pencil' | mdi_icon }} {{ 'plus' | mdi_icon }} {{ 'shield-star-outline' | mdi_icon }} {% if skill.status == 0 %} {{ 'check-circle' | mdi_icon }} {% else %} {{ 'cancel' | mdi_icon }} @@ -90,7 +90,7 @@ var tagId = $( "#tag-filter option:selected" ).val(); $(location).attr( 'href', - '{{ url('legacy_main', { 'name' : 'admin/skill_list.php'}) }}' + tagId + '{{ url('legacy_main', { 'name' : 'skills/skill_list.php'}) }}' + tagId ); }); }); diff --git a/public/main/template/default/skill/skill_wheel.html.twig b/public/main/template/default/skill/skill_wheel.html.twig index 8036de7ff8..1595de0c12 100644 --- a/public/main/template/default/skill/skill_wheel.html.twig +++ b/public/main/template/default/skill/skill_wheel.html.twig @@ -427,7 +427,7 @@ } - window.location.href = "{{ url('legacy_main', {'name': 'admin/skill_edit.php?id=' }) }}" + SkillWheel.currentSkill.id; + window.location.href = "{{ url('legacy_main', {'name': 'skills/skill_edit.php?id=' }) }}" + SkillWheel.currentSkill.id; }); $('#form-button-create-child').on('click', function (e) { @@ -437,7 +437,7 @@ return; } - window.location.href = "{{ url('legacy_main', {'name': 'admin/skill_create.php?parent=' }) }}" + SkillWheel.currentSkill.id; + window.location.href = "{{ url('legacy_main', {'name': 'skills/skill_create.php?parent=' }) }}" + SkillWheel.currentSkill.id; }); $('#form-button-add-to-profile').on('click', function (e) { diff --git a/public/main/template/default/admin/skill.html.twig b/public/main/template/default/skills/skill.html.twig similarity index 66% rename from public/main/template/default/admin/skill.html.twig rename to public/main/template/default/skills/skill.html.twig index eba2dae42c..d562e72387 100644 --- a/public/main/template/default/admin/skill.html.twig +++ b/public/main/template/default/skills/skill.html.twig @@ -3,14 +3,14 @@
  • {{ 'Add profile' | trans }}
  • {{ 'Add level' | trans }} @@ -28,11 +28,11 @@ ({{ item.shortCode }}) {% endif %} {{ 'pencil'|mdi_icon(22) }} {{ item.profile }} {% endfor %} -{% endautoescape %} \ No newline at end of file +{% endautoescape %} diff --git a/public/main/template/default/admin/skill_level.html.twig b/public/main/template/default/skills/skill_level.html.twig similarity index 73% rename from public/main/template/default/admin/skill_level.html.twig rename to public/main/template/default/skills/skill_level.html.twig index e4a4cb84c3..a53afc6e97 100644 --- a/public/main/template/default/admin/skill_level.html.twig +++ b/public/main/template/default/skills/skill_level.html.twig @@ -18,13 +18,13 @@ {{ item.profile }} {{ 'pencil'|mdi_icon(22) }} {{ 'delete'|mdi_icon(22) }} @@ -32,4 +32,4 @@ {% endfor %} -{% endautoescape %} \ No newline at end of file +{% endautoescape %} diff --git a/public/main/template/default/admin/skill_profile.html.twig b/public/main/template/default/skills/skill_profile.html.twig similarity index 62% rename from public/main/template/default/admin/skill_profile.html.twig rename to public/main/template/default/skills/skill_profile.html.twig index bf140c493f..365fecaa03 100644 --- a/public/main/template/default/admin/skill_profile.html.twig +++ b/public/main/template/default/skills/skill_profile.html.twig @@ -6,17 +6,17 @@ {% for item in list %}

    {{ item.name }} - {##} + {##} {##} {##} @@ -29,7 +29,7 @@ {% else %} @@ -39,7 +39,7 @@ {% else %} @@ -48,4 +48,4 @@ {% endfor %}

{% endfor %} -{% endautoescape %} \ No newline at end of file +{% endautoescape %} diff --git a/src/CoreBundle/Controller/BadgeController.php b/src/CoreBundle/Controller/BadgeController.php index 59de15188d..f8ba9145f3 100644 --- a/src/CoreBundle/Controller/BadgeController.php +++ b/src/CoreBundle/Controller/BadgeController.php @@ -19,7 +19,7 @@ class BadgeController extends AbstractController public function issued(int $id): Response { return $this->redirect( - '/main/badge/issued.php?'.http_build_query(['issue' => $id]) + '/main/skills/issued.php?'.http_build_query(['issue' => $id]) ); } @@ -28,7 +28,7 @@ class BadgeController extends AbstractController public function issuedAll(int $skillId, int $userId): Response { return $this->redirect( - '/main/badge/issued_all.php?'.http_build_query(['skill' => $skillId, 'user' => $userId]) + '/main/skills/issued_all.php?'.http_build_query(['skill' => $skillId, 'user' => $userId]) ); } } diff --git a/src/CoreBundle/Entity/SkillRelUser.php b/src/CoreBundle/Entity/SkillRelUser.php index f8076cf156..b9e5f53e76 100644 --- a/src/CoreBundle/Entity/SkillRelUser.php +++ b/src/CoreBundle/Entity/SkillRelUser.php @@ -308,7 +308,7 @@ class SkillRelUser */ public function getAssertionUrl() { - $url = api_get_path(WEB_CODE_PATH).'badge/assertion.php?'; + $url = api_get_path(WEB_CODE_PATH).'skills/assertion.php?'; return $url.http_build_query([ 'user' => $this->user->getId(), diff --git a/tests/behat/features/skill.feature b/tests/behat/features/skill.feature index 472a9812af..a85671bd27 100644 --- a/tests/behat/features/skill.feature +++ b/tests/behat/features/skill.feature @@ -5,7 +5,7 @@ Feature: Skills Scenario: Create a skill skill1 Given I am a platform administrator - And I am on "main/admin/skill_create.php" + And I am on "main/skills/skill_create.php" When I fill in the following: | name | skill1 | | short_code | s1 | @@ -17,7 +17,7 @@ Feature: Skills Scenario: Create a second level skill Given I am a platform administrator - And I am on "main/admin/skill_create.php" + And I am on "main/skills/skill_create.php" When I fill in the following: | name | skill11 | | short_code | s11 | @@ -30,7 +30,7 @@ Feature: Skills Scenario: Create a skill skilldis Given I am a platform administrator - And I am on "main/admin/skill_create.php" + And I am on "main/skills/skill_create.php" When I fill in the following: | name | skilldis | | short_code | sdis | @@ -40,41 +40,41 @@ Feature: Skills And wait for the page to be loaded Then I should see "The skill has been created: skilldis" - # This following scenario needs to be adapted because + # This following scenario needs to be adapted because # the first skill in the list is disable and not the one named skilldis - # So Intead of having then I follow "Disable" I put the exact page "/main/admin/skill_list.php?id=4&action=disable" + # So Intead of having then I follow "Disable" I put the exact page "/main/skills/skill_list.php?id=4&action=disable" # where I should get because there is nothing unique to identify this link other than the URL # The problem is that it will only work if the there was no skills created before lauching the behat tests # The disable function works, it's the behat test that do no activate the function on the correct line Scenario: Disable a skill skilldis Given I am a platform administrator - And I am on "main/admin/skill_list.php" + And I am on "main/skills/skill_list.php" And wait for the page to be loaded Then I should see "skilldis" - Then I am on "/main/admin/skill_list.php?id=4&action=disable" + Then I am on "/main/skills/skill_list.php?id=4&action=disable" And wait for the page to be loaded Then I should see "Skill \"skilldis\" disabled" - # This following scenario needs to be adapted because + # This following scenario needs to be adapted because # the first skill in the list is tried to be enable and not the one named skilldis - # So Intead of having then I follow "Enable" I put the exact page "/main/admin/skill_list.php?id=4&action=enable" + # So Intead of having then I follow "Enable" I put the exact page "/main/skills/skill_list.php?id=4&action=enable" # where I should get because there is nothing unique to identify this link other than the URL # The problem is that it will only work if the there was no skills created before lauching the behat tests # The enable function works, it's the behat test that do no activate the function on the correct line Scenario: Enable a skill skilldis Given I am a platform administrator - And I am on "main/admin/skill_list.php" + And I am on "main/skills/skill_list.php" And wait for the page to be loaded Then I should see "skilldis" - Then I am on "/main/admin/skill_list.php?id=4&action=enable" + Then I am on "/main/skills/skill_list.php?id=4&action=enable" And wait for the page to be loaded Then I should see "Skill \"skilldis\" enabled" - # This scenario works but it needs to be adapted + # This scenario works but it needs to be adapted # because it does not update skill1 but the first in the list Scenario: Update a skill skill1 Given I am a platform administrator - And I am on "main/admin/skill_list.php" + And I am on "main/skills/skill_list.php" And wait for the page to be loaded Then I should see "skill1" Then I follow "Edit" @@ -87,7 +87,7 @@ Feature: Skills Scenario: Assign skill11 to user 1 Given I am a platform administrator - And I am on "main/badge/assign.php?user=1" + And I am on "main/skills/assign.php?user=1" When I select "skill11" from "skill" And wait for the page to be loaded Then I fill in the following: @@ -99,7 +99,7 @@ Feature: Skills Scenario: Reassign skill11 to user 1 Given I am a platform administrator - And I am on "main/badge/assign.php?user=1" + And I am on "main/skills/assign.php?user=1" When I select "skill11" from "skill" And wait for the page to be loaded Then I fill in the following: @@ -118,7 +118,7 @@ Feature: Skills # The following scenario need to be completed once the funcionality is ready # Scenario: Set a badge to a skill # Given I am a platform administrator -# And I am on "main/admin/skill_list.php" +# And I am on "main/skills/skill_list.php" # Then I should see "skill11" # Then I follow "Create badge" # Then I follow "Browse"