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 changes for issue 311 and 227)
No edit summary
Line 76: Line 76:
<br>
<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.
'''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:
<br>
<br>
''app/controllers/student_teams_controller.rb''
''app/controllers/student_teams_controller.rb''

Revision as of 19:59, 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.

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