CSC/ECE 517 Fall 2017/E1793. Help students find teams to join Team1964: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
(Created page with " == 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 as...")
 
No edit summary
 
(31 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== About Expertiza ==
== 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 feedbacks as well.
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===
===Github link===
Line 10: Line 9:
*http://wiki.expertiza.ncsu.edu/index.php/Expertiza_documentation
*http://wiki.expertiza.ncsu.edu/index.php/Expertiza_documentation


===Pull Request===
*https://github.com/expertiza/expertiza/pull/1129/


==='''Problem Statement'''===
==='''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 in a team with other team members hold similar bidding preferences. However, you 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.
*For team-based assignments, it always takes time to find suitable team members.  


Currently, there are 2 ways to find other students to join your team:
*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.


1.If your team is not full, you could invite people by inputting his/her UnityID. It will send an invitation to certain user. If s/he accept your invitation,s/he will leave original team and join your team.
*'''In this project, we will build a new feature to help students find teams to join.'''


2.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.
Currently, there are 2 ways to find other students to join your team:
 
It would be better for students who do not have team yet or whose team is not full yet to be able to see a list of students who don’t already have teams. So too for instructors.


*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.


== Task Description ==
*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.


====Problem 1====
Below screenshots represents the description above.


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.
Student: Advertisement icon doesn't appear in Chrome browser.


====Problem 2====
[[File:A_chrome_before.png|frame|upright|center]]
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​ ​accept your​ ​invitation,s/he​ ​will​ ​leave​ ​original​ ​team​ ​and​ ​join​ ​in​ ​your​ ​team.​ ​It​ ​will​ ​be​ ​more straightforward​ ​than​ ​typing​ ​UnityID.


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


For​ ​instructor​ ​end: Display​ ​a​ ​list​ ​of​ ​​students​ ​who​ ​do​ ​not​ ​have​ ​team​ ​with​ ​invitation​ ​links​ ​in​ ​teams#list page
[[File:A_instructor_cr_before.png|frame|upright|center]]


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


== Test Plan ==
[[File:A_mozilla_before.png|frame|upright|center]]


=== Edge cases ===


We will be writing automated tests to check if the changes made are working correctly.  
'''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.


For that, we considered the following scenarios
== Task Description ==


*If the team is full, the person who received an invitation link would not be able to accept that.
====Change Request 1====
*If a student leaves a team, then he is able to see his previous teammates in the available list of students that do not have a complete team and have not created an invitation link.
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.
*Student sees a horn icon in the last column if any of the students have created an advertisement for that topic.
*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.
*A student can create an invitation link only if his team is not yet full.
*The same student who accepted the invitation link actually gets added to the team.
*A student won't be able to send the invitation to himself as he is already a member of that team.
*An instructor sees only the list of the students who do not have teams with invitation link.
*If a student joins a team using an invitation link, then he gets all the rights that a team member of that team has. Ex: Now, he will be able to approve a team join request and then correspondingly send the invitation for joining the group to that student.
*


=====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.


== Code coverage ==
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.


Based on the scenarios we added, code coverage increased by 0.2%.
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.


More report could be found from below link:
====Change Request 2====
*https://github.com/expertiza/expertiza/pull/1026
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.


== Testing in UI ==
====Change Request 3====
For​ ​instructor​ ​end:  Display​ ​a​ ​list​ ​of​ ​​students​ ​who​ ​do​ ​not​ ​have​ ​team​ ​with​ ​invitation​ ​links​ ​in​ ​teams#list page


===Problem 1 and Problem 2===
=====What did we do?=====
'''This has solution step for CR2 and CR3.'''


====Steps====
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.


1. Login as instructor/TA (who has the privilege to view summary of reviews for all rounds)
'''def extract_assignment_participants(assignment_id, excluded_id = nil)'''
2. Choose an assignment and go to summary page


You would see a page similar to below with sorting enabled on specific columns on the right side of name.
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.


[[File:Summary_page_with_sorting_enabled.png|frame|upright|center]]
More changes could be found here: [https://github.com/expertiza/expertiza/pull/1129/files#diff-e2d518aed0fccbb9ab0fc9e2e1ef8683 app/helpers/assignment_helper.rb]


====Screenshots====
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).
Below are the screenshots displaying the fix :


=====Round 1=====
[https://github.com/expertiza/expertiza/pull/1129/files#diff-113f035d853c52fdfd3a00851a3db407 app/controllers/student_teams_controller.rb(for student)]
[https://github.com/expertiza/expertiza/pull/1129/files#diff-7543048f54ac556dff85edee281fafd8 app/controllers/teams_controller.rb(for instructors)]


[[File:Sorting_on_criteria_round1.png|frame|upright|center]]
For student, we checked if student can actually send invites or not, and based on that we fetched the participant list.
[[File:Sorting_on_avg_round1.png|frame|upright|center]]
We considered cases enlisted below for verifying if a student can send invite or not:
[[File:Sorting_on_score_round1.png|frame|upright|center]]


=====Round 2=====
*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


[[File:Sorting_on_criteria_round2.png|frame|upright|center]]
The table containing the list of students to send an invite to was created/not created based on above criteria only.
[[File:Sorting_on_avg_round2.png|frame|upright|center]]
[[File:Sorting_on_score_round2.png|frame|upright|center]]


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


[[File:Sorting_on_criteria_author.png|frame|upright|center]]
== Modified Files ==
[[File:Sorting_on_avg_author.png|frame|upright|center]]
1)Conrollers:-
[[File:Sorting_on_score_author.png|frame|upright|center]]
*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




===Problem 2===
== Test Plan ==


====Steps====
=== Test Cases ===


1. Login as a TA
We have written automated tests to check if the changes made are working correctly.  


====Screenshots====
For that, we considered the following scenarios
You would be directed to the hop page displaying all courses a TA has privilege to view.
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.


[[File:Courses_screen_ta.png|frame|upright|center]]
All tests could be found here:
[https://github.com/expertiza/expertiza/pull/1129/files#diff-d2b8c8df44cb32268062c72be7da59fb spec/controllers/student_teams_controller_spec.rb]
[https://github.com/expertiza/expertiza/pull/1129/files#diff-d1d14865d734d2f66dc726c70cb1bcb9 spec/features/team_invitation_spec.rb]


Below is the db result which matches with the results displayed on the screen
== Visual representation of changes made ==


[[File:Db_result_courses_ta.png|frame|upright|center]]
Horn icon appearing in correct column in signup sheet table.


[[File:A_after.png|frame|upright|center]]


== Visual Demo of the fix ==
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:


A video explaining the fix can be found at below location:
[[File:Join_request_main_page_after.png|frame|upright|center]]
[https://www.youtube.com/watch?v=-jziQI4T--0&feature=youtu.be]


== Other links ==
===Project Video===
*https://youtu.be/B3h3O8UtJ8E


Pull request link :
==Team Information==
*https://github.com/expertiza/expertiza/pull/1026
[mailto:tpahuja@ncsu.edu Tushar Pahuja]<br>
[mailto:pmgandh2@ncsu.edu Pragam Manoj Gandhi]<br>
[mailto:knielar@ncsu.edu Nielarshi Kumar]<br>
[mailto:abhardw3@ncsu.edu Abhishek Bhardwaj]

Latest revision as of 15:13, 17 December 2017

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