public function __construct($service) { parent::__construct($service); $this->id = 'ToolProxy.collection'; $this->template = '/toolproxy'; $this->formats[] = 'application/vnd.ims.lti.v2.toolproxy+json'; $this->methods[] = 'POST'; }
public function parse_value($value) { global $COURSE; if ($COURSE->format == 'site') { $this->params['context_type'] = 'Group'; } else { $this->params['context_type'] = 'CourseSection'; } $this->params['context_id'] = $COURSE->id; $this->params['vendor_code'] = $this->get_service()->get_tool_proxy()->vendorcode; $this->params['product_code'] = $this->get_service()->get_tool_proxy()->guid; $value = str_replace('$ToolProxyBinding.custom.url', parent::get_endpoint(), $value); return $value; }
public function parse_value($value) { $id = optional_param('id', 0, PARAM_INT); // Course Module ID. if (!empty($id)) { $cm = get_coursemodule_from_id('lti', $id, 0, false, MUST_EXIST); $this->params['link_id'] = $cm->instance; } $value = str_replace('$LtiLink.custom.url', parent::get_endpoint(), $value); return $value; }
public function parse_value($value) { $value = str_replace('$ToolProxy.custom.url', parent::get_endpoint(), $value); return $value; }
public function get_endpoint() { return parent::get_endpoint() . '?lti_version=' . \mod_lti\ltiservice\service_base::LTI_VERSION2P0; }