|
|
|
@ -18,6 +18,12 @@ use PHPExiftool\Driver\Tag\MXF\ViewportAspectRatio; |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
class ImsLtiTool |
|
|
|
class ImsLtiTool |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @var string|null |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @ORM\Column(name="public_key", type="text", nullable=true) |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public $publicKey; |
|
|
|
/** |
|
|
|
/** |
|
|
|
* @var integer |
|
|
|
* @var integer |
|
|
|
* |
|
|
|
* |
|
|
|
@ -68,14 +74,12 @@ class ImsLtiTool |
|
|
|
* @ORM\Column(name="active_deep_linking", type="boolean", nullable=false, options={"default": false}) |
|
|
|
* @ORM\Column(name="active_deep_linking", type="boolean", nullable=false, options={"default": false}) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private $activeDeepLinking = false; |
|
|
|
private $activeDeepLinking = false; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @var null|string |
|
|
|
* @var null|string |
|
|
|
* |
|
|
|
* |
|
|
|
* @ORM\Column(name="privacy", type="text", nullable=true, options={"default": null}) |
|
|
|
* @ORM\Column(name="privacy", type="text", nullable=true, options={"default": null}) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private $privacy = null; |
|
|
|
private $privacy = null; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @var Course|null |
|
|
|
* @var Course|null |
|
|
|
* |
|
|
|
* |
|
|
|
@ -83,7 +87,6 @@ class ImsLtiTool |
|
|
|
* @ORM\JoinColumn(name="c_id", referencedColumnName="id") |
|
|
|
* @ORM\JoinColumn(name="c_id", referencedColumnName="id") |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private $course = null; |
|
|
|
private $course = null; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @var GradebookEvaluation|null |
|
|
|
* @var GradebookEvaluation|null |
|
|
|
* |
|
|
|
* |
|
|
|
@ -91,7 +94,6 @@ class ImsLtiTool |
|
|
|
* @ORM\JoinColumn(name="gradebook_eval_id", referencedColumnName="id", onDelete="SET NULL") |
|
|
|
* @ORM\JoinColumn(name="gradebook_eval_id", referencedColumnName="id", onDelete="SET NULL") |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private $gradebookEval = null; |
|
|
|
private $gradebookEval = null; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @var ImsLtiTool|null |
|
|
|
* @var ImsLtiTool|null |
|
|
|
* |
|
|
|
* |
|
|
|
@ -99,28 +101,18 @@ class ImsLtiTool |
|
|
|
* @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") |
|
|
|
* @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private $parent; |
|
|
|
private $parent; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @var ArrayCollection |
|
|
|
* @var ArrayCollection |
|
|
|
* |
|
|
|
* |
|
|
|
* @ORM\OneToMany(targetEntity="Chamilo\PluginBundle\Entity\ImsLti\ImsLtiTool", mappedBy="parent") |
|
|
|
* @ORM\OneToMany(targetEntity="Chamilo\PluginBundle\Entity\ImsLti\ImsLtiTool", mappedBy="parent") |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private $children; |
|
|
|
private $children; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @var string |
|
|
|
* @var string |
|
|
|
* |
|
|
|
* |
|
|
|
* @ORM\Column(name="client_id", type="string", nullable=true) |
|
|
|
* @ORM\Column(name="client_id", type="string", nullable=true) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private $clientId; |
|
|
|
private $clientId; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @var string|null |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @ORM\Column(name="public_key", type="text", nullable=true) |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public $publicKey; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @var string|null |
|
|
|
* @var string|null |
|
|
|
* |
|
|
|
* |
|
|
|
@ -165,7 +157,7 @@ class ImsLtiTool |
|
|
|
$this->customParams = null; |
|
|
|
$this->customParams = null; |
|
|
|
$this->activeDeepLinking = false; |
|
|
|
$this->activeDeepLinking = false; |
|
|
|
$this->course = null; |
|
|
|
$this->course = null; |
|
|
|
$this->gradebookEval =null; |
|
|
|
$this->gradebookEval = null; |
|
|
|
$this->privacy = null; |
|
|
|
$this->privacy = null; |
|
|
|
$this->children = new ArrayCollection(); |
|
|
|
$this->children = new ArrayCollection(); |
|
|
|
$this->consumerKey = null; |
|
|
|
$this->consumerKey = null; |
|
|
|
@ -192,6 +184,7 @@ class ImsLtiTool |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @param string $name |
|
|
|
* @param string $name |
|
|
|
|
|
|
|
* |
|
|
|
* @return ImsLtiTool |
|
|
|
* @return ImsLtiTool |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function setName($name) |
|
|
|
public function setName($name) |
|
|
|
@ -211,6 +204,7 @@ class ImsLtiTool |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @param null|string $description |
|
|
|
* @param null|string $description |
|
|
|
|
|
|
|
* |
|
|
|
* @return ImsLtiTool |
|
|
|
* @return ImsLtiTool |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function setDescription($description) |
|
|
|
public function setDescription($description) |
|
|
|
@ -230,6 +224,7 @@ class ImsLtiTool |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @param string $launchUrl |
|
|
|
* @param string $launchUrl |
|
|
|
|
|
|
|
* |
|
|
|
* @return ImsLtiTool |
|
|
|
* @return ImsLtiTool |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function setLaunchUrl($launchUrl) |
|
|
|
public function setLaunchUrl($launchUrl) |
|
|
|
@ -239,44 +234,6 @@ class ImsLtiTool |
|
|
|
return $this; |
|
|
|
return $this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @return string |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public function getConsumerKey() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return $this->consumerKey; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @param string $consumerKey |
|
|
|
|
|
|
|
* @return ImsLtiTool |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public function setConsumerKey($consumerKey) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$this->consumerKey = $consumerKey; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $this; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @return string |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public function getSharedSecret() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return $this->sharedSecret; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @param string $sharedSecret |
|
|
|
|
|
|
|
* @return ImsLtiTool |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public function setSharedSecret($sharedSecret) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$this->sharedSecret = $sharedSecret; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $this; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @return null|string |
|
|
|
* @return null|string |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ -287,6 +244,7 @@ class ImsLtiTool |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @param null|string $customParams |
|
|
|
* @param null|string $customParams |
|
|
|
|
|
|
|
* |
|
|
|
* @return ImsLtiTool |
|
|
|
* @return ImsLtiTool |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function setCustomParams($customParams) |
|
|
|
public function setCustomParams($customParams) |
|
|
|
@ -324,6 +282,9 @@ class ImsLtiTool |
|
|
|
return implode("\n", $pairs); |
|
|
|
return implode("\n", $pairs); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @return array |
|
|
|
|
|
|
|
*/ |
|
|
|
public function getCustomParamsAsArray() |
|
|
|
public function getCustomParamsAsArray() |
|
|
|
{ |
|
|
|
{ |
|
|
|
$params = []; |
|
|
|
$params = []; |
|
|
|
@ -342,33 +303,6 @@ class ImsLtiTool |
|
|
|
return $params; |
|
|
|
return $params; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @return array |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public function parseCustomParams() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (empty($this->customParams)) { |
|
|
|
|
|
|
|
return []; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$params = []; |
|
|
|
|
|
|
|
$strings = explode("\n", $this->customParams); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach ($strings as $string) { |
|
|
|
|
|
|
|
if (empty($string)) { |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$pairs = explode('=', $string, 2); |
|
|
|
|
|
|
|
$key = self::filterSpecialChars($pairs[0]); |
|
|
|
|
|
|
|
$value = $pairs[1]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$params['custom_'.$key] = $value; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $params; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Map the key from custom param. |
|
|
|
* Map the key from custom param. |
|
|
|
* |
|
|
|
* |
|
|
|
@ -410,17 +344,30 @@ class ImsLtiTool |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Set activeDeepLinking. |
|
|
|
* @return array |
|
|
|
* |
|
|
|
|
|
|
|
* @param bool $activeDeepLinking |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @return ImsLtiTool |
|
|
|
|
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function setActiveDeepLinking($activeDeepLinking) |
|
|
|
public function parseCustomParams() |
|
|
|
{ |
|
|
|
{ |
|
|
|
$this->activeDeepLinking = $activeDeepLinking; |
|
|
|
if (empty($this->customParams)) { |
|
|
|
|
|
|
|
return []; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return $this; |
|
|
|
$params = []; |
|
|
|
|
|
|
|
$strings = explode("\n", $this->customParams); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach ($strings as $string) { |
|
|
|
|
|
|
|
if (empty($string)) { |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$pairs = explode('=', $string, 2); |
|
|
|
|
|
|
|
$key = self::filterSpecialChars($pairs[0]); |
|
|
|
|
|
|
|
$value = $pairs[1]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$params['custom_'.$key] = $value; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $params; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
@ -433,6 +380,20 @@ class ImsLtiTool |
|
|
|
return $this->activeDeepLinking; |
|
|
|
return $this->activeDeepLinking; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Set activeDeepLinking. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param bool $activeDeepLinking |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @return ImsLtiTool |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public function setActiveDeepLinking($activeDeepLinking) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$this->activeDeepLinking = $activeDeepLinking; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $this; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Get course. |
|
|
|
* Get course. |
|
|
|
* |
|
|
|
* |
|
|
|
@ -482,45 +443,21 @@ class ImsLtiTool |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Get privacy. |
|
|
|
* @return bool |
|
|
|
* |
|
|
|
|
|
|
|
* @return null|string |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public function getPrivacy() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return $this->privacy; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Set privacy. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param bool $shareName |
|
|
|
|
|
|
|
* @param bool $shareEmail |
|
|
|
|
|
|
|
* @param bool $sharePicture |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @return ImsLtiTool |
|
|
|
|
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function setPrivacy($shareName = false, $shareEmail = false, $sharePicture = false) |
|
|
|
public function isSharingName() |
|
|
|
{ |
|
|
|
{ |
|
|
|
$this->privacy = serialize( |
|
|
|
$unserialize = $this->unserializePrivacy(); |
|
|
|
[ |
|
|
|
|
|
|
|
'share_name' => $shareName, |
|
|
|
|
|
|
|
'share_email' => $shareEmail, |
|
|
|
|
|
|
|
'share_picture' => $sharePicture, |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $this; |
|
|
|
return (bool) $unserialize['share_name']; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @return bool |
|
|
|
* @return mixed |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function isSharingName() |
|
|
|
public function unserializePrivacy() |
|
|
|
{ |
|
|
|
{ |
|
|
|
$unserialize = $this->unserializePrivacy(); |
|
|
|
return \UnserializeApi::unserialize('not_allowed_classes', $this->privacy); |
|
|
|
|
|
|
|
|
|
|
|
return (bool) $unserialize['share_name']; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
@ -543,14 +480,6 @@ class ImsLtiTool |
|
|
|
return (bool) $unserialize['share_picture']; |
|
|
|
return (bool) $unserialize['share_picture']; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @return mixed |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public function unserializePrivacy() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return \UnserializeApi::unserialize('not_allowed_classes', $this->privacy); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @return ImsLtiTool|null |
|
|
|
* @return ImsLtiTool|null |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ -575,6 +504,78 @@ class ImsLtiTool |
|
|
|
return $this; |
|
|
|
return $this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @return string |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public function getSharedSecret() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return $this->sharedSecret; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @param string $sharedSecret |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @return ImsLtiTool |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public function setSharedSecret($sharedSecret) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$this->sharedSecret = $sharedSecret; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $this; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @return string |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public function getConsumerKey() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return $this->consumerKey; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @param string $consumerKey |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @return ImsLtiTool |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public function setConsumerKey($consumerKey) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$this->consumerKey = $consumerKey; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $this; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Get privacy. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @return null|string |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public function getPrivacy() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return $this->privacy; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Set privacy. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param bool $shareName |
|
|
|
|
|
|
|
* @param bool $shareEmail |
|
|
|
|
|
|
|
* @param bool $sharePicture |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @return ImsLtiTool |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public function setPrivacy($shareName = false, $shareEmail = false, $sharePicture = false) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$this->privacy = serialize( |
|
|
|
|
|
|
|
[ |
|
|
|
|
|
|
|
'share_name' => $shareName, |
|
|
|
|
|
|
|
'share_email' => $shareEmail, |
|
|
|
|
|
|
|
'share_picture' => $sharePicture, |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $this; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Get loginUrl. |
|
|
|
* Get loginUrl. |
|
|
|
* |
|
|
|
* |
|
|
|
@ -647,20 +648,6 @@ class ImsLtiTool |
|
|
|
return $this; |
|
|
|
return $this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Set advantageServices. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param array $advantageServices |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @return ImsLtiTool |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public function setAdvantageServices($advantageServices) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$this->advantageServices = $advantageServices; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $this; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Get advantageServices. |
|
|
|
* Get advantageServices. |
|
|
|
* |
|
|
|
* |
|
|
|
@ -682,31 +669,31 @@ class ImsLtiTool |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Add LineItem to lineItems. |
|
|
|
* Set advantageServices. |
|
|
|
* |
|
|
|
* |
|
|
|
* @param LineItem $lineItem |
|
|
|
* @param array $advantageServices |
|
|
|
* |
|
|
|
* |
|
|
|
* @return $this |
|
|
|
* @return ImsLtiTool |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function addLineItem(LineItem $lineItem) |
|
|
|
public function setAdvantageServices($advantageServices) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$lineItem->setTool($this); |
|
|
|
$this->advantageServices = $advantageServices; |
|
|
|
|
|
|
|
|
|
|
|
$this->lineItems[] = $lineItem; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $this; |
|
|
|
return $this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Set lineItems. |
|
|
|
* Add LineItem to lineItems. |
|
|
|
* |
|
|
|
* |
|
|
|
* @param ArrayCollection $lineItems |
|
|
|
* @param LineItem $lineItem |
|
|
|
* |
|
|
|
* |
|
|
|
* @return $this |
|
|
|
* @return $this |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function setLineItems(ArrayCollection $lineItems) |
|
|
|
public function addLineItem(LineItem $lineItem) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$this->lineItems = $lineItems; |
|
|
|
$lineItem->setTool($this); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$this->lineItems[] = $lineItem; |
|
|
|
|
|
|
|
|
|
|
|
return $this; |
|
|
|
return $this; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -750,6 +737,20 @@ class ImsLtiTool |
|
|
|
return $this->lineItems->matching($criteria); |
|
|
|
return $this->lineItems->matching($criteria); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Set lineItems. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param ArrayCollection $lineItems |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @return $this |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public function setLineItems(ArrayCollection $lineItems) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$this->lineItems = $lineItems; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $this; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Get version. |
|
|
|
* Get version. |
|
|
|
* |
|
|
|
* |
|
|
|
@ -760,15 +761,6 @@ class ImsLtiTool |
|
|
|
return $this->version; |
|
|
|
return $this->version; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function getVersionName() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (\ImsLti::V_1P1 === $this->version) { |
|
|
|
|
|
|
|
return 'LTI 1.0 / 1.1'; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return 'LTI 1.3'; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Set version. |
|
|
|
* Set version. |
|
|
|
* |
|
|
|
* |
|
|
|
@ -783,6 +775,18 @@ class ImsLtiTool |
|
|
|
return $this; |
|
|
|
return $this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @return string |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public function getVersionName() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (\ImsLti::V_1P1 === $this->version) { |
|
|
|
|
|
|
|
return 'LTI 1.0 / 1.1'; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return 'LTI 1.3'; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @return ArrayCollection |
|
|
|
* @return ArrayCollection |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|