Skip to content

Commit

Permalink
Bug fix: unalbe to display review rubric for asgt w/o vary_rubric_by_rd
Browse files Browse the repository at this point in the history
  • Loading branch information
yangsong8 committed Aug 15, 2015
1 parent 2c9b4a9 commit 47105cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion app/controllers/response_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,6 @@ def get_content(new_response=false)
reviewees_topic=SignedUpTeam.topic_id_by_team_id(@contributor.id)
@current_round = @assignment.get_current_round(reviewees_topic)
@questionnaire = @map.questionnaire(@current_round)
@questionnaire = @map.questionnaire(@current_round)
elsif @map.type="MetareviewResponseMap" && new_response
@questionnaire = @map.questionnaire
else
Expand Down
6 changes: 5 additions & 1 deletion app/models/review_response_map.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ class ReviewResponseMap < ResponseMap
# otherwise this assignment does not use the "varying rubrics", so in assignment_questionnaires table there should
# be only 1 questionnaire with type 'ReviewQuestionnaire'. -Yang
def questionnaire(round)
Questionnaire.find(self.assignment.get_review_questionnaire_id(round))
if self.assignment.varying_rubrics_by_round?
Questionnaire.find(self.assignment.get_review_questionnaire_id(round))
else
Questionnaire.find(self.assignment.get_review_questionnaire_id)
end
end

def get_title
Expand Down

0 comments on commit 47105cf

Please sign in to comment.