CSC/ECE 517 Spring 2023 - E2345. Reimplement QuestionnairesController and QuestionsController

From Expertiza_Wiki
Revision as of 02:53, 5 April 2023 by Rshah29 (talk | contribs)
Jump to navigation Jump to search

Introduction

This page gives a description of the changes made for the questions_controller.rb, questionnaire_controller.rb, question.rb & questionnaire.rb of Expertiza based OSS project.

Problem Statement

What is needed: This project builds on E2321, and the main goal is to get the endpoints of QuestionsController and QuestionnairesController running in reimplementation-backend repository. Detailed goals of the project are as follows:

  1. Improving the clarity and conciseness of code: The code should be written in a clean and concise manner. Methods with identical names that perform different functionalities should be renamed for clarity. Functions or functionality that are not clear should be commented on or removed. Any loops or methods that can be refactored for better performance should be addressed.
  2. Discarding unused or unclear functionality: Any unused or unclear functionality should be removed from the controllers. This will help to reduce complexity and make the code easier to maintain.
  3. Writing tests for the two controllers: Tests should be written for both the QuestionnairesController and the QuestionsController. The tests should cover at least 80% of the code, and tools like Rubocop and Code Climate should be used to verify code smells.
  4. Reimplement Questions and Questionnaires models: Reimplement the two models to facilitate the endpoints of the respective controllers.
  5. Writing tests for the two models: Tests should be written for both the Questionnaires and the Questions models. The tests should cover at least 80% of the code, and tools like Rubocop and Code Climate should be used to verify code smells.


Plan and List of Work Done

General Design Goals

  • Ensure all prior/expected functionality is working correctly, and if not, make any repairs or changes necessary.
  • DRY out prior implementation's controller and model methods which have functionality that already exists within the expertiza system.
  • Ensure all present test cases still work properly after making the above changes and create additional test cases.


Relevant Links


Contributors

This feature was created as part of Dr. Edward Gehringer's "CSC/ECE 517: Object-Oriented Design and Development" class, Spring 2023. The contributors were: Vineet Vimal Chheda, Rohan Jigarbhai Shah, and Aditya Srivastava. Our project mentor was Ankur Mundra (amundra@ncsu.edu)