This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pathway = Pathway.find([:id]) | |
s = Student.all | |
s.each do |student| | |
Enrollment.create(student_id: student.id, pathway_id: pathway.id) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"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"}]}]}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@activities = Activity.all | |
@activities.each do |activity| | |
activity.state = "Published" | |
activity.save | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@item_steps = ItemStep.all | |
@item_steps.each do |item_step| | |
item_step.hints.each_with_index do |hint, index| | |
hint.position = index | |
hint.save | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"language":"en","lessonData":{"fileName":"http://content.thinkthroughmath.com/uploads/image/image/44224/g3_fl1.swf","title":"G3FL1 Place Value with Whole Numbers Lesson","type":"JIT","chapters":[{"activity_id":1385,"title":"Place Value \u2013 Ones and Tens","internal_title":"JIT 1","order":1,"subtitles":[{"chapter_id":1028,"file_name":"http://ttm-content.s3.amazonaws.com/legacy-audio/4604970d-7430-4918-980e-d23d4b9551f7/F4604970d-7430-4918-980e-d23d4b9551f7.mp3"},{"chapter_id":1028,"file_name":"http://ttm-content.s3.amazonaws.com/legacy-audio/218c8a8b-2edd-4b7b-b8b4-be0f4c601e7f/F218c8a8b-2edd-4b7b-b8b4-be0f4c601e7f.mp3"},{"chapter_id":1028,"file_name":"http://ttm-content.s3.amazonaws.com/legacy-audio/f468e9d3-f9b1-4c03-a57c-17ec5c648ce9/Ff468e9d3-f9b1-4c03-a57c-17ec5c648ce9.mp3"}]},{"activity_id":1385,"title":"Comparing Numbers","internal_title":"JIT 2","order":2,"subtitles":[{"chapter_id":1029,"file_name":"http://ttm-content.s3.amazonaws.com/legacy-audio/7b8a2b21-dbdc-4575-9573-c83bf7c2846c/F7b8a2b21-dbdc- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# first one | |
item_step = Item.find(829).item_steps.first | |
bad_item_step_id = 829 | |
Attempt.where("attemptable_type = 'ItemStep' and attemptable_id = ?", bad_item_step_id).each do |a| | |
a.attemptable_id = item_step.id | |
if a.correct | |
a.response_id = item_step.correct_responses.first.id | |
else | |
a.response_id = item_step.incorrect_responses.first.id | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@activity = Activity.find(1085) | |
@activity.items.each do |item| | |
p item.item_steps.first.id | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std = $stdout | |
$stdout = File.new('console.out', 'w') | |
ActiveRecord::Base.logger = nil | |
Item.published.all.each do |item| | |
next if (item.active == false) | |
#item = Item.find_by_item_number_and_state(60124, "Published") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pathway Reports Integration Test | |
ERROR (0.00220s) (24:00:22.962) 0001 can get all lesson enrollments for a partially completed enrollment | |
Couldn't find Pathway with id=254 | |
Message Integration Test::Viewing messages::as a teacher | |
ERROR (0.64553s) (23:00:05.036) 0001 shouldn't show an error page if there aren't any contest messages | |
no link or button 'Messages' found | |
-- This link was commented out for launch. Skip the test for now |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unit Tests | |
Snippet: | |
ERROR (0.01649s) (11:00:09.365) 0002 can create a snippet with audio from text | |
Couldn't find Snippet with id=1564 | |
School::shard_name | |
TODO: fix this test because previously we picked the LAST shard | |
FAIL (0.01305s) (11:00:08.666) 0001 uses a random shard if this customer doesn't have any other schools | |
Expected: "enrollments_shard_two" |
OlderNewer