Proposing a fix for big tooltips in modules page footer for previous/next buttons
add submission attempts history to ember quizzes

fixes CNVS-12451

test plan:
  - as a teacher
  - enable fabulous quizzes
  - take a quiz multiple times
  - the list of previous attempts should show up in the "Attempt History" table

  - as a student
  - take a quiz multiple times
  - the list of previous attempts should show up in the "Attempt History" table

Change-Id: I7d55bc22014b44a33e58a4272010f913d6fd866d
Reviewed-on: https://gerrit.instructure.com/35273
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
remove some of the less useful associations from export

delayed_messages, exports, imports, migrations,
stream_items, etc.

Change-Id: I6eb63457ad496d7aaf56fc9ec8a9602a5679fdd7
Reviewed-on: https://gerrit.instructure.com/35215
Reviewed-by: Braden Anderson <banderson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Anthus Williams <awilliams@instructure.com>
QA-Review: Anthus Williams <awilliams@instructure.com>
Quiz Stats - Matching

Adds support for Matching question statistics. Similar to FIMB and
Mulitple Dropdowns in the output.

Closes CNVS-13088

TEST PLAN
---- ----

Similar to https://gerrit.instructure.com/#/c/35101/ but with Matching
questions instead of FIMB.

Change-Id: Iaa5da1631503a8750b9673d7cb6064a296a8aa55
Reviewed-on: https://gerrit.instructure.com/35331
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
Ember Quiz Stats - Matching

Question statistics like those for FIMB and Multiple Dropdowns.

Closes CNVS-13072

TEST PLAN
---- ----

  - create a quiz with matching questions
  - take it by a number of students, score differently
  - visit ember quiz stats
  - verify that each left-side "answer" gets its own button
  - click the button and verify that:
    - the possible matches as well as the distractors are charted in the
      answer response distribution chart
    - the correct answer is highlighted in green
    - the ratios should be correct
  - expand the question details to display the answers
    - verify that no matter which answer set you're previewing, all the
      possible matches are displayed, but only the correct one gets
      highlighted differently as you activate an answer set
  - really, it's the same AC as for FIMB and MDropdowns in
    https://gerrit.instructure.com/#/c/34804/

Change-Id: I4fb18c041b7648f20223766dd402bfdbcceb3b55
Reviewed-on: https://gerrit.instructure.com/35428
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
ignore errors on individual shards when scrubbing messages

Change-Id: I9745053f78503157ae19ddfcb8005958cc753acf
Reviewed-on: https://gerrit.instructure.com/35451
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
no more Setting backcompat

Change-Id: I61a202b0a2427ab31f5d3ad59ae8fbd0eac79e5d
Reviewed-on: https://gerrit.instructure.com/35065
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Ember Quiz Stats [+Backend] - Numerical

Adds numerical question support to CanvasQuizStatistics and the renderer
in the Ember quiz statistics (subclass of ShortAnswer question).

Closes CNVS-13087, CNVS-13086

TEST PLAN
---- ----

  - create a quiz with a numerical question:
    - mix and match between the answer types: exact, exact with margin,
      and range answers
  - take the quiz by a number of students, we need to score like this to
    cover the possible cases:
    - a correct answer
    - a missing answer
    - an incorrect/out-of-range answer
  - hitting the stats api should return the documented metrics in the
    output of "question_statistics":
    /api/v1/courses/:course_id/quizzes/:quiz_id/statistics [GET]
  - visiting ember quizzes should now render the numerical stats which
    is similar to short answer (fill in the blank) and multiple answers:
    - make sure the "Other" and "No Answer" answers and bars show up
  - verify the API docs are updated

Change-Id: I0c9ec0dbc7c729410241177b6ed43b0cd4dad143
Reviewed-on: https://gerrit.instructure.com/35431
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
make resolve_path API operate relative to course root

fixes CNVS-13260

test plan:
 - in course, group, and user context:
  - ensure /api/v1/{context}/folders/by_path alone returns
    an array containing only the context's root directory
    (usually named "course files" or "my files", etc.)
  - ensure /api/v1/{context}/folders/by_path/{path} returns
    an array containing the context's root directory
    followed by the folders in the path

Change-Id: Iecf6de0aed301041f8aa55b3d13123e0c503844e
Reviewed-on: https://gerrit.instructure.com/35352
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
remove backwards compatible failed_jobs.original_id column

This was deprecated in a previous release.

closes CNVS-12828

test plan: failed jobs should still show in the UI properly and record
their original job id, including in rails3.

Change-Id: I0e8ff9af4e0d0aeb81dada3a91cad56c2b56bdac
Reviewed-on: https://gerrit.instructure.com/34359
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>
Updated tr translation
improve moodle 2 handling of missing file references

