From d552331ec10ebb10cab790c783d1130c23ff8c40 Mon Sep 17 00:00:00 2001
From: gloas <gloas@afi-sa.fr>
Date: Wed, 18 Apr 2018 10:42:04 +0200
Subject: [PATCH] dev #74357 fix dashbord modules sso url

---
 VERSIONS_WIP/74357                                          | 2 ++
 library/ZendAfi/View/Helper/DigitalResource/Dashboard.php   | 2 +-
 .../digital_resources/StoryPlayR/tests/StoryPlayRTest.php   | 6 ++++++
 3 files changed, 9 insertions(+), 1 deletion(-)
 create mode 100644 VERSIONS_WIP/74357

diff --git a/VERSIONS_WIP/74357 b/VERSIONS_WIP/74357
new file mode 100644
index 00000000000..4d841c718ec
--- /dev/null
+++ b/VERSIONS_WIP/74357
@@ -0,0 +1,2 @@
+ - ticket #74357 : Ressources numériques : correction du lien SSO générique généré par le tableau de bord.
+ 
\ No newline at end of file
diff --git a/library/ZendAfi/View/Helper/DigitalResource/Dashboard.php b/library/ZendAfi/View/Helper/DigitalResource/Dashboard.php
index 5661467ed65..4ff706990c7 100644
--- a/library/ZendAfi/View/Helper/DigitalResource/Dashboard.php
+++ b/library/ZendAfi/View/Helper/DigitalResource/Dashboard.php
@@ -236,7 +236,7 @@ class ZendAfi_View_Helper_DigitalResource_Dashboard extends ZendAfi_View_Helper_
 
     $url = $this->_config->urlFor($user);
     $html [] = $this->_tag('h4', $this->_('URL SSO générée par /modules/%s pour l\'utilisateur "%s"',
-                                          $this->_config->getName(),
+                                          $this->_config->getSsoAction(),
                                           $user->getLogin()))
       . $this->view->tagAnchor($url, $url, ['target' => '_blank']);
 
diff --git a/library/digital_resources/StoryPlayR/tests/StoryPlayRTest.php b/library/digital_resources/StoryPlayR/tests/StoryPlayRTest.php
index ed2a892e867..e3b02615091 100644
--- a/library/digital_resources/StoryPlayR/tests/StoryPlayRTest.php
+++ b/library/digital_resources/StoryPlayR/tests/StoryPlayRTest.php
@@ -128,6 +128,12 @@ class StoryPlayRDashboardActivatedTest extends StoryPlayRActivatedTestCase {
   }
 
 
+  /** @test */
+  public function urlSsoTitleBeDisplay() {
+    $this->assertXPathContentContains('//h4', 'URL SSO générée par /modules/story-play-r pour l\'utilisateur "StoryPlayR_test_user"');
+  }
+
+
   /** @test */
   public function testSsoValidateUrlMessageShoudlBeDisplay() {
     $this->assertXPathContentContains('//h4', 'URL de validation du ticket de connexion générée pour l\'utilisateur "StoryPlayR_test_user"');
-- 
GitLab