Skip to content

Commit

Permalink
Release code
Browse files Browse the repository at this point in the history
  • Loading branch information
UPDATE.SH committed Nov 4, 2021
0 parents commit a55e19c
Show file tree
Hide file tree
Showing 27 changed files with 1,166 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/vendor/
/composer.lock
20 changes: 20 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "oat-sa/lib-em-php-lti-events",
"minimum-stability": "dev",
"require": {
"symfony/validator": "5.3.*",
"symfony/serializer": "5.3.*",
"doctrine/annotations": "1.14.x-dev",
"oat-sa/lib-lti1p3-ags": "^1.2",
"symfony/property-access": "5.3.*",
"oat-sa/lib-lti1p3-core": "^6.6",
"oat-sa/lib-lti1p3-proctoring": "^0.4",
"oat-sa/lib-lti1p3-basic-outcome": "^4.1",
"oat-sa/lib-lti1p3-nrps": "^7.0"
},
"autoload": {
"psr-4": {
"OAT\\Library\\EnvironmentManagementLtiEvents\\": "src/"
}
}
}
34 changes: 34 additions & 0 deletions src/Event/Ags/CreateLineItemEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

declare(strict_types=1);

namespace OAT\Library\EnvironmentManagementLtiEvents\Event\Ags;

use OAT\Library\EnvironmentManagementLtiEvents\Event\EventInterface;
use OAT\Library\Lti1p3Ags\Model\LineItem\LineItemInterface;

class CreateLineItemEvent implements EventInterface
{
public const TYPE = 'agsCreateLineItem';

public function __construct(
private string $registrationId,
private LineItemInterface $lineItem,
private string $lineItemsContainerUrl,
) {}

public function getRegistrationId(): string
{
return $this->registrationId;
}

public function getLineItem(): LineItemInterface
{
return $this->lineItem;
}

public function getLineItemsContainerUrl(): string
{
return $this->lineItemsContainerUrl;
}
}
27 changes: 27 additions & 0 deletions src/Event/Ags/DeleteLineItemEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

declare(strict_types=1);

namespace OAT\Library\EnvironmentManagementLtiEvents\Event\Ags;

use OAT\Library\EnvironmentManagementLtiEvents\Event\EventInterface;

class DeleteLineItemEvent implements EventInterface
{
public const TYPE = 'agsDeleteLineItem';

public function __construct(
private string $registrationId,
private string $lineItemUrl,
) {}

public function getRegistrationId(): string
{
return $this->registrationId;
}

public function getLineItemUrl(): string
{
return $this->lineItemUrl;
}
}
33 changes: 33 additions & 0 deletions src/Event/Ags/GetLineItemEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

declare(strict_types=1);

namespace OAT\Library\EnvironmentManagementLtiEvents\Event\Ags;

use OAT\Library\EnvironmentManagementLtiEvents\Event\EventInterface;

class GetLineItemEvent implements EventInterface
{
public const TYPE = 'agsGetLineItem';

public function __construct(
private string $registrationId,
private string $lineItemUrl,
private array $scopes = [],
) {}

public function getRegistrationId(): string
{
return $this->registrationId;
}

public function getLineItemUrl(): string
{
return $this->lineItemUrl;
}

public function getScopes(): array
{
return $this->scopes;
}
}
63 changes: 63 additions & 0 deletions src/Event/Ags/ListLineItemsEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?php

declare(strict_types=1);

namespace OAT\Library\EnvironmentManagementLtiEvents\Event\Ags;

use OAT\Library\EnvironmentManagementLtiEvents\Event\EventInterface;

class ListLineItemsEvent implements EventInterface
{
public const TYPE = 'agsListLineItems';

public function __construct(
private string $registrationId,
private string $lineItemsContainerUrl,
private ?string $resourceIdentifier = null,
private ?string $resourceLinkIdentifier = null,
private ?string $tag = null,
private ?int $limit = null,
private ?int $offset = null,
private ?array $scopes = null
) {}

public function getRegistrationId(): string
{
return $this->registrationId;
}

public function getLineItemsContainerUrl(): string
{
return $this->lineItemsContainerUrl;
}

public function getResourceIdentifier(): ?string
{
return $this->resourceIdentifier;
}

public function getResourceLinkIdentifier(): ?string
{
return $this->resourceLinkIdentifier;
}

public function getTag(): ?string
{
return $this->tag;
}

public function getLimit(): ?int
{
return $this->limit;
}

public function getOffset(): ?int
{
return $this->offset;
}

public function getScopes(): ?array
{
return $this->scopes;
}
}
45 changes: 45 additions & 0 deletions src/Event/Ags/ListResultsEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

