コード例 #1
0
 /**
  *
  * @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->getSubmissionDataUrl())) {
         $params['custom_submission_url'] = $submission->getSubmissionDataUrl();
         $params['custom_submission_filename'] = $submission->getSubmissionDataFilename();
     }
     if (!is_null($submission->getCustomCSS())) {
         $params['launch_presentation_css_url'] = $submission->getCustomCSS();
     }
     if (!is_null($submission->getWideMode())) {
         $params['custom_widemode'] = (int) $submission->getWideMode();
     }
     $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));
 }