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
(Adding a background for team advertisements)
(Adding documentation for issue 312)
Line 1: Line 1:
===Introduction to Expertiza===
==='''Introduction to Expertiza'''===


----
----
Line 5: Line 5:
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.
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===
==='''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.
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'''===
----
'''Issue 312 :''' When a student gets accepted by a team, all the other join team requests/pending invitations should be removed.
<br>
'''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.
<br>
'''Fix:'''
<br>
'''Files Changed'''
<br>
''app/controllers/invitation_controller.rb''
[[File:Invitation_controller.png]]
<br>
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.
<br>
<br>
''app/models/invitation.rb''
<br>
[[File:Invitation_model.png]]
<br>
''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.
<br>
<br>
''app/models/join_team_request.rb''
<br>
[[File:Join_team request_model.png]]
<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.

Revision as of 19:03, 28 October 2016

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


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.