瀏覽代碼

Skills: Add content-type for badges' class and assertion - refs BT#15374

Angel Fernando Quiroz Campos 6 年之前
父節點
當前提交
73f61512fa
共有 3 個文件被更改,包括 6 次插入3 次删除
  1. 2 0
      main/badge/assertion.php
  2. 2 1
      main/badge/class.php
  3. 2 2
      main/badge/issuer.php

+ 2 - 0
main/badge/assertion.php

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

+ 2 - 1
main/badge/class.php

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

+ 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);