renamed View::filter to View::afterRender

Change-Id: If7a19ad055966f2147c173b02ea9011fc4741ee9
Reviewed-on: https://gerrit.instructure.com/13730
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
revert several grade calculation changes

Revert "make grade_summary page use GradeCalculator"

This reverts commit 4776cb28806098895c74c12eca09b778956cfaaa.

Revert "fix gradebook bug in ie8"

This reverts commit c9272374581c4eb21676b7db1d3035868d45f7d0.

Revert "gb2: don't lie about which assignments are dropped"

This reverts commit da379330794322efd5e956c301e2dbbef7f0c656.

Revert "fix ruby calculation of grades (grade-dropping)"

This reverts commit 63f75597a2983379c5c36afe3efcf26f36cdef56.

Revert "fix grade-dropping in gradebooks"

This reverts commit 4a4a2f53c1d86fb87c9525204bab35127e2b1a03.

Conflicts:

	spec/selenium/grading_standards_spec.rb

Change-Id: I597d777fee23c4dc57bb915c6cbe5185dc18d0af
Reviewed-on: https://gerrit.instructure.com/13716
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
validate ldap filter in search test

test plan:
 * enter valid ldap settings, except for filter
 * test them, but don't put in a username and password
 * you should get an error about invalid filter syntax

Change-Id: I61339085cbd902ba6e1234a098181db32cd42385
Reviewed-on: https://gerrit.instructure.com/13754
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
eportfolio direct-to-s3 upload, fixes #10572

don't proxy uploads through canvas

also fix ui so that file picker goes away after saving

test plan:
1. w/ s3 file store, edit an eportfolio
2. add a file/image
3. it should work
4. repeat steps 1-3 for local file store
5. edit an eportfolio
6. add a file from your existing user files
7. it should work

Change-Id: I1518e06dec495180371eef75af2e6659d49d36b1
Reviewed-on: https://gerrit.instructure.com/13692
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
add account setting to only allow calendar2

closes #10292

Test plan:
  1) enable calendar2 on an account
  2) set up a user to prefer the old calendar
  3) set the 'calendar2_only' setting to true on the account
  4) go to the calendar as the user from step 2, you should be
     redirected to calendar2
     * there should be no way to get to the old calendar

Change-Id: I6280caf2878d04ef3f73efdbc61187906aeb5113
Reviewed-on: https://gerrit.instructure.com/13756
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
clear associated_enrollment between rows; fixes #10652

test plan:
 * create a SIS import that enrolls a student after an observer
 * the student's enrollment should not have an associated user ID

Change-Id: I6b05e1c7cc4a634a77795b5d8ddc7ba269810479
Reviewed-on: https://gerrit.instructure.com/13776
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
filter discussion search results after every key press in IE

fixes: #10342

also fixed css so it looks good in firefox and IE

the ticket also mentioned that "the x button to
clear search also does not display" but not going
to fix that, it is because IE does not have any native
special styling for input type=search.

