ALTER TABLE xapi_cmi5_item ADD CONSTRAINT FK_7CA116D8727ACA70 FOREIGN KEY (parent_id) REFERENCES xapi_cmi5_item (id) ON DELETE CASCADE;
CREATE TABLE xapi_activity_state (id INT AUTO_INCREMENT NOT NULL, state_id VARCHAR(255) NOT NULL, activity_id VARCHAR(255) NOT NULL, agent LONGTEXT NOT NULL COMMENT '(DC2Type:json)', document_data LONGTEXT NOT NULL COMMENT '(DC2Type:json)', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB;
CREATE TABLE xapi_activity_profile (id INT AUTO_INCREMENT NOT NULL, profile_id VARCHAR(255) NOT NULL, activity_id VARCHAR(255) NOT NULL, document_data LONGTEXT NOT NULL COMMENT '(DC2Type:json)', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB;
@ -47,12 +48,13 @@ final class StatementGetController
'format' => true,
'attachments' => true,
'ascending' => true,
'cursor' => true,
];
private $repository;
private $statementSerializer;
private $statementResultSerializer;
private $statementsFilterFactory;
protected $repository;
protected $statementSerializer;
protected $statementResultSerializer;
protected $statementsFilterFactory;
public function __construct(StatementRepositoryInterface $repository, StatementSerializerInterface $statementSerializer, StatementResultSerializerInterface $statementResultSerializer, StatementsFilterFactory $statementsFilterFactory)
{
@ -86,14 +88,19 @@ final class StatementGetController
@ -185,4 +196,14 @@ final class StatementGetController
throw new BadRequestHttpException('Request must not contain statementId or voidedStatementId parameters, and also any other parameter besides "attachments" or "format".');
}
}
protected function generateMoreIrl(ParameterBag $query): IRL
if (null === $method = $this->request->query->get('method')) {
return;
}
if (empty($parts[1])) {
throw new AccessDeniedHttpException();
if ($this->request->query->count() > 1) {
throw new BadRequestHttpException('Including other query parameters than "method" is not allowed. You have to send them as POST parameters inside the request body.');
}
$authDecoded = base64_decode($parts[1]);
$this->request->setMethod($method);
$this->request->query->remove('method');
$parts = explode(':', $authDecoded, 2);
if (null !== $content = $this->request->request->get('content')) {