/**
  *
  * @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));
 }
Exemple #2
0
 /**
  *
  * @param TiiLTI $lti
  * @return array
  */
 private function getDownloadSubmissionFormHash($endpoint, $lti)
 {
     $params = array('lis_person_sourcedid' => $lti->getUserId(), 'lis_result_sourcedid' => $lti->getSubmissionId(), 'roles' => $lti->getRole(), 'custom_source' => $this->getIntegrationId());
     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() . $endpoint);
     $this->setParameters($this->getLtiParams());
     return array_merge($this->getLtiParams(), $this->getParamArray($params));
 }