<commit_before># Output quotes for each successful step passed
def puts_success(type, name, event)
  puts eval("@#{type}s")[name][:quotes][event] || eval("@#{type}_default_config")[:quotes][event] + ": #{name}"
end

user_names = ['<NAME>','<NAME>','<NAME>','<NAME>','<NAME>','<NAME>','<NAME>',
  '<NAME>','<NAME>','<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>',
  '<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>']

majors = ['Engineering','American Culture','Anthropology','Asian Studies','Astronomy','Cognitive Science','Creative Writing and Literature','English','German','Informatics','Linguistics','Physics']
pseuydonyms = ['<NAME>', 'Snow White', 'Beauty', 'the Beast', 'Trusty John', 'Grimble', 'Bufkin', 'Prince Charming', 'Cinderella', 'Old King Cole','Hobbes', 'Pinocchio', 'Briar Rose', 'Doctor Swineheart', 'Rapunzel', 'Kay', 'Mrs. Sprat', '<NAME>', 'Ozma', 'Great Fairy Witch','Maddy', 'Mr. Grandours', 'Mrs. Someone', 'Prospero', 'Mr. Kadabra','Geppetto', 'Morgan le Fay','Rose Red','Boy Blue','<NAME>','<NAME>','<NAME>','<NAME>','Bo Peep','The Adversary','Goldilocks','Bluebeard','Ichabod Crane','Baba Yaga','The Snow Queen','Rodney', 'June', 'Hansel', 'The Nome King', '<NAME>', 'Mister Dark', 'Fairy Godmother', 'D<NAME>', '<NAME>', '<NAME>']

# Generate sample admin
User.create! do |u|
  u.username = 'albus'
  u.first_name = 'Albus'
  u.last_name = 'Dumbledore'
  u.email = '<EMAIL>'
  u.password = '<PASSWORD>'
  u.admin = true
  u.save!
end.activate!
puts "Children must be taught how to think, not what to think.― <NAME>"

#----------------------------------------------------------------------------------------------------------------------#

#                                          COURSE DEFAULT CONFIGURATION                                                #

#----------------------------------------------------------------------------------------------------------------------#

# Add all attributes that will be passed on any course creation here, with a default value
# All courses will use defaults when individual attributes aren't supplied

@course_default_config = {
  :quotes => {
    :course_created => "A new course has been created",
    :grade_sceme_elements_created => "Grade scheme elements have been added for the course",
    :teams_created => "Teams have been added for the course",
    :badges_created => "Badges have been added for the course",
    :weights_created => "Weights have been configured for the course"
  },
  # All courses must have grade scheme elements
  :grade_scheme_hash => { [0,600000] => 'F', [600000,649000] => 'D+', [650000,699999] => 'C-', [700000,749999] => 'C', [750000,799999] => 'C+', [800000,849999] => 'B-', [850000,899999] => 'B', [900000,949999] => 'B+', [950000,999999] => 'A-', [1000000,1244999] => 'A', [1245000,1600000] => 'A+'},
  :grade_levels => ['Amoeba', 'Sponge', 'Roundworm', 'Jellyfish', 'Leech', 'Snail', 'Sea Slug', 'Fruit Fly', 'Lobster', 'Ant', 'Honey Bee', 'Cockroach', 'Frog', 'Mouse', 'Rat', 'Octopus', 'Cat', 'Chimpanzee', 'Elephant', 'Human', 'Orca'].shuffle,
    # Not all courses have teams
  :team_names => ['Harm & Hammer','Abusement Park','Silver Woogidy Woogidy Woogidy Snakes','Carpe Ludus','Eduception','Operation Unthinkable','Team Wang','The Carpal Tunnel Crusaders','Pwn Depot'].shuffle,
    # Not all courses have badges
  :badge_names => ['Creative', 'Inner Eye', 'Patronus Producer','Cheerful Charmer','Invisiblity Cloak','Marauders Map','Lumos','Rune Reader','Tea Leaf Guru','Wizard Chess Grand Master','Green Thumb','Gamekeeper','Seeker','Alchemist','Healer','Parseltongue','House Cup'].shuffle,
  :attributes => {
    :academic_history_visible => false,
    :accepts_submissions => false,
    :add_team_score_to_student => false,
    :assignment_term => nil,
    :badge_setting => false,
    :badge_term => nil,
    :challenge_term => nil,
    :character_names => false,
    :character_profiles => false,
    :class_email => nil,
    :courseno => "ABC101",
    :grading_philosophy => nil,
    :group_setting => false,
    :in_team_leaderboard => false,
    :location => nil,
    :max_group_size => nil,
    :media => nil,
    :media_caption => nil,
    :media_credit => nil,
    :meeting_times => nil,
    :min_group_size => nil,
    :name => "Generic course with Minimum Requirements",
    :office => nil,
    :office_hours => nil,
    :phone => nil,
    :semester => "Winter",
    :tagline => nil,
    :team_challenges => false,
    :team_roles => false,
    :team_score_average => false,
    :team_setting => false,
    :team_term => false,
    :teams_visible => false,
    :total_assignment_weight => 0,
    :twitter_handle => nil,
    :twitter_hashtag => nil,
    :user_term => nil,
    :year => Date.today.year,
  }
}

