CSC/ECE 517 Fall 2016/oss E1651: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
(Starting to write wiki)
No edit summary
 
(13 intermediate revisions by 2 users not shown)
Line 20: Line 20:




The current project deals with the functionality of managing teams in Expertiza. There are 2 types of teams, Course Teams and Assignment Teams. Course teams stay same for the whole course, while assignment teams can be different for different assignments within a course. An instructor has the functionality to copy an assignment team to make it a course team and vice versa. The objective of the project is to -  
The current project deals with the functionality of managing teams in Expertiza. There are 2 types of teams, Course Teams and Assignment Teams. Course teams stay same for the whole course, while assignment teams can be different for different assignments within a course. An instructor has the functionality to copy an assignment team to make it a course team and vice versa. Few issues with current functionality are -
*No test cases to check copy team functionality
*UI is not intuitive as User has to go through "Create teams"->"Create team"->"Inherit teams from course" to copy teams
*Duplicated code in "create_team_and_node" method for assignment and course teams
 
The objective of the project is to -  
* Write test to check if the current functions work properly.
* Write test to check if the current functions work properly.
* Debug the code for copying teams.
* Debug the code for copying teams.
* Improve the UI.
* Improve the UI.
* Refactoring the code to leverage polymorphism.
* Refactoring the code to leverage polymorphism.


== Files Created / Changed in the project ==
== Files Created / Changed in the project ==
Line 44: Line 50:
* Specs
* Specs
** models/assignment_team_spec.rb
** models/assignment_team_spec.rb
===Refactoring Implementation===
1. Team Model
In the team model, we refactored the method create_team_and_node to remove an unnecessary argument teamtype, and inferred the teamtype from the Class.
We also created a new method parent_model_for_id to fetch the related Assignment or Course object.
2. Sign up sheet, Team, Review Mapping Controller, Assignment Team, Course Team
All of these files called the create_team_and_node method. Since we changed the signature, we changed the respective method calls in these classes.
3. teams/list.html.erb, teams/new.html.erb
Moved the inherit teams functionality from new.html.erb, an internal page, to list.html.erb. List page, thereby removing 1 user click.
===Functionality Updates===
1. Course and Assignment Team Model
We created the parent_model_for_id method to return the related Course/Assignment object and also fixed the copy method, which earlier had an undefined local variable.
2. Assignment Node Model
In the Assignment node model, we created a new method to check if the related assignment object has a course associated with it. This is then used in a view.
3. tree_display/actions/_teams_actions.html.erb
This is the partial to show actions related to teams. The option to copy teams from assignments to course should not be visible if there is no course associated with the assignment. Added a condition to the if statement to check for the same.
===Test Cases===
1. Assignment Spec
Wrote test cases to check if an assignment belongs to a course.
2. Assignment and Course Team Spec
Wrote test cases to check the method to copy assignment teams to course teams and vice versa.
3. Team Spec
Wrote test cases to verify create team and node functionality for course team and assignment team.
== UI Testing ==
===Inherit Teams===
* Create a Course by following steps: Go to Manage -> Courses -> New Public Courses -> Enter Course Details -> Create
* Create Course Teams for newly created course.
* Create an Assignment by following these steps: Go to Manage -> New Public Assignment -> Enter Details and select previously created course -> Add details on all tabs and check checkboxes
* Go to "manage" and page should show current teams as follows:
[[File:Inherit_Teams.PNG]]
* Go to Courses -> Assignments -> Create Team -> Inherit Teams
* Now, you should be able to inherit course teams to inherit teams.
[[File:Inherited Teams.PNG]]
===Bequeath Teams===
* Create an Assignment by following these steps: Go to Manage -> New Public Assignment -> Enter Details -> Add details on all tabs and check checkboxes
* Create Assignment teams for newly created assignment.
* Select to "Copy Team to Course"
* Assignment team should be copied to course teams for this assignment's course.
[[File:Bequeath.PNG]]
===Remove inherit option from create teams===
Inherit option removed from Create Teams page and moved to Assignment -> Create Teams
[[File:Inherit Removed.PNG]]

Latest revision as of 01:53, 8 November 2016

This wiki page is for describing the changes made for E1651 OSS assignment for Fall 2016, CSC/ECE 517.


Peer Review Information

For users intending to view the deployed Expertiza associated with this assignment, the credentials are below:

  • Instructor login: username -> instructor6, password -> password
  • Student login: username -> student4340, password -> password
  • Student login: username -> student4405, password -> password


Expertiza Background

Expertiza is an educational web application created and maintained by the joint efforts of the students and the faculty at NCSU. It’s an open source project developed on Ruby on Rails platform and it’s code is available on Github. It allows students to review each other’s work and improve their work upon this feedback.


Description of the current project

The current project deals with the functionality of managing teams in Expertiza. There are 2 types of teams, Course Teams and Assignment Teams. Course teams stay same for the whole course, while assignment teams can be different for different assignments within a course. An instructor has the functionality to copy an assignment team to make it a course team and vice versa. Few issues with current functionality are -

  • No test cases to check copy team functionality
  • UI is not intuitive as User has to go through "Create teams"->"Create team"->"Inherit teams from course" to copy teams
  • Duplicated code in "create_team_and_node" method for assignment and course teams

The objective of the project is to -

  • Write test to check if the current functions work properly.
  • Debug the code for copying teams.
  • Improve the UI.
  • Refactoring the code to leverage polymorphism.


Files Created / Changed in the project

  • Models
    • team.rb
    • course_team.rb
    • assignment_team.rb
    • assignment_node.rb
    • sign_up_sheet.rb
  • Controllers
    • review_mapping_controller.rb
  • Views
    • teams/list.html.erb
    • teams/new.html.erb
    • tree_display/actions/_teams_actions.html.erb
  • Specs
    • models/assignment_team_spec.rb

Refactoring Implementation

1. Team Model In the team model, we refactored the method create_team_and_node to remove an unnecessary argument teamtype, and inferred the teamtype from the Class. We also created a new method parent_model_for_id to fetch the related Assignment or Course object.

2. Sign up sheet, Team, Review Mapping Controller, Assignment Team, Course Team All of these files called the create_team_and_node method. Since we changed the signature, we changed the respective method calls in these classes.

3. teams/list.html.erb, teams/new.html.erb Moved the inherit teams functionality from new.html.erb, an internal page, to list.html.erb. List page, thereby removing 1 user click.

Functionality Updates

1. Course and Assignment Team Model We created the parent_model_for_id method to return the related Course/Assignment object and also fixed the copy method, which earlier had an undefined local variable.

2. Assignment Node Model In the Assignment node model, we created a new method to check if the related assignment object has a course associated with it. This is then used in a view.

3. tree_display/actions/_teams_actions.html.erb This is the partial to show actions related to teams. The option to copy teams from assignments to course should not be visible if there is no course associated with the assignment. Added a condition to the if statement to check for the same.

Test Cases

1. Assignment Spec Wrote test cases to check if an assignment belongs to a course.

2. Assignment and Course Team Spec Wrote test cases to check the method to copy assignment teams to course teams and vice versa.

3. Team Spec Wrote test cases to verify create team and node functionality for course team and assignment team.

UI Testing

Inherit Teams

  • Create a Course by following steps: Go to Manage -> Courses -> New Public Courses -> Enter Course Details -> Create
  • Create Course Teams for newly created course.
  • Create an Assignment by following these steps: Go to Manage -> New Public Assignment -> Enter Details and select previously created course -> Add details on all tabs and check checkboxes
  • Go to "manage" and page should show current teams as follows:

  • Go to Courses -> Assignments -> Create Team -> Inherit Teams
  • Now, you should be able to inherit course teams to inherit teams.

Bequeath Teams

  • Create an Assignment by following these steps: Go to Manage -> New Public Assignment -> Enter Details -> Add details on all tabs and check checkboxes
  • Create Assignment teams for newly created assignment.
  • Select to "Copy Team to Course"
  • Assignment team should be copied to course teams for this assignment's course.

Remove inherit option from create teams

Inherit option removed from Create Teams page and moved to Assignment -> Create Teams