CSC/ECE 517 Fall 2015/oss E1569 JNR

From Expertiza_Wiki
Revision as of 04:40, 31 October 2015 by Nnagara2 (talk | contribs)
Jump to navigation Jump to search

E1569: Refactoring ReviewMappingController

This page provides a description of our Expertiza based OSS project, which aimed at refactoring the ReviewMappingController.

Introduction

Expertiza is an Open Source software tool developed at NC State University. It is used to facilitate assignment and course management. It is primarily intended to facilitate assignments being peer reviewed. It is written as a Ruby on Rails application, thus functioning natively in a web environment. It can be cloned from GitHub.

Refactoring

Refactoring is a process designed to change code without modifying the functionality. Refactoring can improve the readability and the logical design of the software, making sure everything is in the right place and has the right name. This allows code to be understood more quickly by a developer, which shortens the time it takes to develop new features.

Development environment setup

Problem statement<ref>https://docs.google.com/document/d/1uWs3zyrupTmrOFuv5IbVWCF4NRvCXqJmg8dZ0wCqgus/edit</ref>

The ReviewMappingController file in this application (review_mapping_controller.rb) is responsible for setting up mappings between reviewers and reviewees. It essentially connects a reviewer to an assignment. However, it is a fairly bloated file since it has to handle functionality for five different kinds of maps (review response, author feedback, teammate review, meta-review, and quiz response). It is a prime choice for refactoring because the refactoring can clarify the intent of the different methods in the file.

There were 11 tasks involved in refactoring the review_mapping_controller:

  • Method delete_rofreviewer should do the same thing as delete_metareviewer
  • Method delete_participant is not used
  • Method list_sortable is not used
  • Method automatic_review_mapping is too long
  • Method review_report has SQL-like code
  • Method add_user_to_assignment should not be in this controller
  • Method get_team_from_submission should not be in this controller
  • Method delete_all_reviewers doesn’t actually delete all the reviewers, but just the outstanding review response maps. We want to keep this functionality
  • Method delete_participant should not be in this controller
  • Method name release_reservation doesn’t describe the functionality well
  • Method delete_review is not used


References

<references/>