├── translations └── .gitignore ├── .dockerignore ├── sonar-project.properties ├── config ├── packages │ ├── test │ │ ├── twig.yaml │ │ ├── validator.yaml │ │ ├── framework.yaml │ │ └── monolog.yaml │ ├── routing.yaml │ ├── prod │ │ ├── routing.yaml │ │ ├── deprecations.yaml │ │ └── monolog.yaml │ ├── sensio_framework_extra.yaml │ ├── cache.yaml │ ├── dev │ │ ├── deprecations.yaml │ │ └── monolog.yaml │ ├── translation.yaml │ ├── validator.yaml │ ├── twig.yaml │ ├── framework.yaml │ ├── psr_http_message_bridge.yaml │ ├── nyholm_psr7.yaml │ ├── lti1p3.yaml │ └── security.yaml ├── routes │ ├── dev │ │ └── framework.yaml │ ├── framework.yaml │ ├── health_check.yaml │ └── lti1p3.yaml ├── preload.php ├── keys │ ├── public.key │ └── private.key ├── bundles.php ├── bootstrap.php └── devkit │ └── deep_linking.yaml ├── doc ├── images │ └── logo │ │ └── logo.png ├── api.md └── installation.md ├── .coderabbit.yaml ├── src ├── .preload.php ├── Action │ ├── Api │ │ ├── ApiActionInterface.php │ │ └── Platform │ │ │ ├── Proctoring │ │ │ ├── DeleteAssessmentAction.php │ │ │ ├── GetAssessmentAction.php │ │ │ ├── ListAssessmentsAction.php │ │ │ ├── UpdateAssessmentAction.php │ │ │ └── CreateAssessmentAction.php │ │ │ └── Nrps │ │ │ ├── DeleteMembershipAction.php │ │ │ ├── GetMembershipAction.php │ │ │ ├── ListMembershipsAction.php │ │ │ └── CreateMembershipAction.php │ ├── Util │ │ └── PhpInfoAction.php │ ├── Platform │ │ ├── Proctoring │ │ │ ├── ListAssessmentsAction.php │ │ │ ├── ViewAssessmentAction.php │ │ │ ├── DeleteAssessmentAction.php │ │ │ └── CreateAssessmentAction.php │ │ ├── Ags │ │ │ ├── ListLineItemsAction.php │ │ │ ├── ViewLineItemAction.php │ │ │ └── DeleteLineItemAction.php │ │ ├── BasicOutcome │ │ │ ├── ListBasicOutcomesAction.php │ │ │ └── DeleteBasicOutcomeAction.php │ │ ├── Nrps │ │ │ ├── ListMembershipsAction.php │ │ │ ├── ViewMembershipAction.php │ │ │ └── DeleteMembershipAction.php │ │ ├── Ajax │ │ │ └── RegistrationDefaultLaunchUrlAction.php │ │ └── Message │ │ │ ├── ProctoringReturnAction.php │ │ │ ├── DeepLinkingReturnAction.php │ │ │ └── ProctoringEndAction.php │ ├── DashboardAction.php │ └── Tool │ │ ├── Ajax │ │ ├── NrpsServiceClientAction.php │ │ ├── Ags │ │ │ ├── ListLineItemsServiceClientAction.php │ │ │ └── ListResultsServiceClientAction.php │ │ ├── AcsServiceClientAction.php │ │ └── BasicOutcomeServiceClientAction.php │ │ └── Message │ │ ├── ProctoringResponseAction.php │ │ └── DeepLinkingResponseAction.php ├── Security │ ├── Api │ │ ├── Token │ │ │ └── ApiKeyToken.php │ │ ├── Provider │ │ │ └── ApiKeyProvider.php │ │ └── Firewall │ │ │ └── ApiKeyListener.php │ └── User │ │ └── UserAuthenticator.php ├── DependencyInjection │ ├── Compiler │ │ ├── RedisPass.php │ │ └── ConfigurationPass.php │ └── Security │ │ └── Factory │ │ └── ApiKeyFactory.php ├── Request │ ├── Encoder │ │ └── Base64UrlEncoder.php │ └── ParamConverter │ │ └── AgsLineItemIdentifierConverter.php ├── Factory │ └── ScopeRepositoryFactory.php ├── Form │ ├── Generator │ │ └── FormShareUrlGenerator.php │ └── Platform │ │ └── Proctoring │ │ └── AssessmentType.php ├── Generator │ └── UrlGenerator.php ├── Proctoring │ ├── AcsServiceServerControlProcessor.php │ ├── AssessmentRepository.php │ └── Assessment.php ├── Nrps │ └── DefaultMembershipFactory.php └── Ags │ └── ScoreRepository.php ├── .env.test ├── tests ├── bootstrap.php └── Unit │ └── CoreTraitsTest.php ├── .gitignore ├── bin ├── phpunit └── console ├── php.ini ├── templates ├── tool │ ├── ajax │ │ ├── acs.html.twig │ │ ├── basic-outcome.html.twig │ │ └── ags │ │ │ ├── listResults.html.twig │ │ │ └── viewLineItem.html.twig │ └── message │ │ └── proctoringEnd.html.twig ├── error │ └── error.html.twig ├── notification │ └── flashes.html.twig ├── launch │ ├── blocks │ │ ├── claims.html.twig │ │ ├── platformSecurity.html.twig │ │ ├── message.html.twig │ │ ├── toolSecurity.html.twig │ │ ├── deepLinkingItem.html.twig │ │ ├── proctoringStartAssessment.html.twig │ │ ├── proctoringEndAssessment.html.twig │ │ └── identity.html.twig │ └── modal │ │ └── generatorShareModal.html.twig └── platform │ └── proctoring │ ├── createAssessment.html.twig │ └── editAssessment.html.twig ├── unit.json ├── docker ├── phpfpm │ └── Dockerfile ├── nginx │ └── nginx.conf └── kube │ └── Dockerfile ├── .env ├── cloudbuild.yaml ├── public └── index.php ├── .github └── workflows │ └── sonar.yml ├── phpunit.xml.dist ├── docker-compose.yml ├── README.md └── composer.json /translations/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | .git 2 | vendor/ -------------------------------------------------------------------------------- /sonar-project.properties: -------------------------------------------------------------------------------- 1 | sonar.projectKey=devkit-lti1p3 2 | -------------------------------------------------------------------------------- /config/packages/test/twig.yaml: -------------------------------------------------------------------------------- 1 | twig: 2 | strict_variables: true 3 | -------------------------------------------------------------------------------- /config/packages/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | utf8: true 4 | -------------------------------------------------------------------------------- /config/packages/prod/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | strict_requirements: null 4 | -------------------------------------------------------------------------------- /doc/images/logo/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oat-sa/devkit-lti1p3/HEAD/doc/images/logo/logo.png -------------------------------------------------------------------------------- /config/packages/sensio_framework_extra.yaml: -------------------------------------------------------------------------------- 1 | sensio_framework_extra: 2 | router: 3 | annotations: false 4 | -------------------------------------------------------------------------------- /config/packages/test/validator.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | validation: 3 | not_compromised_password: false 4 | -------------------------------------------------------------------------------- /config/packages/test/framework.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | test: true 3 | session: 4 | storage_id: session.storage.mock_file 5 | -------------------------------------------------------------------------------- /config/routes/dev/framework.yaml: -------------------------------------------------------------------------------- 1 | _errors: 2 | resource: '@FrameworkBundle/Resources/config/routing/errors.xml' 3 | prefix: /_error 4 | -------------------------------------------------------------------------------- /.coderabbit.yaml: -------------------------------------------------------------------------------- 1 | remote_config: 2 | url: 'https://raw.githubusercontent.com/oat-sa/tao-code-quality/main/coderabbit/php/common/v1/.coderabbit.yaml' 3 | -------------------------------------------------------------------------------- /config/packages/cache.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | cache: 3 | app: cache.adapter.redis 4 | default_redis_provider: '%env(resolve:REDIS_CACHE_DSN)%' 5 | -------------------------------------------------------------------------------- /config/routes/framework.yaml: -------------------------------------------------------------------------------- 1 | when@dev: 2 | _errors: 3 | resource: '@FrameworkBundle/Resources/config/routing/errors.xml' 4 | prefix: /_error 5 | -------------------------------------------------------------------------------- /config/packages/dev/deprecations.yaml: -------------------------------------------------------------------------------- 1 | monolog: 2 | channels: [deprecation] 3 | handlers: 4 | deprecation: 5 | type: "null" 6 | channels: [deprecation] 7 | -------------------------------------------------------------------------------- /config/packages/prod/deprecations.yaml: -------------------------------------------------------------------------------- 1 | monolog: 2 | channels: [deprecation] 3 | handlers: 4 | deprecation: 5 | type: "null" 6 | channels: [deprecation] 7 | -------------------------------------------------------------------------------- /src/.preload.php: -------------------------------------------------------------------------------- 1 | bootEnv(dirname(__DIR__).'/.env'); 11 | } 12 | -------------------------------------------------------------------------------- /config/packages/test/monolog.yaml: -------------------------------------------------------------------------------- 1 | monolog: 2 | handlers: 3 | main: 4 | type: fingers_crossed 5 | action_level: error 6 | handler: nested 7 | excluded_http_codes: [404, 405] 8 | channels: ["!event"] 9 | nested: 10 | type: stream 11 | path: "%kernel.logs_dir%/%kernel.environment%.log" 12 | level: debug 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ###> IDE ### 2 | /.idea/ 3 | ###> IDE ### 4 | 5 | ###> symfony/framework-bundle ### 6 | /.env.local 7 | /.env.local.php 8 | /.env.*.local 9 | /config/secrets/prod/prod.decrypt.private.php 10 | /public/bundles/ 11 | /var/ 12 | /vendor/ 13 | ###< symfony/framework-bundle ### 14 | 15 | ###> symfony/phpunit-bridge ### 16 | .phpunit 17 | .phpunit.result.cache 18 | /phpunit.xml 19 | ###< symfony/phpunit-bridge ### 20 | -------------------------------------------------------------------------------- /config/routes/lti1p3.yaml: -------------------------------------------------------------------------------- 1 | lti1p3_jwks: 2 | resource: '@Lti1p3Bundle/Resources/config/routing/jwks.yaml' 3 | 4 | lti1p3_message_platform: 5 | resource: '@Lti1p3Bundle/Resources/config/routing/message/platform.yaml' 6 | 7 | lti1p3_message_tool: 8 | resource: '@Lti1p3Bundle/Resources/config/routing/message/tool.yaml' 9 | 10 | lti1p3_service_platform: 11 | resource: '@Lti1p3Bundle/Resources/config/routing/service/platform.yaml' 12 | -------------------------------------------------------------------------------- /bin/phpunit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | 2 |
8 | {{ controlResult|json_encode(constant('JSON_PRETTY_PRINT') + constant('JSON_UNESCAPED_SLASHES')) }}
9 |
10 | {{ message }}
11 |
8 | {{ token.payload.token.claims.all|json_encode(constant('JSON_PRETTY_PRINT') + constant('JSON_UNESCAPED_SLASHES')) }}
9 |
10 |
26 |
--------------------------------------------------------------------------------
/config/packages/psr_http_message_bridge.yaml:
--------------------------------------------------------------------------------
1 | services:
2 | _defaults:
3 | autowire: true
4 | autoconfigure: true
5 |
6 | Symfony\Bridge\PsrHttpMessage\HttpFoundationFactoryInterface:
7 | '@Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory'
8 |
9 | Symfony\Bridge\PsrHttpMessage\HttpMessageFactoryInterface:
10 | '@Symfony\Bridge\PsrHttpMessage\Factory\PsrHttpFactory'
11 |
12 | Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory: null
13 | Symfony\Bridge\PsrHttpMessage\Factory\PsrHttpFactory: null
14 |
15 | # Uncomment the following line to allow controllers to receive a
16 | # PSR-7 server request object instead of an HttpFoundation request
17 | #Symfony\Bridge\PsrHttpMessage\ArgumentValueResolver\PsrServerRequestResolver: null
18 |
19 | # Uncomment the following line to allow controllers to return a
20 | # PSR-7 response object instead of an HttpFoundation response
21 | #Symfony\Bridge\PsrHttpMessage\EventListener\PsrResponseListener: null
22 |
--------------------------------------------------------------------------------
/src/Action/Api/ApiActionInterface.php:
--------------------------------------------------------------------------------
1 | Platform - ACS assessment creation{% endblock %}
4 |
5 | {% block body %}
6 | {{ assessment.identifier }}
9 | {{ token.payload.version }}{{ token.payload.messageType }}{{ response.score|default('n/a') }}
14 | {{ results|json_encode(constant('JSON_PRETTY_PRINT') + constant('JSON_UNESCAPED_SLASHES')) }}
15 |
16 | {% else %}
17 | {{ lineItem.identifier }}
64 | {{ lineItem.additionalProperties.all|json_encode(constant('JSON_PRETTY_PRINT') + constant('JSON_UNESCAPED_SLASHES')) }}
65 |
66 | {% else %}
67 | n/a
68 | {% endif %}
69 | LtiEndAssessment message to finish the proctoring message flow.
46 | {{ token.payload.userIdentity.identifier }}{{ role }}