fix ENV handlebars regressions, closes CNVS-10189

fix a couple regressions from g/27497

test plan:
1. go to manage groups in an account or a large roster course
2. you should be able to add users to a group (via "+" icon)
3. the popup should say "Students" if you are in a course

Change-Id: I422305ce7675050e52f8779c3efebb10ef13d70a
Reviewed-on: https://gerrit.instructure.com/27932
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
remove canvas- from production scribd_user

closes CNVS-10190

test plan
 - in production upload a scribdable doc
 - doc should render

Change-Id: I1e6ed767fe9359250e2966bcee34c99ec1548495
Reviewed-on: https://gerrit.instructure.com/27939
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
show uncategorized account groups, fixes CNVS-10188, refs CNVS-1482

when you import groups into an account vis SIS, they are not linked to any
group set. this commit puts them in a new "Uncategorized" tab so you can
still see them and navigate to their home pages. previously you could see
them in the now-retired right sidebar.

note that there is no "Uncategorized" set in the db; we simply display a
synthetic group set that is essentially read-only.

also note that this doesn't apply to course groups, because 1. you can't
SIS import them and 2. canvas won't let you create a course group without
a group set.

test plan:
1.  do a SIS of import of some groups. for bonus points, import some users
    into those groups
2.  go to the manage groups page for the account
3.  you should see an "Uncategorized" tab at the end (always comes last)
4.  click it
5.  you should see a note explaining what these are
6.  you should not be able to delete or edit the group set
7.  you should not be able to add/edit/delete groups in the set
8.  you should be able to see the users in the groups (if any)
9.  you should not be able to reassign users (via menu or drag-and-drop)
    in the group set
10. you should be able to navigate to a given group's home page (via cog)
11. you should be able to filter groups via the search box
12. accounts without Uncategorized group sets should not have an
    Uncategorized tab
13. all other group sets (and their contents) should behave normally in
    this account and in any other course/account (general regression test)

Change-Id: Id0fa8e547bc9274a685c89d70b0cbb54ef3a01d0
Reviewed-on: https://gerrit.instructure.com/27933
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>

Conflicts:
	app/coffeescripts/views/groups/manage/GroupUsersView.coffee
fix creating topics via modules with draft state off

test plan:
 - with draft state off,
   - a discussion topic created via add-module-item should remain
     in the module item list after a page reload
 - with draft state on,
   - a discussion topic created via add-module-item should be
     initially unpublished

fixes CNVS-10192

Change-Id: I3504a594f0f71810ac933ae66264f54e63691e1e
Reviewed-on: https://gerrit.instructure.com/27972
Reviewed-by: Mark Severson <markse@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
fix editing questions when there are more than 25 questions

test plan:
  - As a teacher, create a quiz with more than 25 questions.
  - Refresh the edit page and click on the "Questions" tab.
  - You should be able to edit quiz questions at the end of the list
    (e.g. questions after question #25).

fixes CNVS-10212

Change-Id: I9045f91f527d31048ce3da24fa91b36c9e79a4de
Reviewed-on: https://gerrit.instructure.com/27967
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
make unhiding feature flags require only membership on site admin

creating feature flags _on_ site admin still requires a
full-fledged site administrator, but creating feature flags
for hidden features on root accounts only requires a site
membership (and permissions on the root account, of course).

test plan:
 - a user with a non-admin account membership on site admin:
   * should be able to see hidden features on site admin and
     root accounts
   * should not be able to set feature flags on site admin
   * should be able to enable hidden features on root accounts
     (provided their site membership or root account membership
     gives them this ability)

fixes CNVS-10205

Change-Id: I4463dd6e60b06b7428143412e902b9e0fa895f04
Reviewed-on: https://gerrit.instructure.com/27959
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
fix for grade_change grader being nil or auto graded

The fix changes the grade change auditing so it will not create an index record
for autograded or nil grader events.

Note: Added a check for the event stream failure to raise the exceptions in the
test environment.  This can be overridden using the class as well.  This will
allow the failure spec to run as expected.

Test Plan:
  - Create a quiz.
  - Autograde the quiz for a student.
  - Check the grade change logs and they should exist.
  - No errors should be in the log table for the event stream

Change-Id: I682ab483950e123dc5522649df6ad43d6ff5a553
Reviewed-on: https://gerrit.instructure.com/27977
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clare Strong <clare@instructure.com>
api: restore docs for creating a submission

fixes CNVS-10241

test plan:
- generate the api docs and go to /doc/api/submissions.html
- there should be docs for creatint a submission

Change-Id: I734127c194a10c2e33af3923e541c994f328216c
Reviewed-on: https://gerrit.instructure.com/28017
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
conversations: fix recipient search pagination

fixes CNVS-10209

test plan:
  * open old conversations
  * in the recipient search, select a course with more than ten people
  * scroll to the bottom
  * confirm that all of the people in the course are present

Regression appears to have been introduced in
https://gerrit.instructure.com/26489 .

Change-Id: Ie2bb7cf3d6c348ae753fc245d719dfb081948ea2
Reviewed-on: https://gerrit.instructure.com/28016
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
use base 36 values of context ids for scribd_user

this will allow for 46k shards and 60 million
documents per context type and remain under 10
digits for scribd. scribd_user format is
first_letter or context_type, shard_id in hex,
'-', and context_id in base 36.
Submission 21438841 on Shard 13456 = "sads-cribd"

fixes CNVS-10238

test plan
 - in production create upload a scribdable document
 - document should render

Change-Id: Iab226c25835e6779928464a0ea0ac4b91c9cc6a2
Reviewed-on: https://gerrit.instructure.com/28057
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
treesame commit of origin/stable/2013-12-28

Treesame-Commit-Id: affc634823495fef926d587e53229666611a0597