Skip to content

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.

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.

  • composer require ulams/topic-type-project
  • php artisan migrate
  • php artisan db:seed --class="Ulams\TopicTypeProject\Database\Seeders\TopicTypeProjectPermissionSeeder"

The endpoints are defined in swagger

Run ./vendor/bin/phpunit to run tests. Test details codecov

  • 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.

This package does not listen for any events.

Permissions are defined in seeder.

  • Project
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
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

Registered with AdministrableConfig::registerConfig (editable in the admin panel under Configuration → Settings).

None.

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 Email
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.

None.

None.

None.

None.