• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

expertiza / expertiza / #19280

25 Mar 2025 01:00AM UTC coverage: 10.218% (-0.05%) from 10.272%
#19280

push

web-flow
Merge pull request #14 from sweekar52/E2500_Refactor_student_teams_functionality

E2500 refactor student teams functionality

27 of 354 new or added lines in 20 files covered. (7.63%)

8 existing lines in 5 files now uncovered.

1641 of 16060 relevant lines covered (10.22%)

0.1 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/app/controllers/pair_programming_controller.rb
1
class PairProgrammingController < ApplicationController
×
2
  include AuthorizationHelper
×
3

4
  def action_allowed?
×
5
    current_user_has_student_privileges?
×
6
  end
×
7

8
  def send_invitations
×
NEW
9
    participants = TeamsParticipant.where(team_id: params[:team_id])
×
NEW
10
    participants.each { |participant| participant.update_attributes(pair_programming_status: "W") }
×
NEW
11
    TeamsParticipant.find_by(team_id: params[:team_id], participant_id: current_user.id).update_attributes(pair_programming_status: "A")
×
12
    # ExpertizaLogger.info "Accepting Invitation #{params[:inv_id]}: #{accepted}"
13
    Team.find(params[:team_id]).update_attributes(pair_programming_request: 1)
×
14
    flash[:success] = "Invitations have been sent successfully!"
×
15
    redirect_to view_student_teams_path student_id: params[:student_id]
×
16
  end
×
17

18
  def accept
×
NEW
19
    participant = TeamsParticipant.find_by(team_id: params[:team_id], participant_id: current_user.id)
×
NEW
20
    participant.update_attributes(pair_programming_status: "A")
×
21
    flash[:success] = "Pair Programming Request Accepted Successfully!"
×
22
    redirect_to view_student_teams_path student_id: params[:student_id]
×
23
  end
×
24

25
  def decline
×
NEW
26
    participant = TeamsParticipant.find_by(team_id: params[:team_id], participant_id: current_user.id)
×
NEW
27
    participant.update_attributes(pair_programming_status: "D")
×
28
    Team.find(params[:team_id]).update_attributes(pair_programming_request: 0)
×
29
    flash[:success] = "Pair Programming Request Declined!"
×
30
    redirect_to view_student_teams_path student_id: params[:student_id]
×
31
  end
×
32
end
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc