Open tsauvine opened 8 years ago
I feel that we should unify the use of keyword comment
and review
. It can cause misunderstanding.
If we pay attention to the Rails pattern, when you are about to create an object, we may call Review.new
as a placeholder for the view, but we do not save it to DB.
When a user click on the Create Comment
button, we go to /submissions/:id/review
, which is this action
# submissions_controller.rb
def review
return access_denied unless @course.has_teacher(current_user) || @submission.group.has_reviewer?(current_user) || (@exercise.collaborative_mode == 'review' && (@course_instance.has_student(current_user) || @course_instance.has_assistant(current_user)))
review = @submission.assign_to(current_user)
redirect_to edit_review_path(review)
log "create_review #{@submission.id},#{@exercise.id}"
end
The question is, why do we not present a form to create a review here without creating a review until the user click Submit Review
?
In 'submission wall' collaborative mode, if a student clicks the 'comment' button to view the submission, a review object is created. Preferably, a review should only be created if the student actually writes feedback and saves.