CSC/ECE 517 Fall 2016/E1642. Refactor review response map.rb: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
(Problem Statement added)
Line 15: Line 15:
=== Problem Statement ===
=== Problem Statement ===
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.
The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and  metareview_response_maps.
*Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere.  
*'''P1: ''' Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere.  
*Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.
*'''P2: ''' Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.
*metareview_response_maps rename, refactoring can be done. No need to do second iteration.
*'''P3: ''' metareview_response_maps rename, refactoring can be done. No need to do second iteration.
*Assignment Branch Condition size for final_versions_from_reviewer is too high.  
*'''P4: ''' Assignment Branch Condition size for final_versions_from_reviewer is too high.  
*Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if.  
*'''P5: ''' Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if.  
*Use find_by instead of where.first, e.g. line 60, 65, etc.
*'''P6: ''' Use find_by instead of where.first, e.g. line 60, 65, etc.
*Wrap the over-long lines: 58, 62 and 181.
*'''P7: ''' Wrap the over-long lines: 58, 62 and 181.
*Write missing unit tests for existing methods.
*'''P8: ''' Write missing unit tests for existing methods.


== Reason for Refractor==
== Reason for Refractor==

Revision as of 23:03, 28 October 2016

Peer Review Information

For testing the changes made, the following credentials are recommended:

  • Instructor Login: username: instructor6 password: password
  • Student Login: username: student11 password: password
  • Student Login: username: student1862 password: password

The above users are suggested for testing because there are a few users which would lead to exceptions upon login for unknown reasons completely unrelated to our work.


Introduction to Expertiza

Background

Expertiza is an open source project based on Ruby on Rails framework. Expertiza allows the instructor to create new assignments and customize new or existing assignments. It also allows the instructor to create a list of topics the students can sign up for. Students can form teams in Expertiza to work on various projects and assignments. Students can also peer review other students' submissions. Expertiza supports submission across various document types, including the URLs and wiki pages.


Problem Statement

The following were the tasks identified to accomplish through this project. These tasks are part of the review_response_map.rb, assignment.rb and metareview_response_maps.

  • P1: Code Climate shows import method is complex, because of lots of checks. This method can be fixed by adding private methods for raising import error. However, you need to check if this functionality is called anywhere.
  • P2: Get_assessments_round_for method can be renamed to get_responses_for_team_round. Team_id private variable is not needed.
  • P3: metareview_response_maps rename, refactoring can be done. No need to do second iteration.
  • P4: Assignment Branch Condition size for final_versions_from_reviewer is too high.
  • P5: Assignment Branch Condition size for get_assessments_round_for is too high, try to get rid of the nested if.
  • P6: Use find_by instead of where.first, e.g. line 60, 65, etc.
  • P7: Wrap the over-long lines: 58, 62 and 181.
  • P8: Write missing unit tests for existing methods.

Reason for Refractor

The purpose of this work is to rewrite the code of seven file for several reason listed below.

Files Modified in this Project

  • review_response_map.rb
  • assignment.rb
  • metareview_response_maps


Solutions implemented and Delivered

few lines with changes