Newer
Older
<?php
/**
* Copyright (c) 2012-2016, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class Skilleos_Config extends Class_DigitalResource_Config {
const SKILLEOS_URL = 'http://skilleos.com/sigb/sso/';
public function getConfig() {
return [
'DocTypeLabel' => $this->_('Cours en ligne Skilleos'),
'PermissionLabel' => $this->_('Bibliothèque numérique: accéder à Skilleos'),
'MenuLabel' => $this->_('Lien vers Skilleos'),
'Introduction' => $this->_('Première plateforme de cours vidéo en ligne pour vos loisirs et votre vie professionnelle'),
'NotAllowedMessage' => $this->_('Votre abonnement ne permet pas l\'accès à cette ressource.'),
'HelpLink' => 'http://wiki.bokeh-library-portal.org/index.php/Skilleos',
'Url' => 'http://www.skilleos.com/',
'Icon' => 'https://www.skilleos.com/img/logo.jpg',
'MailUrl' => 'https://skilleos.zendesk.com/hc/fr/requests/new',
'AdminVars' => [
'BIB_ID' => Class_AdminVar_Meta::newDefault($this->_('Identifiant fournit par Skilleos'))->bePrivate(),
'CLIENT_ID' => Class_AdminVar_Meta::newDefault($this->_('Client_id fournit par Skilleos'))->bePrivate(),
'CLIENT_SECRET' => Class_AdminVar_Meta::newDefault($this->_('client_secret fournit par Skilleos'))->bePrivate(),
],
'SsoAction' => true,
'Batch' => 'Skilleos_Batch',
'Service' => 'Skilleos_Service',
'ModuleMenu' => 'Skilleos_ModuleMenu',
];
}
public function getSsoUrl($user) {
$module = $this->getDigitalResource()
->getModuleNameFor($this->getName());
return static::SKILLEOS_URL . '?casid='.$this->getAdminVar('BIB_ID'). '&ticket='.(new Class_CasTicket())->getTicketForCurrentUser();
public function isEnabled() {