declare(strict_types=1);

namespace OAT\Library\EnvironmentManagementLtiEvents\Event\Ags;

use OAT\Library\EnvironmentManagementLtiEvents\Event\EventInterface;

class ListResultsEvent implements EventInterface
{
public const TYPE = 'agsListResults';

public function __construct(
private string $registrationId,
private string $lineItemUrl,
private ?string $userIdentifier = null,
private ?int $limit = null,
private ?int $offset = null,
) {}

public function getRegistrationId(): string
{
return $this->registrationId;
}

public function getLineItemUrl(): string
{
return $this->lineItemUrl;
}

public function getUserIdentifier(): ?string
{
return $this->userIdentifier;
}

public function getLimit(): ?int
{
return $this->limit;
}

public function getOffset(): ?int
{
return $this->offset;
}
}
34 changes: 34 additions & 0 deletions src/Event/Ags/PublishScoreEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

declare(strict_types=1);

namespace OAT\Library\EnvironmentManagementLtiEvents\Event\Ags;

use OAT\Library\EnvironmentManagementLtiEvents\Event\EventInterface;
use OAT\Library\Lti1p3Ags\Model\Score\ScoreInterface;

class PublishScoreEvent implements EventInterface
{
public const TYPE = 'agsPublishScore';

public function __construct(
private string $registrationId,
private ScoreInterface $score,
private string $lineItemUrl
) {}

public function getRegistrationId(): string
{
return $this->registrationId;
}

public function getScore(): ScoreInterface
{
return $this->score;
}

public function getLineItemUrl(): string
{
return $this->lineItemUrl;
}
}
34 changes: 34 additions & 0 deletions src/Event/Ags/UpdateLineItemEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

declare(strict_types=1);

namespace OAT\Library\EnvironmentManagementLtiEvents\Event\Ags;

use OAT\Library\EnvironmentManagementLtiEvents\Event\EventInterface;
use OAT\Library\Lti1p3Ags\Model\LineItem\LineItemInterface;

class UpdateLineItemEvent implements EventInterface
{
public const TYPE = 'agsUpdateLineItem';

public function __construct(
private string $registrationId,
private LineItemInterface $lineItem,
private ?string $lineItemUrl = null
) {}

public function getRegistrationId(): string
{
return $this->registrationId;
}

public function getLineItem(): LineItemInterface
{
return $this->lineItem;
}

public function getLineItemUrl(): ?string
{
return $this->lineItemUrl;
}
}
33 changes: 33 additions & 0 deletions src/Event/BasicOutcome/DeleteResultEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

declare(strict_types=1);

namespace OAT\Library\EnvironmentManagementLtiEvents\Event\BasicOutcome;

use OAT\Library\EnvironmentManagementLtiEvents\Event\EventInterface;

class DeleteResultEvent implements EventInterface
{
public const TYPE = 'basicOutcomeDeleteResult';

public function __construct(
private string $registrationId,
private string $lisOutcomeServiceUrl,
private string $lisResultSourcedId
) {}

public function getRegistrationId(): string
{
return $this->registrationId;
}

public function getLisOutcomeServiceUrl(): string
{
return $this->lisOutcomeServiceUrl;
}

public function getLisResultSourcedId(): string
{
return $this->lisResultSourcedId;
}
}
33 changes: 33 additions & 0 deletions src/Event/BasicOutcome/ReadResultEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

declare(strict_types=1);

namespace OAT\Library\EnvironmentManagementLtiEvents\Event\BasicOutcome;

use OAT\Library\EnvironmentManagementLtiEvents\Event\EventInterface;

class ReadResultEvent implements EventInterface
{
public const TYPE = 'basicOutcomeReadResult';

public function __construct(
private string $registrationId,
private string $lisOutcomeServiceUrl,
private string $lisResultSourcedId
) {}

public function getRegistrationId(): string
{
return $this->registrationId;
}

public function getLisOutcomeServiceUrl(): string
{
return $this->lisOutcomeServiceUrl;
}

public function getLisResultSourcedId(): string
{
return $this->lisResultSourcedId;
}
}
Loading

0 comments on commit a55e19c

Please sign in to comment.