fix gb2 for multiple student view students

fixes CNVS-9889

Test plan:
  * make a course with a student view student
  * delete the student view student
  * make another student view student
  * bring back the original student view student (now you have 2)
  * load gb2
  * the student view students should both be displayed at the bottom
    (no matter how you sort the gradebook)

Change-Id: Id53cbe11923440ed0fedd1f965424c647a5a6f96
Reviewed-on: https://gerrit.instructure.com/27172
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Clare Strong <clare@instructure.com>
fix migration issue for populating duedatecacher

Since temp tables are cleared in data fixups the temp table for the update is
being cleared and throwing errors during migration to beta.

Change-Id: I780f0341c504b5bc45c78331c3065000e35891cd
Reviewed-on: https://gerrit.instructure.com/27169
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QuizQuestion::AnswerParser refactor and clean up

fixes
CNVS-8975,CNVS-8976,CNVS-8974,CNVS-8973,CNVS-8971,CNVS-8972,CNVS-8970,CNVS-8965,CNVS-8966,CNVS-8967,CNVS-8968,CNVS-8969

this commit addresses each of the answer format tickets, with minor
refactoring and cleanup.

Test Plan
Make sure all questions can be created and edited normally.

Change-Id: I65fc184b2ea9bb5cc76e4167bd57031be1f4e3ce
Reviewed-on: https://gerrit.instructure.com/27122
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
validate quiz score is numeric with a reasonable value when creating a graded survey

fixes CNVS-3637, CNVS-1421

test plan:
- as a teacher
  - create a new graded survey
  - setting score to a valid number should save
  - setting score to a string should give a validation error
  - setting score to a number > 2,000,000,000 should give a validation error
  - setting score to a number < 0 should give a validation error
  - the validation errors should show up after you change the value and move to the next field
  - the validation errors should also show up if you attempt to save the quiz

- as a student
  - take the graded survey and make sure that you can successfully complete the survey

Change-Id: Idea8732169ded62569483c2c872e928a05f86ef0
Reviewed-on: https://gerrit.instructure.com/27119
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
TinyMCE: prevent keyboard trap after switching to the HTML edit view

When a keyboard user presses enter to switch to the HTML edit view, their focus
is now set to the textarea field. It also prevents the HTML editor field from being hidden from screen reader users

fixes CNVS-6534

Test plan:
- Visit all WYSIWYG editors that offer a link for switching to an HTML edit
  view, such as the editors available on:
  - EPortfolio
  - course wikis
  - Quiz/assignment editors and submission pages
  - discussion topics
  - etc.
- Navigate to the switch view link with the keyboard.
- With the WYSIWYG editor active, press enter on that link.
- Verify that focus is placed in the HTML editor textarea.
- Verify that focus can still be changed by use of the keyboard, such as with
  the tab and shift-tab keys.
- Verify that the textarea in the HTML editor is not hidden for screen reader users.
- Because this change was not able to be made in one single location, verify
  that all WYSIWYG editors that offer the HTML edit option exhibit the above
  behaviors.

Change-Id: Ibe0793457fbc0381f24fca9399c2a79a4a79ff74
Reviewed-on: https://gerrit.instructure.com/26477
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Tested-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
add new profile modal layout

fixes CNVS-9756

test plan:
  * navigate to user profile settings page;
  * click their avatar and verify that the modal is empty
    but for navigation pills at the top that can be
    selected.

Change-Id: I6737fb25a4de644e3e2db99ebc4d5b8436e915cb
Reviewed-on: https://gerrit.instructure.com/26843
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
discussion draft state backend

fixes CNVS-9263

test plan
be sure to test ungraded discussions, graded discussions, graded
group discussions (root level and group topics), and announcements

with draft state disabled
- ensure publish icons do not appear on discussion index page
- ensure publish button does not appear on discussion show page
- ensure that discussions for delayed posting are not visible to
 students

with draft state enabled
- ensure that publish icons appear on the discussion index page and
 that clicking them toggles the discussion's publish state
- ensure that publish button appears on the discussion show page
 and that clicking it toggles the discusssion's publish state
- ensure that unpublished topics are not visible to students
- ensure that published topics are visible to students, even if
 the topic is for delayed posting
- ensure that topics for delayed posting show a 'This topic will
 open on' message on the topic show page
- ensure that [un]publishing the root topic of a graded group
 discussion changes the group level discussion and vice versa
- ensure that announcements are published when posted and cannot
 be unpublished

test plan for misc frontend fixes
- as a teacher, create a new discussion
- ensure it is unpublished
- as a student, create a new discussion
- ensure that it is published and that no publish button appears
 on the topic show page or the topic index page

