XAPI: Move entities from php-xapi to Lrs directory - refs BT#16742

pull/3680/head
Angel Fernando Quiroz Campos 5 years ago
parent af64f92174
commit 868af72283
  1. 4
      plugin/xapi/src/Lrs/Entity/Actor.php
  2. 6
      plugin/xapi/src/Lrs/Entity/Attachment.php
  3. 18
      plugin/xapi/src/Lrs/Entity/Context.php
  4. 4
      plugin/xapi/src/Lrs/Entity/Extensions.php
  5. 0
      plugin/xapi/src/Lrs/Entity/LICENSE
  6. 6
      plugin/xapi/src/Lrs/Entity/Result.php
  7. 18
      plugin/xapi/src/Lrs/Entity/Statement.php
  8. 30
      plugin/xapi/src/Lrs/Entity/StatementObject.php
  9. 4
      plugin/xapi/src/Lrs/Entity/Verb.php
  10. 2
      plugin/xapi/src/Lrs/StatementsController.php
  11. 17
      plugin/xapi/src/XApiPlugin.php

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Chamilo\PluginBundle\Entity\XApi;
namespace Chamilo\PluginBundle\Entity\XApi\Lrs;
use Doctrine\ORM\Mapping as ORM;
use Xabbuh\XApi\Model\Account;
@ -96,7 +96,7 @@ class Actor
/**
* @param \Xabbuh\XApi\Model\Actor $model
*
* @return \Chamilo\PluginBundle\Entity\XApi\Actor
* @return \Chamilo\PluginBundle\Entity\XApi\Lrs\Actor
*/
public static function fromModel(ActorModel $model)
{

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Chamilo\PluginBundle\Entity\XApi;
namespace Chamilo\PluginBundle\Entity\XApi\Lrs;
use Doctrine\ORM\Mapping as ORM;
use Xabbuh\XApi\Model\Attachment as AttachmentModel;
@ -35,7 +35,7 @@ class Attachment
public $identifier;
/**
* @ORM\ManyToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Statement", inversedBy="attachments")
* @ORM\ManyToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\Statement", inversedBy="attachments")
*/
public $statement;
@ -105,7 +105,7 @@ class Attachment
/**
* @param \Xabbuh\XApi\Model\Attachment $model
*
* @return \Chamilo\PluginBundle\Entity\XApi\Attachment
* @return \Chamilo\PluginBundle\Entity\XApi\Lrs\Attachment
*/
public static function fromModel(AttachmentModel $model)
{

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Chamilo\PluginBundle\Entity\XApi;
namespace Chamilo\PluginBundle\Entity\XApi\Lrs;
use Doctrine\ORM\Mapping as ORM;
use Xabbuh\XApi\Model\Context as ContextModel;
@ -44,7 +44,7 @@ class Context
/**
* @var StatementObject|null
*
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\StatementObject", cascade={"ALL"})
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\StatementObject", cascade={"ALL"})
* @ORM\JoinColumn(referencedColumnName="identifier")
*/
public $instructor;
@ -52,7 +52,7 @@ class Context
/**
* @var StatementObject|null
*
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\StatementObject", cascade={"ALL"})
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\StatementObject", cascade={"ALL"})
* @ORM\JoinColumn(referencedColumnName="identifier")
*/
public $team;
@ -67,28 +67,28 @@ class Context
/**
* @var StatementObject[]|null
*
* @ORM\OneToMany(targetEntity="Chamilo\PluginBundle\Entity\XApi\StatementObject", mappedBy="parentContext", cascade={"ALL"})
* @ORM\OneToMany(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\StatementObject", mappedBy="parentContext", cascade={"ALL"})
*/
public $parentActivities;
/**
* @var StatementObject[]|null
*
* @ORM\OneToMany(targetEntity="Chamilo\PluginBundle\Entity\XApi\StatementObject", mappedBy="groupingContext", cascade={"ALL"})
* @ORM\OneToMany(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\StatementObject", mappedBy="groupingContext", cascade={"ALL"})
*/
public $groupingActivities;
/**
* @var StatementObject[]|null
*
* @ORM\OneToMany(targetEntity="Chamilo\PluginBundle\Entity\XApi\StatementObject", mappedBy="categoryContext", cascade={"ALL"})
* @ORM\OneToMany(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\StatementObject", mappedBy="categoryContext", cascade={"ALL"})
*/
public $categoryActivities;
/**
* @var StatementObject[]|null
*
* @ORM\OneToMany(targetEntity="Chamilo\PluginBundle\Entity\XApi\StatementObject", mappedBy="otherContext", cascade={"ALL"})
* @ORM\OneToMany(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\StatementObject", mappedBy="otherContext", cascade={"ALL"})
*/
public $otherActivities;
@ -123,7 +123,7 @@ class Context
/**
* @var Extensions|null
*
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Extensions", cascade={"ALL"})
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\Extensions", cascade={"ALL"})
* @ORM\JoinColumn(referencedColumnName="identifier")
*/
public $extensions;
@ -131,7 +131,7 @@ class Context
/**
* @param \Xabbuh\XApi\Model\Context $model
*
* @return \Chamilo\PluginBundle\Entity\XApi\Context
* @return \Chamilo\PluginBundle\Entity\XApi\Lrs\Context
*/
public static function fromModel(ContextModel $model)
{

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Chamilo\PluginBundle\Entity\XApi;
namespace Chamilo\PluginBundle\Entity\XApi\Lrs;
use Doctrine\ORM\Mapping as ORM;
use Xabbuh\XApi\Model\Extensions as ExtensionsModel;
@ -41,7 +41,7 @@ class Extensions
/**
* @param \Xabbuh\XApi\Model\Extensions $model
*
* @return \Chamilo\PluginBundle\Entity\XApi\Extensions
* @return \Chamilo\PluginBundle\Entity\XApi\Lrs\Extensions
*/
public static function fromModel(ExtensionsModel $model)
{

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Chamilo\PluginBundle\Entity\XApi;
namespace Chamilo\PluginBundle\Entity\XApi\Lrs;
use Doctrine\ORM\Mapping as ORM;
use Xabbuh\XApi\Model\Result as ResultModel;
@ -98,7 +98,7 @@ class Result
/**
* @var Extensions|null
*
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Extensions", cascade={"ALL"})
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\Extensions", cascade={"ALL"})
* @ORM\JoinColumn(referencedColumnName="identifier")
*/
public $extensions;
@ -106,7 +106,7 @@ class Result
/**
* @param \Xabbuh\XApi\Model\Result $model
*
* @return \Chamilo\PluginBundle\Entity\XApi\Result
* @return \Chamilo\PluginBundle\Entity\XApi\Lrs\Result
*/
public static function fromModel(ResultModel $model)
{

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Chamilo\PluginBundle\Entity\XApi;
namespace Chamilo\PluginBundle\Entity\XApi\Lrs;
use Doctrine\ORM\Mapping as ORM;
use Xabbuh\XApi\Model\Statement as StatementModel;
@ -37,7 +37,7 @@ class Statement
/**
* @var StatementObject
*
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\StatementObject", cascade={"ALL"})
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\StatementObject", cascade={"ALL"})
* @ORM\JoinColumn(referencedColumnName="identifier")
*/
public $actor;
@ -45,7 +45,7 @@ class Statement
/**
* @var Verb
*
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Verb", cascade={"ALL"})
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\Verb", cascade={"ALL"})
* @ORM\JoinColumn(referencedColumnName="identifier")
*/
public $verb;
@ -53,7 +53,7 @@ class Statement
/**
* @var StatementObject
*
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\StatementObject", cascade={"ALL"})
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\StatementObject", cascade={"ALL"})
* @ORM\JoinColumn(referencedColumnName="identifier")
*/
public $object;
@ -61,7 +61,7 @@ class Statement
/**
* @var Result
*
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Result", cascade={"ALL"})
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\Result", cascade={"ALL"})
* @ORM\JoinColumn(referencedColumnName="identifier")
*/
public $result;
@ -69,7 +69,7 @@ class Statement
/**
* @var StatementObject
*
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\StatementObject", cascade={"ALL"})
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\StatementObject", cascade={"ALL"})
* @ORM\JoinColumn(referencedColumnName="identifier")
*/
public $authority;
@ -91,7 +91,7 @@ class Statement
/**
* @var Context
*
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Context", cascade={"ALL"})
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\Context", cascade={"ALL"})
* @ORM\JoinColumn(referencedColumnName="identifier")
*/
public $context;
@ -106,14 +106,14 @@ class Statement
/**
* @var Attachment[]|null
*
* @ORM\OneToMany(targetEntity="Chamilo\PluginBundle\Entity\XApi\Attachment", mappedBy="statement", cascade={"ALL"})
* @ORM\OneToMany(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\Attachment", mappedBy="statement", cascade={"ALL"})
*/
public $attachments;
/**
* @param \Xabbuh\XApi\Model\Statement $model
*
* @return \Chamilo\PluginBundle\Entity\XApi\Statement
* @return \Chamilo\PluginBundle\Entity\XApi\Lrs\Statement
*/
public static function fromModel(StatementModel $model)
{

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Chamilo\PluginBundle\Entity\XApi;
namespace Chamilo\PluginBundle\Entity\XApi\Lrs;
use Doctrine\ORM\Mapping as ORM;
use Xabbuh\XApi\Model\Account;
@ -117,7 +117,7 @@ class StatementObject
/**
* @var Extensions|null
*
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Extensions", cascade={"all"})
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\Extensions", cascade={"all"})
* @ORM\JoinColumn(referencedColumnName="identifier")
*/
public $activityExtensions;
@ -167,14 +167,14 @@ class StatementObject
/**
* @var StatementObject[]|null
*
* @ORM\OneToMany(targetEntity="Chamilo\PluginBundle\Entity\XApi\StatementObject", mappedBy="group")
* @ORM\OneToMany(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\StatementObject", mappedBy="group")
*/
public $members;
/**
* @var StatementObject|null
*
* @ORM\ManyToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\StatementObject", inversedBy="members")
* @ORM\ManyToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\StatementObject", inversedBy="members")
* @ORM\JoinColumn(referencedColumnName="identifier")
*/
public $group;
@ -189,7 +189,7 @@ class StatementObject
/**
* @var StatementObject|null
*
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\StatementObject", cascade={"ALL"})
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\StatementObject", cascade={"ALL"})
* @ORM\JoinColumn(referencedColumnName="identifier")
*/
public $actor;
@ -197,7 +197,7 @@ class StatementObject
/**
* @var Verb|null
*
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Verb", cascade={"ALL"})
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\Verb", cascade={"ALL"})
* @ORM\JoinColumn(referencedColumnName="identifier")
*/
public $verb;
@ -205,7 +205,7 @@ class StatementObject
/**
* @var StatementObject|null
*
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\StatementObject", cascade={"ALL"})
* @ORM\OneToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\StatementObject", cascade={"ALL"})
* @ORM\JoinColumn(referencedColumnName="identifier")
*/
public $object;
@ -223,7 +223,7 @@ class StatementObject
/**
* @var Statement|null
*
* @ORM\ManyToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Context", inversedBy="parentActivities")
* @ORM\ManyToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\Context", inversedBy="parentActivities")
* @ORM\JoinColumn(referencedColumnName="identifier")
*/
public $parentContext;
@ -231,7 +231,7 @@ class StatementObject
/**
* @var Statement|null
*
* @ORM\ManyToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Context", inversedBy="groupingActivities")
* @ORM\ManyToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\Context", inversedBy="groupingActivities")
* @ORM\JoinColumn(referencedColumnName="identifier")
*/
public $groupingContext;
@ -239,7 +239,7 @@ class StatementObject
/**
* @var Statement|null
*
* @ORM\ManyToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Context", inversedBy="categoryActivities")
* @ORM\ManyToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\Context", inversedBy="categoryActivities")
* @ORM\JoinColumn(referencedColumnName="identifier")
*/
public $categoryContext;
@ -247,7 +247,7 @@ class StatementObject
/**
* @var Statement|null
*
* @ORM\ManyToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Context", inversedBy="otherActivities")
* @ORM\ManyToOne(targetEntity="Chamilo\PluginBundle\Entity\XApi\Lrs\Context", inversedBy="otherActivities")
* @ORM\JoinColumn(referencedColumnName="identifier")
*/
public $otherContext;
@ -255,7 +255,7 @@ class StatementObject
/**
* @param $model
*
* @return \Chamilo\PluginBundle\Entity\XApi\StatementObject
* @return \Chamilo\PluginBundle\Entity\XApi\Lrs\StatementObject
*/
public static function fromModel($model)
{
@ -305,7 +305,7 @@ class StatementObject
/**
* @param \Xabbuh\XApi\Model\Activity $model
*
* @return \Chamilo\PluginBundle\Entity\XApi\StatementObject
* @return \Chamilo\PluginBundle\Entity\XApi\Lrs\StatementObject
*/
private static function fromActivity(Activity $model)
{
@ -358,7 +358,7 @@ class StatementObject
/**
* @param \Xabbuh\XApi\Model\Actor $model
*
* @return \Chamilo\PluginBundle\Entity\XApi\StatementObject
* @return \Chamilo\PluginBundle\Entity\XApi\Lrs\StatementObject
*/
private static function fromActor(ActorModel $model)
{
@ -394,7 +394,7 @@ class StatementObject
/**
* @param \Xabbuh\XApi\Model\SubStatement $model
*
* @return \Chamilo\PluginBundle\Entity\XApi\StatementObject
* @return \Chamilo\PluginBundle\Entity\XApi\Lrs\StatementObject
*/
private static function fromSubStatement(SubStatement $model)
{

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
namespace Chamilo\PluginBundle\Entity\XApi;
namespace Chamilo\PluginBundle\Entity\XApi\Lrs;
use Doctrine\ORM\Mapping as ORM;
use Xabbuh\XApi\Model\IRI;
@ -66,7 +66,7 @@ class Verb
/**
* @param \Xabbuh\XApi\Model\Verb $model
*
* @return \Chamilo\PluginBundle\Entity\XApi\Verb
* @return \Chamilo\PluginBundle\Entity\XApi\Lrs\Verb
*/
public static function fromModel(VerbModel $model)
{

@ -4,7 +4,7 @@
namespace Chamilo\PluginBundle\XApi\Lrs;
use Chamilo\PluginBundle\Entity\XApi\Statement as StatementEntity;
use Chamilo\PluginBundle\Entity\XApi\Lrs\Statement as StatementEntity;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;

@ -2,18 +2,17 @@
/* For licensing terms, see /license.txt */
use Chamilo\CourseBundle\Entity\CTool;
use Chamilo\PluginBundle\Entity\XApi\Actor as ActorEntity;
use Chamilo\PluginBundle\Entity\XApi\Attachment as AttachmentEntity;
use Chamilo\PluginBundle\Entity\XApi\Lrs\Actor as ActorEntity;
use Chamilo\PluginBundle\Entity\XApi\Lrs\Attachment as AttachmentEntity;
use Chamilo\PluginBundle\Entity\XApi\Cmi5Item;
use Chamilo\PluginBundle\Entity\XApi\Context as ContextEntity;
use Chamilo\PluginBundle\Entity\XApi\Extensions as ExtensionsEntity;
use Chamilo\PluginBundle\Entity\XApi\Result as ResultEntity;
use Chamilo\PluginBundle\Entity\XApi\Lrs\Context as ContextEntity;
use Chamilo\PluginBundle\Entity\XApi\Lrs\Extensions as ExtensionsEntity;
use Chamilo\PluginBundle\Entity\XApi\Lrs\Result as ResultEntity;
use Chamilo\PluginBundle\Entity\XApi\SharedStatement;
use Chamilo\PluginBundle\Entity\XApi\Statement as StatementEntity;
use Chamilo\PluginBundle\Entity\XApi\StatementObject as StatementObjectEntity;
use Chamilo\PluginBundle\Entity\XApi\Lrs\Statement as StatementEntity;
use Chamilo\PluginBundle\Entity\XApi\Lrs\StatementObject as StatementObjectEntity;
use Chamilo\PluginBundle\Entity\XApi\ToolLaunch;
use Chamilo\PluginBundle\Entity\XApi\Verb as VerbEntity;
use Chamilo\PluginBundle\Entity\XApi\Lrs\Verb as VerbEntity;
use Doctrine\ORM\Tools\SchemaTool;
use GuzzleHttp\RequestOptions;
use Http\Adapter\Guzzle6\Client;

Loading…
Cancel
Save