Skip to content

Add /assignment endpoints in course-management #1

@benjaminkostiuk

Description

@benjaminkostiuk

Overview

Implement the /assignment endpoints defined in the API planning document https://github.com/puffproject/docs/blob/master/API_ARCHITECTURE.md.

You can break the following into separate issues for pull requests if you want.

Breakdown

  1. Create an Assignment entity based on the ASSIGNMENT table.
  • Should have a many to one mapping to courses.
  • Can maybe include both the Course object and id as separate fields if that makes things easier.
  1. Create an AssignmnentAttribute entity based on the ASSIGNMENT_ATTR table.
  • Should be similar to the CourseAttribute entity.
  • You'll also need an Enum for the attribute names.

2.5. Create AssignmentPage and AssignmentAttributeView models.

  • You can do this by extending BasePage and AssignmentAttributeView will have the same fields as values for the enum from 2.
  1. Create a Assignment & AssignmentAttribute JPA repository interfaces.
  • Similar to the Course repositories already created.
  1. Create an Assignment service interface and class
  • Should be similar to the CourseService already implemented
  • Don't forget to throw ElementNotFound exceptions if the associated Course can't be found for an assignment.
  1. Create an REST interface for Assignment endpoints
  • Similar to the Course REST interface already created.
  1. Implement the REST interface with a RestController for Assignment endpoints
  • Similar to the Course Controller.
  • Don't forget the security and access control on endpoints.
  1. Write tests for your endpoints (You should also test manually)
  • Unit tests for your Assignment service class
  • Api component tests for your new apis
  • There are already some tests written for Courses that you can work off of.

Metadata

Metadata

Labels

featureFeature or improvementpriority:highHigh priority work item

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions