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

expertiza / expertiza / #19735

29 Mar 2026 07:33PM UTC coverage: 31.694% (-15.2%) from 46.923%
#19735

push

web-flow
Merge pull request #2974 from expertiza/development_server

Development server

4948 of 15612 relevant lines covered (31.69%)

4.94 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
×
9
    users = TeamsUser.where(team_id: params[:team_id])
×
10
    users.each { |user| user.update_attributes(pair_programming_status: "W") }
×
11
    TeamsUser.find_by(team_id: params[:team_id], user_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
×
19
    user = TeamsUser.find_by(team_id: params[:team_id], user_id: current_user.id)
×
20
    user.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
×
26
    user = TeamsUser.find_by(team_id: params[:team_id], user_id: current_user.id)
×
27
    user.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