Updated zh translation
Updated ar translation
refactored lti_role_creator into lti_user_creator

Change-Id: Ide94a66bd850a2c6e60ae9353192257c97e2a5db
Reviewed-on: https://gerrit.instructure.com/29977
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stephan Hagemann <stephan@pivotallabs.com>
Product-Review: Stephan Hagemann <stephan@pivotallabs.com>
QA-Review: Stephan Hagemann <stephan@pivotallabs.com>
fixing grammar on options toggle

test plan:
  go to course settings page and hit edit course details
  the options toggle should say "fewer options" once clicked
  the toggle should work as expected

changed "less options" to "fewer options"

Change-Id: I4b82120339b502c9a1b06875cfed1b7cd6993cb6
Reviewed-on: https://gerrit.instructure.com/29793
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Mike Nomitch <mnomitch@instructure.com>
IE10+ TinyMCE Links compatibility

The patch makes linking stuff in the RCE possible on IE10+. The reason
it was not functioning on IE9+ is because the "fix" for IE is installed
only if the browser is identified to be IE, while our detection code was
not able to detect versions past 9.

Closes CNVS-5644

TEST PLAN
---- ----

When I say the link "works" in the steps below, it means 4 things:

  1. the word text is not modified
  2. the word becomes highlighted in blue and underlined as a link
  3. the word stays in its place
  4. the word actually becomes a clickable link (viewable only when
     you're viewing the content as opposed to editing it)

  - create a discussion
  - using Chrome/FF: type some words, then select a word in the middle
    and link it to any web page:
    - verify that the link "works"
  - save the discussion
  - now using IE8, IE9, IE10, and IE11:
    - edit that discussion
    - add another sentence, and link a word in the middle:
      - verify that the link "works"
  - don't hate me

> Optional: embedding YouTube videos

  - enable the YouTube LTI
  - embed a YT vid in the discussion content
  - verify that when you're adding or modifying links using IE, the
    video doesn't disappear or gets broken (as was reported by Caleb)

CR NOTES
-- -----

  - the test for IE10 is done using the conditional JS compiling, which
    is dropped in IE11+
  - the test for IE11 is done by sniffing the UA for Trident and rv:
    11.0
  - in order not to introduce any side-effects, I kept from installing
    an "ie" class on the root document elements in the case of IE10+

Change-Id: I61d6ac1918291eb8df6da1aa270ef8358ed49a8f
Reviewed-on: https://gerrit.instructure.com/29651
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
fix sharding array coercion

This matches the behavior of the rails2 sharding stuff.  Specifically,
it doesn't fail when the return value of the block is true

Change-Id: I3f165d8c896bc038bf57908356b15c06dd76591b
Reviewed-on: https://gerrit.instructure.com/30081
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
fix failing user model specs

bare_submission_model doesn't validate (#valid? returns nil!?!?) as
used here

Change-Id: I2623274156ea99c30bb67f7fc03be2757d1f1ae2
Reviewed-on: https://gerrit.instructure.com/30082
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
view spec fixes for rails 3

* fix view spec rendering to include helpers
* re-implement have_tag rspec matcher
* fix problems with finding routes to
 unsaved records

Change-Id: I6ed267fcf5e8e32a62ee059be46371bc0ea35603
Reviewed-on: https://gerrit.instructure.com/30016
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
fix pseudonyms_controller_spec rescue_action_in_public! calls for rails3

Change-Id: I610b1dd45b2554e50370a4a5a90ffb4937fc581e
Reviewed-on: https://gerrit.instructure.com/30073
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
converting @object notation to @model - Part 3/11

Contributed by github.com/mcgachey

  app/controllers/collaborations_controller.rb
  app/controllers/comm_messages_api_controller.rb
  app/controllers/communication_channels_controller.rb
  app/controllers/conferences_controller.rb
  app/controllers/content_exports_api_controller.rb

Fixes SIS-146

Currently, some API objects are documented using the @object tag, and
others are documented using @model. The @model tag is preferred because
it provides more information in the machine-readable Swagger documents
generated by the API documentation build step. For example, the @object
notation does not give a way to specify that a model property contains
an instance of another type. This complete information is necessary in
order to build an SDK generator.

This change converts the @object notations into @model, adding missing
type information and correcting inaccurate data (for example, dates were
typed as "string" in the existing JSON documentation). Embedded types are
also separated out so that their format can also be documented - this
information was previously lost.

The change also makes two minor fixes to the HTML and JSON documentation
generators. The HTML generator is fixed so that a missing documentation
string is ignored rather than being shown as an empty comment, and the
JSON generator is modified so that the Model-level documentation and
required attributes are properly provided.

Note that the JSON generated here is not fully-complient to the Swagger
format. Swagger does not support a Map structure, but the Canvas API
uses (semi-)arbitrary key/value dictionaries in a few places. In those
instances the properties are typed as "map", but this is not a part of the
Swagger spec. Any cleaner alternative approaches here would be welcome.

Change-Id: I92dd48d52cdda123ceb5cfaf9ac98e746b1c9131
Reviewed-on: https://gerrit.instructure.com/30007
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
fix running specs in rails 3 without development gems

Change-Id: I1b659ab2f30afc460a65ad3c8851f472d2feba24
Reviewed-on: https://gerrit.instructure.com/30091
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>
log mem/cpu stats for jobs as well

This logs the STAT line in the same format as for web requests, though
omitting the @@last_sample at the end.

Rather than implementing it directly in worker.rb, I pulled in the new
Lifecycle callback code that delayed_job added after we forked, and
added the logging as an around filter in our canvas initializer.
Eventually I'd like to pull the other canvas-specific code into
lifecycle callbacks as well, making delayed_job more generic and
extractable.

test plan: run jobs, and verify that they still complete successfully,
and log a STAT line at the end with information on cpu and memory usage.

Change-Id: I18e17b286f5df8aa3c9774f0ac92841f4b92e193
Reviewed-on: https://gerrit.instructure.com/30037
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
round avatars everywhere (almost)

fixes CNVS-10713, CNVS-10636

test plan
- ensure that every page that has avatars displays them in a
   consistent, circular way
- ensure that the change didn't break the rest of the page

avatars were left square on purpose on these pages
- speedgrader header (too much work to circle)
- big pic on profile page (too big and interactive, needs
   some proper ui design)
- profile pic selector (not really profile pics yet, just images)
- app review (error handling is tricky)

some pages where you might find avatars to check
- manage avatars (/account/:id/avatars)
- discussions index
- discussions show (don't forget threaded sub-entries!)
- profile page (/about/:id)
- group edit (i can't find this page, but it has code)
- course roster (/courses/:id/users)
- context roster (/groups/:id/users)
- old conversations (message list, message detail, people picker)
- new conversations
- gradebook2 (student column, submission comments)
- speed grader (top left student name, submission comments,
   discussion assignment)
- app review (enable app center plugin, app rating comments)
- user show page (/users/:id)
- masquerade page (/users/:id/masquerade)
- masquerade footer (on the bottom of any page when you masquerade)

Change-Id: Ic01a4b44433aaf6254798d8267bf473a8bf85c2d
Reviewed-on: https://gerrit.instructure.com/28953
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
QA-Review: Joel Hough <joel@instructure.com>
fix selenium db synchronization for rails 3

Change-Id: Iacf7aedeb43472f945a6892b456076761c55c35b
Reviewed-on: https://gerrit.instructure.com/30092
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
inline string patching from lib/ext/string.rb

Change-Id: Ifb811afa3e5ebd01f1faa66f280020e6fbc9088a
Reviewed-on: https://gerrit.instructure.com/30011
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
QA-Review: Stephan Hagemann <stephan@pivotallabs.com>
replace Array#once_per extension with #uniq

Change-Id: I49111316d6cbc1f4be111567ed7f5e670d1d948c
Reviewed-on: https://gerrit.instructure.com/30023
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
QA-Review: Stephan Hagemann <stephan@pivotallabs.com>
inline only usage of Array#count_per

Change-Id: I79d32eedcf8c00259777ed04df605905ca3f685f
Reviewed-on: https://gerrit.instructure.com/30026
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
QA-Review: Stephan Hagemann <stephan@pivotallabs.com>
inline only usage of Array#to_csv

Change-Id: I161db686070126447603a2a511edaccec30edfef
Reviewed-on: https://gerrit.instructure.com/30028
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
QA-Review: Stephan Hagemann <stephan@pivotallabs.com>
remove unused Array#to and Array#from from lib/ext

Change-Id: Id59daa2c9e64833e8d843ebb55312faa5b5dcd0e
Reviewed-on: https://gerrit.instructure.com/30032
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
QA-Review: Stephan Hagemann <stephan@pivotallabs.com>
rails3: second attempt at fixing erubis

Change-Id: I3bba2799e20fdd52efe6a16b1276d5cfac74419f
Reviewed-on: https://gerrit.instructure.com/30013
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>