treesame commit of origin/stable/2013-09-14

Treesame-Commit-Id: 3b6790d8cf364dd73b6873987b743125d6d38109
treesame commit of origin/stable/2013-09-14

Treesame-Commit-Id: 002ca9be2a859e990b18cf2837c4c2bf51c70bb2
enable saml login when multiple non-saml authorization configs

**TEST PLAN**
Create a non saml authorization config
via rails console create a saml authorization config
saml authentiation should work when calling saml_consume endpoint

fixes PS-649

Change-Id: I95c3203056c614c241383d6f11a997def6547a76
Reviewed-on: https://gerrit.instructure.com/24452
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Adam Phillipps <adam@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
don't fire jstcss guard on sass errors

test plan:
1. put some invalid sass in a jst stylesheet
2. you should see the error in the guard output, but guard shouldn't die

Change-Id: Idd07ba3c64f89d35e79e3f6a886a28a26f8e8a1c
Reviewed-on: https://gerrit.instructure.com/24557
Reviewed-by: Mark Ericksen <marke@instructure.com>
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
includes create bad queries. don't use them for content lists

Change-Id: I4afafae06d4a799aaa626f40f37f49dae4af7c13
Reviewed-on: https://gerrit.instructure.com/24609
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
don't dedup against broken attachments

refs CNVS-8056

when uploading a new attachment that matches the md5 of an existing
attachment, but that existing attachment's s3object is missing, promote
the new attachment to root attachment instead of throwing away the new
copy of the s3object that was missing.

test-plan:
 - be using s3
 - upload a file once, call this a1.
 - upload the same file again, call this a2.
 - in script/console, execute `a1.s3object.delete`. a1 and a2 should now
   both be broken.
 - upload the same file a third time, call this a3.
 - all of a1, a2, and a3 should now work.

Change-Id: I163b8093d2a9e9f69e3428ba10d1fbb58e437957
Reviewed-on: https://gerrit.instructure.com/24278
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
don't delete s3 objects on attachment destruction

refs CNVS-8056

we don't want to actually delete objects from s3 (at least not due to
the Attachment being destroyed). With our root attachment deduplication
scheme it just gets too messy and buggy.  We'll just GC them later.

test-plan:
 - be using s3
 - upload a file, call this a1
 - upload the same file again, call this a2. a2 should have a1 as its
   root attachment
 - in script/console, call a2.destroy!. a2 should be removed completely
   from the database
 - a1 should still work (its s3object should not be gone)

Change-Id: Ie1f488e28b44c983a0d8528d61ce8ae99b8c6736
Reviewed-on: https://gerrit.instructure.com/24280
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
include canvas revision in health_check json response

test plan:

curl -H 'Accept: application/json' http://<domain>/health_check

If you have a VERSION file in your canvas dir it'll report that
version, otherwise "Unknown"

Change-Id: I43c72140541ea441d4ec96a4c179d8db775843b7
Reviewed-on: https://gerrit.instructure.com/24595
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
properly handle exceptions in reserve_capacity

Passing a nil cost to increment was raising an error, masking the
original error that the block raised in the first place

Change-Id: I7970ed7d454d8b04309087daf557f969e5adb057
Reviewed-on: https://gerrit.instructure.com/24610
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
added quiz regrade tour

added tour popover to quiz edit/questions for teachers
when they edit quiz question on regrade

test plan:
edit a question of a quiz that students have already taken,
change the answer to reveal regrade options and verify popover
exists. Verify that its Ok, got it button works.

Change-Id: I13446746d90e05fb6da3a8632a045871c067e92b
Reviewed-on: https://gerrit.instructure.com/23680
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
[WebAIM] quiz answer indicators not read by SR

Quiz answers should be read by the screen reader when their
corresponding element receives focus.

closes CNVS-6634

Test plan:

  - As a Teacher, create a quiz with questions of (preferably) all types
  - Make sure the quiz has one "Fill in the blanks" question as it
    represents an edge case
  - Publish the quiz
  - As a Student, take the quiz, and get some answers right!
  - Using JAWS or a SR, advance to the radio buttons or text fields
  - Confirm that the SR speaks "Correct", "You Answered" appropriately

Notes:

