CSC/ECE 517 Fall 2013/oss E820 gzs

From Expertiza_Wiki
Jump to navigation Jump to search

Resources

# Project Description

Project Github Repository

Expertiza Wiki

VCL Project Setup IP

Expertiza Project

The Expertiza project is software which supports team projects and the submission of almost any document type, including URLs and wiki pages and uses peer review as a mode of assessment. The following topic describes the project requirements in details

E608. E820. Finish removing individual assignments

Classes Involved:

  • Signed_up_user.rb
  • _reports.html.erb
  • grades\_team.html.erb
  • _reports.html.erb


What it does:

  • In Expertiza submissions for assignments is performed by teams. Either individuals or teams would submit, and reviews were directed to the entities that submitted, whether they were individuals or teams. A user can still create an assignment that is not a “team assignment”; if so, the team-assignment code is still used, but the maximum team size is set to 1 and the auto generated team name is shown instead of the individual user name.


What needs to be done:

  • If an assignment is an “individual assignment” (max team size of 1), team names that are generated behind the scenes should never appear in any view or report. Signup sheets and score reports should use only the username (and or full name) of the user in question.

Testing Steps

1. Login with Admin credentials.
2. Database with Assignments, topics and teams (both individual and multiple user teams) already setup.
3. View Sign_up Sheet, Reports and View_scores for each assignment, to observe the changes wherein, only username is displayed if team size    
   is 1, in place of team name.

Modifications to Existing Code

There were several places where in case of "individual assignment" the default team name of the user is displayed instead of the username. We identified these places and modified the occurrences in partials such that the team name is suppressed.

Changed file: Signed_up_user.rb

In admin Mode, the view path for observing the needed changes: Home-> Assignment -> Sign-up Sheet, which should display the team name if team size >1, else it displays the username.

if team_name_added == false
if participant_names.size==1
names =  participant_name.u_name
else
names =  participant_name.team_name 

As can be seen in the following screenshot, only the username is displayed in case of single user team: user1, user2 and user10 whereas the default team name is displayed in case of third team since team size >1.

Changed file: grades\_team.html.erb

In admin Mode, the view path for observing the needed changes: Home-> Assignment -> View_Score, which should display the team name if team size >1, else it displays the username.

 <% if tscore[:team].get_participants.size!=1 %>

<%= tscore[:team].name %> <% else %> <%= tscore[:team].get_participants.first.name %> <% end %> As can be seen in the following screenshot, only the username is displayed in case of single user team for viewing their respective grades: user1, user2 and user10 whereas the default team name is displayed in case of third team since team size >1.

Changed file: _reports.html.erb

In admin Mode, the view path for observing the needed changes: Home-> Review Mapping -> Reports, which should display the team name if team size >1, else it displays the username.

<% if Team.find(ri.reviewee_id).users.size==1 %>
<%=  Team.find(ri.reviewee_id).users.first.name %>
<% else %>
<%=  Team.find(ri.reviewee_id).name %>
<% end %>

As can be seen in the following screenshot, for team reviewed column for Reviewer- First User, only the username is displayed in case of single user team: user2 whereas the default team name is displayed in case of third team since team size >1.

Code Clean up, Changed file: _reports.html.erb

Also, at various places such as the above mentioned file, there are excessive number of checks for the team size condition. We have cleaned up the code for such cases by having the partials suppress the team name.
<% if @assignment.team_assignment %>
Team reviewed
<% else %>
Participant reviewed
<% end %>
=> Replaced with:
Team reviewed

Additional Learning and Future Work

  • Setting and debugging the master Expertiza branch.
  • Code clean up done besides the requirements of the project.
  • Design choice for the changes made in partial files such that code reuse can be maximised.
  • Cucumber testing scenarios for the changes made: Work In Progress
  • Further code smells need to be processed for more elegance.

General Information

Members

  • Ganqin Huang (ghuang2)
  • Zhicheng Wu (zwu5)
  • Shalini Chauhan(schauha)