test plan:
* import the packages referenced in the ticket
* should not fail catastrophically

fixes #CNVS-13226

Change-Id: Ib66ec7c7d5eea3331349f069db6035e592ab84c4
Reviewed-on: https://gerrit.instructure.com/35448
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
DA - send flag from assignment edit page

fixes CNVS-9765

test plan:
 - turn on the Differentiated Assignments feature flag
 * from the edit page
  - add a due date for some of the sections, but not all
  - save (update assignment)
  - the only_visible_to_overrides flag on the assignment
    should be true
    (you'll need to check the assignment with the API)
  - edit the assignment again and there should not be an
    empty due date row for 'Everyone else'
  - add a due date for all the sections
  - update the assignment
  - the only_visible_to_overrides flag should be false
 * on the show page
  - edit the assignment so that there are only due dates
    for some sections but not all
  - there should not be a row in the due date area
    for 'Everyone else'

Change-Id: I1bce92c335c1af2c9ead6d963174c817d4b10cdd
Reviewed-on: https://gerrit.instructure.com/33706
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
conversations: compose dialog usability tweaks

fixes CNVS-12625, CNVS-13234

test plan:
  * open conversations

  * open the conversation search user finder
  * select a course
  * verify that a "Back" option is present

  * open the recipient finder and ctrl+click on a result
  * verify that the recipient is added but the finder stays open

  * focus the message body textarea
  * verify that enter and shift+enter both just add a line break

Change-Id: I1d7bdd3c882ead8ccb42ae0bd33d664c08847cec
Reviewed-on: https://gerrit.instructure.com/35264
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
Ember Quiz Stats - fix chart sections placement

On smaller screens, the question statistics were acting too big and so
the last section always dropped down below the other ones. This patch
makes the initial section width just a tad smaller to make more room for
friends.

Closes CNVS-13230

TEST PLAN
---- ----

  - use a 13" or smaller laptop (not sure if changing resolution works,
    i tried on 4 different resolutions/monitors, only laptop one did
    this)
  - go to ember quiz stats for a quiz with some questions
  - verify that the discrimination index and essay/formula/fileupload
    charts are on the same line as the rest

Change-Id: I298c577bb626547c56315d612ea9c9c24ea7e768
Reviewed-on: https://gerrit.instructure.com/35429
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
fix sis_batch id in course activity

fixes: CNVS-13302

Fixes the sis imports to log the sis batch correctly and to display the sis
batch on the details modal in the auditing ui.

Test Plan:

- Do a SIS import for a course.
- Open the Course Activity Audit logging and the sis batch id for the course
  should be shown in the dialog.
- If the source for an event is not SIS the sis batch field will not be shown.

Change-Id: Ib93a992dac83b2ec480d888e5d4686b808bcda8f
Reviewed-on: https://gerrit.instructure.com/35475
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
transition the polling api to the jsonapi standard

fixes CNVS-13271
this commit changes the formatting of the JSON returned by the polling
endpoints to conform to the adopted jsonapi standard. It also adds a
'created_at' field to the poll and poll_session endpoints

Test plan
- All polling endpoints should adhere to the jsonapi standard (nested
  under a collection, e.g. all returned JSON items will be contained under
  a pluralized root, polls will be under a 'polls' key, poll choices
  will be under a 'poll_choices' key, even for a single resource)

- There are no 'meta' or 'links' attributes to worry about yet

- The poll and poll_session endpoints should return a 'created_at'
  field.  This is viewable by both students and teachers

Change-Id: Ie0fd49a2c699fba5d8257ee1e8dbb062c81662cb
Reviewed-on: https://gerrit.instructure.com/35388
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
validate types on polymorphic associations

fixes ALYT-26

test plan:
	* regression test

Change-Id: Ie93e89b842e354f1f76d75f3492145b86c79a035
Reviewed-on: https://gerrit.instructure.com/34560
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
Merge pull request #454 from Unow/fix-tooltips-modules-page-footer

Tooltips bugs in module sequence footer content when they are too big
fix loading a conversation message

this was failing because it was doing
_.pluck(message.participants, 'name')
but a bunch of message.participants were undefined

I just saw this because it was not working for me
in my own canvas.
The best way I can think of to show you how this
was broken is this screenshot:
http://cl.ly/image/3E061r2F2B3W

test plan:
open new conversations inbox.
click a message,
it should load

Change-Id: I7273d92d8bd206da0b2c56fabf1951bdc46f3095
Reviewed-on: https://gerrit.instructure.com/35214
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>