CSC/ECE 517 Fall 2016/E1652 Fix teammate advertisements and requests to join a team

From Expertiza_Wiki
Jump to navigation Jump to search

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 -> student6420, password -> password
  • Student login: username -> student6361, password -> password


Introduction to Expertiza

Expertiza is a peer review system where the students can submit their work and do reviews on fellow students’ work. Expertiza is an open source project and is based on “Ruby on Rails” framework. Expertiza facilitates easy creation of assignments and a list of topics for the same. It allows students to suggest a topic for an assignment as well. Students can form teams and invite other students to join their team for various assignments. Moreover, students can post team advertisements and describe the qualities they are looking for in their team members and other students can respond to the same. Expertiza overall gives a simple web interface for assignment management for both the students as well as instructors.

Background

In Expertiza, there are teammate advertisement, invitation and join team request features which facilitate students to form teams. Teammate advertisement works only for assignments with topics. The topic holders can create advertisement and a trumpet icon will show on the signup sheet page. If one respond to the advertisement, a join team request will be created and the topic holder can see it on “Your team” page. After a student get a team and the team is not full, (s)he should also be able to send invitations to others.

Issues

All commits have been done from a single machine using id sndesai92 but all team members have worked on the project.

Team members:
1. Saloni Desai
2. Shriyansh Yadav
3. Vaibhav Shinde

Issue 312:

When a student gets accepted by a team, all the other join team requests/pending invitations should be removed.
Current Scenario :When a student gets accepted by a team, all other join team requests/pending invitations are still shown on his page and their corresponding entries in the database.
Fix:
Files Changed
app/controllers/invitation_controller.rb
If a student accepts an invite and that add was successful to the database, we call remove_pending_invitations() passing the student’s user_id and the current assignment_id to be deleted from the list of pending invitations. Similarly, we call remove_pending_join_team_requests() passing the participant_id as a parameter. Participant_id is fetched from the Participant table which gives data on which all students participate in a particular assignment. remove_pending_invitations() and remove_pending_join_team_requests() methods are defined in models/invitation.rb and models/join_team_request.rb as these methods are manipulating the database and it has to handled by the models while controller simply invokes these methods.

app/models/invitation.rb

remove_pending_invitations() looks for all entries in the Invitation database that matches the student_id and an assignment_id and has a reply_status as waiting and destroys all of them.

app/models/join_team_request.rb

remove_pending_join_team_requests() looks for all entries in the JoinTeamRequest database where a matching participant_id and the status is pending and deletes all those entries.

Issue 311:

When one respond to an advertisement, (s)he should only be able to respond once.
Current scenario: A student can respond to an advertisement any number of times.
Fix:
Files Changed
app/controllers/join_team_requests_controller.rb

We check if the join request initiated by a student is a firstRequest?. If it is a firstRequest? we allow the student to save the join request to the database else we flash a note saying the student has already responded to this particular advertisement once.
app/models/join_team_request.rb

firstRequest? method fetches all entries from JoinTeamRequest table with a matching team_id and participant_id. If the number of entries returned by this query is less than 1 means the student is requesting a join team request for the first time.

Issue 227:

If user A got a topic and user B got no topic, then A join B’s team, A’s topic be be dropped and A and B end up with a new team with no topic. This issue should be handle carefully because we cannot simply add B to A’s team (imagine, if A has teammate X and B has teammate Y...). One of a potential fix is that, for assignment w/ topics, one cannot not post an ad unless (s)he holds a topic, similarly, one cannot sent invitations unless (s)he holds a topic.
Current Scenario: A student cannot create a team advertisement without a topic but can invite other students to join his/her team without a topic.
Fix:
Files Changed
app/views/student_teams/view.html.erb

Here we give access to the invite people link if and only if the team is not full and the student has a topic.

Issue 5:

If the last member leaves the team, all the records will be deleted (like sign_up_topics, reviews done on this teams work, etc). We have to respect the decision of the students when they leave. But the team record should not be deleted if this team’s work has already got reviewed.
Current Scenario: If the last member leaves a team, the entire team is destroyed and a destroy on team creates a ripple effect thus destroying all the work done by this team.
Fix: Files changed
app/controllers/student_teams_controller.rb


app/models/response_map.rb

Issue 421: This issue is already fixed as stated by the current scenario.

The advertisement does not work properly when there are 2 teams posting advertisements on the same topic.
Current Scenario: When 2 students post team advertisements for the same topic and a third student clicks on team advertisements, it shows both students' team advertisements.

Testing Manually via UI

Testing fix for Issue 312 :

Step 1: Login as an instructor. Create a new assignment (Assignment1) and related sign up topics (Topic1, Topic2, Topic3) and add atleast 4 students as participants. (student1, student2, student3, student4)
Step 2: Login as student1. Sign up for Topic1 for Assignment1. Create a team advertisement.
Step 3: Login as student2. Sign up for Topic2 for Assignment1. Create a team advertisement.
Step 4: Login as student3. Sign up for Topic3 for Assignment1. Invite student4 to join your team.
Step 5: Login as student4 and respond to student1 and student2’s team advertisements.
Step 6: Login as student1. Invite student4 from the response received to your team advertisement.
Step 7: Login as student4. Accept student1 invitation.
Outcome: This should delete pending team request send to student2 and delete the join team request sent by student3.

Testing fix for Issue 311:

Step 1: Login as an instructor and create a new assignment (Assignment1) and related sign up topics (Topic1,Topic2) and add students (student1,student2) as participants.
Step 2: Login as student1 and sign up for Topic1 for Assignment1 and create a team advertisement for the same.
Step 3: Login as student2 and respond to student1’s team advertisement for Assignment1.
Step 4: Now as student2 again try to respond to student1’s team advertisement.
Outcome: This should flash a message saying you have already responded to this team advertisement.

Testing fix for Issue 227:

Step 1: Login as an instructor and create a new assignment(Assignment1) and related sign up topics (Topic1,Topic2) and add students(student1,student2) as participants.
Step 2: Login as student1 and before signing up for a topic go to your team’s page.
Outcome: It shouldn’t allow you to invite other people to join your team or create advertisements unless you have a topic assigned to you.

Issue 5:

It cannot be tested from the UI as the team is not visible from the UI but still the entries in the databases are preserved if the team;s work is reviewed and the last member of the team leaves the team.


References

  1. Expertiza on GitHub
  2. Details of the Expertiza Project
  3. Demo link