Fix skills use url() instead of _p.web_main in tpls, fix class names

pull/3924/head
Julio Montoya 3 years ago
parent 26ffea09ff
commit d20ae844af
  1. 1
      public/main/admin/skill_badge_create.php
  2. 2
      public/main/badge/assertion.php
  3. 6
      public/main/badge/assign.php
  4. 1
      public/main/badge/class.php
  5. 24
      public/main/template/default/admin/skill.html.twig

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
/**

@ -22,7 +22,7 @@ if (!$objSkill->userHasSkill($userId, $skillId, $courseId, $sessionId)) {
exit;
}
$objSkillRelUser = new SkillRelUser();
$objSkillRelUser = new SkillRelUserModel();
$userSkill = $objSkillRelUser->getByUserAndSkill(
$userId,
$skillId,

@ -109,7 +109,7 @@ if (!empty($subSkillList)) {
}
if (!$profile) {
$skillRelSkill = new SkillRelSkill();
$skillRelSkill = new SkillRelSkillModel();
$parents = $skillRelSkill->getSkillParents($skillId);
krsort($parents);
foreach ($parents as $parent) {
@ -294,8 +294,8 @@ if ($form->validate()) {
);
// Send email depending of children_auto_threshold
$skillRelSkill = new SkillRelSkill();
$skillModel = new \Skill();
$skillRelSkill = new SkillRelSkillModel();
$skillModel = new SkillModel();
$parents = $skillModel->getDirectParents($skillToProcess);
$extraFieldValue = new ExtraFieldValue('skill');

@ -9,6 +9,7 @@
require_once __DIR__.'/../inc/global.inc.php';
$skillId = isset($_GET['id']) ? (int) $_GET['id'] : 0;
$objSkill = new SkillModel();
$skill = $objSkill->get($skillId);
$json = [];

@ -1,19 +1,25 @@
{% autoescape false %}
<h3>{{ 'Skills' | get_lang }}</h3>
<h3>{{ 'Skills' | trans }}</h3>
<ul>
<li>
<a href="{{ _p.web_main }}{{ 'admin/skill_profile.php' }}">
{{ 'AddProfile' | get_lang }}
<a
href="{{ url('legacy_main', {'name' : 'admin/skill_profile.php'}) }}"
>
{{ 'Add profile' | trans }}
</a>
</li>
<li>
<a href="{{ _p.web_main }}{{ 'admin/skill_level.php' }}">
{{ 'AddLevel' | get_lang }}
<a
href="{{ url('legacy_main', {'name' : 'admin/skill_level.php'}) }}"
>
{{ 'Add level' | trans }}
</a>
</li>
</ul>
{{ form }}
{% if form is defined %}
{{ form }}
{% endif %}
{% for item in list %}
<h4>
@ -21,8 +27,10 @@
{% if item.shortCode %}
({{ item.shortCode }})
{% endif %}
<a href="{{ _p.web_main }}admin/skill.php?action=edit&id={{ item.id }}">
<img src="{{ 'edit.png'|icon(22) }}">
<a
href="{{ url('legacy_main', {'name' : 'admin/skill.php'}) ~ '?action=edit&id=' ~ item.id}}"
>
<img src="{{ 'edit.png'|icon(22) }}" />
</a>
</h4>
{{ item.profile }}

Loading…
Cancel
Save