From c316d592b560ff9ad7499a3fed5a9505b56d1343 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Wed, 22 Jun 2022 09:32:10 +0000 Subject: [PATCH] wait #5330 @0.5 --- inc/commons/class.common.tools.php | 22 ++++++++++++++++++++++ inc/ws/Metier/class.ws.book.parametres.php | 5 ----- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/inc/commons/class.common.tools.php b/inc/commons/class.common.tools.php index 0d4b9c892..4cf3be912 100644 --- a/inc/commons/class.common.tools.php +++ b/inc/commons/class.common.tools.php @@ -1456,6 +1456,28 @@ class commonTools die(json_encode($res)); } + public static function excelTranslationM($args) + { + $name = $_REQUEST['name'] ?? 'translations'; + + $o = json_decode($_REQUEST['str'], true); + $tmp = CubeIT_Files::tempnam(); + $width = []; + foreach ($o['locales'] as $locale) { + $width[] = 50; + } + CubeIT_Excel::simple($name, $o['translations'], $o['locales'], $tmp, $width); + + $n = $name . '.xlsx'; + + header('Content-Disposition: attachment; filename=' . $n); + header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); + ob_end_clean(); + readfile($tmp); + unlink($tmp); + exit; + } + public static function excelTranslation($args) { $name = $_REQUEST['name'] ?? 'translations'; diff --git a/inc/ws/Metier/class.ws.book.parametres.php b/inc/ws/Metier/class.ws.book.parametres.php index 4df55a11b..47ebb4a5b 100644 --- a/inc/ws/Metier/class.ws.book.parametres.php +++ b/inc/ws/Metier/class.ws.book.parametres.php @@ -2739,10 +2739,6 @@ L,index', 'label' => __('Version precompilée'), 'grade' => 3, ], - 'section_elearning' => [ - 'label' => 'E-Learning', - 'default' => NULL, - ], 'gamify_coins_pages' => [ 'type' => 'textarea', 'default' => '', @@ -3452,7 +3448,6 @@ L,index', 7 => 'download_win_cd_html', 8 => 'download_win_html', 9 => 'download_precompiled', - 10 => 'section_elearning', ], ], 'gamify' => [ -- 2.39.5