"to get the selenium errors locally, you have to use USE_OPTIMIZED_JS=true bundle exec spec spec/selenium/path_to_spec.rb" - stanley
?debug_js=1
bake canvas:compile_assets
## | |
# replaces :blah: with an image with the appropriate emoji | |
all_emojis = [ | |
'+1', '-1', '100', '1234', '8ball', 'a', 'ab', 'abc', 'abcd', 'accept', | |
'aerial_tramway', 'airplane', 'alarm_clock', 'alien', 'ambulance', 'anchor', | |
'angel', 'anger', 'angry', 'anguished', 'ant', 'apple', 'aquarius', 'aries', | |
'arrow_backward', 'arrow_double_down', 'arrow_double_up', 'arrow_down', | |
'arrow_down_small', 'arrow_forward', 'arrow_heading_down', | |
'arrow_heading_up', 'arrow_left', 'arrow_lower_left', 'arrow_lower_right', |
var HomeUI = { | |
imageLoadCounter:1, | |
delayTimer:null, | |
animationTimer:null, | |
timerCounter:0, | |
currentAnimation:null, | |
animating:false, | |
popUpTimer:null, | |
NUM_IMAGES_TO_LOAD:4, | |
POP_UP_DELAY:3000, |
(function(){ | |
var | |
rAF = (window.requestAnimationFrame || window.msRequestAnimationFrame || | |
window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || | |
window.oRequestAnimationFrame), | |
cAF = (window.cancelAnimationFrame || | |
window.msCancelAnimationFrame || window.msCancelRequestAnimationFrame || | |
window.mozCancelAnimationFrame || window.mozCancelRequestAnimationFrame || | |
window.webkitCancelAnimationFrame || window.webkitCancelRequestAnimationFrame || | |
window.oCancelAnimationFrame || window.oCancelRequestAnimationFrame), |
COURSE_ID = 5 # replace this with id of course with many (>=500) students | |
# generating a large course is left as an exercise to the reader | |
course = Course.find(COURSE_ID) | |
# generate quiz | |
q = course.quizzes.create! :title => "Big Quiz" | |
eval(File.read 'quiz_questions.txt').each_with_index do |(question, as), i| | |
answers = as.map.with_index { |a, j| |
[ | |
["The main function of myelin is to", | |
["form a protective coating over nerve axons.", | |
"affect the speed of nerve impulses.", | |
"block the reception of acetylcholine.", | |
"aid a nerve's receptivity to neurotransmitters by increasing the number of receptor sites available."]], | |
["The part of the nerve cell specialized for conducting information is the", | |
["axon.", | |
"cell body.", |
"to get the selenium errors locally, you have to use USE_OPTIMIZED_JS=true bundle exec spec spec/selenium/path_to_spec.rb" - stanley
?debug_js=1
bake canvas:compile_assets
def mvim | |
edit_interactively 'mvim -f -c "set filetype=ruby"' | |
end | |
class Object | |
def send_chain(meths) | |
result = self | |
meths.each do |m| | |
return nil if result == nil | |
if result.respond_to?(m) |
function toggle-class-cache() { | |
cfg=config/environments/development-local.rb | |
if grep -q config.cache_classes $cfg; then | |
sed -i ' | |
/config.cache_classes/ s/true/false/ | |
t | |
s/false/true/' \ | |
config/environments/development-local.rb | |
else | |
echo "config.cache_classes = false" > $cfg |
N_ASSIGNMENTS=100 | |
N_USERS=500 | |
begin | |
account = Account.default | |
account.transaction do | |
course = account.courses.create! name: "Big Gradebook" | |
e = course.enroll_teacher(User.find(1)) |
N_ASSIGNMENTS=100 | |
N_USERS=500 | |
def grade_submission_sql_inserts(assignment,student,grade) | |
"(#{assignment.id}, #{student.id}, #{grade}, true, 'graded', '#{Time.zone.now.iso8601}')" | |
end | |
def grade_submission_sql(assignments,students) | |
students_sql = assignments.map do |assignment| | |
students.map do |student| |