Browse Source

Minor - update from 1.11.x

Julio Montoya 6 năm trước cách đây
mục cha
commit
5d603a837a

+ 2 - 0
main/badge/assertion.php

@@ -60,4 +60,6 @@ $json = [
     ],
 ];
 
+header('Content-Type: application/json');
+
 echo json_encode($json);

+ 1 - 1
main/badge/assign.php

@@ -39,7 +39,7 @@ $skillUserRepo = $entityManager->getRepository('ChamiloCoreBundle:SkillRelUser')
 $skillLevels = api_get_configuration_value('skill_levels_names');
 
 $skillsOptions = ['' => get_lang('Select')];
-$acquiredLevel = [];
+$acquiredLevel = ['' => get_lang('None')];
 $formDefaultValues = [];
 
 if (empty($skillLevels)) {

+ 2 - 2
main/badge/class.php

@@ -8,8 +8,6 @@
  *
  * @package chamilo.badge
  */
-header('Content-Type: application/json');
-
 require_once __DIR__.'/../inc/global.inc.php';
 
 $skillId = isset($_GET['id']) ? intval($_GET['id']) : 0;
@@ -24,4 +22,6 @@ $json = [
     'issuer' => api_get_path(WEB_CODE_PATH)."badge/issuer.php",
 ];
 
+header('Content-Type: application/json');
+
 echo json_encode($json);

+ 0 - 1
main/badge/issued.php

@@ -16,7 +16,6 @@ use SkillRelUser as SkillRelUserManager;
 require_once __DIR__.'/../inc/global.inc.php';
 
 $issue = isset($_REQUEST['issue']) ? (int) $_REQUEST['issue'] : 0;
-$userId = isset($_REQUEST['user']) ? (int) $_REQUEST['user'] : 0;
 
 if (empty($issue)) {
     api_not_allowed(true);

+ 2 - 2
main/badge/issuer.php

@@ -10,11 +10,11 @@
  */
 require_once __DIR__.'/../inc/global.inc.php';
 
-header('Content-Type: application/json');
-
 $json = [
     'name' => api_get_setting('Institution'),
     'url' => api_get_path(WEB_PATH),
 ];
 
+header('Content-Type: application/json');
+
 echo json_encode($json);