Skip to content

Commit

Permalink
Deleted commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
Eshwar Chandra Vidhyasagar Thedla committed Mar 4, 2022
1 parent 58afd20 commit 673fe20
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions app/controllers/reputation_web_service_controller.rb
Expand Up @@ -20,32 +20,7 @@ def action_allowed?
current_user_has_ta_privileges?
end

# normal db query, return peer review grades
# query="SELECT U.id, RM.reviewee_id as submission_id, "+
# "sum(A.answer * Q.weight) / sum(QN.max_question_score * Q.weight) * 100 as total_score "+
# # new way to calculate the grades of coding artifacts
# #"100 - SUM((QN.max_question_score-A.answer) * Q.weight) AS total_score "+
# "from answers A "+
# "inner join questions Q on A.question_id = Q.id "+
# "inner join questionnaires QN on Q.questionnaire_id = QN.id "+
# "inner join responses R on A.response_id = R.id "+
# "inner join response_maps RM on R.map_id = RM.id "+
# "inner join participants P on P.id = RM.reviewer_id "+
# "inner join users U on U.id = P.user_id "+
# "inner join teams T on T.id = RM.reviewee_id "
# query += "inner join signed_up_teams SU_team on SU_team.team_id = T.id " if has_topic == true
# query += "where RM.type='ReviewResponseMap' "+
# "and RM.reviewed_object_id = "+ assignment_id.to_s + " " +
# "and A.answer is not null "+
# "and Q.type ='Criterion' "+
# #If one assignment is varying rubric by round (724, 733, 736) or 2-round peer review with (735),
# #the round field in response records corresponding to ReviewResponseMap will be 1 or 2, will not be null.
# "and R.round = 2 "
# query+="and SU_team.is_waitlisted = 0 " if has_topic == true
# query+="group by RM.id "+
# "order by RM.reviewee_id"
#
# result = ActiveRecord::Base.connection.select_all(query)
# db query, return peer reviews
def db_query(assignment_id, round_num, has_topic, another_assignment_id = 0)
raw_data_array = []
assignment_ids = []
Expand Down

0 comments on commit 673fe20

Please sign in to comment.