E1728. Remove useless partials from grades view and move view logic to grades helper.rb: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 35: Line 35:


==Refactoring Tasks==
==Refactoring Tasks==
===Remove useless partials from grades view, such as _scores_author_feedback.html.erb, _scores_metareview.html.erb, _scores_submitted_work.html.erb, _scores_header.html.erb, etc.===
The named files were removed from the project and the deletions were committed to the repository
==Test Plans==
==Test Plans==

Revision as of 20:55, 21 March 2017

Introduction

This wiki provides details on the refactoring tasks that were undertaken as part of the continuous improvement to the Expertiza project

Background

Expertiza is a web application where students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation.

The application provides a complete system through which students and instructors collaborate on the learning objects as well as submit, review and grade assignments for the courses.

Motivation

By participating in the overall refactoring effort as part of the continuous improvement of Expertiza, students get an opportunity to work on a open source software project. This helps them gain exposure on the technologies used in the project as well as much needed experience in collaborating with peers as part of the software development process.

Tasks

The tasks involved as part of this refactoring effort were geared towards cleaning up the grade view logic.

Initial Task List

The initial set of tasks were:

  • For files: _scores_author_feedback.html.erb, _scores_metareview.html.erb, _scores_submitted_work.html.erb
  1. Move javascript code to assets
  • For files: _scores_header.html.erb
  1. Move logical code (such as L43-96) to helper file and assign self-explanatory method name
  • For files: _participant.html.erb, view_team.html.erb
  1. Move javascript code to assets
  2. Move logical code to helper file and assign self-explanatory method name
  3. Such as L8-22 in _participant.html.erb
  • Create test file named grades_helper_spec.rb in spec/helpers
  • Write test cases for all methods in grades_helper.rb

Revised Task List

On working with files _scores_author_feedback.html.erb, _scores_metareview.html.erb, _scores_submitted_work.html.erb, _scores_header.html.erb, the team came to find out that these files were not being used anymore in the application and the overall tasks were updated to the following:

  • Remove useless partials from grades view, such as _scores_author_feedback.html.erb, _scores_metareview.html.erb, _scores_submitted_work.html.erb, _scores_header.html.erb, etc.
  • For files _participant.html.erb, view_team.html.erb to grades_helper.rb
  1. Move javascript code to assets
  2. Move logical code to helper file and assign self-explanatory method name such as L8-22 in _participant.html.erb
  • Create test file named grades_helper_spec.rb in spec/helpers
  • Write test cases for all methods in grades_helper.rb by using factories

Refactoring Tasks

Remove useless partials from grades view, such as _scores_author_feedback.html.erb, _scores_metareview.html.erb, _scores_submitted_work.html.erb, _scores_header.html.erb, etc.

The named files were removed from the project and the deletions were committed to the repository

Test Plans