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

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 24: Line 24:
3. Vaibhav Shinde<br>
3. Vaibhav Shinde<br>


===Issue 312 ===  
===Issue 312: ===  
When a student gets accepted by a team, all the other join team requests/pending invitations should be removed.
When a student gets accepted by a team, all the other join team requests/pending invitations should be removed.
<br>
<br>
Line 53: Line 53:
<br>
<br>
''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.
''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.
<br>
===Issue 311: ===  
<br>
===Issue 311 ===  
When one respond to an advertisement, (s)he should only be able to respond once.
When one respond to an advertisement, (s)he should only be able to respond once.
<br>
<br>
Line 75: Line 73:
<br>
<br>
''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.
''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.
<br>
===Issue 227: ===  
<br>
===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.  
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.  
<br>
<br>
Line 91: Line 87:
<br>
<br>
Here we give access to the invite people link if and only if the team is not full and the student has a topic.
Here we give access to the invite people link if and only if the team is not full and the student has a topic.
<br>
===Issue 5 ===
===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.
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.

Revision as of 23:07, 28 October 2016

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