When viewing the quiz attempt, the display of answers of some question types
are not consistent (namely, FITB and Numerical questions) in that the
correct answer is set inside a text field (<input />) while the other
answers (or the student-supplied one) are set in nodes of different
types (<div />). This causes these other answers _not_ to receive focus
by the screen reader.

However, this is not related to this issue (only that it affects it.)

Change-Id: I12c38d22768fdc759b5a3719e91c03d78b8fca90
Reviewed-on: https://gerrit.instructure.com/24300
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
Merge pull request #353 from sfu/fix-alerts

Fix permissions check for interaction alerts
admin-links: open menu on enter or space

fixes CNVS-8154

test plan:
  * open a page with a cog menu, such as assesments
    or discussions (JAWS testing is important)
  * bring your focus to the cog menu
  * press enter or space
  * verify that the menu opens
  * close the menu and repeat
  * verify that the menu still opens
  * open a discussion topic page in Chrome or Safari
  * focus the topic settings gear button
  * verify that the focus outline wraps the button neatly

I'm happy with my change to admin-links here--I like having it just pass
through the event instead of having special-case magic. I'd appreciate
feedback on my jquery UI popup changes, though.

Change-Id: I72dcb150e467748c59428fe2bdd4c8c2ddf22823
Reviewed-on: https://gerrit.instructure.com/24499
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
fix editing a wiki page to only prompt to save true changes

test plan:
 - with draft state enabled
 * edit a wiki page already containing elements such as:
   - <br>
   - <hr>
   - consecutive  spaces
 * if no changes have been made, you should not be prompted
   to save changes
 * once changes have been made (to the body or title), you
   should be prompted when attempting to navigate away from
   the page in any way

fixes CNVS-8146

Change-Id: Iab650bfe7caab757b6f7d9111061973aed4c18a3
Reviewed-on: https://gerrit.instructure.com/24549
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
includes create bad queries. don't use them for content lists

Change-Id: I4afafae06d4a799aaa626f40f37f49dae4af7c13
Reviewed-on: https://gerrit.instructure.com/24609
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
include canvas revision in health_check json response

test plan:

curl -H 'Accept: application/json' http://<domain>/health_check

If you have a VERSION file in your canvas dir it'll report that
version, otherwise "Unknown"

Change-Id: I43c72140541ea441d4ec96a4c179d8db775843b7
Reviewed-on: https://gerrit.instructure.com/24595
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
properly handle exceptions in reserve_capacity

Passing a nil cost to increment was raising an error, masking the
original error that the block raised in the first place

Change-Id: I7970ed7d454d8b04309087daf557f969e5adb057
Reviewed-on: https://gerrit.instructure.com/24610
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
added quiz regrade tour

added tour popover to quiz edit/questions for teachers
when they edit quiz question on regrade

test plan:
edit a question of a quiz that students have already taken,
change the answer to reveal regrade options and verify popover
exists. Verify that its Ok, got it button works.

Change-Id: I13446746d90e05fb6da3a8632a045871c067e92b
Reviewed-on: https://gerrit.instructure.com/23680
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
don't validate frozen assignment fields

fixes an issues where, since the assignment title label was disabled, the data
wasn't being collected for save (correct), and so the validations mistook that
as the field being empty (incorrect).

fixes CNVS-8245

test plan:
- set up a frozen assignment
  * enable assignment freezer
  * edit assignment to be frozen
  * copy course
  * view copied assignment as a teacher (not admin)
- you should be able to edit the due date

Change-Id: I4f29107b47999d602193454ec9b2754efd408b8b
Reviewed-on: https://gerrit.instructure.com/24550
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
allow bulk messaging in new conversations

fixes CNVS-8045

test plan:
  * as a teacher with new conversations, navigate to new
    conversations and click the compose button;
  * verify that the "Bulk message" checkbox appears
    below the subject line;
  * attempt to send two messages to an entire class: one
    with the bcc checkbox selected, and another with it
    unchecked;
  * as a student in the class using old conversations,
    navigate to conversations and verify that you have two
    messages: one group conversation with the entire class,
    and one group conversation between you and the
    instructor.

Change-Id: Ic3bab8ce406c565a50ca50ad19d74b949f1caad1
Reviewed-on: https://gerrit.instructure.com/24515
Reviewed-by: Braden Anderson <banderson@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>