From: Vincent Vanwaelscappel Date: Wed, 27 Nov 2024 16:53:13 +0000 (+0100) Subject: wait #7212 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=8f0efce4ad8e88c7168f5bffbf00ee498a775cd0;p=fluidbook-toolbox.git wait #7212 @0.5 --- diff --git a/app/Fluidbook/Compiler/Compiler.php b/app/Fluidbook/Compiler/Compiler.php index 76fadad8e..aa981954b 100644 --- a/app/Fluidbook/Compiler/Compiler.php +++ b/app/Fluidbook/Compiler/Compiler.php @@ -517,7 +517,7 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError $this->config->rasterizePages = ArrayUtil::parseRange($this->config->rasterizePages); $this->config->vectorPages = array_diff(ArrayUtil::parseRange($this->config->vectorPages), $this->config->rasterizePages); $this->numerotation = $this->config->numerotation = explode(',', $this->getFluidbook()->page_numbers); - $this->config->dynamicBackgroundColor=[]; + $this->config->dynamicBackgroundColor = []; $this->initTabsConfig(); @@ -1487,7 +1487,7 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError $dbc[$page] = $e; } } - if(count($dbc)) { + if (count($dbc)) { $this->config->dynamicBackgroundColor = $dbc + $this->config->dynamicBackgroundColor; } @@ -1513,6 +1513,9 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError foreach ($p as $range => $coins) { $pages = ArrayUtil::parseRange($range); foreach ($pages as $page) { + if ($this->isDoublePage() && $page % 2 === 1 && $page > 1) { + continue; + } $this->config->set('gamifyCoins.visit_page_' . $page, $coins); } } diff --git a/app/Models/Traits/PublicationSettings.php b/app/Models/Traits/PublicationSettings.php index cba6137c8..80362fd25 100644 --- a/app/Models/Traits/PublicationSettings.php +++ b/app/Models/Traits/PublicationSettings.php @@ -1702,7 +1702,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']), + 'hint' => __('Format (un par ligne): numéro ou intervale de pages=[variable:]nombre. Par exemple : :example1 ou :example2 ou :example3', ['example1' => '2=5', 'example2' => '5=A:10','example3'=>'5-8;9=1']), ]); }