]> _ Git - fluidbook-toolbox.git/commitdiff
wait #6229 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 30 Aug 2023 14:41:30 +0000 (16:41 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 30 Aug 2023 14:41:30 +0000 (16:41 +0200)
app/Fluidbook/Compiler/Compiler.php
app/Models/Traits/PublicationSettings.php

index 5d8853654dd73322c3913e4e8515134b01a5b350..46babf640126da34227a32825415964eee5802fb 100644 (file)
@@ -1537,7 +1537,7 @@ class Compiler extends Base implements CompilerInterface
         foreach ($p as $range => $coins) {
             $pages = ArrayUtil::parseRange($range);
             foreach ($pages as $page) {
-                $this->config->gamifyCoins['visit_page_' . $page] = (int)$coins;
+                $this->config->gamifyCoins['visit_page_' . $page] = $coins;
             }
         }
 
index ff27fde7642ca27911cd6da84c0421fac5fb34ed..c3b1005862ccbdbb2a35b6731d3bb925590f5fb4 100644 (file)
@@ -186,7 +186,8 @@ trait PublicationSettings
         ]);
     }
 
-    protected function _main(){
+    protected function _main()
+    {
         $this->addSettingField('title', LongText::class, $this->__('Titre de la publication'), [
             'v2' => '{"type":"text","default":"","editable":true,"label":"\\u00a7!\\u00a7Titre de la publication!\\u00a7!","embed":false}',
         ]);
@@ -1950,6 +1951,7 @@ trait PublicationSettings
     {
         $this->addSettingField('section_gamify', FormSection::class, $this->__('Gamification'));
         $this->addSettingField('gamify_coins_pages', Textarea::class, $this->__('Attribuer des coins lors de la visite des pages'), [
+            'hint' => __('Format (un par ligne): numéro de page=[variable:]nombre. Par exemple : :example1 ou :example2', ['example1' => '2=5', 'example2' => '5=A:10']),
             'v2' => '{"type":"textarea","default":"","editable":true,"label":"\\u00a7!\\u00a7Attribuer des coins lors de la visite des pages!\\u00a7!"}',
         ]);
     }