fix filter overlap issue, fixes #7177

test plan:
* go to your inbox
* make your browser window small
* ensure that you can still see conversations on the left hand side

Change-Id: Icae41d263c69e48afa481703bc3686f714d5ffe9
Reviewed-on: https://gerrit.instructure.com/8520
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
conversations rss feed; closes #6828

added a feed of all your conversation messages. each entry has the following
prperties:
- title is the first several words of the message
- author is the person who wrote the message
- content contains the body of the message, a list of any attachments, and
  a line adding context (other participants and shared classes/groups)

test plan:
- go to conversations view
- load the rss feed
- makes sure it contains your messages, attachments, and looks good

Change-Id: I3375dd01285429010b4d75fbea3bf1f7241ddddb
Reviewed-on: https://gerrit.instructure.com/8198
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
remove require_user_for_context from lib/authentication_methods

this method was a thin wrapper around get_context that redirected to the root
page if a context didn't exist.  Ostensibly it also showed the http error as in
flash message if a context did exist but the user didn't, or didn't belong to
the context, but this branch of code never worked due to a state vs
workflow_state bug that rendered the if statement always false.

Change-Id: I5a7353ddf3e1fc082324384a5ea3d3b6196c0dfd
Reviewed-on: https://gerrit.instructure.com/8499
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
always set conversation tags, even if empty, fixes #7178

because the new filter only shows up if all conversations have tags, if
you start a conversation with someone that you share no contexts with,
the conversation filter disappears. this change ensures all conversations
and conversation_participants have initial empty tags (which then get
added to as messages are added)

test plan:
* start a conversation with someone you share no courses with
* reload the page
* ensure the filter dropdown is still there

Change-Id: I535615897fc630a70baceb645d75f20d2f17a5b9
Reviewed-on: https://gerrit.instructure.com/8529
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
remove duplicate sis imported enrollments

prior to b6300298d it was possible to generate multiple enrollments for
the same user+section+type through deleted enrollments. that changeset
included a cleanup migration but it wasn't complete. this completes the
cleanup.

fixes #7181

Change-Id: Ia1630fdfb2714594492b87805089c02645891796
Reviewed-on: https://gerrit.instructure.com/8525
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
AMD Conversion

"Trivial" JavaScript / CoffeeScript changes
--------------------------------------------------

For the most part, all javascript was simply
wrapped in `require` or `define`. The dependencies
were found with a script that matched regexes in
the files, it errs on the side of listing too many
dependencies, so its worth double checking each
file's dependencies (over time, anyway).

i18n API changes
--------------------------------------------------

No longer have to do I18n.scoped calls, just
list i18n as a dependency with the scope and it's
imported already scoped

  require ['i18n!some_scope'], (I18n) ->
    I18n.t 'im_scoped', 'I'm scoped!'

JS bundling now done with r.js, not Jammit
--------------------------------------------------

We don't use jammit to bundle JS anymore. Simply
list dependencies for your JS modules in the file
and RequireJS handles the rest.

To optimize the JavaScript, first make sure you
have node.js 0.4.12+ installed and then run:

  $ rake js:build

The app defaults to the optimized build in
production. You can use non-optimized in
production by putting ?debug_assets=true in the
url just like before.

You can also test the optimized JavaScript in
development with ?optimized_js=true.

Significant changes
--------------------------------------------------

These files have "real" changes to them (unlike
the JavaScript that is simply wrapped in require
and define).  Worth taking a really close look at:

- app/helpers/application_helper.rb
- app/views/layouts/application.html.erb
- config/assets.yml
- config/build.js
- lib/handlebars/handlebars.rb
- lib/i18n_extraction/js_extractor.rb
- lib/tasks/canvas.rake
- lib/tasks/i18n.rake
- lib/tasks/js.rake

Change-Id: I4bc5ecb1231f331aaded0fef2bcc1f3a9fe482a7
Reviewed-on: https://gerrit.instructure.com/6986
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
add missing sis_source_id not null scope

refs #7181

just to be safe

Change-Id: I6f182132e87688c171d3b39e07eb903a9190c1a2
Reviewed-on: https://gerrit.instructure.com/8548
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
moved a file uploads selenium test into local only describe

