Skip to content

Commit

Permalink
Add some draft activities in the seed
Browse files Browse the repository at this point in the history
  • Loading branch information
jorg-vr committed Oct 26, 2023
1 parent 715f25c commit 587056b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,11 @@ def fill_series_with_realistic_submissions(s)
RepositoryAdmin.create(repository: activity_repo, user: zeus)
RepositoryAdmin.create(repository: big_activity_repo, user: zeus)

contents_list = ContentPage.all.to_a
exercises_list = Exercise.all.to_a
# remove draft status from all activities except the first 5
Activity.where.not(id: Activity.first(5)).update_all(draft: false)

# remove draft status from all activities
Activity.update_all(draft: false)
contents_list = ContentPage.where(draft: false).to_a
exercises_list = Exercise.where(draft: false).all.to_a

puts "Add series, content pages, exercises, read states and submissions to courses (#{Time.now - start})"

Expand Down

0 comments on commit 587056b

Please sign in to comment.