Skills - Move all "skills" and "badge" code inside main/skills - refs CT#2243

pull/4375/head
Christian 3 years ago
parent 4c1786fba7
commit ccfbed0d16
  1. 18
      public/documentation/installation_guide.html
  2. 18
      public/documentation/installation_guide_es_ES.html
  3. 24
      public/documentation/installation_guide_fr_FR.html
  4. 12
      public/main/admin/index.php
  5. 2
      public/main/admin/sub_language_ajax.inc.php
  6. 2
      public/main/admin/user_information.php
  7. 2
      public/main/admin/user_list.php
  8. 2
      public/main/gradebook/get_badges.php
  9. 4
      public/main/inc/lib/SkillModel.php
  10. 2
      public/main/inc/lib/SkillRelUserModel.php
  11. 2
      public/main/inc/lib/userportal.lib.php
  12. 2
      public/main/mySpace/myStudents.php
  13. 2
      public/main/session/resume_session.php
  14. 4
      public/main/skills/assertion.php
  15. 4
      public/main/skills/assign.php
  16. 4
      public/main/skills/class.php
  17. 0
      public/main/skills/criteria.php
  18. 0
      public/main/skills/issued.php
  19. 0
      public/main/skills/issued_all.php
  20. 0
      public/main/skills/issuer.php
  21. 2
      public/main/skills/skill.php
  22. 2
      public/main/skills/skill_badge.php
  23. 2
      public/main/skills/skill_badge_create.php
  24. 4
      public/main/skills/skill_badge_list.php
  25. 4
      public/main/skills/skill_create.php
  26. 2
      public/main/skills/skill_edit.php
  27. 0
      public/main/skills/skill_example.csv
  28. 4
      public/main/skills/skill_level.php
  29. 6
      public/main/skills/skill_list.php
  30. 4
      public/main/skills/skill_profile.php
  31. 0
      public/main/skills/skill_rel_course.php
  32. 2
      public/main/skills/skill_translate.php
  33. 0
      public/main/skills/skills.php
  34. 0
      public/main/skills/skills_gradebook.php
  35. 0
      public/main/skills/skills_import.php
  36. 0
      public/main/skills/skills_profile.php
  37. 0
      public/main/skills/skills_wheel.php
  38. 4
      public/main/template/default/skill/badge.html.twig
  39. 6
      public/main/template/default/skill/badge_list.html.twig
  40. 2
      public/main/template/default/skill/drh_report.html.twig
  41. 12
      public/main/template/default/skill/list.html.twig
  42. 4
      public/main/template/default/skill/skill_wheel.html.twig
  43. 8
      public/main/template/default/skills/skill.html.twig
  44. 6
      public/main/template/default/skills/skill_level.html.twig
  45. 12
      public/main/template/default/skills/skill_profile.html.twig
  46. 4
      src/CoreBundle/Controller/BadgeController.php
  47. 2
      src/CoreBundle/Entity/SkillRelUser.php
  48. 32
      tests/behat/features/skill.feature

