fix gradebook2 "add a comment" spec

this is mostly just to get rid of some useless
`keep_trying_until`s

Change-Id: Iaac9f67a5db482e3858c53eacd99bbb497f12f61
Reviewed-on: https://gerrit.instructure.com/8045
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
fix returning the correct pseudonym in the API

test plain:
 * create a user with multiple pseudonyms in multiple accounts
 * API requests should return the pseudonym info only of
   pseudonyms that apply to the account related to the request
   being sent
 * SIS info should be returned even if a non SIS pseudonym is
   listed first

Change-Id: I895cc6fe2854dcd768590eeae16304b6092f2317
Reviewed-on: https://gerrit.instructure.com/8081
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
fix intermittently failing selenium specs

Change-Id: I06fb42b44dc807399862f5f8a6d93d8cd911a74c
Reviewed-on: https://gerrit.instructure.com/8093
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
fix include_ungraded_assignments behavior of gradebook2

When I made gradebook2 I thought "include ungraded
assignments" was to show/hide "not-graded" assignments
it is actually there to adjust how final scores are
displayed. So that was bug 1

bug 2 was that toggling that setting did not
actually update final grade percentages.

also, reword the setting in the header to say:
"Treat ungraded as 0's"
instead of:
"Include Ungraded Assignments"
because it is less confusing

test plan

 * create an assignment of type 'not-graded'
 * make sure it does not show up in gradebook2
 * in gradebook2 click the "Treat ungraded as 0's"
   option in the cog menu in the header
 * make sure that total columns change to reflect
   treating ungraded assignments as a score of 0

Change-Id: I276d02dfcf13acafd49ce2697a8f4b4bca6bef64
fixes: #6765
Reviewed-on: https://gerrit.instructure.com/8107
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
make group conferences available to course admins, fixes #6681

this brings the overly strict tab display permission in line with the
other controller/view checks... provided an admin can manage or even
just view group pages, they can see web conferences.

Change-Id: I8412b3e62ad053e33a1219f1c52dbdf0b1110958
Reviewed-on: https://gerrit.instructure.com/8102
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jon Jensen <jon@instructure.com>
handle MalformedCSV errors gracefully fixes #6814

run the file completely through the parser before giving it to the
importers, and fail-fast with a useful error message

test plan:
 * import an SIS file with mismatched quotes
 * you should get a warning about malformed CSV, not a reference
   to "Error while importing CSV. Please contact support."

Change-Id: If785910e76bce6fcc2efe5507febcbfc14727a05
Reviewed-on: https://gerrit.instructure.com/8095
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
handle Timeout::Error in redis caching

Hook into the redis library at a pretty low level, to try and do
everything we can to avoid erroring if redis goes down. This applies to
both redis-as-cache and redis-as-data-store.

test plan: Set up redis and caching in your local instance. Point it to
both an existing box on a port not running redis, and a non-existent IP.
In both situations, you should not see caching errors or redis data
errors. After the first error, it shouldn't attempt to hit redis again for 5
minutes.

Change-Id: I101b2d3d2123151b244eb82ba78b176ed1f4d5ad
Reviewed-on: https://gerrit.instructure.com/8097
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
i18n:check skip vendor/ except for vendor/plugins/

test plan: run rake i18n:check, it should skip stuff like vendor/ruby

Change-Id: I67e0e75515d3506f8c03352573848a053a5102d0
Reviewed-on: https://gerrit.instructure.com/7828
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
upgrading selenium webdriver to 2.15.0

Change-Id: Ie5b8d087c70ff6ab6117257770f2f6274583a41d
Reviewed-on: https://gerrit.instructure.com/8094
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
fix conversation loading errors, closes #6812

Change-Id: Idaafd241be4dfa62197245e792342d11a1cc046e
Reviewed-on: https://gerrit.instructure.com/8109
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
only queue the process_attachment job when the attachment is created

