LTI: Add namespace in classes for forms

pull/3944/head
Angel Fernando Quiroz Campos 4 years ago
parent 4d8435ab18
commit db0d61cca1
  1. 4
      plugin/ims_lti/configure.php
  2. 1
      plugin/ims_lti/create.php
  3. 1
      plugin/ims_lti/edit.php
  4. 13
      plugin/ims_lti/src/Form/FrmAdd.php
  5. 13
      plugin/ims_lti/src/Form/FrmEdit.php

@ -35,7 +35,7 @@ $categories = Category::load(null, null, $course->getCode());
switch ($action) {
case 'add':
$form = new FrmAdd('ims_lti_add_tool', [], $baseTool);
$form = new \Chamilo\PluginBundle\ImsLti\Form\FrmAdd('ims_lti_add_tool', [], $baseTool);
$form->build();
if ($baseTool) {
@ -173,7 +173,7 @@ switch ($action) {
break;
}
$form = new FrmEdit('ims_lti_edit_tool', [], $tool);
$form = new \Chamilo\PluginBundle\Form\FrmEdit('ims_lti_edit_tool', [], $tool);
$form->build(false);
if ($form->validate()) {

@ -1,6 +1,7 @@
<?php
/* For license terms, see /license.txt */
use Chamilo\PluginBundle\Entity\ImsLti\ImsLtiTool;
use Chamilo\PluginBundle\ImsLti\Form\FrmAdd;
$cidReset = true;

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

@ -1,7 +1,16 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\PluginBundle\ImsLti\Form;
use Category;
use Chamilo\PluginBundle\Entity\ImsLti\ImsLtiTool;
use Display;
use FormValidator;
use ImsLti;
use ImsLtiPlugin;
use LtiAssignmentGradesService;
use LtiNamesRoleProvisioningService;
/**
* Class FrmAdd.
@ -15,7 +24,7 @@ class FrmAdd extends FormValidator
/**
* @var bool
*/
private $toolIsV1p3 = false;
private $toolIsV1p3;
/**
* FrmAdd constructor.
@ -194,7 +203,7 @@ class FrmAdd extends FormValidator
$this->setDefaults($defaults);
}
public function returnForm()
public function returnForm(): string
{
$js = "<script>
\$(function () {

@ -1,7 +1,16 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\PluginBundle\Form;
use Category;
use Chamilo\PluginBundle\Entity\ImsLti\ImsLtiTool;
use Display;
use FormValidator;
use ImsLti;
use ImsLtiPlugin;
use LtiAssignmentGradesService;
use LtiNamesRoleProvisioningService;
/**
* Class FrmAdd.
@ -34,8 +43,6 @@ class FrmEdit extends FormValidator
* Build the form.
*
* @param bool $globalMode
*
* @throws Exception
*/
public function build($globalMode = true)
{
@ -179,7 +186,7 @@ class FrmEdit extends FormValidator
}
/**
* @throws Exception
* @throws \Exception
*/
public function setDefaultValues()
{

Loading…
Cancel
Save