Skip to content
Snippets Groups Projects
Commit 149bfa47 authored by Laurent's avatar Laurent
Browse files

hotline #81053 Skilleos : fetch thumbnail from 'picture' field

parent 49399ea0
Branches
Tags
2 merge requests!2870Hotline,!2867Hotline#81053 skileos suppression de fichiers et pb de vignettes
Pipeline #5206 passed with stage
in 30 minutes and 39 seconds
......@@ -28,7 +28,7 @@ class Skilleos_Service_Parser extends Class_WebService_BibNumerique_RessourceNum
->setDescription($json->introduction.$json->description.$json->contenu_and_objectif);
$this->_lessons = [];
$this->_posters[] = $json->ressource->url;
$this->_posters[] = isset($json->picture) ? $json->picture->url : $json->ressource->url;
$this->addAuthor($json->teacher->name);
......
......@@ -281,6 +281,13 @@ class SkilleosServiceHarvestTest extends SkilleosServiceTestCase {
$this->assertEquals('Tatiana Abbey', Class_Album::find(6)->getAuthors()[0]->getName());
}
/** @test */
public function thumbnailShouldBeThumbDotpng() {
$this->assertEquals('https://moncompte.skilleos.com/uploads/ressources/default/0001/11/thumb_10683_default_big.png', Class_Album::find(6)->getPoster());
}
/** @test */
public function withoutUserConnectionLinkToModuleSkilleosShouldIndicateToConnect() {
ZendAfi_Auth::getInstance()->clearIdentity();
......
......@@ -105,7 +105,7 @@
"url": "https:\/\/moncompte.skilleos.com\/uploads\/ressources\/default\/0001\/12\/thumb_11660_default_big.png"
},
"id": 677,
"ressource": {
"picture": {
"url": "https:\/\/moncompte.skilleos.com\/uploads\/ressources\/default\/0001\/12\/thumb_11659_default_big.png"
}
},
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment