CSC/ECE 517 Fall 2017/E1764 Refactor Grades Controller.rb: Difference between revisions
(scratch) |
No edit summary |
||
Line 1: | Line 1: | ||
== Expertiza Background== | == 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 == | == 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 == | == Files modified in current project == | ||
1. grades_controller.rb | |||
2. grades_controller_spec.rb | |||
=== GradesController === | === GradesController === | ||
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. | |||
There were no existing test cases for the controller. We have added a spec file named 'grades_spec.rb' under the spec folder. As no changes were done for the model, no tests for the model were included. | |||
=== GradesHelper === | === GradesHelper === |
Revision as of 14:17, 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
GradesController
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.
There were no existing test cases for the controller. We have added a spec file named 'grades_spec.rb' under the spec folder. As no changes were done for the model, no tests for the model were included.