Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add /assignment endpoints in course-management #1

Open
benjaminkostiuk opened this issue May 9, 2021 · 2 comments
Open

Add /assignment endpoints in course-management #1

benjaminkostiuk opened this issue May 9, 2021 · 2 comments
Assignees
Labels
feature Feature or improvement priority:high High priority work item

Comments

@benjaminkostiuk
Copy link
Member

benjaminkostiuk commented May 9, 2021

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.
@benjaminkostiuk benjaminkostiuk added feature Feature or improvement priority:high High priority work item labels May 9, 2021
@benjaminkostiuk
Copy link
Member Author

benjaminkostiuk commented May 12, 2021

@jeevanauluck I think this could be a good first issue to start on. Try breaking it up into a few separate pull requests. The structure is going to be similar to the Course endpoints.

@benjaminkostiuk
Copy link
Member Author

The creation of JPA Assignment & AssignmentAttribute JPA repositories is blocking #2, so for now to unblock going to allow @youcefs21 to implement them. We can refactor as needed later.

@youcefs21 youcefs21 self-assigned this Feb 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature or improvement priority:high High priority work item
Projects
None yet
Development

No branches or pull requests

3 participants