If the job took more than a few seconds to start, more jobs for the same
attachment would get continually queued up.

fixes #6931

test plan: try to download a eportfolio export or submissions zip with
delayed jobs not running. you should only see one job queued up, no
matter how many times your browser does AJAX queries for status.

Change-Id: Icbdb75bf1c9e9f76af82b8d1bcb48e4b7e17abe5
Reviewed-on: https://gerrit.instructure.com/8129
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
account-level tools couldn't be configured by url

previously this would only work for course-level tools

fixes #6935

test plan:
- try adding a tool to an account by url configuration
- make sure it doesn't die

Change-Id: Id04a0619bd733d351098731cf2db67f8a26936dd
Reviewed-on: https://gerrit.instructure.com/8136
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
course_navigation typo in stylesheet

fixes #6936

test plan:
- add a tool with course navigation from the external tools tab
  (like http://lti-examples.heroku.com/config/course_navigation.xml)
- make sure the tool says "Course navigation configured"
  in the external tools tab

Change-Id: I745d64d6557be4b90851c3301409ffb459a32fe2
Reviewed-on: https://gerrit.instructure.com/8137
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
hide discussions from observers; closes #6825

provides a role override permission for viewing discussions. primarily useful
for disallowing observers from reading discussion, although by default it is
enabled.

test plan:
- create a course
- create a discussion (d1) in that course
- create a discussion assignment (d2) in that course
- log in as an observer and make sure you can see both discussions above
- log in as an admin and revoke the read_forum permission for observers
- log back in as the observer and make sure you can't see the discussions
- also check that the assignment shows the assignment page, but does not
  redirect to the associated discussion.

Change-Id: I4c6441c781c24e6aadacbfc23dcc307c772ecd2c
Reviewed-on: https://gerrit.instructure.com/8069
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
flag selenium gradebook2 comment spec as pending

the test frequently fails when executed on aws

Change-Id: I70b1ea54b085754591e5ce1233ede3ce3c1c4dad
Reviewed-on: https://gerrit.instructure.com/8153
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
modified selenium specs for IE

Change-Id: I61645b4d6fd54e96b0af186e532ef09e3f43e190
Reviewed-on: https://gerrit.instructure.com/8090
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
process page views from redis in transactional batches

This should make the database much happier

test plan: turn on queue mode for page views, generate a few page views,
and verify that they're still stored to the db after the job runs.

Change-Id: If90b543b805c7f599ce1865b669d4943cafb220d
Reviewed-on: https://gerrit.instructure.com/8161
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
fix sizing on external tool buttons

tinymce buttons are by default 20x20, but the external tool
icons are expected to be standard 16x16 icons, so they were
getting stretched. This fixes that using css to add some
padding for external tool buttons in tinymce.

fixes #6937

test plan:
- configure an external tool with an editor button on a course
  (like http://lti-examples.heroku.com/config/editor_button.xml)
- go to the rich editor in that course
- make sure the icon isn't stretched and ugly
- make sure the rest of the styling for the rich editor still
  looks the same

Change-Id: Ic46e37a812c20f70c00771cebe4e5cb9ccadc5f3
Reviewed-on: https://gerrit.instructure.com/8138
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
support https for retrieving lti xml configs

net http needs some additional config in order
to support https requests.

fixes #6938

test plan:
- try adding an external tool with an http url config
  (like http://lti-examples.heroku.com/config/course_navigation.xml)
- make sure it adds correctly

- try adding an external tool with an https url config
  (like https://lti-examples.heroku.com/config/course_navigation.xml)
- make sure it adds correctly

Change-Id: Ia26c7d383069bccf761f18a2993f352002cc868a
Reviewed-on: https://gerrit.instructure.com/8139
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
breaking up selenium wiki_spec

Change-Id: Ib229227d7755c25a4c95eab8cd18efd62d45e680
Reviewed-on: https://gerrit.instructure.com/8110
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>