Skip to content

Commit d739f89

Browse files
committed
Don't show correct answer in the first 2 hours
1 parent d1b4489 commit d739f89

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/controllers/submissions_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ def check_access!
324324
else
325325
return if can?(:teach, @course) || @submission.user_id.to_s == current_user.id.to_s
326326
if @submission.created_at > 2.hours.ago
327+
respond_access_denied("You cannot see this paste because all tests passed and you haven't completed this exercise.") unless paste_visible
327328
return
328329
else
329330
unless paste_visible

0 commit comments

Comments
 (0)