Fix references to LtiBundle - refs BT#13469 #2741

pull/2818/head
Angel Fernando Quiroz Campos 6 years ago
parent c287cc5a00
commit 36859a78eb
  1. 2
      config/bundles.php
  2. 2
      config/routes/chamilo.yaml
  3. 16
      src/LtiBundle/ChamiloIntegrationBundle.php
  4. 16
      src/LtiBundle/ChamiloLtiBundle.php
  5. 4
      src/LtiBundle/Component/OutcomeDeleteRequest.php
  6. 4
      src/LtiBundle/Component/OutcomeDeleteResponse.php
  7. 4
      src/LtiBundle/Component/OutcomeReadRequest.php
  8. 4
      src/LtiBundle/Component/OutcomeReadResponse.php
  9. 4
      src/LtiBundle/Component/OutcomeReplaceRequest.php
  10. 4
      src/LtiBundle/Component/OutcomeReplaceResponse.php
  11. 4
      src/LtiBundle/Component/OutcomeRequest.php
  12. 4
      src/LtiBundle/Component/OutcomeResponse.php
  13. 4
      src/LtiBundle/Component/OutcomeResponseStatus.php
  14. 4
      src/LtiBundle/Component/OutcomeUnsupportedRequest.php
  15. 4
      src/LtiBundle/Component/OutcomeUnsupportedResponse.php
  16. 14
      src/LtiBundle/Controller/AdminController.php
  17. 20
      src/LtiBundle/Controller/CourseController.php
  18. 18
      src/LtiBundle/Controller/ServiceController.php
  19. 8
      src/LtiBundle/Entity/ExternalTool.php
  20. 6
      src/LtiBundle/Form/ExternalToolType.php
  21. 6
      src/LtiBundle/Resources/config/routing.yml

