CSC/ECE 517 Spring 2023 -E2339. Reimplement signed up teams controller and sign up topics controller.rb
Introduction
The content of this page provides details on the adjustments needed for the "sign_up_topics controller" and the development of a new "signed_up_teams_controller" in the process of re-implementing the expertiza based open-source software project.
Implemented Work
As a component of program 3, it was agreed to partition the sign-up topic controller in Expertiza into two distinct controllers, namely "sign_up_topics_controller" and "signed_up_teams_controller". The implementation for the former has already been executed.The diagram presented below offers a visual depiction of the previously mentioned details.
Design Improvements and Ongoing work for "sign_up_topics controller"
1. Add filter to the index method : At present, the "index" method used to display all the available topics lacks the capability to filter by assignment ID. Although the existing implementation includes a filter to remove topics, the plan is to either relocate or establish a comparable filter for the "index" method to enable the listing of only selected topics.
2. Merge delete filter into the destroy method : To reduce code repetition and improve the DRYness of the code, the controller's "delete_filter" will be moved to the destroy method. This will eliminate duplicate code and make it easier to maintain the controller in the future.
A representation showing that the methods named filter and delete filter with now be moved to index and destroy.
method name | description |
filter | filters topics based on assignment id (required) and topic identifiers (optional)---> move to index |
delete_filter | deletes topics based on assignment id (required) and topic identifiers (optional)-->move to destroy |
3. The existing test plan covers all the current functionality, but it needs to be modified to include the changes mentioned earlier. Additionally, to improve debugging, we will enhance the test plan to output specific responses for every failed test case.
A sample test with only a status 200 response is shown below.
4. The controller name will be changed to signup_topics_controller to ensure it is spelled as a single word to follow proper naming conventions.
Signed Up teams Controller
The signed up teams controller will be having the following functionalities
Index - this will filter the topics based on the team ID.
Create - this will create a sign up team.
Update - this will update the signed up team.
Delete - this will destroy the signed up team.
A basic E/R Diagram for the same is shown :
Relevant Links (previous implementation)
Github Repository: https://github.com/anuj672/reimplementation-back-end
Pull Request: https://github.com/expertiza/reimplementation-back-end/pull/25
Video1 : https://youtu.be/ZAh80Gj5A5U
Video2: https://youtu.be/1IFXC7DAljI
Group
Mentored by
Krishna Saurabh Vankadaru
Group members
Anuj Naresh Chetwani
Indira Pimpalkhare
Tejas Prabhu