@ -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 ^courses/([^/]+)/(.*)$ app/courses/$1/$2 [QSA,L]
RewriteRule ^session/(\d{1,})/about/?$ main/session/about.php?session_id=$1 [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 ^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 ^badge/(\d{1,}) main/skills/issued.php?issue=$1 [L]
RewriteRule ^skill/(\d{1,})/user/(\d{1,}) main/badge/issued_all.php?skill=$1&user=$2 [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/badge/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/exercice/(.*)$ main/exercise/$1 [QSA,L]
RewriteRule ^main/newscorm/(.*)$ main/lp/$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] 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 ^/courses/([^/]+)/(.*)$ /app/courses/$1/$2 last;
rewrite ^/session/([^/]+)/about/?$ /main/session/about.php?session_id=$1 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 ^/course/([^/]+)/about/?$ /main/course_info/about.php?course_id=$1 last;
rewrite ^/badge/(\d+) /main/badge/issued.php?issue=$1 last; rewrite ^/badge/(\d+) /main/skills/issued.php?issue=$1 last;
rewrite ^/skill/(\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/badge/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/exercice/(.*)$ /main/exercise/$1 last;
rewrite ^/main/newscorm/(.*)$ /main/lp/$1 last; rewrite ^/main/newscorm/(.*)$ /main/lp/$1 last;
rewrite ^/service/(\d+)$ /plugin/buycourses/src/service_information.php?service_id=$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>
<rule name="rule 13v" stopProcessing="true"> <rule name="rule 13v" stopProcessing="true">
<match url="^badge/(\d{1,})" /> <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>
<rule name="rule 14v" stopProcessing="true"> <rule name="rule 14v" stopProcessing="true">
<match url="^skill/(\d{1,})/user/(\d{1,})" /> <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>
<rule name="rule 15v" stopProcessing="true"> <rule name="rule 15v" stopProcessing="true">
<match url="^badge/(\d{1,})/user/(\d{1,})" /> <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>
<rule name="rule 16v" stopProcessing="true"> <rule name="rule 16v" stopProcessing="true">
<match url="^main/exercice/(.*)$" /> <match url="^main/exercice/(.*)$" />

@ -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 ^courses/([^/]+)/(.*)$ app/courses/$1/$2 [QSA,L]
RewriteRule ^session/(\d{1,})/about/?$ main/session/about.php?session_id=$1 [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 ^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 ^badge/(\d{1,}) main/skills/issued.php?issue=$1 [L]
RewriteRule ^skill/(\d{1,})/user/(\d{1,}) main/badge/issued_all.php?skill=$1&user=$2 [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/badge/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/exercice/(.*)$ main/exercise/$1 [QSA,L]
RewriteRule ^main/newscorm/(.*)$ main/lp/$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] 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/([^/]+)/work/(.*)$ /main/work/download.php?file=work/$2&cDir=$1 last;
rewrite ^/courses/([^/]+)/(.*)$ /app/courses/$1/$2 last; rewrite ^/courses/([^/]+)/(.*)$ /app/courses/$1/$2 last;
rewrite ^/session/([^/]+)/about/?$ /main/session/about.php?session_id=$1 last; rewrite ^/session/([^/]+)/about/?$ /main/session/about.php?session_id=$1 last;
rewrite ^/badge/(\d+) /main/badge/issued.php?issue=$1 last; rewrite ^/badge/(\d+) /main/skills/issued.php?issue=$1 last;
rewrite ^/skill/(\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/badge/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/exercice/(.*)$ /main/exercise/$1 last;
rewrite ^/main/newscorm/(.*)$ /main/lp/$1 last; rewrite ^/main/newscorm/(.*)$ /main/lp/$1 last;
rewrite ^/service/(\d+)$ /plugin/buycourses/src/service_information.php?service_id=$1 last; rewrite ^/service/(\d+)$ /plugin/buycourses/src/service_information.php?service_id=$1 last;
@ -1035,15 +1035,15 @@ location ^~ /tests/ {
</rule> </rule>
<rule name="rule 13v" stopProcessing="true"> <rule name="rule 13v" stopProcessing="true">
<match url="^badge/(\d{1,})" /> <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>
<rule name="rule 14v" stopProcessing="true"> <rule name="rule 14v" stopProcessing="true">
<match url="^skill/(\d{1,})/user/(\d{1,})" /> <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>
<rule name="rule 15v" stopProcessing="true"> <rule name="rule 15v" stopProcessing="true">
<match url="^badge/(\d{1,})/user/(\d{1,})" /> <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>
<rule name="rule 16v" stopProcessing="true"> <rule name="rule 16v" stopProcessing="true">
<match url="^main/exercice/(.*)$" /> <match url="^main/exercice/(.*)$" />

@ -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 ^courses/([^/]+)/(.*)$ app/courses/$1/$2 [QSA,L]
RewriteRule ^session/(\d{1,})/about/?$ main/session/about.php?session_id=$1 [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 ^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 ^badge/(\d{1,}) main/skills/issued.php?issue=$1 [L]
RewriteRule ^skill/(\d{1,})/user/(\d{1,}) main/badge/issued_all.php?skill=$1&user=$2 [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/badge/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/exercice/(.*)$ main/exercise/$1 [QSA,L]
RewriteRule ^main/newscorm/(.*)$ main/lp/$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] 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/([^/]+)/work/(.*)$ /main/work/download.php?file=work/$2&cDir=$1 last;
rewrite ^/courses/([^/]+)/(.*)$ /app/courses/$1/$2 last; rewrite ^/courses/([^/]+)/(.*)$ /app/courses/$1/$2 last;
rewrite ^/session/([^/]+)/about/?$ /main/session/about.php?session_id=$1 last; rewrite ^/session/([^/]+)/about/?$ /main/session/about.php?session_id=$1 last;
rewrite ^/badge/(\d+) /main/badge/issued.php?issue=$1 last; rewrite ^/badge/(\d+) /main/skills/issued.php?issue=$1 last;
rewrite ^/skill/(\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/badge/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/exercice/(.*)$ /main/exercise/$1 last;
rewrite ^/main/newscorm/(.*)$ /main/lp/$1 last; rewrite ^/main/newscorm/(.*)$ /main/lp/$1 last;
rewrite ^/service/(\d+)$ /plugin/buycourses/src/service_information.php?service_id=$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 / { location / {
rewrite ^/courses/([^/]+)/$ /main/course_home/course_home.php?cDir=$1 last; 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 ^/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 ^/skill/(\d+)/user/(\d+)$ /main/skills/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+)/user/(\d+)$ /main/skills/issued_all.php?skill=$1&user=$2 last;
try_files $uri @rewrite; 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/([^/]+)/$ /main/course_home/course_home.php?cDir=$1 last;
rewrite ^/courses/([^/]+)/index.php$ /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 ^/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/exercice/(.+)$ /main/exercise/$1 last;
rewrite ^/main/newscorm/(.+)$ /main/lp/$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>
<rule name="rule 13v" stopProcessing="true"> <rule name="rule 13v" stopProcessing="true">
<match url="^badge/(\d{1,})" /> <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>
<rule name="rule 14v" stopProcessing="true"> <rule name="rule 14v" stopProcessing="true">
<match url="^skill/(\d{1,})/user/(\d{1,})" /> <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>
<rule name="rule 15v" stopProcessing="true"> <rule name="rule 15v" stopProcessing="true">
<match url="^badge/(\d{1,})/user/(\d{1,})" /> <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>
<rule name="rule 16v" stopProcessing="true"> <rule name="rule 16v" stopProcessing="true">
<match url="^main/exercice/(.*)$" /> <match url="^main/exercice/(.*)$" />

@ -271,19 +271,19 @@ if (api_is_platform_admin()) {
$items = []; $items = [];
$items[] = [ $items[] = [
'url' => 'skills_wheel.php', 'url' => api_get_path(WEB_CODE_PATH).'skills/skills_wheel.php',
'label' => get_lang('Skills wheel'), 'label' => get_lang('Skills wheel'),
]; ];
$items[] = [ $items[] = [
'url' => 'skills_import.php', 'url' => api_get_path(WEB_CODE_PATH).'skills/skills_import.php',
'label' => get_lang('Skills import'), 'label' => get_lang('Skills import'),
]; ];
$items[] = [ $items[] = [
'url' => 'skill_list.php', 'url' => api_get_path(WEB_CODE_PATH).'skills/skill_list.php',
'label' => get_lang('Manage skills'), 'label' => get_lang('Manage skills'),
]; ];
$items[] = [ $items[] = [
'url' => 'skill.php', 'url' => api_get_path(WEB_CODE_PATH).'skills/skill.php',
'label' => get_lang('Manage skills levels'), 'label' => get_lang('Manage skills levels'),
]; ];
@ -292,11 +292,11 @@ if (api_is_platform_admin()) {
'label' => get_lang('Skills ranking'), 'label' => get_lang('Skills ranking'),
]; ];
$items[] = [ $items[] = [
'url' => 'skills_gradebook.php', 'url' => api_get_path(WEB_CODE_PATH).'skills/skills_gradebook.php',
'label' => get_lang('Skills and assessments'), 'label' => get_lang('Skills and assessments'),
]; ];
/*$items[] = array( /*$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') 'label' => get_lang('Badges')
);*/ );*/
$allow = api_get_configuration_value('gradebook_dependency'); $allow = api_get_configuration_value('gradebook_dependency');

@ -78,7 +78,7 @@ if (isset($new_language) && isset($language_variable) && isset($file_id)) {
} }
if (isset($_REQUEST['skill'])) { 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; exit;
} }
} }

@ -111,7 +111,7 @@ if (api_is_platform_admin()) {
ICON_SIZE_MEDIUM, ICON_SIZE_MEDIUM,
false false
), ),
api_get_path(WEB_CODE_PATH).'badge/assign.php?user='.$userId api_get_path(WEB_CODE_PATH).'skills/assign.php?user='.$userId
); );
} }
} }