@ -55,7 +55,7 @@ return [
Chamilo\SettingsBundle\ChamiloSettingsBundle::class => ['all' => true],
Chamilo\TimelineBundle\ChamiloTimelineBundle::class => ['all' => true],
Chamilo\ApiBundle\ChamiloApiBundle::class => ['all' => true],
Chamilo\IntegrationBundle\ChamiloIntegrationBundle::class => ['all' => true],
Chamilo\LtiBundle\ChamiloLtiBundle::class => ['all' => true],
winzou\Bundle\StateMachineBundle\winzouStateMachineBundle::class => ['all' => true],
Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle::class => ['all' => true],
Sylius\Bundle\ResourceBundle\SyliusResourceBundle::class => ['all' => true],

@ -30,4 +30,4 @@ chamilo_graphql:
resource: "@ChamiloApiBundle/GraphQL/Resources/config/routing.yaml"
chamilo_lti:
resource: "@ChamiloIntegrationBundle/Resources/config/routing.yml"
resource: "@ChamiloLtiBundle/Resources/config/routing.yml"

@ -1,16 +0,0 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\IntegrationBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
* Class ChamiloIntegrationBundle
*
* @package Chamilo\IntegrationBundle
*/
class ChamiloIntegrationBundle extends Bundle
{
}

@ -0,0 +1,16 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\LtiBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
* Class ChamiloLtiBundle.
*
* @package Chamilo\LtiBundle
*/
class ChamiloLtiBundle extends Bundle
{
}

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\IntegrationBundle\Component;
namespace Chamilo\LtiBundle\Component;
use Chamilo\CoreBundle\Entity\GradebookEvaluation;
use Chamilo\UserBundle\Entity\User;
@ -9,7 +9,7 @@ use Chamilo\UserBundle\Entity\User;
/**
* Class OutcomeDeleteRequest.
*
* @package Chamilo\IntegrationBundle\Component
* @package Chamilo\LtiBundle\Component
*/
class OutcomeDeleteRequest extends OutcomeRequest
{

@ -1,12 +1,12 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\IntegrationBundle\Component;
namespace Chamilo\LtiBundle\Component;
/**
* Class OutcomeDeleteResponse.
*
* @package Chamilo\IntegrationBundle\Component
* @package Chamilo\LtiBundle\Component
*/
class OutcomeDeleteResponse extends OutcomeResponse
{

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\IntegrationBundle\Component;
namespace Chamilo\LtiBundle\Component;
use Chamilo\CoreBundle\Entity\GradebookEvaluation;
use Chamilo\UserBundle\Entity\User;
@ -9,7 +9,7 @@ use Chamilo\UserBundle\Entity\User;
/**
* Class OutcomeReadRequest.
*
* @package Chamilo\IntegrationBundle\Component
* @package Chamilo\LtiBundle\Component
*/
class OutcomeReadRequest extends OutcomeRequest
{

@ -1,12 +1,12 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\IntegrationBundle\Component;
namespace Chamilo\LtiBundle\Component;
/**
* Class OutcomeReadResponse.
*
* @package Chamilo\IntegrationBundle\Component
* @package Chamilo\LtiBundle\Component
*/
class OutcomeReadResponse extends OutcomeResponse
{

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\IntegrationBundle\Component;
namespace Chamilo\LtiBundle\Component;
use Chamilo\CoreBundle\Entity\GradebookEvaluation;
use Chamilo\UserBundle\Entity\User;
@ -9,7 +9,7 @@ use Chamilo\UserBundle\Entity\User;
/**
* Class OutcomeReplaceRequest.
*
* @package Chamilo\IntegrationBundle\Component
* @package Chamilo\LtiBundle\Component
*/
class OutcomeReplaceRequest extends OutcomeRequest
{

@ -1,12 +1,12 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\IntegrationBundle\Component;
namespace Chamilo\LtiBundle\Component;
/**
* Class OutcomeReplaceResponse.
*
* @package Chamilo\IntegrationBundle\Component
* @package Chamilo\LtiBundle\Component
*/
class OutcomeReplaceResponse extends OutcomeResponse
{

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\IntegrationBundle\Component;
namespace Chamilo\LtiBundle\Component;
use Doctrine\ORM\EntityManager;
use Symfony\Bundle\FrameworkBundle\Translation\Translator;
@ -9,7 +9,7 @@ use Symfony\Bundle\FrameworkBundle\Translation\Translator;
/**
* Class OutcomeRequest.
*
* @package Chamilo\IntegrationBundle\Component
* @package Chamilo\LtiBundle\Component
*/
abstract class OutcomeRequest
{

@ -1,12 +1,12 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\IntegrationBundle\Component;
namespace Chamilo\LtiBundle\Component;
/**
* Class OutcomeResponse.
*
* @package Chamilo\IntegrationBundle\Component
* @package Chamilo\LtiBundle\Component
*/
abstract class OutcomeResponse
{

@ -1,12 +1,12 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\IntegrationBundle\Component;
namespace Chamilo\LtiBundle\Component;
/**
* Class OutcomeResponseStatus.
*
* @package Chamilo\IntegrationBundle\Component
* @package Chamilo\LtiBundle\Component
*/
class OutcomeResponseStatus
{

@ -1,12 +1,12 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\IntegrationBundle\Component;
namespace Chamilo\LtiBundle\Component;
/**
* Class OutcomeUnsupportedRequest.
*
* @package Chamilo\IntegrationBundle\Component
* @package Chamilo\LtiBundle\Component
*/
class OutcomeUnsupportedRequest extends OutcomeRequest
{

@ -1,12 +1,12 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\IntegrationBundle\Component;
namespace Chamilo\LtiBundle\Component;
/**
* Class OutcomeUnsupportedResponse.
*
* @package Chamilo\IntegrationBundle\Component
* @package Chamilo\LtiBundle\Component
*/
class OutcomeUnsupportedResponse extends OutcomeResponse
{

@ -1,11 +1,11 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\IntegrationBundle\Controller;
namespace Chamilo\LtiBundle\Controller;
use Chamilo\CoreBundle\Controller\BaseController;
use Chamilo\IntegrationBundle\Entity\ExternalTool;
use Chamilo\IntegrationBundle\Form\ExternalToolType;
use Chamilo\LtiBundle\Entity\ExternalTool;
use Chamilo\LtiBundle\Form\ExternalToolType;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
@ -14,7 +14,7 @@ use Symfony\Component\Routing\Annotation\Route;
/**
* Class AdminController.
*
* @package Chamilo\IntegrationBundle\Controller
* @package Chamilo\LtiBundle\Controller
*/
class AdminController extends BaseController
{
@ -27,7 +27,7 @@ class AdminController extends BaseController
*/
public function adminAction(): Response
{
$repo = $this->getDoctrine()->getRepository('ChamiloIntegrationBundle:ExternalTool');
$repo = $this->getDoctrine()->getRepository('ChamiloLtiBundle:ExternalTool');
$tools = $repo->findAll();
return $this->render('@ChamiloTheme/Lti/admin.html.twig', ['tools' => $tools]);
@ -91,7 +91,7 @@ class AdminController extends BaseController
{
$em = $this->getDoctrine()->getManager();
/** @var ExternalTool $tool */
$tool = $em->find('ChamiloIntegrationBundle:ExternalTool', $toolId);
$tool = $em->find('ChamiloLtiBundle:ExternalTool', $toolId);
if (empty($tool)) {
throw $this->createNotFoundException();
@ -145,7 +145,7 @@ class AdminController extends BaseController
{
$em = $this->getDoctrine()->getManager();
/** @var ExternalTool $tool */
$tool = $em->find('ChamiloIntegrationBundle:ExternalTool', $toolId);
$tool = $em->find('ChamiloLtiBundle:ExternalTool', $toolId);
if (empty($tool)) {
throw $this->createNotFoundException();

@ -1,15 +1,15 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\IntegrationBundle\Controller;
namespace Chamilo\LtiBundle\Controller;
use Chamilo\CoreBundle\Controller\BaseController;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CourseBundle\Entity\CTool;
use Chamilo\IntegrationBundle\Component\ServiceRequestFactory;
use Chamilo\IntegrationBundle\Entity\ExternalTool;
use Chamilo\IntegrationBundle\Form\ExternalToolType;
use Chamilo\LtiBundle\Component\ServiceRequestFactory;
use Chamilo\LtiBundle\Entity\ExternalTool;
use Chamilo\LtiBundle\Form\ExternalToolType;
use Chamilo\UserBundle\Entity\User;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
use Symfony\Component\HttpFoundation\Request;
@ -20,7 +20,7 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
/**
* Class CourseController.
*
* @package Chamilo\IntegrationBundle\Controller
* @package Chamilo\LtiBundle\Controller
*/
class CourseController extends BaseController
{
@ -36,7 +36,7 @@ class CourseController extends BaseController
{
$em = $this->getDoctrine()->getManager();
/** @var ExternalTool $tool */
$tool = $em->find('ChamiloIntegrationBundle:ExternalTool', $id);
$tool = $em->find('ChamiloLtiBundle:ExternalTool', $id);
if (empty($tool)) {
throw $this->createNotFoundException('External tool not found');
@ -132,7 +132,7 @@ class CourseController extends BaseController
{
$em = $this->getDoctrine()->getManager();
/** @var ExternalTool|null $tool */
$tool = $em->find('ChamiloIntegrationBundle:ExternalTool', $id);
$tool = $em->find('ChamiloLtiBundle:ExternalTool', $id);
if (empty($tool)) {
throw $this->createNotFoundException();
@ -575,7 +575,7 @@ class CourseController extends BaseController
$em = $this->getDoctrine()->getManager();
/** @var ExternalTool $tool */
$tool = $em->find('ChamiloIntegrationBundle:ExternalTool', str_replace('tool:', '', $data));
$tool = $em->find('ChamiloLtiBundle:ExternalTool', str_replace('tool:', '', $data));
if (empty($tool)) {
throw $this->createNotFoundException('External tool not found');
@ -726,7 +726,7 @@ class CourseController extends BaseController
$em = $this->getDoctrine()->getManager();
/** @var ExternalTool|null $externalTool */
$externalTool = $em->find('ChamiloIntegrationBundle:ExternalTool', $id);
$externalTool = $em->find('ChamiloLtiBundle:ExternalTool', $id);
if (empty($externalTool)) {
throw $this->createNotFoundException();
@ -770,7 +770,7 @@ class CourseController extends BaseController
public function courseConfigureAction($id = '', Request $request): Response
{
$em = $this->getDoctrine()->getManager();
$repo = $em->getRepository('ChamiloIntegrationBundle:ExternalTool');
$repo = $em->getRepository('ChamiloLtiBundle:ExternalTool');
$tool = new ExternalTool();
$parentTool = null;

@ -1,14 +1,14 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\IntegrationBundle\Controller;
namespace Chamilo\LtiBundle\Controller;
use Chamilo\CoreBundle\Controller\BaseController;
use Chamilo\IntegrationBundle\Component\OutcomeDeleteRequest;
use Chamilo\IntegrationBundle\Component\OutcomeReadRequest;
use Chamilo\IntegrationBundle\Component\OutcomeReplaceRequest;
use Chamilo\IntegrationBundle\Component\OutcomeUnsupportedRequest;
use Chamilo\IntegrationBundle\Entity\ExternalTool;
use Chamilo\LtiBundle\Component\OutcomeDeleteRequest;
use Chamilo\LtiBundle\Component\OutcomeReadRequest;
use Chamilo\LtiBundle\Component\OutcomeReplaceRequest;
use Chamilo\LtiBundle\Component\OutcomeUnsupportedRequest;
use Chamilo\LtiBundle\Entity\ExternalTool;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
@ -16,7 +16,7 @@ use Symfony\Component\Routing\Annotation\Route;
/**
* Class ServicesController.
*
* @package Chamilo\IntegrationBundle\Controller
* @package Chamilo\LtiBundle\Controller
*/
class ServiceController extends BaseController
{
@ -30,7 +30,7 @@ class ServiceController extends BaseController
public function outcomeServiceAction(Request $request): Response
{
$em = $this->getDoctrine()->getManager();
$toolRepo = $em->getRepository('ChamiloIntegrationBundle:ExternalTool');
$toolRepo = $em->getRepository('ChamiloLtiBundle:ExternalTool');
$headers = \OAuthUtil::get_headers();
@ -86,7 +86,7 @@ class ServiceController extends BaseController
}
/**
* @return \Chamilo\IntegrationBundle\Component\OutcomeResponse|null
* @return \Chamilo\LtiBundle\Component\OutcomeResponse|null
*/
private function processServiceRequest()
{

@ -1,7 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\IntegrationBundle\Entity;
namespace Chamilo\LtiBundle\Entity;
use Chamilo\CoreBundle\Entity\Course;
use Doctrine\Common\Collections\ArrayCollection;
@ -10,7 +10,7 @@ use Doctrine\ORM\Mapping as ORM;
/**
* Class ExternalTool.
*
* @package Chamilo\IntegrationBundle\Entity
* @package Chamilo\LtiBundle\Entity
*
* @ORM\Table(name="lti_external_tool")
* @ORM\Entity()
@ -90,14 +90,14 @@ class ExternalTool
/**
* @var ExternalTool|null
*
* @ORM\ManyToOne(targetEntity="Chamilo\IntegrationBundle\Entity\ExternalTool", inversedBy="children")
* @ORM\ManyToOne(targetEntity="Chamilo\LtiBundle\Entity\ExternalTool", inversedBy="children")
* @ORM\JoinColumn(name="parent_id", referencedColumnName="id")
*/
private $parent;
/**
* @var ArrayCollection
*
* @ORM\OneToMany(targetEntity="Chamilo\IntegrationBundle\Entity\ExternalTool", mappedBy="parent")
* @ORM\OneToMany(targetEntity="Chamilo\LtiBundle\Entity\ExternalTool", mappedBy="parent")
*/
private $children;

@ -1,9 +1,9 @@
<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\IntegrationBundle\Form;
namespace Chamilo\LtiBundle\Form;
use Chamilo\IntegrationBundle\Entity\ExternalTool;
use Chamilo\LtiBundle\Entity\ExternalTool;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
@ -18,7 +18,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
/**
* Class ExternalToolType.
*
* @package Chamilo\IntegrationBundle\Form
* @package Chamilo\LtiBundle\Form
*/
class ExternalToolType extends AbstractType
{

@ -1,14 +1,14 @@
chamilo_lti_admin_controller:
resource: '@ChamiloIntegrationBundle/Controller/AdminController.php'
resource: '@ChamiloLtiBundle/Controller/AdminController.php'
type: annotation
prefix: '/admin/lti'
chamilo_lti_teacher_controller:
resource: '@ChamiloIntegrationBundle/Controller/CourseController.php'
resource: '@ChamiloLtiBundle/Controller/CourseController.php'
type: annotation
prefix: '/courses/{code}/lti'
chamilo_lti_service_controller:
path: /lti/os
defaults:
_controller: 'ChamiloIntegrationBundle:Service:outcomeService'
_controller: 'ChamiloLtiBundle:Service:outcomeService'

Loading…
Cancel
Save