CSC/ECE 517 Fall 2014/OSS E1461 knn: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
=Expertiza - Refactoring StudentTeamController=
'Expertiza - Refactoring StudentTeamController'


__TOC__
__TOC__
Line 7: Line 7:


One part of the OSS project for Fall 2014 was refactoring of different sections of Expertiza. Our team was tasked with refactoring of the StudentTeamController.
One part of the OSS project for Fall 2014 was refactoring of different sections of Expertiza. Our team was tasked with refactoring of the StudentTeamController.
===StudentTeamController===
StudentTeamController is responsible for the methods creation and joining of teams for group projects on Expertiza. Specifically, this controller allows the user to:
*Create, edit or delete a team (name)
*Add a teamate to the team
*Leave a team if they want to move to a new team
*View received and sent invitations
This controller also provides the student and team instance variables to the corresponding student_team views.
We were tasked with refactoring this controller using DRY principles and more RESTful actions as well as updating our sections using the most current excepted ruby and rails style guidelines. In addition, 6 specific tasks were given:
*Change the list method to index (and others in the RESTful style)
*Use Ruby 1.9 style key: value pairs
*Remove commented-out code
*Use routing helpers (http://guides.rubyonrails.org/routing.html#path-and-url-helpers)
*Pluralize the class (StudentTeamsController)
*Use `.zero?` instead of `== 0`
==Refactoring of Old Code==
===Using Routing Helpers===
Modifications were made to StudentTeamsController.rb as well as anywhere that used routes pointing to StudentTeamsController which consisted of
passes information and responds to commands from the views displaying

Revision as of 20:23, 28 October 2014

'Expertiza - Refactoring StudentTeamController'

Introduction

Expertiza is an open source web application created by NCSU give a interface for team learning and peer review. Expertiza allows students to create and communicate with teams as well as an easy platform for online assignment submission. Another feature of Expertiza is its framework for allowing a peer review system on assignments, creating an easy way to give and receive feedback on assignments, allowing for improvement and re-submission based on classmates constructive feedback.

One part of the OSS project for Fall 2014 was refactoring of different sections of Expertiza. Our team was tasked with refactoring of the StudentTeamController.

StudentTeamController

StudentTeamController is responsible for the methods creation and joining of teams for group projects on Expertiza. Specifically, this controller allows the user to:

  • Create, edit or delete a team (name)
  • Add a teamate to the team
  • Leave a team if they want to move to a new team
  • View received and sent invitations

This controller also provides the student and team instance variables to the corresponding student_team views.

We were tasked with refactoring this controller using DRY principles and more RESTful actions as well as updating our sections using the most current excepted ruby and rails style guidelines. In addition, 6 specific tasks were given:

Refactoring of Old Code

Using Routing Helpers

Modifications were made to StudentTeamsController.rb as well as anywhere that used routes pointing to StudentTeamsController which consisted of

passes information and responds to commands from the views displaying