Minor - Format code

pull/3944/head
Angel Fernando Quiroz Campos 4 years ago
parent fa5dc8b18b
commit d6d0baea0e
  1. 1
      plugin/ims_lti/edit.php
  2. 16
      plugin/ims_lti/src/Form/FrmAdd.php
  3. 9
      plugin/ims_lti/src/Form/FrmEdit.php
  4. 7
      plugin/lti_provider/src/Form/FrmEdit.php

@ -1,5 +1,6 @@
<?php <?php
/* For license terms, see /license.txt */ /* For license terms, see /license.txt */
use Chamilo\PluginBundle\Entity\ImsLti\ImsLtiTool; use Chamilo\PluginBundle\Entity\ImsLti\ImsLtiTool;
use Chamilo\PluginBundle\Form\FrmEdit; use Chamilo\PluginBundle\Form\FrmEdit;

@ -41,11 +41,11 @@ class FrmAdd extends FormValidator
parent::__construct($name, 'POST', '', '', $attributes, self::LAYOUT_HORIZONTAL, true); parent::__construct($name, 'POST', '', '', $attributes, self::LAYOUT_HORIZONTAL, true);
$this->baseTool = $tool; $this->baseTool = $tool;
$this->toolIsV1p3 = $this->baseTool && $this->toolIsV1p3 = $this->baseTool
!empty($this->baseTool->publicKey) && && !empty($this->baseTool->publicKey)
!empty($this->baseTool->getClientId()) && && !empty($this->baseTool->getClientId())
!empty($this->baseTool->getLoginUrl()) && && !empty($this->baseTool->getLoginUrl())
!empty($this->baseTool->getRedirectUrl()); && !empty($this->baseTool->getRedirectUrl());
} }
/** /**
@ -96,8 +96,8 @@ class FrmAdd extends FormValidator
['iframe' => 'iframe', 'window' => 'window'] ['iframe' => 'iframe', 'window' => 'window']
); );
if (null === $this->baseTool || if (null === $this->baseTool
($this->baseTool && !$this->baseTool->isActiveDeepLinking()) || ($this->baseTool && !$this->baseTool->isActiveDeepLinking())
) { ) {
$this->addCheckBox( $this->addCheckBox(
'deep_linking', 'deep_linking',
@ -157,7 +157,7 @@ class FrmAdd extends FormValidator
'replacement_user_id', 'replacement_user_id',
[ [
$plugin->get_lang('ReplacementUserId'), $plugin->get_lang('ReplacementUserId'),
$plugin->get_lang('ReplacementUserIdHelp') $plugin->get_lang('ReplacementUserIdHelp'),
], ],
false false
); );

@ -6,6 +6,7 @@ namespace Chamilo\PluginBundle\Form;
use Category; use Category;
use Chamilo\PluginBundle\Entity\ImsLti\ImsLtiTool; use Chamilo\PluginBundle\Entity\ImsLti\ImsLtiTool;
use Display; use Display;
use Exception;
use FormValidator; use FormValidator;
use ImsLti; use ImsLti;
use ImsLtiPlugin; use ImsLtiPlugin;
@ -105,8 +106,8 @@ class FrmEdit extends FormValidator
['iframe' => 'iframe', 'window' => 'window'] ['iframe' => 'iframe', 'window' => 'window']
); );
if (null === $parent || if (null === $parent
(null !== $parent && !$parent->isActiveDeepLinking()) || (null !== $parent && !$parent->isActiveDeepLinking())
) { ) {
$this->addCheckBox( $this->addCheckBox(
'deep_linking', 'deep_linking',
@ -165,7 +166,7 @@ class FrmEdit extends FormValidator
'replacement_user_id', 'replacement_user_id',
[ [
$plugin->get_lang('ReplacementUserId'), $plugin->get_lang('ReplacementUserId'),
$plugin->get_lang('ReplacementUserIdHelp') $plugin->get_lang('ReplacementUserIdHelp'),
], ],
false false
); );
@ -186,7 +187,7 @@ class FrmEdit extends FormValidator
} }
/** /**
* @throws \Exception * @throws Exception
*/ */
public function setDefaultValues() public function setDefaultValues()
{ {

@ -4,6 +4,7 @@
namespace Chamilo\PluginBundle\LtiProvider\Form; namespace Chamilo\PluginBundle\LtiProvider\Form;
use Chamilo\PluginBundle\Entity\LtiProvider\Platform; use Chamilo\PluginBundle\Entity\LtiProvider\Platform;
use Exception;
use FormValidator; use FormValidator;
use LtiProviderPlugin; use LtiProviderPlugin;
@ -32,10 +33,8 @@ class FrmEdit extends FormValidator
/** /**
* Build the form. * Build the form.
*
* @param bool $globalMode
*/ */
public function build(bool $globalMode = true) public function build()
{ {
$plugin = LtiProviderPlugin::create(); $plugin = LtiProviderPlugin::create();
$this->addHeader($plugin->get_lang('ConnectionDetails')); $this->addHeader($plugin->get_lang('ConnectionDetails'));
@ -55,7 +54,7 @@ class FrmEdit extends FormValidator
} }
/** /**
* @throws \Exception * @throws Exception
*/ */
public function setDefaultValues(): void public function setDefaultValues(): void
{ {

Loading…
Cancel
Save