- as a teacher, create a new graded group discussion
- navigate to the group level topic
- publish the topic using the button on the show page
- ensure that the button switches to the 'Published' state

- as a teacher, create an announcement
- ensure that it is published

Change-Id: If0c46d232bc25776770012654af23e5cf10bbb45
Reviewed-on: https://gerrit.instructure.com/26654
QA-Review: Joel Hough <joel@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Clare Strong <clare@instructure.com>
validate the length of sis ids on the rails side

fixes CNVS-9902

test plan
 - set sis id to longer than 255 char
 - should not throw database error

Change-Id: If72466dc91c1ef48ac91b5e9d7a92bea62c88c50
Reviewed-on: https://gerrit.instructure.com/27164
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Add optional parent coenrolment banner on /login page

fixes CNVS-9350

test plan:
1. Enable the parent coenrolment banner through script/console with:
    a = Account.default;
    a.settings[:self_registration] = true;
    a.settings[:self_registration_type] = 'observer'
    a.save;
2. Verify that /login shows "click here for a parent account" banner.
3. Click that banner.
4. Verify that clicking "Start Participating" without filling out the
   form pops up all of the "Required field" error messages.
5. Verify that submitting bad info (e.g. an email address without an @
   sign) pops up appropriate error messages as well.
6. Enter good info (using a student account you previously registered)
   and verify that you get the the /?registration_success=1 page.

Change-Id: I9920f8599beafee584d574f4f6748d8a298a8bd2
Reviewed-on: https://gerrit.instructure.com/26680
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jon Jensen <jon@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
spec: clean up core specs - accessibility specs

Change-Id: I0f0d8670c1b48066e2300aeb8a972202eacb5d0f
Reviewed-on: https://gerrit.instructure.com/27211
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <kyler@instructure.com>
QA-Review: Kyle Rosenbaum <kyler@instructure.com>
Product-Review: Kyle Rosenbaum <kyler@instructure.com>
show teachers and students when assignment submission is 'on paper'

fixes CNVS-7992

test plan:
- create an 'on paper' assignment
- teachers should see "Submitting on paper" on the show page
- students should also

Change-Id: I053ab79a73a81e4037f8039e7ffcc74f36facff4
Reviewed-on: https://gerrit.instructure.com/27132
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
remove unsupported PageView migration

redis queue for page views is no longer supported

Change-Id: I14caed9548d064016f3fdae0b5e8a0d74b28d68e
Reviewed-on: https://gerrit.instructure.com/27220
Reviewed-by: Anthus Williams <awilliams@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
hide zero pt quizzes points in quiz index

closes CNVS-9793

test plan:
  - be sure to test with and without fabulous quizzes enabled
    - create a quiz without creating any questions
    - return to quiz index
      - quiz should not display anything for points possible
    - create a quiz with one or more questions (total of 0 pts possible)
    - return to quiz index
      - quiz should not display anything for points possible
    - create a quiz with questions and some points possible
    - return to quiz index
      - quiz should displays points possible

Change-Id: I3fb90bd678c4ebafa5c23dde663592fd72b18cd1
Reviewed-on: https://gerrit.instructure.com/27189
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Jason Madsen <jmadsen@instructure.com>
replace original_id attr_accessor with previous_id

in preparation for rails 3

Change-Id: I048e4f8db97dacf64616ad52ec075516b55f3c0f
Reviewed-on: https://gerrit.instructure.com/26966
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>
use controller method instead of @controller

in preparation for rails 3

Change-Id: Ib752c02b8eb63093648843dca696f17fcc7f62ef
Reviewed-on: https://gerrit.instructure.com/26976
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>
don't wrap invalid fields in a fieldWithErrors div, fixes CNVS-9761

we don't need this default rails behavior anywhere, and it can be used to
harvest usernames on the login page (i.e. a valid vs. invalid usernames
will result in a fieldWithErrors in a different place)

test plan:
1. go to the login page
2. submit a valid username and an invalid password
3. in the js console, $('.fieldWithErrors'), should return []
4. submit an invalid username and any password
5. in the js console, $('.fieldWithErrors'), should return []

Change-Id: Ie434d0e6af70319469625694c060ebd15cf9f67f
Reviewed-on: https://gerrit.instructure.com/27107
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
remove duplicate submitted_at from documentation

test plan
 - docs should generate 

Change-Id: I515e56367b4e5faf8b0b9196651fe0179236d4df
Reviewed-on: https://gerrit.instructure.com/27239
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Modified the link in facebook/twitter templates as well.
Updated ja translation
fix canvas_connect meeting archive xml parsing

Change-Id: I824d723c5325fa2f97e0d1ce564d9e22f4e3b6f7
Reviewed-on: https://gerrit.instructure.com/27099
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>