test plan:
 * make sure that the box looks good in IE, firefox,
   and chrome.  (like this: http://cl.ly/image/1p2g0Q2L2a2w )
 * make sure results are filtered after you press a
   a key in in IE

Change-Id: I690fa5a06b1cbd0e7195070e7ef0109094742ac2
Reviewed-on: https://gerrit.instructure.com/13635
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
fix discussion reordering and allow dragging to top and bottom

fixes: #10327

test plan:
* Create at least 5 discussion topics in a course
* Go to the discussion topics page
* Drag an item in the middle of the list to the bottom
* make sure it stays where you put it
* reload page make sure the order stays
* repeat but put it on top of list
* repeat putting it in middle of list

Change-Id: Ib838a3fba7812d999c1bb8ac8f3f772933bdb92f
Reviewed-on: https://gerrit.instructure.com/13636
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
fix server error when non-enrolled admin comments on submission

refs #10595

test plan: try to comment on a submission to an assignment
as a site admin user who is not enrolled in the course

Change-Id: I60a5bdad6e0771fe19e74bf75cd42d86f3ffebe1
Reviewed-on: https://gerrit.instructure.com/13755
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
make it so if you hit enter in jqUI dialog it submits form

fixes: #10247

test plan:
hit Start A New Course on dashboard
Name the course and hit enter
should do the same as hitting the submit button

Change-Id: I76a45edb723ddc33d1bd0708551e35744b1db0b7
Reviewed-on: https://gerrit.instructure.com/13650
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
allow /grades page to link to gradebook2, fixes: #9387

test plan:
as a teacher, go to /grades
click on the link for one of the courses you teach,
it should go to the gradebook you have set as default.
(specifically to test this fix, have gb2 as the default
and click it, it should go to gb2)

Change-Id: I5ef7284ba4379acd6c40801aa8d57ca5139def7a
Reviewed-on: https://gerrit.instructure.com/13706
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
add GA tracking to help links

closes #10610

test plan: with google analytics enabled, click the help link and verify
the event is sent to GA. also try on an account that has a custom help
link configured.

Change-Id: I26ba5b2d01437f015f447b00325e1c0e8f9c607d
Reviewed-on: https://gerrit.instructure.com/13763
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
refactored Assignment#speed_grader_json

closes #10671

it now sends only the user and submission data
needed by the speedgrader app instead of
everything

test plan:
1. speed grader should behave as it always has
2. inspect window.jsonData, look at the user and
   submission data and make sure it doesn't have
   every column

Change-Id: If2d79766756249c6f715eb8ee4334bee973ed891
Reviewed-on: https://gerrit.instructure.com/13700
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
fix cross-shard facebook app use fixes #9640

test plan:
 * authorize facebook from a non-default shard
 * view Canvas' facebook app from a non-default shard
 * in the event that your facebook app isn't set up correctly, you
   can test item 2 by going to /facebook?force_view=1 when you're
   already logged in. this will pretend it was logged in from
   Facebook

Change-Id: I01a76262727ad3535c95e674816309016f7e74fc
Reviewed-on: https://gerrit.instructure.com/13703
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
add future enrollments to /courses. fixes #9959

when a user visits the /courses page, display all of their
future enrollments, meaning their enrollments in any published
courses with start_at dates > Time.now.

test plan:
  * create a course with a start_at date in the future and enroll
    a student;
  * as the student, accept the enrollment and visit the /courses
    page;
  * verify that the course appears under the header 'Future
    Enrollments;'
  * test courses without a start_at date and courses that are not
    published; verify that they do not appear in the future
    enrollments section.

Change-Id: Ieada1f4d7418e69e7d611516f196cb2d1b25117f
Reviewed-on: https://gerrit.instructure.com/13265
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
exclude retired CCs in NotificationPolicy.for(User)

fixes #10422

test plan:
 * set up daily or weekly notifications to an address
   for a certain notification category
 * delete that address
 * set up a different address, and set notifications
   for the same category to "never"
 * make sure the notification to the old address
   is not received

note that the old/new addresses could conceivably be the same
(they are in the ticket), but that's tricky to set up because
the UI will prefer to reactivate the old address rather than
create a new one with the same name

Change-Id: I908d37ae4d587afad38eb9332df4ab7c31f36f7a
Reviewed-on: https://gerrit.instructure.com/13778
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
redis jobs backend

This supports all the features of our current delayed jobs backend,
including priorities, queues, jobs scheduled for the future, strands,
periodic jobs, etc.

Atomicity is guaranteed by using the new Lua scripting features of Redis
2.6, so this requires 2.6 (which is still only a release candidate as of this
time).

It's not yet production ready (see the TODO at the top of the
redis/job.rb file), so trying to start canvas in prod with redis jobs
configured will raise an error as a safeguard.

The tests have been modified to all pass with redis configured as the
jobs backend. Some selenium specs were removed because the jobs UI lost
some functionality that I didn't think was important enough to port to
redis (listing the most popular tags for future and failed jobs, for
example).

Change-Id: Ie57b15bae1d4ba7b2b2344c872411165551d1ac8
Reviewed-on: https://gerrit.instructure.com/12120
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
improve accessibility of files page. fixes #9271

this commit marks up the file list as a tree and makes it
keyboard navigable. it also adds labels to each of the file
sections to make them easier to understand.

test plan:
  * using a screen reader, navigate to the files page and
    attempt to click a file in the tree navigation;
  * verify that it opens in the preview pane as expected;
  * do the same with a folder and verify that it displays as
    expected.

Change-Id: Icc9ad33973882f35d6aca0219a2b77e0358d3cb3
Reviewed-on: https://gerrit.instructure.com/13638
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
remove out-of-order <h1 /> tags, replace w/ <h2 />.

refs #10365

until we can come up with a more coherent header strategy, this
commit removes the out-of-order <h1 /> tags and opts instead for
just starting at <h2 />.

also removes the <h2 /> tags in the navigation, as they're
potentially confusing to users trying to find content via the
heading tags.

test plan:
  N/A

Change-Id: I1a1cf75feae981eba3ed4ecf0897060759ec46a0
Reviewed-on: https://gerrit.instructure.com/13599
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
add a contributing doc for github coolness

Github added a new feature to let users know there is a
contribution doc: https://github.com/blog/1184-contributing-guidelines

refs #nothing

Change-Id: I050fee6e7cb865b78495721cec24785ac764e414
Reviewed-on: https://gerrit.instructure.com/13797
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>