CSC 517 S2016 E1611 Refactor team.rb, course team.rb, and assignment team.rb: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 8: Line 8:


[http://expertiza.ncsu.edu/ Expertiza] is an [https://en.wikipedia.org/wiki/Open-source_software open source project] developed on [http://rubyonrails.org/ Ruby on Rails] framework. It is primarily developed as a platform for instructors to create, assign and grade assignments and quizzes and for the students to view, submit assignments and take quizzes. Other activities involved in a course can also be done via Expertiza, like creating teams, reviewing assignments among others.
[http://expertiza.ncsu.edu/ Expertiza] is an [https://en.wikipedia.org/wiki/Open-source_software open source project] developed on [http://rubyonrails.org/ Ruby on Rails] framework. It is primarily developed as a platform for instructors to create, assign and grade assignments and quizzes and for the students to view, submit assignments and take quizzes. Other activities involved in a course can also be done via Expertiza, like creating teams, reviewing assignments among others.
===Problem Statement===
The three classes in question- team, assignment team and course team, deal with teams of students that do assignments."team.rb" is the superclass; course_team is a team created for a course (if students are expected to stay in the same team all semester), and assignment_team is a team created for an assignment.  Either the instructor can set up course or assignment teams (using the “Create teams” icon on the course or assignment Actions menu), or the students can, by issuing and accepting invitations.
The code for 'importing', 'exporting', and 'copying' teams for assignment and course violates the DRY principle. There is a paucity of comments and there are deprecated methods and other methods that may not be used anymore, and could be deleted.
===Tasks Identified===
The following tasks were accomplished in this project:
* Improved the clarity of code by improving the variable and parameter names.
* Long character strings were taken and given appropriate names.
* Handled pagination by a separate helper module, which can be used by multiple controllers.
* Implemented action_allowed for access_control  to prevent unauthorized access of methods.
* Prevented displaying of all versions for all users and tables when a user views the index page.
* Added missing CRUD methods to Versions Controller
* Added RSPEC testcases for testing changes done in Versions Controller

Revision as of 00:58, 24 March 2016

E1611 Refactor team.rb, course_team.rb, and assignment_team.rb

This page provides the description of the Expertiza based OSS project on refactoring.


Introduction to Expertiza

Expertiza is an open source project developed on Ruby on Rails framework. It is primarily developed as a platform for instructors to create, assign and grade assignments and quizzes and for the students to view, submit assignments and take quizzes. Other activities involved in a course can also be done via Expertiza, like creating teams, reviewing assignments among others.


Problem Statement

The three classes in question- team, assignment team and course team, deal with teams of students that do assignments."team.rb" is the superclass; course_team is a team created for a course (if students are expected to stay in the same team all semester), and assignment_team is a team created for an assignment. Either the instructor can set up course or assignment teams (using the “Create teams” icon on the course or assignment Actions menu), or the students can, by issuing and accepting invitations. The code for 'importing', 'exporting', and 'copying' teams for assignment and course violates the DRY principle. There is a paucity of comments and there are deprecated methods and other methods that may not be used anymore, and could be deleted.

Tasks Identified

The following tasks were accomplished in this project:

  • Improved the clarity of code by improving the variable and parameter names.
  • Long character strings were taken and given appropriate names.
  • Handled pagination by a separate helper module, which can be used by multiple controllers.
  • Implemented action_allowed for access_control to prevent unauthorized access of methods.
  • Prevented displaying of all versions for all users and tables when a user views the index page.
  • Added missing CRUD methods to Versions Controller
  • Added RSPEC testcases for testing changes done in Versions Controller