#----------------------------------------------------------------------------------------------------------------------#
#----------------------------------------------------------------------------------------------------------------------#

# Note: @courses will hold each course as a hash key.
# The custom attributes should be defined below and will be available throughout sample creation.
#
# Additionally, The Active record models associated with the course be accessible on each course:<commit_msg>Fix a bug in the default setting of team term in sample data<commit_after># Output quotes for each successful step passed
def puts_success(type, name, event)
  puts eval("@#{type}s")[name][:quotes][event] || eval("@#{type}_default_config")[:quotes][event] + ": #{name}"
end

user_names = ['<NAME>','<NAME>','<NAME>','<NAME>','<NAME>','<NAME>','<NAME>',
  '<NAME>','<NAME>','<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>',
  '<NAME>', '<NAME>', '<NAME>', '<NAME>', '<NAME>']

majors = ['Engineering','American Culture','Anthropology','Asian Studies','Astronomy','Cognitive Science','Creative Writing and Literature','English','German','Informatics','Linguistics','Physics']
pseuydonyms = ['Bigby Wolf', 'Snow White', 'Beauty', 'the Beast', 'Trusty John', 'Grimble', 'Bufkin', 'Prince Charming', 'Cinderella', 'Old King Cole','Hobbes', 'Pinocchio', '<NAME>', 'Doctor Swineheart', 'Rapunzel', 'Kay', 'Mrs. Sprat', '<NAME>', 'Ozma', 'Great Fairy Witch','Maddy', 'Mr. Grandours', 'Mrs. Someone', 'Prospero', 'Mr. Kadabra','Geppetto', '<NAME>','<NAME>','Boy Blue','<NAME>','Reynard the Fox','<NAME>','<NAME>','Bo Peep','The Adversary','Goldilocks','Bluebeard','Ichabod Crane','Baba Yaga','The Snow Queen','Rodney', 'June', 'Hansel', 'The Nome King', '<NAME>', 'Mister Dark', 'Fairy Godmother', '<NAME>', 'Hadeon the Destroyer', '<NAME>']

# Generate sample admin
User.create! do |u|
  u.username = 'albus'
  u.first_name = 'Albus'
  u.last_name = 'Dumbledore'
  u.email = '<EMAIL>'
  u.password = '<PASSWORD>'
  u.admin = true
  u.save!
end.activate!
puts "Children must be taught how to think, not what to think.― <NAME>"

#----------------------------------------------------------------------------------------------------------------------#

#                                          COURSE DEFAULT CONFIGURATION                                                #

