CSC/ECE 517 Fall 2017/E1764 Refactor Grades Controller.rb

From Expertiza_Wiki
Revision as of 15:02, 27 October 2017 by Yhu22 (talk | contribs)
Jump to navigation Jump to search

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.

Grades_Controller_Spec

List of changes

Solutions Implemented and Delivered

Testing Details

RSpec

Scope for future improvement