CSC/ECE 517 Fall 2017/E1764 Refactor Grades Controller.rb: Difference between revisions
No edit summary |
No edit summary |
||
Line 14: | Line 14: | ||
2. grades_controller_spec.rb | 2. grades_controller_spec.rb | ||
=== | === Grades_Controller === | ||
The main purpose of grades controller is to allow students and instructors to see grades and reviews through Expertiza, providing functions such as update scores, view teams, make chart and calculate penalties. Some functions were written in long and redundant way which makes it hard to understand and behaves inefficient. | The main purpose of grades controller is to allow students and instructors to see grades and reviews through Expertiza, providing functions such as update scores, view teams, make chart and calculate penalties. Some functions were written in long and redundant way which makes it hard to understand and behaves inefficient. | ||
We extract some part of functions to become a helper function to make each function more clear and easier to understand. | We extract some part of functions to become a helper function to make each function more clear and easier to understand. Besides, we slightly change some variable names by using more specific words to promote the readability. | ||
=== | === Grades_Controller_Spec === | ||
Revision as of 15:02, 27 October 2017
Expertiza Background
Expertiza is an educational web application for students to submit the articles, code, websites and peer-review learning objects. It is an open source project based on Ruby on Rails and developed by students for many years and keep refactoring and fixing bugs upon peer review.
Description of the current project
This project is to refactor grades controller which calculates the grades of assignment participants' from peer review and views of listing the scores. After refactor the previous work, it is the part of TLD that use RSpec to examine the correctness of functions and do the integration test.
Files modified in current project
1. grades_controller.rb 2. grades_controller_spec.rb
Grades_Controller
The main purpose of grades controller is to allow students and instructors to see grades and reviews through Expertiza, providing functions such as update scores, view teams, make chart and calculate penalties. Some functions were written in long and redundant way which makes it hard to understand and behaves inefficient.
We extract some part of functions to become a helper function to make each function more clear and easier to understand. Besides, we slightly change some variable names by using more specific words to promote the readability.