Change-Id: I74d5cf903b1b45dfb81d63e665d74cccb1aa9c0b
Reviewed-on: https://gerrit.instructure.com/8545
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
breaking up multiple selenium files

in order to manage and debug test files easier

Change-Id: Ic306848f3a66a877b1ceefd0fbd7cc399dae9433
Reviewed-on: https://gerrit.instructure.com/8430
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
drag/drop learning outcomes fixes #6720

test case:
1. go to courses/:id/outcomes
2. add a couple groups
3. add a couple outcomes
4. drag and drop to re-order, nest items
5. refresh page, note that everything is how you
   left it

Previously it was using `.find` instead of
`.children`, so it sent the wrong data to the
controller.

Change-Id: I6e98f5ae2f8ace4663d6180c6774e6bd5aad426b
Reviewed-on: https://gerrit.instructure.com/8418
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
fix display of turnitin settings on account settings

Change-Id: I00a656fc90805246cf5e4289c5b1565368635fe1
Reviewed-on: https://gerrit.instructure.com/7152
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
fix undefined method `to_date' for nil:NilClass WIP

Change-Id: Ib4059932592821d691f82cf4412a0323bcb43197
Reviewed-on: https://gerrit.instructure.com/7933
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
set empty tags for conversations affected by #7178 (refs #7178)

recently created (or resurrected) conversations with no common
contexts (explicit or inferred) did not get the tags set to '',
and this was preventing the course filter from displaying in the
ui

test plan:

ensure that the course filter shows up

Change-Id: I2c332eedab7765a9d8e3bcb2f41cae260e89a611
Reviewed-on: https://gerrit.instructure.com/8542
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
fix submission comment migration, clean up data. fixes #7203

also make view resilient to bad data in the future

test plan:

confirm that the dummy conversation messages go away and that people stop
getting dashboard errors

Change-Id: I2d59bf400f7b5b92debf4a4e0af2de2204878cf8
Reviewed-on: https://gerrit.instructure.com/8578
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
fix - assignments discussions selenium spec

Change-Id: I11512405fd33e2dfcf2fd810925909b3d572390c
Reviewed-on: https://gerrit.instructure.com/8580
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
marking selenium file uploads test as pending

should upload a file on the homework submissions page, even over quota needs to be rewritten

Change-Id: I4961d5f5fc2688c3d87827c220e19204a7e1ed5c
Reviewed-on: https://gerrit.instructure.com/8587
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
fix - selenium course wizard test in courses spec

Change-Id: I6bde80a6fd53bf7d0db31bf2b1f51cacd3bebd70
Reviewed-on: https://gerrit.instructure.com/8573
Tested-by: Bryan Madsen <bryan@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
fix site admin pseudonym creation with passwords fixes #5231

test plan:
 * add a pseudonym to an existing user; the password should work immediately

Change-Id: I5c7c0213c7d200ff4641ad6afd158787a7c05aac
Reviewed-on: https://gerrit.instructure.com/8101
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
add course delete/complete api. fixes #7060

affects: courses api
test plan:
  * make request as authorized user with params[:event] as
    'deleted' and verify that course workflow_state becomes
    'deleted.'
  * make request as authorized user with params[:event] as
    'conclude' and verify that course workflow_state becomes
    'completed.'
  * make request as unauthorized user and verify that 401 is
    returned.

Change-Id: Iec933effc32795dffbe67ef781a84a0fc7ec7ec0
Reviewed-on: https://gerrit.instructure.com/8347
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
always make submission comments as the current user

for group assignments, from the dashboard, student comments would be
made as the owner of the first submission in the group.

fixes #7196

test plan:
  * set up a group assignment with two students in the target group
  * make a submission comment to the group as the teacher, from the speedgrader or whatever
  * as one of the students, reply to the submission comment from your dashboard
  * do the same as the other student
  * for both students, the comment should show as coming from the proper
    student, not the other student.

Change-Id: I65030303b62318482664db31c077e6b351f37d25
Reviewed-on: https://gerrit.instructure.com/8594
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>