@ -624,7 +624,7 @@ function modify_filter($user_id, $url_params, $row)
22, 22,
get_lang('Assign skill') 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])
); );
} }

@ -29,7 +29,7 @@ if (empty($userSkills)) {
$assertions = []; $assertions = [];
foreach ($userSkills as $skill) { foreach ($userSkills as $skill) {
$skillId = current($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([ $assertionUrl .= http_build_query([
'user' => $userId, 'user' => $userId,
'skill' => $skillId, 'skill' => $skillId,

@ -1770,7 +1770,7 @@ class SkillModel extends Model
$gradeBookList[$gradebook['id']] = $gradebook['name']; $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 = ''; $translateNameButton = '';
$translateCodeButton = ''; $translateCodeButton = '';
$skillId = null; $skillId = null;
@ -1835,7 +1835,7 @@ class SkillModel extends Model
null, null,
ICON_SIZE_MEDIUM 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]); return Display::toolbarAction('skills_toolbar', [$toolbar]);

@ -145,7 +145,7 @@ class SkillRelUserModel extends Model
*/ */
public static function getAssertionUrl(SkillRelUser $skillIssue) 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([ $url .= http_build_query([
'user' => $skillIssue->getUser()->getId(), 'user' => $skillIssue->getUser()->getId(),

@ -217,7 +217,7 @@ class IndexManager
if (($allowSkillsManagement && api_is_drh()) || api_is_platform_admin()) { if (($allowSkillsManagement && api_is_drh()) || api_is_platform_admin()) {
$items[] = [ $items[] = [
'icon' => Display::return_icon('edit-skill.png', get_lang('My skills')), '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'), 'title' => get_lang('Manage skills'),
]; ];
} }

@ -774,7 +774,7 @@ if (SkillModel::isAllowed($studentId, false)) {
null, null,
ICON_SIZE_MEDIUM 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])
); );
} }

@ -215,7 +215,7 @@ if (0 === $session->getNbrCourses()) {
if ($allowSkills) { if ($allowSkills) {
$courseItem .= Display::url( $courseItem .= Display::url(
Display::return_icon('skills.png', get_lang('Skills')), 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; $courseItem .= $orderButtons;

@ -44,10 +44,10 @@ $json = [
'identity' => $user['email'], 'identity' => $user['email'],
], ],
'issuedOn' => strtotime($userSkill['acquired_skill_at']), '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' => [ 'verify' => [
'type' => 'hosted', '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, 'user' => $userId,
'skill' => $skillId, 'skill' => $skillId,
'course' => $courseId, 'course' => $courseId,

@ -319,7 +319,7 @@ if ($form->validate()) {
$bossList = UserManager::getStudentBossList($userId); $bossList = UserManager::getStudentBossList($userId);
if (!empty($bossList)) { if (!empty($bossList)) {
Display::addFlash(Display::return_message(get_lang('Message Sent'))); 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); $link = Display::url($url, $url);
$subject = get_lang('A student has obtained the number of sub-skills needed to validate the mother skill.'); $subject = get_lang('A student has obtained the number of sub-skills needed to validate the mother skill.');
$message = sprintf( $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 = ''; $disableSelect = '';
if ($disableList) { if ($disableList) {

@ -19,8 +19,8 @@ if ($skill) {
'name' => $skill['name'], 'name' => $skill['name'],
'description' => $skill['description'], 'description' => $skill['description'],
'image' => api_get_path(WEB_UPLOAD_PATH)."badges/{$skill['icon']}", 'image' => api_get_path(WEB_UPLOAD_PATH)."badges/{$skill['icon']}",
'criteria' => api_get_path(WEB_CODE_PATH)."badge/criteria.php?id=$skillId", 'criteria' => api_get_path(WEB_CODE_PATH)."skills/criteria.php?id=$skillId",
'issuer' => api_get_path(WEB_CODE_PATH).'badge/issuer.php', 'issuer' => api_get_path(WEB_CODE_PATH).'skills/issuer.php',
]; ];
} }

@ -88,7 +88,7 @@ switch ($action) {
} }
$tpl->assign('list', $list); $tpl->assign('list', $list);
$view = $tpl->get_template('admin/skill.tpl'); $view = $tpl->get_template('skills/skill.tpl');
$contentTemplate = $tpl->fetch($view); $contentTemplate = $tpl->fetch($view);
$tpl->assign('actions', $toolbarAction); $tpl->assign('actions', $toolbarAction);
$tpl->assign('content', $contentTemplate); $tpl->assign('content', $contentTemplate);

@ -35,7 +35,7 @@ $toolbar = Display::url(
null, null,
ICON_SIZE_MEDIUM 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')] ['title' => get_lang('Manage skills')]
); );

@ -65,7 +65,7 @@ if ('POST' === $_SERVER['REQUEST_METHOD']) {
Display::addFlash(Display::return_message(get_lang('Update successful'))); 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[] = [ $interbreadcrumb[] = [

@ -26,7 +26,7 @@ $interbreadcrumb = [
'name' => get_lang('Administration'), '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'), 'name' => get_lang('Badges'),
], ],
]; ];
@ -38,7 +38,7 @@ $toolbar = Display::url(
null, null,
ICON_SIZE_MEDIUM 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')] ['title' => get_lang('Manage skills')]
); );

@ -61,7 +61,7 @@ if ($createForm->validate()) {
$extraFieldValue = new ExtraFieldValue('skill'); $extraFieldValue = new ExtraFieldValue('skill');
$extraFieldValue->saveFieldValues($skillValues); $extraFieldValue->saveFieldValues($skillValues);
if ($created) { 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); $link = Display::url($skillValues['name'], $url);
Display::addFlash( Display::addFlash(
Display::return_message(get_lang('The skill has been created').': '.$link, 'success', false) 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; exit;
} }

@ -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; exit;
} }

@ -54,7 +54,7 @@ if (!empty($item)) {
$formToDisplay = ''; $formToDisplay = '';
$interbreadcrumb[] = ['url' => 'index.php', 'name' => get_lang('Administration')]; $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')]; $interbreadcrumb[] = ['url' => api_get_self(), 'name' => get_lang('Skill level')];
switch ($action) { switch ($action) {
@ -157,7 +157,7 @@ switch ($action) {
$tpl = new Template($action); $tpl = new Template($action);
$tpl->assign('form', $formToDisplay); $tpl->assign('form', $formToDisplay);
$tpl->assign('list', $list); $tpl->assign('list', $list);
$templateName = $tpl->get_template('admin/skill_level.tpl'); $templateName = $tpl->get_template('skills/skill_level.tpl');
$contentTemplate = $tpl->fetch($templateName); $contentTemplate = $tpl->fetch($templateName);
$tpl->assign('actions', Display::toolbarAction('toolbar', [$toolbarAction])); $tpl->assign('actions', Display::toolbarAction('toolbar', [$toolbarAction]));
$tpl->assign('content', $contentTemplate); $tpl->assign('content', $contentTemplate);

@ -123,7 +123,7 @@ switch ($action) {
null, null,
ICON_SIZE_MEDIUM 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')] ['title' => get_lang('Create skill')]
); );
@ -134,7 +134,7 @@ switch ($action) {
null, null,
ICON_SIZE_MEDIUM 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')] ['title' => get_lang('Skills wheel')]
); );
@ -145,7 +145,7 @@ switch ($action) {
null, null,
ICON_SIZE_MEDIUM 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')] ['title' => get_lang('Import skills from a CSV file')]
); );

@ -45,7 +45,7 @@ if (!empty($item)) {
$formToDisplay = $form->returnForm(); $formToDisplay = $form->returnForm();
$interbreadcrumb[] = ['url' => 'index.php', 'name' => get_lang('Administration')]; $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')]; $interbreadcrumb[] = ['url' => api_get_self(), 'name' => get_lang('Skill profile')];
$toolbar = null; $toolbar = null;
@ -166,7 +166,7 @@ switch ($action) {
} }
$tpl->assign('list', $list); $tpl->assign('list', $list);
$templateName = $tpl->get_template('admin/skill_profile.tpl'); $templateName = $tpl->get_template('skills/skill_profile.tpl');
$contentTemplate = $tpl->fetch($templateName); $contentTemplate = $tpl->fetch($templateName);
if ($toolbar) { if ($toolbar) {

@ -47,7 +47,7 @@ if (empty($originalName)) {
Display::addFlash( Display::addFlash(
Display::return_message(get_lang('Could not translate'), 'error') 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; exit;
} }

@ -1,10 +1,10 @@
<div class="col-md-12"> <div class="col-md-12">
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li class="active"> <li class="active">
<a href="{{ _p.web_main }}admin/skill_badge.php">{{ 'Home' | trans }}</a> <a href="{{ _p.web_main }}skills/skill_badge.php">{{ 'Home' | trans }}</a>
</li> </li>
<li> <li>
<a href="{{ _p.web_main }}admin/skill_badge_list.php">{{ "CurrentBadges" | trans }}</a> <a href="{{ _p.web_main }}skills/skill_badge_list.php">{{ "CurrentBadges" | trans }}</a>
</li> </li>
</ul> </ul>

@ -1,10 +1,10 @@
<div class="col-md-12"> <div class="col-md-12">
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li> <li>
<a href="{{ _p.web_main }}admin/skill_badge.php">{{ 'Home' | trans }}</a> <a href="{{ _p.web_main }}skills/skill_badge.php">{{ 'Home' | trans }}</a>
</li> </li>
<li class="active"> <li class="active">
<a href="{{ _p.web_main }}admin/skill_badge_list.php">{{ "Current badges" | trans }}</a> <a href="{{ _p.web_main }}skills/skill_badge_list.php">{{ "Current badges" | trans }}</a>
</li> </li>
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
@ -30,7 +30,7 @@
</td> </td>
<td>{{ skill.description }}</td> <td>{{ skill.description }}</td>
<td> <td>
<a href="{{ _p.web_main }}admin/skill_badge_create.php?id={{ skill.id }}" <a href="{{ _p.web_main }}skills/skill_badge_create.php?id={{ skill.id }}"
class="btn btn--primary btn-sm" title="{{ "Create badge" | trans }}"> class="btn btn--primary btn-sm" title="{{ "Create badge" | trans }}">
<em class="fa fa-shield fa-fw"></em> <em class="fa fa-shield fa-fw"></em>
</a> </a>

@ -4,7 +4,7 @@
{{ 'SkillsWheel' | trans }} {{ 'SkillsWheel' | trans }}
</a> </a>
{% if allow_drh_skills_management %} {% if allow_drh_skills_management %}
<a class="btn btn--plain" href="{{ _p.web_main }}admin/skills_wheel.php"> <a class="btn btn--plain" href="{{ _p.web_main }}skills/skills_wheel.php">
{{ 'ManageSkills' | trans }} {{ 'ManageSkills' | trans }}
</a> </a>
{% endif %} {% endif %}

@ -49,29 +49,29 @@
<td class="text-right"> <td class="text-right">
<div class="btn-group btn-group-sm" role="group" aria-label=""> <div class="btn-group btn-group-sm" role="group" aria-label="">
<a <a
href="{{ url('legacy_main', { 'name' : 'admin/skill_edit.php', 'id' : skill.id }) }}" href="{{ url('legacy_main', { 'name' : 'skills/skill_edit.php', 'id' : skill.id }) }}"
class="btn btn--primary btn-sm" title="{{ "Edit" | trans }}"> class="btn btn--primary btn-sm" title="{{ "Edit" | trans }}">
{{ 'pencil' | mdi_icon }} {{ 'pencil' | mdi_icon }}
</a> </a>
<a <a
href="{{ url('legacy_main', { 'name' : 'admin/skill_create.php', 'parent' : skill.id }) }}" href="{{ url('legacy_main', { 'name' : 'skills/skill_create.php', 'parent' : skill.id }) }}"
class="btn btn--plain btn-sm" title="{{ "Create child skill" | trans }}"> class="btn btn--plain btn-sm" title="{{ "Create child skill" | trans }}">
{{ 'plus' | mdi_icon }} {{ 'plus' | mdi_icon }}
</a> </a>
<a <a
href="{{ url('legacy_main', { 'name' : 'admin/skill_badge_create.php', 'id' : skill.id }) }}" href="{{ url('legacy_main', { 'name' : 'skills/skill_badge_create.php', 'id' : skill.id }) }}"
class="btn btn-light btn-sm" title="{{ "Create badge" | trans }}"> class="btn btn-light btn-sm" title="{{ "Create badge" | trans }}">
{{ 'shield-star-outline' | mdi_icon }} {{ 'shield-star-outline' | mdi_icon }}
</a> </a>
{% if skill.status == 0 %} {% if skill.status == 0 %}
<a <a
href="{{ url('legacy_main', { 'name' : 'admin/skill_list.php', 'id' : skill.id, 'action': 'enable' }) }}" href="{{ url('legacy_main', { 'name' : 'skills/skill_list.php', 'id' : skill.id, 'action': 'enable' }) }}"
class="btn btn--success btn-sm" title="{{ 'Enable' }}"> class="btn btn--success btn-sm" title="{{ 'Enable' }}">
{{ 'check-circle' | mdi_icon }} {{ 'check-circle' | mdi_icon }}
</a> </a>
{% else %} {% else %}
<a <a
href="{{ url('legacy_main', { 'name' : 'admin/skill_list.php', 'id' : skill.id, 'action': 'disable' }) }}" href="{{ url('legacy_main', { 'name' : 'skills/skill_list.php', 'id' : skill.id, 'action': 'disable' }) }}"
class="btn btn-sm" title="{{ 'Disable' }}"> class="btn btn-sm" title="{{ 'Disable' }}">
{{ 'cancel' | mdi_icon }} {{ 'cancel' | mdi_icon }}
</a> </a>
@ -90,7 +90,7 @@
var tagId = $( "#tag-filter option:selected" ).val(); var tagId = $( "#tag-filter option:selected" ).val();
$(location).attr( $(location).attr(
'href', 'href',
'{{ url('legacy_main', { 'name' : 'admin/skill_list.php'}) }}' + tagId '{{ url('legacy_main', { 'name' : 'skills/skill_list.php'}) }}' + tagId
); );
}); });
}); });

@ -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) { $('#form-button-create-child').on('click', function (e) {
@ -437,7 +437,7 @@
return; 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) { $('#form-button-add-to-profile').on('click', function (e) {

@ -3,14 +3,14 @@
<ul> <ul>
<li> <li>
<a <a
href="{{ url('legacy_main', {'name' : 'admin/skill_profile.php'}) }}" href="{{ url('legacy_main', {'name' : 'skills/skill_profile.php'}) }}"
> >
{{ 'Add profile' | trans }} {{ 'Add profile' | trans }}
</a> </a>
</li> </li>
<li> <li>
<a <a
href="{{ url('legacy_main', {'name' : 'admin/skill_level.php'}) }}" href="{{ url('legacy_main', {'name' : 'skills/skill_level.php'}) }}"
> >
{{ 'Add level' | trans }} {{ 'Add level' | trans }}
</a> </a>
@ -28,11 +28,11 @@
({{ item.shortCode }}) ({{ item.shortCode }})
{% endif %} {% endif %}
<a <a
href="{{ url('legacy_main', {'name' : 'admin/skill.php'}) ~ '?action=edit&id=' ~ item.id}}" href="{{ url('legacy_main', {'name' : 'skills/skill.php'}) ~ '?action=edit&id=' ~ item.id}}"
> >
{{ 'pencil'|mdi_icon(22) }} {{ 'pencil'|mdi_icon(22) }}
</a> </a>
</h4> </h4>
{{ item.profile }} {{ item.profile }}
{% endfor %} {% endfor %}
{% endautoescape %} {% endautoescape %}

@ -18,13 +18,13 @@
<td> {{ item.profile }}</td> <td> {{ item.profile }}</td>
<td> <td>
<a <a
href="{{ url('legacy_main', {'name' : 'admin/skill_level.php'}) }}?action=edit&id={{ item.id }}" href="{{ url('legacy_main', {'name' : 'skills/skill_level.php'}) }}?action=edit&id={{ item.id }}"
> >
{{ 'pencil'|mdi_icon(22) }} {{ 'pencil'|mdi_icon(22) }}
</a> </a>
<a <a
href="{{ url('legacy_main', {'name' : 'admin/skill_level.php'}) }}?action=delete&id={{ item.id }}" href="{{ url('legacy_main', {'name' : 'skills/skill_level.php'}) }}?action=delete&id={{ item.id }}"
> >
{{ 'delete'|mdi_icon(22) }} {{ 'delete'|mdi_icon(22) }}
</a> </a>
@ -32,4 +32,4 @@
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
{% endautoescape %} {% endautoescape %}

@ -6,17 +6,17 @@
{% for item in list %} {% for item in list %}
<h4>{{ item.name }} <h4>{{ item.name }}
{#<a href="{{ _p.web_main }}admin/skill_level.php?action=add_level&id={{ item.id }}">#} {#<a href="{{ _p.web_main }}skills/skill_level.php?action=add_level&id={{ item.id }}">#}
{#<img src="{{ 'add.png'|icon(22) }}">#} {#<img src="{{ 'add.png'|icon(22) }}">#}
{#</a>#} {#</a>#}
<a <a
href="{{ url('legacy_main', {'name' : 'admin/skill_profile.php'}) }}?action=edit&id={{ item.id }}" href="{{ url('legacy_main', {'name' : 'skills/skill_profile.php'}) }}?action=edit&id={{ item.id }}"
> >
<img src="{{ 'edit.png'|icon(22) }}"> <img src="{{ 'edit.png'|icon(22) }}">
</a> </a>
<a <a
href="{{ url('legacy_main', {'name' : 'admin/skill_profile.php'}) }}?action=delete&id={{ item.id }}" href="{{ url('legacy_main', {'name' : 'skills/skill_profile.php'}) }}?action=delete&id={{ item.id }}"
> >
<img src="{{ 'delete.png'|icon(22) }}"> <img src="{{ 'delete.png'|icon(22) }}">
</a> </a>
@ -29,7 +29,7 @@
<img src="{{ 'up_na.png'|icon(22) }}" /> <img src="{{ 'up_na.png'|icon(22) }}" />
{% else %} {% else %}
<a <a
href="{{ url('legacy_main', {'name' : 'admin/skill_profile.php'}) }}?action=move_up&level_id={{ level.id }}&id={{ item.id }}" href="{{ url('legacy_main', {'name' : 'skills/skill_profile.php'}) }}?action=move_up&level_id={{ level.id }}&id={{ item.id }}"
> >
<img src="{{ 'up.png'|icon(22) }}" /> <img src="{{ 'up.png'|icon(22) }}" />
</a> </a>
@ -39,7 +39,7 @@
<img src="{{ 'down_na.png'|icon(22) }}" /> <img src="{{ 'down_na.png'|icon(22) }}" />
{% else %} {% else %}
<a <a
href="{{ url('legacy_main', {'name' : 'admin/skill_profile.php'}) }}?action=move_down&level_id={{ level.id }}&id={{ item.id }}" href="{{ url('legacy_main', {'name' : 'skills/skill_profile.php'}) }}?action=move_down&level_id={{ level.id }}&id={{ item.id }}"
> >
<img src="{{ 'down.png'|icon(22) }}" /> <img src="{{ 'down.png'|icon(22) }}" />
</a> </a>
@ -48,4 +48,4 @@
{% endfor %} {% endfor %}
</ul> </ul>
{% endfor %} {% endfor %}
{% endautoescape %} {% endautoescape %}

@ -19,7 +19,7 @@ class BadgeController extends AbstractController
public function issued(int $id): Response public function issued(int $id): Response
{ {
return $this->redirect( 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 public function issuedAll(int $skillId, int $userId): Response
{ {
return $this->redirect( 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])
); );
} }
} }

@ -308,7 +308,7 @@ class SkillRelUser
*/ */
public function getAssertionUrl() 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([ return $url.http_build_query([
'user' => $this->user->getId(), 'user' => $this->user->getId(),

@ -5,7 +5,7 @@ Feature: Skills
Scenario: Create a skill skill1 Scenario: Create a skill skill1
Given I am a platform administrator 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: When I fill in the following:
| name | skill1 | | name | skill1 |
| short_code | s1 | | short_code | s1 |
@ -17,7 +17,7 @@ Feature: Skills
Scenario: Create a second level skill Scenario: Create a second level skill
Given I am a platform administrator 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: When I fill in the following:
| name | skill11 | | name | skill11 |
| short_code | s11 | | short_code | s11 |
@ -30,7 +30,7 @@ Feature: Skills
Scenario: Create a skill skilldis Scenario: Create a skill skilldis
Given I am a platform administrator 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: When I fill in the following:
| name | skilldis | | name | skilldis |
| short_code | sdis | | short_code | sdis |
@ -40,41 +40,41 @@ Feature: Skills
And wait for the page to be loaded And wait for the page to be loaded
Then I should see "The skill has been created: skilldis" 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 # 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 # 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 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 # The disable function works, it's the behat test that do no activate the function on the correct line
Scenario: Disable a skill skilldis Scenario: Disable a skill skilldis
Given I am a platform administrator 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 And wait for the page to be loaded
Then I should see "skilldis" 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 And wait for the page to be loaded
Then I should see "Skill \"skilldis\" disabled" 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 # 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 # 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 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 # The enable function works, it's the behat test that do no activate the function on the correct line
Scenario: Enable a skill skilldis Scenario: Enable a skill skilldis
Given I am a platform administrator 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 And wait for the page to be loaded
Then I should see "skilldis" 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 And wait for the page to be loaded
Then I should see "Skill \"skilldis\" enabled" 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 # because it does not update skill1 but the first in the list
Scenario: Update a skill skill1 Scenario: Update a skill skill1
Given I am a platform administrator 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 And wait for the page to be loaded
Then I should see "skill1" Then I should see "skill1"
Then I follow "Edit" Then I follow "Edit"
@ -87,7 +87,7 @@ Feature: Skills
Scenario: Assign skill11 to user 1 Scenario: Assign skill11 to user 1
Given I am a platform administrator 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" When I select "skill11" from "skill"
And wait for the page to be loaded And wait for the page to be loaded
Then I fill in the following: Then I fill in the following:
@ -99,7 +99,7 @@ Feature: Skills
Scenario: Reassign skill11 to user 1 Scenario: Reassign skill11 to user 1
Given I am a platform administrator 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" When I select "skill11" from "skill"
And wait for the page to be loaded And wait for the page to be loaded
Then I fill in the following: Then I fill in the following:
@ -118,7 +118,7 @@ Feature: Skills
# The following scenario need to be completed once the funcionality is ready # The following scenario need to be completed once the funcionality is ready
# Scenario: Set a badge to a skill # Scenario: Set a badge to a skill
# Given I am a platform administrator # 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 should see "skill11"
# Then I follow "Create badge" # Then I follow "Create badge"
# Then I follow "Browse" # Then I follow "Browse"

Loading…
Cancel
Save