|
@@ -72,6 +72,13 @@ class ImsLtiTool
|
|
|
*/
|
|
|
private $activeDeepLinking = false;
|
|
|
|
|
|
+ /**
|
|
|
+ * @var null|string
|
|
|
+ *
|
|
|
+ * @ORM\Column(name="privacy", type="text", nullable=true, options={"default": null})
|
|
|
+ */
|
|
|
+ private $privacy = null;
|
|
|
+
|
|
|
/**
|
|
|
* @var Course|null
|
|
|
*
|
|
@@ -99,6 +106,7 @@ class ImsLtiTool
|
|
|
$this->activeDeepLinking = false;
|
|
|
$this->course = null;
|
|
|
$this->gradebookEval =null;
|
|
|
+ $this->privacy = null;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -260,10 +268,14 @@ class ImsLtiTool
|
|
|
* Set activeDeepLinking.
|
|
|
*
|
|
|
* @param bool $activeDeepLinking
|
|
|
+ *
|
|
|
+ * @return ImsLtiTool
|
|
|
*/
|
|
|
public function setActiveDeepLinking($activeDeepLinking)
|
|
|
{
|
|
|
$this->activeDeepLinking = $activeDeepLinking;
|
|
|
+
|
|
|
+ return $this;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -323,4 +335,74 @@ class ImsLtiTool
|
|
|
|
|
|
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;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return bool
|
|
|
+ */
|
|
|
+ public function isSharingName()
|
|
|
+ {
|
|
|
+ $unserialize = $this->unserializePrivacy();
|
|
|
+
|
|
|
+ return (bool) $unserialize['share_name'];
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return bool
|
|
|
+ */
|
|
|
+ public function isSharingEmail()
|
|
|
+ {
|
|
|
+ $unserialize = $this->unserializePrivacy();
|
|
|
+
|
|
|
+ return (bool) $unserialize['share_email'];
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return bool
|
|
|
+ */
|
|
|
+ public function isSharingPicture()
|
|
|
+ {
|
|
|
+ $unserialize = $this->unserializePrivacy();
|
|
|
+
|
|
|
+ return (bool) $unserialize['share_picture'];
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return mixed
|
|
|
+ */
|
|
|
+ public function unserializePrivacy()
|
|
|
+ {
|
|
|
+ return unserialize($this->privacy);
|
|
|
+ }
|
|
|
}
|