Class: StudentProgress::Cohort

Inherits:
Sequel::Model
  • Object
show all
Defined in:
lib/student_progress/cohort.rb

Instance Method Summary collapse

Instance Method Details

#add_students(usernames) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/student_progress/cohort.rb', line 4

def add_students(usernames)
  usernames.each do |username|
    student = StudentProgress::Student.find_or_create(github_username: username)
    student.cohort_id = self.id
    student.save
  end
end

#run_progress_reportObject



12
13
14
# File 'lib/student_progress/cohort.rb', line 12

def run_progress_report
  StudentProgress::Scraper.scrape_progress(self)
end