Package: topic-type-project
Generated from api/packages/topic-type-project
Source: api/packages/topic-type-project · imported version 0.1.2. The sections after the README are extracted from the code on every docs build.
README
Section titled “README”What does it do
Section titled “What does it do”This package is another TopicType. It allows students to upload their solutions as files. This type is used for building headless Course.
The package by default grants students permissions to add and view their own solutions within the course. Administrators have permissions to display the list of all student solutions, as well as to download and delete them.
Installing
Section titled “Installing”composer require ulams/topic-type-projectphp artisan migratephp artisan db:seed --class="Ulams\TopicTypeProject\Database\Seeders\TopicTypeProjectPermissionSeeder"
Endpoints
Section titled “Endpoints”Run ./vendor/bin/phpunit to run tests.
Test details
Events
Section titled “Events”ProjectSolutionCreatedEvent- This event is dispatched when the user has uploaded a solution
You can use the ulams/templates-email package, which listens to this event and sends an email.
Listeners
Section titled “Listeners”This package does not listen for any events.
Permissions
Section titled “Permissions”Permissions are defined in seeder.
More documentation in the package
Section titled “More documentation in the package”Topic types
Section titled “Topic types”Project
API endpoints
Section titled “API endpoints”| Method | Path | Auth | Action |
|---|---|---|---|
GET |
/api/admin/topic-project-solutions |
yes | ProjectSolutionApiAdminController@index |
GET |
/api/admin/topic-project-solutions/{id} |
yes | ProjectSolutionApiAdminController@read |
PATCH |
/api/admin/topic-project-solutions/{id}/feedback |
yes | ProjectSolutionApiAdminController@feedback |
PATCH |
/api/admin/topic-project-solutions/{id}/grade |
yes | ProjectSolutionApiAdminController@grade |
DELETE |
/api/admin/topic-project-solutions/{id} |
yes | ProjectSolutionApiAdminController@delete |
GET |
/api/topic-project-solutions |
yes | ProjectSolutionApiController@index |
GET |
/api/topic-project-solutions/{id} |
yes | ProjectSolutionApiController@read |
POST |
/api/topic-project-solutions |
yes | ProjectSolutionApiController@create |
DELETE |
/api/topic-project-solutions/{id} |
yes | ProjectSolutionApiController@delete |
Permissions
Section titled “Permissions”| Permission | Seeded for roles | Constant |
|---|---|---|
project-solution_create-own |
admin, student | TopicTypeProjectPermissionEnum::CREATE_OWN_PROJECT_SOLUTION |
project-solution_list-own |
admin, student | TopicTypeProjectPermissionEnum::LIST_OWN_PROJECT_SOLUTION |
project-solution_delete-own |
admin, student | TopicTypeProjectPermissionEnum::DELETE_OWN_PROJECT_SOLUTION |
project-solution_read-own |
admin, student | TopicTypeProjectPermissionEnum::READ_OWN_PROJECT_SOLUTION |
project-solution_list |
admin | TopicTypeProjectPermissionEnum::LIST_PROJECT_SOLUTION |
project-solution_delete |
admin | TopicTypeProjectPermissionEnum::DELETE_PROJECT_SOLUTION |
project-solution_read |
admin | TopicTypeProjectPermissionEnum::READ_PROJECT_SOLUTION |
project-solution_update |
admin | TopicTypeProjectPermissionEnum::UPDATE_PROJECT_SOLUTION |
Settings
Section titled “Settings”Registered with AdministrableConfig::registerConfig (editable in the admin panel under Configuration → Settings).
None.
Events
Section titled “Events”| Event | Description | Notification templates |
|---|---|---|
ProjectGradabilityChangedEvent |
Emitted whenever a project’s counts_to_grade flag flips, in either direction. Consumed (in pcg-grades) to regenerate or delete the journal partial grade(s) derived from this project. | |
ProjectSolutionCreatedEvent |
||
ProjectSolutionGradedEvent |
Emitted when a solution of a project flagged counts_to_grade is graded by a lecturer. Re-grading the solution emits it again. Consumed (in pcg-grades) to upsert the partial grade for the journal. |
Notification templates registered here
Section titled “Notification templates registered here”None.
Artisan commands
Section titled “Artisan commands”None.
Scheduled jobs
Section titled “Scheduled jobs”None.
Environment variables read
Section titled “Environment variables read”None.