/** * * @param TiiLTI $lti * @return array */ public function getCreateAssignmentFormHash($lti) { $params = array('lis_person_sourcedid' => $lti->getUserId(), 'lis_coursesection_sourcedid' => $lti->getClassId(), '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(); } $this->setLtiParams($params); parent::__construct($this->accountid, $this->sharedkey); $this->setEndPoint($this->getApiBaseUrl() . $lti::CREATEASSIGNMENTENDPOINT); $this->setParameters($this->getLtiParams()); return array_merge($this->getLtiParams(), $this->getParamArray($params)); }
/** * * @param TiiLTI $lti * @return array */ public function getRubricManagerFormHash($lti) { $params = array('lis_person_sourcedid' => $lti->getUserId(), 'roles' => $lti->getRole(), 'custom_source' => $this->getintegrationid()); if (!is_null($lti->getClassId())) { $params['lis_coursesection_sourcedid'] = $lti->getClassId(); } if (!is_null($lti->getCustomCSS())) { $params['launch_presentation_css_url'] = $lti->getCustomCSS(); } $this->setLtiParams($params); parent::__construct($this->accountid, $this->sharedkey); $this->setEndPoint($this->getApiBaseUrl() . $lti::RUBRICENDPOINT); $this->setParameters($this->getLtiParams()); return array_merge($this->getLtiParams(), $this->getParamArray($params)); }