From 7b230ad061358c4f3f2fe9c93c72880169d8077e Mon Sep 17 00:00:00 2001 From: NicoDucou Date: Tue, 21 Dec 2021 17:47:27 +0100 Subject: [PATCH] Learnpath: adding possibility to set autolaunch when creating a LearningPath by webservice -refs BT#17453 --- main/inc/lib/webservices/Rest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main/inc/lib/webservices/Rest.php b/main/inc/lib/webservices/Rest.php index 9be0ab7cdc..74221871a6 100644 --- a/main/inc/lib/webservices/Rest.php +++ b/main/inc/lib/webservices/Rest.php @@ -2096,6 +2096,9 @@ class Rest extends WebService /*$learningPath->setSession($session);*/ $learningPath->setSessionId($sessionId); } + } + if (isset($spec['autolaunch']) && $spec['autolaunch']) { + $learningPath->setAutolaunch(1); } if (array_key_exists('lp_cat_id', $spec)) { $categoryId = $spec['lp_cat_id']; @@ -2191,7 +2194,7 @@ class Rest extends WebService } } } - } + } Database::getManager()->flush(); return $learningPath;