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

expertiza / expertiza / #19677

16 Mar 2026 04:54PM UTC coverage: 31.83% (-14.8%) from 46.601%
#19677

push

web-flow
Merge pull request #2968 from aanand-1706/fix-course-view-for-ta

Allow TAs to view the courses that they are TAing, even if the course is public (previously they could only view a course they were TAing if it was private(!)).

4 of 5 new or added lines in 1 file covered. (80.0%)

5928 existing lines in 106 files now uncovered.

4939 of 15517 relevant lines covered (31.83%)

4.96 hits per line

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

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

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

UNCOV
8
  def send_invitations
×
UNCOV
9
    users = TeamsUser.where(team_id: params[:team_id])
×
UNCOV
10
    users.each { |user| user.update_attributes(pair_programming_status: "W") }
×
UNCOV
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}"
UNCOV
13
    Team.find(params[:team_id]).update_attributes(pair_programming_request: 1)
×
UNCOV
14
    flash[:success] = "Invitations have been sent successfully!"
×
UNCOV
15
    redirect_to view_student_teams_path student_id: params[:student_id]
×
UNCOV
16
  end
×
17

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

UNCOV
25
  def decline
×
UNCOV
26
    user = TeamsUser.find_by(team_id: params[:team_id], user_id: current_user.id)
×
UNCOV
27
    user.update_attributes(pair_programming_status: "D")
×
UNCOV
28
    Team.find(params[:team_id]).update_attributes(pair_programming_request: 0)
×
UNCOV
29
    flash[:success] = "Pair Programming Request Declined!"
×
UNCOV
30
    redirect_to view_student_teams_path student_id: params[:student_id]
×
UNCOV
31
  end
×
UNCOV
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