Skip to content

Instantly share code, notes, and snippets.

View benjaminvialle's full-sized avatar

Benjamin Vialle benjaminvialle

View GitHub Profile

Keybase proof

I hereby claim:

  • I am benjaminvialle on github.
  • I am benjaminvialle (https://keybase.io/benjaminvialle) on keybase.
  • I have a public key whose fingerprint is 72DF 86FB BBBD 5EDA E8FF 1834 8268 84A3 47F9 FD9A

To claim this, I am signing this object:

@benjaminvialle
benjaminvialle / math_ml.patch
Created November 11, 2012 16:02
Diff from RB for issue 285
diff --git a/.gitmodules b/.gitmodules
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "public/javascripts/MathJax"]
+ path = public/javascripts/MathJax
+ url = https://github.com/mathjax/MathJax.git
diff --git a/Gemfile.lock b/Gemfile.lock
--- a/Gemfile.lock
+++ b/Gemfile.lock
@benjaminvialle
benjaminvialle / issue-687.diff
Created November 11, 2012 15:58
Diff from RB for issue 687
diff --git a/Gemfile b/Gemfile
--- a/Gemfile
+++ b/Gemfile
@@ -63,6 +63,8 @@ group :development, :test do
gem "time-warp"
gem "ruby-debug"
gem "mocha"
+ gem "assert_valid_markup",
+ :git => "git://github.com/hoboman313/assert_valid_markup.git"
end
@benjaminvialle
benjaminvialle / issue-705.diff
Created November 11, 2012 15:55
Diff from RB for issue 705
diff --git a/test/functional/api/users_controller_test.rb b/test/functional/api/users_controller_test.rb
--- a/test/functional/api/users_controller_test.rb
+++ b/test/functional/api/users_controller_test.rb
@@ -26,7 +26,7 @@ class Api::UsersControllerTest < ActionController::TestCase
context "/show" do
setup do
- get "show", :id => 1
+ get "show", :id => "garbage"
end
@benjaminvialle
benjaminvialle / issue_339-1.diff
Created November 11, 2012 15:52
Diff from RB for issue 339
diff --git a/app/controllers/assignments_controller.rb b/app/controllers/assignments_controller.rb
--- a/app/controllers/assignments_controller.rb
+++ b/app/controllers/assignments_controller.rb
@@ -468,11 +468,13 @@ class AssignmentsController < ApplicationController
@assignments = Assignment.all
end
- # Refreshes the grade distribution graphs and reloads the page
+ # Refreshes the grade distribution graphs and reloads the assignment graph using ajax
def refresh_graph
@benjaminvialle
benjaminvialle / 338.diff
Created November 11, 2012 15:50
Diff from RB for issue 338
diff --git a/db/migrate/20120313220117_create_submission_file_preferences.rb b/db/migrate/20120313220117_create_submission_file_preferences.rb
--- /dev/null
+++ b/db/migrate/20120313220117_create_submission_file_preferences.rb
@@ -0,0 +1,15 @@
+class CreateSubmissionFilePreferences < ActiveRecord::Migration
+ def self.up
+ create_table :submission_file_preferences do |t|
+ t.references :user
+ t.references :submission_file
+ t.string :encoding, :null => false
@benjaminvialle
benjaminvialle / issue_617-1.diff
Created November 11, 2012 15:49
Diff from RB for issue 617
diff --git a/app/views/main/login.html.erb b/app/views/main/login.html.erb
--- a/app/views/main/login.html.erb
+++ b/app/views/main/login.html.erb
@@ -29,9 +29,12 @@
</div>
</div>
+
+<%# Warn Internet Explorer users %>
<%# Try to put focus on the login text field on load %>
@benjaminvialle
benjaminvialle / 644-1.diff
Created November 11, 2012 15:46
Diff from RB for issue 644
diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css
--- a/public/stylesheets/main.css
+++ b/public/stylesheets/main.css
@@ -968,11 +968,23 @@ input#extra_mark_description{
#role_switch_dialog {
background-color:#fff;
- padding:10px;
- border:10px solid #333;
+ padding:10px;
@benjaminvialle
benjaminvialle / validation-1.diff
Created November 11, 2012 15:42
Diff from RB for issue 474
diff --git a/app/models/assignment.rb b/app/models/assignment.rb
--- a/app/models/assignment.rb
+++ b/app/models/assignment.rb
@@ -68,7 +68,11 @@ class Assignment < ActiveRecord::Base
validates_inclusion_of :assign_graders_to_criteria, :in => [true, false]
before_save :reset_collection_time
- validate :minimum_number_of_groups, :check_timezone
+ validate :minimum_number_of_groups
+ # Call custom validator in order to validate the :due_date attribute
@benjaminvialle
benjaminvialle / bug523-1.patch
Created November 11, 2012 15:27
Diff from RB for issue 523
diff --git a/app/controllers/submissions_controller.rb b/app/controllers/submissions_controller.rb
--- a/app/controllers/submissions_controller.rb
+++ b/app/controllers/submissions_controller.rb
@@ -269,24 +269,48 @@ class SubmissionsController < ApplicationController
params[:sort_by] = 'group_name'
end
@assignment = Assignment.find(params[:assignment_id])
- @groupings, @groupings_total = handle_paginate_event(
- S_TABLE_PARAMS, # the data structure to handle filtering and sorting
- { :assignment => @assignment, # the assignment to filter by