allow undelete-ing with draft state enabled

fixes CNVS-11856

test plan
- in a course with draft state enabled
- delete an assignment with submissions
- navigate to /course/:id/undelete
- restore the deleted item
- refresh page; verify item is not listed
- navigate to assignments index; verify item is not listed
- repeat for assignment without submissions

Change-Id: I4e1cf09ad8172de30aea137e69c8c9ed6770041e
Reviewed-on: https://gerrit.instructure.com/32202
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Liz Abinante <labinante@instructure.com>
fix url for undeleting quizzes

also fix undeleting practice quizzes

fixes CNVS-11955

test plan:
- in a course, delete a quiz
- go to /courses/:id/undelete
- click the button to undelete the quiz
- it should work

- quick regression on undeleting quizzes/discussion_topics both linked and not
  linked to assignments

Change-Id: I88d30d1baa5685e6c4f16280c9aa34c8965b31fe
Reviewed-on: https://gerrit.instructure.com/32217
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
conversations: remove broken "discussion replies" link

fixes CNVS-11987

test plan:
  * open old conversations
  * open the view dropdown
  * verify that it does not include the "discussion replies" link

Change-Id: Iaeeaa94a62a978a4d30af251c06b51d7855ed246
Reviewed-on: https://gerrit.instructure.com/32278
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
fix namespace issue with attachment relationship on quiz submissions

fixes CNVS-11986, CNVS-11672

test plan:

the problem on this one comes up when we are trying to view an attachment that
was created before the namespace change. So we have to massage the data in the
console to reproduce what's going on here, or test it with data that was created
before the namespace changes.

- as a teacher
  - create a quiz with a file upload question type

- as a student
  - take the quiz and upload the file

- in the console
  Attachment.update_all("context_type='QuizSubmission'", "context_type='Quizzes::QuizSubmission'")

- as a teacher
  - visit the moderate page for this student's quiz, and the attachment link
    should be visible to download the file.

Change-Id: I329bb422770e0d22fa33be189c0229298c12f759
Reviewed-on: https://gerrit.instructure.com/32319
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Clare Strong <clare@instructure.com>
fix Content-type for turnitin post requests

fixes CNVS-12011

test plan:
- submit a document to turnitin
- it should successfully receive a turnitin score

Change-Id: I4b4459e134ae8897896ed4a6200917d7fed1d45f
Reviewed-on: https://gerrit.instructure.com/32344
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
Merge tag 'release/2014-03-22.21' into edge

canvas release release/2014-03-22.21