Skip to content

Commit

Permalink
added comments to save_grade_and_comment_for_reviewer
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhimanyuBellam committed Oct 22, 2022
1 parent 0107572 commit e20fed6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/controllers/review_mapping_controller.rb
Expand Up @@ -532,6 +532,11 @@ def automatic_review_mapping_staggered
redirect_to action: 'list_mappings', id: assignment.id
end

=begin
Used: save grade and comments for the reviewer
Implements: checks if a review grade exists for a participant, if not, creates a review grade record
and assigns grade and other values for the reviewer. Throws error message if review grade is not updated succesfully
=end
def save_grade_and_comment_for_reviewer
review_grade = ReviewGrade.find_or_create_by(participant_id: params[:review_grade][:participant_id])
review_grade.attributes = review_mapping_params
Expand All @@ -549,8 +554,7 @@ def save_grade_and_comment_for_reviewer
end
end

# E1600
# Start self review if not started yet - Creates a self-review mapping when user requests a self-review

def start_self_review
user_id = params[:reviewer_userid]
assignment = Assignment.find(params[:assignment_id])
Expand Down

0 comments on commit e20fed6

Please sign in to comment.