#----------------------------------------------------------------------------------------------------------------------#

# Add all attributes that will be passed on any course creation here, with a default value
# All courses will use defaults when individual attributes aren't supplied

@course_default_config = {
  :quotes => {
    :course_created => "A new course has been created",
    :grade_sceme_elements_created => "Grade scheme elements have been added for the course",
    :teams_created => "Teams have been added for the course",
    :badges_created => "Badges have been added for the course",
    :weights_created => "Weights have been configured for the course"
  },
  # All courses must have grade scheme elements
  :grade_scheme_hash => { [0,600000] => 'F', [600000,649000] => 'D+', [650000,699999] => 'C-', [700000,749999] => 'C', [750000,799999] => 'C+', [800000,849999] => 'B-', [850000,899999] => 'B', [900000,949999] => 'B+', [950000,999999] => 'A-', [1000000,1244999] => 'A', [1245000,1600000] => 'A+'},
  :grade_levels => ['Amoeba', 'Sponge', 'Roundworm', 'Jellyfish', 'Leech', 'Snail', 'Sea Slug', 'Fruit Fly', 'Lobster', 'Ant', 'Honey Bee', 'Cockroach', 'Frog', 'Mouse', 'Rat', 'Octopus', 'Cat', 'Chimpanzee', 'Elephant', 'Human', 'Orca'].shuffle,
    # Not all courses have teams
  :team_names => ['Harm & Hammer','Abusement Park','Silver Woogidy Woogidy Woogidy Snakes','Carpe Ludus','Eduception','Operation Unthinkable','Team Wang','The Carpal Tunnel Crusaders','Pwn Depot'].shuffle,
    # Not all courses have badges
  :badge_names => ['Creative', 'Inner Eye', 'Patronus Producer','Cheerful Charmer','Invisiblity Cloak','Marauders Map','Lumos','Rune Reader','Tea Leaf Guru','Wizard Chess Grand Master','Green Thumb','Gamekeeper','Seeker','Alchemist','Healer','Parseltongue','House Cup'].shuffle,
  :attributes => {
    :academic_history_visible => false,
    :accepts_submissions => false,
    :add_team_score_to_student => false,
    :assignment_term => nil,
    :badge_setting => false,
    :badge_term => nil,
    :challenge_term => nil,
    :character_names => false,
    :character_profiles => false,
    :class_email => nil,
    :courseno => "ABC101",
    :grading_philosophy => nil,
    :group_setting => false,
    :in_team_leaderboard => false,
    :location => nil,
    :max_group_size => nil,
    :media => nil,
    :media_caption => nil,
    :media_credit => nil,
    :meeting_times => nil,
    :min_group_size => nil,
    :name => "Generic course with Minimum Requirements",
    :office => nil,
    :office_hours => nil,
    :phone => nil,
    :semester => "Winter",
    :tagline => nil,
    :team_challenges => false,
    :team_roles => false,
    :team_score_average => false,
    :team_setting => false,
    :team_term => nil,
    :teams_visible => false,
    :total_assignment_weight => 0,
    :twitter_handle => nil,
    :twitter_hashtag => nil,
    :user_term => nil,
    :year => Date.today.year,
  }
}

#----------------------------------------------------------------------------------------------------------------------#
#----------------------------------------------------------------------------------------------------------------------#

# Note: @courses will hold each course as a hash key.
# The custom attributes should be defined below and will be available throughout sample creation.
#
# Additionally, The Active record models associated with the course be accessible on each course:
{'fraction_non_alphanumeric': 0.25817425817425815, 'fraction_numerical': 0.025515025515025515, 'mean_word_length': 2.9607035928143715, 'pattern_counts': {'":': 2, '<': 69, '<?xml version=': 0, '>': 189, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7168306', 'n_tokens_mistral': 3488, 'n_tokens_neox': 3230, 'n_words': 854}