CSC/ECE 517 Fall 2022 - E2257: Refactor questionnaires controller.rb

From Expertiza_Wiki
Jump to navigation Jump to search

Introduction

In Expertiza, Questionnaire is the superclass for all kinds of questionnaires and rubrics—rubrics for evaluating submissions and teammate contributions, and taking quizzes and surveys. All of these are subclasses of Questionnaire. questionnaires_controller.rb is charged with creating, displaying, and managing Questionnaires. Because it is used so widely, malfunctions could cause bugs in many parts of the system; hence it is especially important that the code be clear.


Issues Fixed

  1. Removed create_questionnaire
  2. QuizQuestionnaire check

Files Changed

  • app/controllers/questionnaires_controller.rb
  • spec/controllers/questionnaires_controller_spec.rb

Changes

Fix #1

The create_questionnnaires method was present but its related functionality had been removed. Some kind of link to it is still present in one of the initial migrations which was populating a database to show values for a drop-down that is no longer in use. Thus ended up removing the function and its corresponding test cases.

Fix #2

Fix #3

Fix #4

Fix #5

Project Mentor

Edward Gehringer (efg@ncsu.edu)


Team Member

Ashwin Shankar Umasankar (aumasan@ncsu.edu)

Kailash Singaravelu (ksingar2@ncsu.edu)

Pujitha Enamandala (penaman@ncsu.edu)

Reference

  1. VCL link
  2. Github Repo
  3. Github Pull Request
  4. Expertiza on GitHub
  5. Expertiza Project Documentation Wiki
  6. CodeClimate Documentation