Skip to content

Instantly share code, notes, and snippets.

View apangeajwrubel's full-sized avatar

Jim Wrubel apangeajwrubel

View GitHub Profile
@apangeajwrubel
apangeajwrubel / gist:3188201
Created July 27, 2012 14:04
updating Activities to make them published
@activities = Activity.all
@activities.each do |activity|
activity.state = "Published"
activity.save
end
@apangeajwrubel
apangeajwrubel / gist:3090433
Created July 11, 2012 13:42
live activity data for focus player
{"lessonData":{"image":"http://ttm-content.s3.amazonaws.com/uploads/image/image/6543/LF4GuessWhatItIs.swf","title":"FL4. Interpret Graphs of Real-World Situations Lesson","type":"interactive_chapterized","chapters":[{"activity_id":59,"title":"Introduction","internal_title":"Introduction","order":1,"subtitles":[{"chapter_id":71,"created_at":"2012-06-01T00:23:44Z","display_text":"Subtitle","id":268,"position":1,"updated_at":"2012-06-01T00:23:44Z"}]},{"activity_id":59,"title":"Three Meanings","internal_title":"Three Meanings","order":2,"subtitles":[{"chapter_id":72,"created_at":"2012-06-01T00:23:44Z","display_text":"subtitle","id":269,"position":1,"updated_at":"2012-06-01T00:23:44Z"}]},{"activity_id":59,"title":"Ending","internal_title":"Ending","order":3,"subtitles":[{"chapter_id":73,"created_at":"2012-06-01T00:23:45Z","display_text":"subtitle","id":270,"position":1,"updated_at":"2012-06-01T00:23:45Z"}]}]}}
pathway = Pathway.find([:id])
s = Student.all
s.each do |student|
Enrollment.create(student_id: student.id, pathway_id: pathway.id)
end