Skip to content

Commit 914c0c1

Browse files
committed
Fix unlock conditions for user
1 parent 6c9620b commit 914c0c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/exercise.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def submittable_by?(user)
190190
# Whether a user may see all metadata about the exercise
191191
def visible_to?(user)
192192
user.administrator? || user.teacher?(course.organization) || user.assistant?(course) ||
193-
_fast_visible? && unlock_spec_obj.permits_unlock_for?(user)
193+
_fast_visible? && (unlocked_for?(user) || unlock_spec_obj.permits_unlock_for?(user))
194194
end
195195

196196
def _fast_visible?

0 commit comments

Comments
 (0)