upgrade
This commit is contained in:
234
plugin/lti_provider/Entity/Platform.php
Normal file
234
plugin/lti_provider/Entity/Platform.php
Normal file
@@ -0,0 +1,234 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
namespace Chamilo\PluginBundle\Entity\LtiProvider;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* Class Platform.
|
||||
*
|
||||
* @package Chamilo\PluginBundle\Entity\LtiProvider
|
||||
*
|
||||
* @ORM\Table(name="plugin_lti_provider_platform")
|
||||
* @ORM\Entity()
|
||||
*/
|
||||
class Platform
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="issuer", type="text")
|
||||
*/
|
||||
public $issuer;
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\Id()
|
||||
* @ORM\GeneratedValue()
|
||||
*/
|
||||
protected $id;
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="kid", type="string")
|
||||
*/
|
||||
private $kid;
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="client_id", type="text")
|
||||
*/
|
||||
private $clientId;
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="auth_login_url", type="text")
|
||||
*/
|
||||
private $authLoginUrl;
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="auth_token_url", type="text")
|
||||
*/
|
||||
private $authTokenUrl;
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="key_set_url", type="text")
|
||||
*/
|
||||
private $keySetUrl;
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="deployment_id", type="text")
|
||||
*/
|
||||
private $deploymentId;
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="tool_provider", type="text")
|
||||
*/
|
||||
private $toolProvider;
|
||||
|
||||
/**
|
||||
* Get id.
|
||||
*/
|
||||
public function getId(): int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set id.
|
||||
*/
|
||||
public function setId(int $id): Platform
|
||||
{
|
||||
$this->id = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getToolProvider()
|
||||
{
|
||||
return $this->toolProvider;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $toolProvider
|
||||
*/
|
||||
public function setToolProvider(?string $toolProvider): void
|
||||
{
|
||||
$this->toolProvider = $toolProvider;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get key id.
|
||||
*/
|
||||
public function getKid()
|
||||
{
|
||||
return $this->kid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set key id.
|
||||
*/
|
||||
public function setKid(string $kid): Platform
|
||||
{
|
||||
$this->kid = $kid;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Issuer.
|
||||
*/
|
||||
public function getIssuer()
|
||||
{
|
||||
return $this->issuer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set issuer.
|
||||
*/
|
||||
public function setIssuer(string $issuer): Platform
|
||||
{
|
||||
$this->issuer = $issuer;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get client ID.
|
||||
*/
|
||||
public function getClientId()
|
||||
{
|
||||
return $this->clientId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set client ID.
|
||||
*/
|
||||
public function setClientId(string $clientId): Platform
|
||||
{
|
||||
$this->clientId = $clientId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get auth login URL.
|
||||
*/
|
||||
public function getAuthLoginUrl()
|
||||
{
|
||||
return $this->authLoginUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set auth login URL.
|
||||
*/
|
||||
public function setAuthLoginUrl(string $authLoginUrl): Platform
|
||||
{
|
||||
$this->authLoginUrl = $authLoginUrl;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get auth token URL.
|
||||
*/
|
||||
public function getAuthTokenUrl()
|
||||
{
|
||||
return $this->authTokenUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set auth token URL.
|
||||
*/
|
||||
public function setAuthTokenUrl(string $authTokenUrl): Platform
|
||||
{
|
||||
$this->authTokenUrl = $authTokenUrl;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get key set URL.
|
||||
*/
|
||||
public function getKeySetUrl()
|
||||
{
|
||||
return $this->keySetUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set key set URL.
|
||||
*/
|
||||
public function setKeySetUrl(string $keySetUrl): Platform
|
||||
{
|
||||
$this->keySetUrl = $keySetUrl;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Deployment ID.
|
||||
*/
|
||||
public function getDeploymentId()
|
||||
{
|
||||
return $this->deploymentId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Deployment ID.
|
||||
*/
|
||||
public function setDeploymentId(string $deploymentId): Platform
|
||||
{
|
||||
$this->deploymentId = $deploymentId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
116
plugin/lti_provider/Entity/PlatformKey.php
Normal file
116
plugin/lti_provider/Entity/PlatformKey.php
Normal file
@@ -0,0 +1,116 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
namespace Chamilo\PluginBundle\Entity\LtiProvider;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* Class PlatformKey.
|
||||
*
|
||||
* @package Chamilo\PluginBundle\Entity\LtiProvider
|
||||
*
|
||||
* @ORM\Table(name="plugin_lti_provider_platform_key")
|
||||
* @ORM\Entity()
|
||||
*/
|
||||
class PlatformKey
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="public_key", type="text")
|
||||
*/
|
||||
public $publicKey;
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\Id()
|
||||
* @ORM\GeneratedValue()
|
||||
*/
|
||||
protected $id;
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="kid", type="string")
|
||||
*/
|
||||
private $kid;
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="private_key", type="text")
|
||||
*/
|
||||
private $privateKey;
|
||||
|
||||
/**
|
||||
* Get id.
|
||||
*/
|
||||
public function getId(): int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set id.
|
||||
*/
|
||||
public function setId(int $id): PlatformKey
|
||||
{
|
||||
$this->id = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get key id.
|
||||
*/
|
||||
public function getKid(): string
|
||||
{
|
||||
return $this->kid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set key id.
|
||||
*/
|
||||
public function setKid(string $kid): PlatformKey
|
||||
{
|
||||
$this->kid = $kid;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get privateKey.
|
||||
*/
|
||||
public function getPrivateKey(): string
|
||||
{
|
||||
return $this->privateKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set privateKey.
|
||||
*/
|
||||
public function setPrivateKey(string $privateKey): PlatformKey
|
||||
{
|
||||
$this->privateKey = $privateKey;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get publicKey.
|
||||
*/
|
||||
public function getPublicKey(): string
|
||||
{
|
||||
return $this->publicKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set publicKey.
|
||||
*/
|
||||
public function setPublicKey(string $publicKey): PlatformKey
|
||||
{
|
||||
$this->publicKey = $publicKey;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
267
plugin/lti_provider/Entity/Result.php
Normal file
267
plugin/lti_provider/Entity/Result.php
Normal file
@@ -0,0 +1,267 @@
|
||||
<?php
|
||||
/* For licensing terms, see /license.txt */
|
||||
|
||||
namespace Chamilo\PluginBundle\Entity\LtiProvider;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* Class Result.
|
||||
*
|
||||
* @ORM\Table(name="plugin_lti_provider_result")
|
||||
* @ORM\Entity()
|
||||
*/
|
||||
class Result
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\Id()
|
||||
* @ORM\GeneratedValue()
|
||||
*/
|
||||
protected $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="issuer", type="text")
|
||||
*/
|
||||
protected $issuer;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Column(name="user_id", type="integer", nullable=false)
|
||||
*/
|
||||
protected $userId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="client_uid", type="string", nullable=false)
|
||||
*/
|
||||
protected $clientUId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="course_code", type="string", length=40, nullable=true)
|
||||
*/
|
||||
protected $courseCode;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Column(name="tool_id", type="integer", nullable=false)
|
||||
*/
|
||||
protected $toolId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="tool_name", type="string")
|
||||
*/
|
||||
protected $toolName;
|
||||
|
||||
/**
|
||||
* @var float
|
||||
*
|
||||
* @ORM\Column(name="score", type="float", precision=6, scale=2, nullable=false)
|
||||
*/
|
||||
protected $score;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Column(name="progress", type="integer", nullable=false)
|
||||
*/
|
||||
protected $progress;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Column(name="duration", type="integer", nullable=false)
|
||||
*/
|
||||
protected $duration;
|
||||
|
||||
/**
|
||||
* @var \DateTime
|
||||
*
|
||||
* @ORM\Column(name="start_date", type="datetime", nullable=false)
|
||||
*/
|
||||
protected $startDate;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="user_ip", type="string")
|
||||
*/
|
||||
protected $userIp;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(name="lti_launch_id", type="string")
|
||||
*/
|
||||
protected $ltiLaunchId;
|
||||
|
||||
public function getId(): int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function setId(int $id): Result
|
||||
{
|
||||
$this->id = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getIssuer(): string
|
||||
{
|
||||
return $this->issuer;
|
||||
}
|
||||
|
||||
public function setIssuer(string $issuer): Result
|
||||
{
|
||||
$this->issuer = $issuer;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getUserId(): int
|
||||
{
|
||||
return $this->userId;
|
||||
}
|
||||
|
||||
public function setUserId(int $userId): Result
|
||||
{
|
||||
$this->userId = $userId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getClientUId(): string
|
||||
{
|
||||
return $this->clientUId;
|
||||
}
|
||||
|
||||
public function setClientUId(string $clientUId): Result
|
||||
{
|
||||
$this->clientUId = $clientUId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCourseCode(): string
|
||||
{
|
||||
return $this->courseCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $tool
|
||||
*/
|
||||
public function setCourseCode(string $courseCode): Result
|
||||
{
|
||||
$this->courseCode = $courseCode;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getToolId(): int
|
||||
{
|
||||
return $this->toolId;
|
||||
}
|
||||
|
||||
public function setToolId(int $toolId): Result
|
||||
{
|
||||
$this->toolId = $toolId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getToolName(): string
|
||||
{
|
||||
return $this->toolName;
|
||||
}
|
||||
|
||||
public function setToolName(string $toolName): Result
|
||||
{
|
||||
$this->toolName = $toolName;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getScore(): float
|
||||
{
|
||||
return $this->score;
|
||||
}
|
||||
|
||||
public function setScore(float $score): Result
|
||||
{
|
||||
$this->score = $score;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getProgress(): int
|
||||
{
|
||||
return $this->progress;
|
||||
}
|
||||
|
||||
public function setProgress(int $progress): Result
|
||||
{
|
||||
$this->progress = $progress;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDuration(): int
|
||||
{
|
||||
return $this->duration;
|
||||
}
|
||||
|
||||
public function setDuration(int $duration): Result
|
||||
{
|
||||
$this->duration = $duration;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getStartDate(): \DateTime
|
||||
{
|
||||
return $this->startDate;
|
||||
}
|
||||
|
||||
public function setStartDate(\DateTime $startDate): Result
|
||||
{
|
||||
$this->startDate = $startDate;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getUserIp(): string
|
||||
{
|
||||
return $this->userIp;
|
||||
}
|
||||
|
||||
public function setUserIp(string $userIp): Result
|
||||
{
|
||||
$this->userIp = $userIp;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getLtiLaunchId(): string
|
||||
{
|
||||
return $this->ltiLaunchId;
|
||||
}
|
||||
|
||||
public function setLtiLaunchId(string $ltiLaunchId): Result
|
||||
{
|
||||
$this->ltiLaunchId = $ltiLaunchId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user