CSC/ECE 517 Fall 2017/E1793. Help students find teams to join Team1964

From Expertiza_Wiki
Jump to navigation Jump to search

About Expertiza

Expertiza is a Ruby on Rails based Open Source project. It is a collaboration tool which lets users with different roles (student, instructor, teaching assistant) to collaborate on a course in an institution. A collaboration could be for an assignment where students teams up for an assignment and instructors grades them on the basis of their submission. Students could review other's works and give feedback as well.

Github link

Wiki link

Pull Request

Problem Statement

  • For team-based assignments, it always takes time to find suitable team members.
  • We already have bidding, which could help you to join a team with other team members hold similar bidding preferences. However, a student may not be satisfied with automated team formation and want to switch to another team.
  • In this project, we will build a new feature to help students find teams to join.

Currently, there are 2 ways to find other students to join your team:

  • If your team is not full, you could invite people by inputting his/her UnityID. It will send an invitation to a certain user. If s/he accepts your invitation,s/he will leave the original team and join your team.
  • You could create an advisement by clicking “Your team” link and then clicking “Create” link under “Advertisement for teammates” section. Then your advertisement will appear the last column of the signup sheet page with a horn icon. In this way, all classmates could see your advisement. Someone could send a request to join your team. If you accept their request, s/he will leave original team and join in your team.

Below screenshots represents the description above.

Student: Advertisement icon doesn't appear in Chrome browser.

Instructor: Advertisement icon doesn't appear in Chrome browser.

Advertisement icon appears in Mozilla browser but not in the cell it should appear rather it is visible under "Actions" column.


Change Request requirements:

  • Students whose team is not full yet to be able to see a list of students who don’t already have teams.
  • Students should have an option of inviting other students to join their teams.
  • Instructors should be able to view a list of students who don't have teams.

Task Description

Change Request 1

Fix the second way to find other students to join your team. Currently, after you create ​an​ ​advertisement,​ ​the​ ​horn​ ​icon​ ​does​ ​not​ ​appear​ ​in the​ ​the​ ​last​ ​column​ ​of​ ​the​ ​signup​ ​sheet.

What did we do?

We found out that the problem was due to the name of horn icon. Certain ad blockers block any element with name ad or advertisement and horn icon was named as ad.png. We renamed it to ad_horn.png and it resolved the issue.

We also found out that the issue was also due to some complex table cell population. When the assignment was not in finished stage, actions were put into a td cell and displayed, which was adding an extra row, but this was only for users who had signed up some topic. In other cases, the cell was not created every time, forcing table row to have lesser columns.

We removed the conditional td creation, and added all conditional checks inside a parent td, ensured that even if a user has no action to display, at least a td will be created.

Change Request 2

For​ ​student​ ​end: Display​ ​a​ ​list​ ​of​ ​​students​ ​who​ ​do​ ​not​ ​have​ ​a​ ​team​ ​with​ ​invitation​ ​links​ ​in student_teams#view​ ​page. You​ ​could​ ​invite​ ​students​ ​to​ ​your​ ​team​ ​by​ ​clicking​ ​invitation​ ​links.​ ​If​ ​s/he​ ​accepts your​ ​invitation,s/he​ ​will​ ​leave​ the original​ ​team​ ​and​ ​join​ ​in​ ​your​ ​team.​ ​It​ ​will​ ​be​ ​more straightforward​ ​than​ ​typing​ ​UnityID.

Change Request 3

For​ ​instructor​ ​end: Display​ ​a​ ​list​ ​of​ ​​students​ ​who​ ​do​ ​not​ ​have​ ​team​ ​with​ ​invitation​ ​links​ ​in​ ​teams#list page

What did we do?

This has solution step for CR2 and CR3.

We created a helper method to fetch all participants from the database who did not have a team or whose teams have only one member(themselves). We used Join queries to join tables participants, team_users, and teams to extract participants associated with the assignment with or without teams and then filtered out participants with team size > 1.

def extract_assignment_participants(assignment_id, excluded_id = nil)

Above method was defined in app/helpers/assignment_helper.rb. The second parameter was required to exclude current student's id to be excluded to be returned for student whereas, for an Instructor, all students without teams or with single-member team had to be returned.

More changes could be found here: app/helpers/assignment_helper.rb

The method was made generic enough to be used by both app/controllers/student_teams_controller.rb (for student) and app/controllers/teams_controller.rb (for instructors).

app/controllers/student_teams_controller.rb(for student) app/controllers/teams_controller.rb(for instructors)

For student, we checked if student can actually send invites or not, and based on that we fetched the participant list. We considered cases enlisted below for verifying if a student can send invite or not:

  • Student can't send invite if student doesn\’t have a team
  • Student can't send invite if current team size is 1 and assignment\’s allowed team size is also 1
  • Student can send invite if assignment\’s allowed team size is >1 and current team size is less than allowed team size
  • Student can't send invite if current team size is equal to allowed team size
  • Student can't send invite if assignment is in finished stage
  • Student can send invite if assignment is not in finished state

The table containing the list of students to send an invite to was created/not created based on above criteria only.

For Instructor, there were no such criteria to be considered.

Modified Files

1)Conrollers:-

  • app/controllers/student_teams_controller.rb
  • app/controllers/teams_controller.rb

2)Helper:-

  • app/helpers/assignment_helper.rb

3)Views:-

  • app/views/join_team_requests/_list_not_initiated.html.erb
  • app/views/join_team_requests/_list_received.html.erb
  • app/views/join_team_requests/_list_sent.html.erb
  • app/views/sign_up_sheet/_add_signup_topics.html.erb
  • app/views/sign_up_sheet/_table_line.html.erb
  • app/views/sign_up_sheet/list.html.erb
  • app/views/student_teams/view.html.erb
  • app/views/teams/list.html.erb

4)Tests:-

  • spec/controllers/student_teams_controller_spec.rb
  • spec/features/team_invitation_spec.rb


Test Plan

Test Cases

We have written automated tests to check if the changes made are working correctly.

For that, we considered the following scenarios Testing invitation criteria:-

  • Scenario 1 - Student can't see list of students to invite if student doesn't have a team
  • Scenario 2 - Student can't see list of students to invite if current team size is 1 and assignment’s allowed team size is also 1
  • Scenario 3 - Student can see list of students to invite if assignment’s allowed team size is >1 and current team size is less than allowed team size
  • Scenario 4 - Student can't see list of students to invite if current team size is equal to allowed team size
  • Scenario 5 - Student can't see list of students to invite if assignment is in finished stage
  • Scenario 6 - Student can see list of students to invite if assignment is not in finished state
  • Scenario 7 - The list of students contains only those students who don't have a team yet or whose team is not yet complete and who have not created an advertisement link.
  • Scenario 8 - A student can create an invitation link only if his team is not yet full.
  • Scenario 9 - The same student who accepted the invitation link actually gets added to the team.
  • Scenario 10 - A student won't be able to send the invitation to himself as he is already a member of that team.
  • Scenario 11 - An instructor sees only the list of the students who do not have teams with invitation link.

All tests could be found here: spec/controllers/student_teams_controller_spec.rb spec/features/team_invitation_spec.rb

Visual representation of changes made

Horn icon appearing in correct column in signup sheet table.

All students whose teams are not complete would see list of other students without teams on their "your team" view so that they could invite them by an easy "Invite" link as displayed below:

Project Video

Team Information

Tushar Pahuja
Pragam Manoj Gandhi
Nielarshi Kumar
Abhishek Bhardwaj