Commit a6c7ef53 by Your Name

new rake file

parent 9f0bbe59
24723: Locked by 24723 at Wed Dec 12 09:48:44 -0500 2012
---
cursor_positions:
- :path: models/commentable.rb
:cursor_offset: 0
:timestamp: 2012-11-29 15:01:52 -05:00
- :path: models/comment_thread.rb
:cursor_offset: 532
:timestamp: 2012-12-02 13:22:28 -05:00
- :path: models/comment.rb
:cursor_offset: 620
:timestamp: 2012-12-04 11:08:37 -05:00
- :path: models/content.rb
:cursor_offset: 602
:timestamp: 2012-12-12 10:56:18 -05:00
:selection_offset: 400
:block_selection_mode: false
- :path: lib/tasks/flags.rake
:cursor_offset: 0
:timestamp: 2012-12-12 10:56:18 -05:00
files_to_retain: 0
---
open_files:
- models/comment.rb
---
bounds:
x: 65
y: 24
width: 1857
height: 1085
tree_width: 205
This diff is collapsed. Click to expand it.
require 'rest_client'
roots = {}
roots['development'] = "http://localhost:8000"
roots['test'] = "http://localhost:8000"
roots['production'] = "http://edx.org"
ROOT = roots[ENV['SINATRA_ENV']]
namespace :kps do
#USAGE
#SINATRA_ENV=development rake flags:flagged
task :prolific => :environment do
flagged = Content.flagged
courses = {}
flagged.each do |f|
if not courses[f.course_id]
courses[f.course_id] = []
end
courses[f.course_id] << f
end
courses.each do |k,v|
puts "#{k.upcase}"
puts "****************"
v.each do |f|
puts "#{ROOT}/courses/#{f.course_id}/discussion/forum/#{f.commentable_id}/threads/#{f.comment_thread_id} (#{f.class})"
end
puts "\n\n\n\n"
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment