Constructor
public __construct ( string $APIKey = "", string $sharedSecret = "" ) : OAuthSimple | ||
$APIKey | string | The API Key (sometimes referred to as the consumer key) This value is usually supplied by the site you wish to use. |
$sharedSecret | string | The shared secret. This value is also usually provided by the site you wish to use. |
return | OAuthSimple |
/** * * @param TiiLTI $lti * @return array */ public function getAssignmentInboxFormHash($lti) { $params = array('lis_person_sourcedid' => $lti->getUserId(), 'lis_lineitem_sourcedid' => $lti->getAssignmentId(), 'custom_source' => $this->getintegrationid(), 'roles' => $lti->getRole()); if (!is_null($lti->getCustomCSS())) { $params['launch_presentation_css_url'] = $lti->getCustomCSS(); } if (!is_null($lti->getWideMode())) { $params['custom_widemode'] = (int) $lti->getWideMode(); } if (!is_null($lti->getStudentList())) { $params['custom_studentlist'] = $lti->getStudentList(); } $this->setLtiParams($params); parent::__construct($this->accountid, $this->sharedkey); $this->setEndPoint($this->getApiBaseUrl() . $lti::ASSIGNMENTINBOXENDPOINT); $this->setParameters($this->getLtiParams()); return array_merge($this->getLtiParams(), $this->getParamArray($params)); }
/** * * @param TiiSubmission $submission * @return array */ public function getResubmissionFormHash($submission) { $params = array('lis_person_sourcedid' => $submission->getSubmitterUserId(), 'lis_result_sourcedid' => $submission->getSubmissionId(), 'roles' => $submission->getRole(), 'custom_source' => $this->getIntegrationId(), 'custom_submission_title' => $submission->getTitle(), 'custom_submission_author' => $submission->getAuthorUserId(), 'custom_xmlresponse' => (int) $this->getXmlResponse()); if (!is_null($submission->getCustomCSS())) { $params['launch_presentation_css_url'] = $submission->getCustomCSS(); } $this->setLtiParams($params); parent::__construct($this->accountid, $this->sharedkey); $this->setEndPoint($this->getApiBaseUrl() . $submission::RESUBMITENDPOINT); $this->setParameters($this->getLtiParams()); return array_merge($this->getLtiParams(), $this->getParamArray($params)); }