Commit Graph

11541 Commits

Author SHA1 Message Date
Jeremy Neander 826f435b36 exclude empty weighted grading periods from current course score
fixes CNVS-36163

test plan:
  A. select or create
    1. an account
    2. a course for the account
    3. an enrollment term for the course
    4. a grading period set for the enrollment term
      a. with grading period weighting enabled
      b. with a grading period 'GP1'
        * with a weight of 50%
      c. with a grading period 'GP2'
        * with a weight of 50%
    5. a teacher for the course
    6. a student enrolled in the course
    7. an assignment group 'AG1'
      a. with a weight of 60
      b. with an assignment 'A1'
        i.  due in GP1
        ii. worth 10 points
      c. with an assignment 'A2'
        i.  due in GP1
        ii. worth 10 points

  B. set scores
    1. score A1 with 5 points
    2. score A2 with 10 points

  C. verify calculations
    1. visit Gradebook
    2. select "All Grading Periods"
    3. disable "Trade ungraded as 0"
    4. confirm course grade is 75%
    5. enable "Trade ungraded as 0"
    6. confirm course grade is 37.5%

Change-Id: Ibe2e340222b00899d51f3ca9d4f7232ced1e0891
Reviewed-on: https://gerrit.instructure.com/107873
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-04-11 00:56:04 +00:00
MFairbourn e503422562 spec: skip context_modules_spec.rb:143 in chrome
Test Plan:
- Code Review
- Pass Jenkins / chrome

Change-Id: I08571a2614a57d9c79124f8eafd79dc6f500b88d
Reviewed-on: https://gerrit.instructure.com/108125
Tested-by: Jenkins
Reviewed-by: Pedro Fajardo <pfajardo@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2017-04-10 23:02:45 +00:00
MFairbourn 66c1f72744 spec: fix calendar2 striketrhough specs in chrome
Test Plan:
- Code Review
- Pass Jenkins

Change-Id: Icbed532969b61f4aef7694c47f65aa4dd186fc49
Reviewed-on: https://gerrit.instructure.com/107994
Tested-by: Jenkins
Reviewed-by: Pedro Fajardo <pfajardo@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2017-04-10 15:58:06 +00:00
Felix Milea-Ciobanu 5a9b1f321d move blueprint course associations into blueprint sidebar
fixes MC-146

test plan:
- navigate to any page of a blueprint course
- open the blueprint course sidebar
- note that the text "Associations" and the number of associations
  for the master course appears in the sidebar
- click on the blue "Associations" text
- a full screen modal appears displaying the associations settings
  which was previously on its own page
- note that the associations settings work as expected (no
  functionality changes since it was on its own page)
- note that the save button works properly
- note that the close button and the modal X button close the
  associations and also clear any unsaved changes when the modal is
  reopened
- note that if you change the number of associations in the modal and
  save, the associations count in the sidebar is updated when you
  close the modal

Change-Id: I64b7f6e18a73ed2cdb5fcb11f8e0827e3d2038ce
Reviewed-on: https://gerrit.instructure.com/107644
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
2017-04-08 01:06:34 +00:00
Felix Milea-Ciobanu 0d7898fe11 setup blueprint course sidebar
refs MC-145

test plan:
- navigate to a blueprint course
- note the blue line / bar and button on the right side
- click the button
- a tray sidebar should open from the right side of the screen
- click the close button on the tray
- note that the tray closes
- note that the sidebar shows up on every page in a blueprint course
- note that the sidebar does not show up in non-blueprint course pages
  or any other pages throughout canvas

Change-Id: I4dcadb82e32bf2af01b25ed3b6167ecffc594dd8
Reviewed-on: https://gerrit.instructure.com/107373
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Jenkins
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
2017-04-08 01:06:19 +00:00
Mysti Sadler 62c2cb5dfc Fix link for offline export notifications
fixes OFFW-193

Test plan
- Ensure you have a user with a confirmed communication channel
- Export an offline web export and check notification either in
  /user/:id/messages or by email notification and verify
  the link shows correctly.
- Check epub exports and content exports to verify same
- Break the local set up for web zip in offline_web.yml
  and verify failure notifications show WebZipExport instead
  of ContentExport in the notification

Change-Id: I699e9f3d30dc60b31e94436f18d78e12d477c4c1
Reviewed-on: https://gerrit.instructure.com/107583
Tested-by: Jenkins
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
2017-04-07 21:25:53 +00:00
Cody Cutrer 327e0d7900 move object caching into ConfigFile itself
refs CNVS-36051

we often want to cache an object built from the config we got, so
move that up so we don't keep repeating ourselves

Change-Id: I9c58993b6142cec41f4514dcb1a74dd5d5582234
Reviewed-on: https://gerrit.instructure.com/107166
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-04-07 19:43:54 +00:00
Tyler Pickett f0214f0923 Switch to Imperium gem and update Consul container.
Also, make Consul container accessible from the host.

Fixes: CNVS-35831
Refs: CNVS-34341, CNVS-32864

Test Plan:
- Smoke test RCS and Canvas running together to make sure they still
  play nice.

Change-Id: I418d54a176677b1df8ec42a009752807908a847c
Reviewed-on: https://gerrit.instructure.com/99443
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
2017-04-07 16:59:01 +00:00
James Williams 8356ddfb46 don't double-send submission notifications to teachers
test plan:
* have a teacher with a confirmed communication channel and
 "All submissions" notifications set to send immediately
* submit to an assignment as a student
* the teacher's messages (/users/X/messages) should only
 show one "Assignment Submitted" notification

closes #CNVS-36129

Change-Id: I0f72d64c0fd54e1fd02fd8e599e168773cc5d7c6
Reviewed-on: https://gerrit.instructure.com/107694
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2017-04-07 16:12:06 +00:00
Felix Milea-Ciobanu 1dadf133c5 upgrade course user search page to react 15
fixes CNVS-34306

test plan:
- enable the feature flag for the new course user search page
- checkout the page and all functionality and ensure nothing is broken

Change-Id: Id0d5f878e6d47da93310a30a937d8cff53eca54a
Reviewed-on: https://gerrit.instructure.com/106876
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
2017-04-07 15:49:31 +00:00
Jon Jensen cb53fc0b26 Revert "spec: Fixing Gradezilla specs that failed due to recent InstUI changes"
This can't be merged before https://gerrit.instructure.com/107305/ ...
really it should probably just be part of that commit

This reverts commit 937de4890c.

Change-Id: I35be80e2075c61c1d52feb2cc93e01d4b592337f
Reviewed-on: https://gerrit.instructure.com/107803
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-06 22:15:17 +00:00
Anju Reddy 937de4890c spec: Fixing Gradezilla specs that failed due to recent InstUI changes
Change-Id: Icfbca3ac6d26327931fd1ae441e1153c493c9729
Reviewed-on: https://gerrit.instructure.com/107670
Tested-by: Jenkins
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
QA-Review: Neil Gupta <ngupta@instructure.com>
2017-04-06 20:52:55 +00:00
Keith Garner 93f14c9e08 fix course section recompute final score to not use singleton
Update CourseSection#move_to_course to not use the recompute singleton
as that is intended for a single student and a course section is
likely multiple users. Also, raise an exception in
Enrollment#recompute_final_score_in_singleton if its called with more
than one user.

fixes CNVS-36089

test plan:
 - Have two courses. In the first course have a section with at least
   60 students.
 - Move the section to the second course.
 - In development mode, inspect the development.log to make sure that
   course.recompute_final_score was called with no errors by finding
   the log message that starts with "GRADES: recomputing scores in"

Change-Id: Id135e4ddc387d8faa513e2759b5e4399f9824275
Reviewed-on: https://gerrit.instructure.com/107322
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Tested-by: Jenkins
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-04-06 20:51:25 +00:00
Jon Jensen 072c71a90b spec: tweak rerun formatting slightly, refs SD-2357
include the line number of the not-rerunnable spec for easier tracking in
janky

test plan:
see intentional failures and rerun behavior in patchset 2

Change-Id: I3c381f94c71dc082a83f0f025794dc135b0336b4
Reviewed-on: https://gerrit.instructure.com/107760
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-04-06 19:40:01 +00:00
Jayce Higgins 0815a0b47d Fix another brittle spec in live_events_spec
Change-Id: Ibb4f2d31d6d3fa322561891864c5931dd4909844
Reviewed-on: https://gerrit.instructure.com/107756
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
2017-04-06 19:09:10 +00:00
Spencer Olson 5bdbeadd1a show current grading period grade on page load when observing
closes CNVS-36100

test plan:
1. Create a grading period for a term that is currently active (its
   start date should be before today and its end date should be after
   today).
2. On the grading period set, check the box next to 'Show totals for
   "All Grading Periods" option' and save.
3. Create a course in that term.
4. Create an assignment worth 10 points due in the grading period and
   grade a student 5/10.
5. Create an assignment worth 10 points due after the grading period
   ends and grade a student 10/10.
6. As a user that is observing the student that was graded in steps
   3-4, access the global grades page from the dashboard. To access
   the global grades page, the user will need to be observing a
   different student in another course, as well.
7. Verify the current grading period is selected in the dropdown on
   page load.
8. Verify the student grade is shown as 50%.
9. Select 'All Grading Periods' from the dropdown. Verify the student
   grade is shown as 75%.

Change-Id: I4edc62d67f0e6aa898330e1bd7f57842cdacea42
Reviewed-on: https://gerrit.instructure.com/107458
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-04-06 18:51:36 +00:00
Jayce Higgins 0e92e33ea6 Fix brittle spec for live events
No test plan or ticket

Change-Id: I0768709c22f5c8c63d48add246b1a1de37a30d74
Reviewed-on: https://gerrit.instructure.com/107736
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-06 18:35:06 +00:00
Ed Schiebel 4930907263 Update tutorial trays with images
Fixes: FALCOR-176

Test Plan:
- Turn on the New User Tutorial feature for your
  institution
- In a course, confirm that the following pages' tutorial trays
  have images:
  - Announcements
  - Assignments
  - Collaborations
  - Conferences
  - Discussions
  - Files
  - Grades
  - Import
  - Modules
  - Pages
  - People
  - Quizzes
  - Settings
  - Syllabus

- Confirm the images look ok in every supported browser

Change-Id: I5035f6bc88d8ed4557e1e76c7707aba69a40e3f7
Reviewed-on: https://gerrit.instructure.com/106002
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2017-04-06 17:28:20 +00:00
James Williams 5088465370 remove some dead code and stuff
Change-Id: I9d918d0faa37185b29c656315f07de044fe9c9a1
Reviewed-on: https://gerrit.instructure.com/106126
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-04-06 17:15:13 +00:00
Jayce Higgins 04d1801679 Fixup content_export_complete LiveEvent metadata/body
Fixes: QUIZ-1478

Move the context_type/id to the attributes
Tack on amended_context to the payload

Test-Plan:
  o With live events set up for local testing
    - Assert that the quiz_export_complete event looks right
      - It should contain uuid/root_account_id/and everything else
        in the attributes
      - It should not contain context_type/id in the body

Change-Id: I15387ce81f6d0ed8a7c72831d08b34c1bc40221e
Reviewed-on: https://gerrit.instructure.com/106811
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Dariusz Dzien <ddzien@instructure.com>
Product-Review: Jayce Higgins <jhiggins@instructure.com>
2017-04-06 16:40:30 +00:00
Pam Hiett 925d14d71d fix theming colors on logout button
Fixes: CNVS-35812

test plan:
- as a user that is logged into local canvas
- navigate to localcanvas address /logout and you will see a screen
  that asks if you "really want to logout" the logout button
  should now match the ghost version of the login button

Change-Id: Id7bbbebb08d458bc0542138ba1b8dfd896062bbf
Reviewed-on: https://gerrit.instructure.com/106976
Tested-by: Jenkins
Reviewed-by: Stephen Jensen <sejensen@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
2017-04-06 15:57:17 +00:00
James Williams 661e5ac878 allow admins to view external tool launch definitions
even without lti add/edit rights

test plan:
* have a teacher in a course with the permission
 to "Add/Edit LTI" disabled
* they should still be able to add an external tool
 module item or external tool assignment using an
 existing external tool

closes #CNVS-36068

Change-Id: Ieb3a00728abe064ff9ec74e69e3eae60344c19eb
Reviewed-on: https://gerrit.instructure.com/107569
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Ian Hoerner <ian@instructure.com>
2017-04-05 21:59:59 +00:00
Rob Orton b0466ad816 set filename in copy_attachment_content
refs CNVS-36131

test plan
 - attachment filenames should be set correctly
   in copy_attachment_content

Change-Id: I51e43608b19c5e83271ada236fee2bc6468f933e
Reviewed-on: https://gerrit.instructure.com/107540
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2017-04-05 21:27:39 +00:00
Rob Orton df3ccd87b5 don’t set filename on children attachments on clone
fixes CNVS-36131
refs CNVS-36096

test plan
 - have an attachment `a = Attachment.find id`
 - `a.clone_for(Course.find course_id)`
 - a.filename should be nil

Change-Id: I00646a4236ded7970a4cebb8811054c87fad7d2c
Reviewed-on: https://gerrit.instructure.com/107539
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2017-04-05 21:27:26 +00:00
Brent Burgoyne 4dc372940c handle equation and links plugin via event for rcs
this matches the pattern for other tinymce plugins not migrated to
the rcs. these plugins require jquery-ui and distributing it with the
module causes conflicts in canvas. they will be rewritten with react
when they are brought back in the the module.

refs CNVS-36075

test plan:
- the link and equation plugins for tinymce work the same as before
- test without rcs enabled as it is currently distributing its own
  version of these plugins

Change-Id: Iea86e7c82c06efa6984e815cf86c89478a6ed12a
Reviewed-on: https://gerrit.instructure.com/107337
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
Tested-by: Jenkins
2017-04-05 21:10:40 +00:00
James Williams 2452b580b5 remove duplicated code for resending sms confirmation
turns out it was hitting the endpoint twice
(other one via communication_channels.js)

test plan:
* have an unconfirmed sms communication channel
* click on the address and press "Re-send Confirmation Code"
* it should not send two messages in "/messages"

closes #CNVS-35966

Change-Id: Iff5150664534025e04192c0502542b1f572a3af4
Reviewed-on: https://gerrit.instructure.com/107452
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2017-04-05 19:07:20 +00:00
James Williams d940acf44a prefer section conclusion date on courses index
test plan:
* have a user in a course in a course section
 that ends in the past
* it should show up in the past enrollments
 for the courses index

closes #CNVS-36107

Change-Id: I4fb8637605a98f0fcdf62129cf84359d70a505fb
Reviewed-on: https://gerrit.instructure.com/107459
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Chris Ward <cward@instructure.com>
2017-04-05 17:13:21 +00:00
James Williams deecb1ee18 include assignments for graded objects in external export
closes #CNVS-35995

Change-Id: Icdea27f8ea3b3ad09393bfdbe5ba369e529e8a2d
Reviewed-on: https://gerrit.instructure.com/107034
Tested-by: Jenkins
Reviewed-by: Christian Prescott <cprescott@instructure.com>
QA-Review: Leo Abner <rabner@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2017-04-05 16:17:36 +00:00
Jayce Higgins f0f0e7f5ec Add producer to Live Event metadata
Fixes: PLAT-2371

Test-Plan:
 - spinup local live-event testing services
  - test out live-event spawning processes
    -- check live event docs for triggers of events
  - assert that the kinesis stream contains events with attributes
    containing `producer: 'canvas'`

Change-Id: I68789294005d60dc873a4316b60ff1a93a4e9b94
Reviewed-on: https://gerrit.instructure.com/105622
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Jayce Higgins <jhiggins@instructure.com>
2017-04-05 15:31:26 +00:00
Jon Jensen 99938e6e09 don't import :allthethings: instructure-*, fixes SD-2345
import just the particular instructure-ui / instructure-icon modules we
need, so that we don't get everything in the webpack bundle. also tweak
webpack config so people can't make this mistake again.

67d7ec7197 caused several bundles to balloon in size by a couple MB. this
gets us back down to sane levels (and many bundles are now smaller)

test plan:
specs? ¯\_(ツ)_/¯

Change-Id: I92b859063f56c672b85ec63f5c61ffd17735ced4
Reviewed-on: https://gerrit.instructure.com/107504
Tested-by: Jenkins
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-05 13:45:13 +00:00
Shahbaz Javeed a3564f6f17 removed redundant GradeDisplayWarningDialog and refactored to ES6
refs CNVS-34243

test plan:
* Ensure specs pass
* Create a course with 2 assignments and 2 students
* Enter grades for :allthethings:
* Go to original gradebook (not Gradezilla)

* Open the Total column's options.  You should see
  a menu item that says "Display as Percentage"
* Click on this.  You should see a dialog warning
  you that students will see final grades in the
  format you choose.
* Click continue and notice that the Total column
  now shows the final grade as a percentage
* Click on the Total column's options again and
  you should see the menu item changed to say
  "Display as Points"
* Click this and you should see the warning dialog
  again.
* Check the box that says "Don't warn me again"
* Click continue and notice that the Total column
  now shows the final grade as points
* Try switching to percentage one more time and
  notice that the warning dialog is not shown any
  more

Change-Id: Ice4dae05c093e6ba2689b923164a7f0f3d4af173
Reviewed-on: https://gerrit.instructure.com/107450
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Tested-by: Jenkins
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-04-05 00:38:42 +00:00
Brian Park 7661b83afb add enrollment filters to gradezilla student column header
closes: CNVS-32363

Test Plan:
1. As teacher/admin navigate to gradezilla
2. Expand student column header menu
  - Observe 'Show' menu item group is present
  - Observe 'inactive' and 'concluded' menu items are present
3. Toggle a menu item
  - Observe that the page reloads
  - Observe that upon reload, the toggled item state is applied
  - Observe that upon reload, the student rows are filtered as
     appropriate for the filter settings
* Changing Gradezilla so that page reloads aren't necessary
  is not performed in this changeset
4. Expand settings cog menu
  - Observe enrollment option items are gone

Change-Id: If308a255ba12ec71c0b6e9c1a5d6c17c8587a229
Reviewed-on: https://gerrit.instructure.com/105219
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
2017-04-04 22:10:22 +00:00
Cody Cutrer f1c14aa9b3 log which keys SAML IdPs are using for encryption
fixes CNVS-35852

test plan:
 * configure SAML for an account with an IdP that encrypts assertions.
   you'll probably need to generate a self-signed cert, and reference
   it from saml.yml
 * do a login with that IdP; check the logs to ensure it lists which
   key was used (by path)

Change-Id: I1cd02db38336713590d5e3211f0dd1e4187d1459
Reviewed-on: https://gerrit.instructure.com/106471
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2017-04-04 20:07:12 +00:00
Brian Park 040f576084 use account settings for 'login id' secondary info label
closes: CNVS-35936

Test Plan:
1. Navigate to account settings and update 'Login Label'
2. Navigate to gradezilla and expand student column header
 - Observe that 'Login ID' is replaced with settings value
3. Update 'Login Label' to be empty string and reload gradezilla
 - Observe that 'Login ID' label is restored

Change-Id: I744a3f87bfde9ca5bb534cb02d18acae7d0369f4
Reviewed-on: https://gerrit.instructure.com/105548
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Christi Wruck
2017-04-04 18:30:13 +00:00
Jon Jensen be84615841 bump simplecov, fixes SD-2056
test plan:
see coverage in previous rspec/selenium builds, same numbers as before

Change-Id: I331bf5102914da00a5d350f32b74b4bc9d49c5f8
Reviewed-on: https://gerrit.instructure.com/106895
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-04-04 18:06:25 +00:00
Felix Milea-Ciobanu 67d7ec7197 refactor blueprint course code for eslint / es6 imports
test plan:
- tests still pass

Change-Id: I9d0df26d53ef2840b2ad09af779b264da009db5f
Reviewed-on: https://gerrit.instructure.com/107374
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
QA-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
2017-04-04 15:53:43 +00:00
Dan Minkevitch 4673974d7f Allow students to see past enrollments even if past viewing is restricted
Fixes CNVS-36064

Test Plan:
* In the settings of a course in an active term,
  set the course end date in the past
* In the course settings page:
    * Disable "Users can only participate in the course between these dates"
    * Disable "Restrict students from viewing course after end date"
* As an active student in the course view the course list
* It should show up under "Past Enrollments"

Change-Id: I5323e348d085cda96ba754420128de49df75e9c4
Reviewed-on: https://gerrit.instructure.com/107237
Tested-by: Jenkins
QA-Review: David Tan <dtan@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Chris Ward <cward@instructure.com>
2017-04-04 15:51:31 +00:00
Felix Milea-Ciobanu 876e6a8e33 implement blueprint lock manager to load lock UI into item pages
refs MC-127

test plan:
- ensure you have a master course with one of each items (discussion,
  assignment, quiz, page), that has an associated course that it's
  synced up with
- as a valid admin of the master course:
  - on the show pages of each of the items, check the following:
    - there is a button next to the published button that toggles the
      item from locked to unlocked
    - the text + icon of the button changes back and forth when you
      toggle it
    - set the state to locked
    - when the state is locked, a banner shows at the top listing the
      attributes that are locked for that item
      (example: "Locked: Content & Points")
    - leave the state to locked for all items
  - on the edit pages of each of the four items, after locking them
    from the show page, the same banner should be present stating the
    attributes that are locked for that item (same banner as before)
- make sure to sync the locks with the child course
- as a valid teacher of the child course:
  - on the show pages of each of the items, check the following:
    - there is a transparent locked button that cannot be clicked
    - if the item is locked, the exact same banner describing what
      attributes are locked should be present at the top
  - on the edit pages of the same four items, all locked items should
    have the same banner describing what is locked

Change-Id: Ifa96ab98b24b8eb2b0d3e8ccf898df020a3c01e3
Reviewed-on: https://gerrit.instructure.com/105371
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Kendall Chadwick <kchadwick@instructure.com>
2017-04-04 14:11:53 +00:00
Shahbaz Javeed c2e56e4a2c moderate grades now uses a table instead of divs and spans
closes CNVS-35390

test plan:
* Create a course with a at least two students and two teachers
* Create an assignment for this course which is moderated
* Go to the moderation page and verify the layout looks the same
  as before
* Verify that navigation using the keyboard allows you to
  properly identify the row and column heading for any cell
* Add a second reviewer to the assignment and verify the layout
  looks the same as before
* Verify that navigation using the keyboard allows you to
  properly identify the row and column heading for any cell
* Verify that when you're on the "Select all" checkbox in the top
  left corner of the table, it reads out "Select all students"
* Verify that when you navigate to any other checkbox from the
  right-most column (using Ctrl-Opt-Right to wrap around) it does
  not read out "Select all students" as the heading of that
  column
* Add scores for the assignment using SpeedGrader while logged
  in as the two teachers and then reload the moderation page
* Verify the layout looks the same as before
* Verify that navigation using the keyboard allows you to
  properly identify the row and column heading for any cell
* Verify that VoiceOver (or JAWS) speaks appropriate labels for
  each cell.  Some labels have changed e.g. SpeedGrader now just
  says "SpeedGrader" and an absence of grades is read out as
  "dash" or "none"

Change-Id: Ic041af90dd758145fffd539f55636030e0f7b29a
Reviewed-on: https://gerrit.instructure.com/105516
Tested-by: Jenkins
Reviewed-by: Sheldon Leibole <sheldon@siimpl.io>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Christi Wruck
2017-04-03 23:45:45 +00:00
Jeremy Neander 2b2b222097 create a custom column header component
closes CNVS-35992

test plan:
* visit Gradezilla
* show the notes column
* ensure the notes column displays correctly
* hide the notes column
* ensure the notes column hides without issue
* repeat ad nauseum

Change-Id: Iea87b5b42b47c4ef27abdaa1b2bd1897c1c4a0ef
Reviewed-on: https://gerrit.instructure.com/107012
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
2017-04-03 22:27:14 +00:00
Shahbaz Javeed 9ca8888e52 assignment option dialogs are now focused on display
closes CNVS-35491

test plan:
* Create a course with at least one assignment and one student
* Go to Gradezilla
* From the options menu of the assignment try opening each dialog
* Verify that once the dialog opens the closing X on the visible
  dialog is focused

Change-Id: I21aeecaee7fcf81fe5de54f65e87bdc377b29b01
Reviewed-on: https://gerrit.instructure.com/106750
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Christi Wruck
2017-04-03 22:20:11 +00:00
Mysti Sadler f82f167bc2 Announce search results for course restore in screenreader
fixes CNVS-35504

Test plan
- Search for a deleted course, and non-deleted course
  and a course that doesn't exist
- Ensure all search results announce findings in the
  screenreader
- Also ensure the error message for non-existent
  courses actually displays visually

Change-Id: Ie5f3942d9a0f7cbbb9567dc859ad23fb103f83c5
Reviewed-on: https://gerrit.instructure.com/107080
Tested-by: Jenkins
Reviewed-by: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Nathan Rogowski <nathan@instructure.com>
2017-04-03 19:47:19 +00:00
Cody Cutrer 259e11b92f enable searching by login_id in user search
fixes gh-1005

test plan:
 * use the search api (https://canvas.instructure.com/doc/api/users.html#method.users.index)
   with a term that only matches a user's login id
 * it should find the user

Change-Id: I9bbefc6fc9dc1c38ae5fd07ead55b3b391f8a80a
Reviewed-on: https://gerrit.instructure.com/105704
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2017-04-03 19:03:52 +00:00
Simon Williams 40a2a15365 clean up some usage of plugin_path
refs CNVS-35957

test plan: tests should pass, plugin settings should still work

Change-Id: I143ff73449f3d0241963649c3c91d0f76d04a429
Reviewed-on: https://gerrit.instructure.com/106834
Tested-by: Jenkins
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2017-04-03 18:54:58 +00:00
James Williams 4cb30320bc use quiz visibility for ungrade surveys in todo list
test plan:
* have a ungraded survey quiz assigned to a course section
 and an upcoming due date
* have a student in a different course section
* they shouldn't see the survey in their todo list

closes #CNVS-35999

Change-Id: I13a6bfd298c54f75875235a20ae525766187b4a5
Reviewed-on: https://gerrit.instructure.com/107127
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2017-04-03 16:07:37 +00:00
Derek Bender fadf1a8419 cleanup two spec files that pollute the DOM
Change-Id: Id18b3552962644d802add6776feea15e8e5170cd
Reviewed-on: https://gerrit.instructure.com/107245
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-04-03 14:38:39 +00:00
Jeremy Neander f87a1909e9 spec: clean console output from some specs
This modernizes one file, removes lint from it, and cleans up
dirty console logs within it.

This also updates a deprecated sinon stub in another file and
removes a stray asterisk.

test plan:
* ensure Jenkins passes

Change-Id: I7f4d88056b3efefb747b89cd7d66982e9ae6c3cd
Reviewed-on: https://gerrit.instructure.com/107239
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
2017-04-03 13:33:24 +00:00
wdransfield 905c65551d Add 'lti_assignment_id' to submission and assignment live events
Closes PLAT-2438

Test Plan:
For each of the following live event types, verify that a field
named 'lti_assignment_id' is included and set to the 'lti_context_id'
of the assignment associated with the event:
   * submission_created
   * submission_updated
   * plagiarsim_resubmit
   * assignment_created
   * assignment_updated

Change-Id: I7fa46e414da3a2fab8e4a5ac2c7d213a0dd3ec3c
Reviewed-on: https://gerrit.instructure.com/107104
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-04-03 13:27:31 +00:00
James Williams a6c31474f7 master courses: add api parameter to exclude from course indexes
closes #MC-144

Change-Id: I8125ec41d7e91838fadeaef49e24e8b9a1cfa27e
Reviewed-on: https://gerrit.instructure.com/107165
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-04-03 12:42:51 +00:00
Rob Orton f5ee0b61a7 soft delete account reports
fixes CNVS-35977

test plan
 - delete an account report
 - it should be in the db as deleted

Change-Id: I10f6d29b7fe2dfd3d490cab7b07afbf006bd8e0b
Reviewed-on: https://gerrit.instructure.com/106948
Tested-by: Jenkins
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2017-04-02 22:19:51 +00:00
Rob Orton 8cef8a4d4e still allow students to see the course if dates are unrestricted
fixes CNVS-36064

test plan
In the settings of a course in an active term, set the course end date in the past
Leave "Users can only participate in the course between these dates" unchecked in the course settings page.
Enable "Restrict students from viewing course after end date"
As an active student in the course view the course list.
It should show as active

Change-Id: Ic266f30028033903148113b3518ef1f68fefb5ed
Reviewed-on: https://gerrit.instructure.com/107232
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Tested-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2017-04-02 00:12:29 +00:00
Jeremy Stanley c3b7a550f6 Display "Limit this slot to [ ] groups" for group signups
test plan:
 - have two appointment groups with upcoming time slots
 - make one of these appointment groups sign up groups instead of
   individual users
 - edit time slots for each appointment group
 - ensure the text at the bottom shows
   "Limit this slot to [ ] groups" for the appointment group that
   signs up students by group, and "users" for the other one

fixes CNVS-35745

Change-Id: I639d1f07d5e7e51dca37e15e89a0d76ea24f1602
Reviewed-on: https://gerrit.instructure.com/106599
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2017-03-31 22:45:42 +00:00
Matt Taylor 6293bcf661 Fix bug that modfies alt text when image is quiz correct answer
fixes CNVS-35494

Test plan:
 1. Create a quiz question with both images and text as answers
 2. Add alt text to all the image answers
 3. Choose one of the images as the correct answer
 4. Preview the quiz in VoiceOver, make sure the correct text is voiced for all answers
 5. Edit the quiz and choose a different image as the correct answer
 6. Preview the quiz in VoiceOver, make sure the correct text is voiced for all answers
 7. Run Selenium rspec quizzes_question_html_answers_spec.rb,
    example 'allows and preserves HTML answers for multiple choice', test should pass
 8. Re-run the Selenium rspec with the quizzes.js change reverted, test should fail

Change-Id: Iba53e53e9af0e8783e8f63296d1662f0557e4adf
Reviewed-on: https://gerrit.instructure.com/105549
Tested-by: Jenkins
Reviewed-by: Davis Lynn McClellan <dmcclellan@instructure.com>
Reviewed-by: Dave Donahue <ddonahue@instructure.com>
QA-Review: Gelaina Stern <mstern-c@instructure.com>
QA-Review: Dariusz Dzien <ddzien@instructure.com>
Product-Review: Dave Donahue <ddonahue@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2017-03-31 21:52:24 +00:00
Derek Bender ab1da9bb22 sort by missing and late
closes: CNVS-32446

test plan:
 - Given gradezilla gradebook enabled
 - Given submissions where some are missing and some are late
 - When clicking on the assignment's options in the column header
 - When clicking on "Sort by - Missing"
 - Then assignments that are missing are shown at the top
 - When clicking on "Sort by - Late"
 - Then assignments that are late are shown at the top

Change-Id: I8e9c23d43949b23c2db5f762afe98c3869778b80
Reviewed-on: https://gerrit.instructure.com/105910
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Christi Wruck
2017-03-31 21:33:22 +00:00
Spencer Olson e5354a580c truncate seconds before comparing grading periods
closes CNVS-35768

test plan:

1. Create a course with grading periods.
2. Create an assignment from the assignment group using the "+" button.
3. Make the due date for the assignment end on a grading period end
   date (it is important to not copy and paste the due date in but type
   it in manually).
5. Go to the gradebook and select the grading period whose end date
   matches the assignment's due date.
6. Verify the assignment is visible.

Change-Id: Iddbcd4c790223e66f17db9f8676733c4306723d4
Reviewed-on: https://gerrit.instructure.com/106314
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Christi Wruck
2017-03-31 21:22:22 +00:00
Jayce Higgins 4420c72cfb Add root_account_uuid to canvas LiveEvents
Fixes: PLAT-2369

Test-Plan:
  - spinup local live-event testing services
  - test out live-event spawning processes
    -- check live event docs for triggers of events
  - assert that the kinesis stream contains events with attributes
    containing `root_account_uuid`

Change-Id: I3ad3d64621c7726d30de9a8a8824e8b0e5d5aab2
Reviewed-on: https://gerrit.instructure.com/105621
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Jayce Higgins <jhiggins@instructure.com>
2017-03-31 20:54:25 +00:00
Jon Jensen 0939898e56 fetch all pages of students for adhoc override
fixes CNVS-28479

when a course has more than 200 students (so not all are prefetched) and
an adhoc assignment override specifies more than a page size (default
10) of students, it's possible for some students in the override to be
neither prefetched nor in the first page of results when fetched by ID.
make sure to fetch all pages of results when fetched by ID.

also make the 4 prefetch requests happen serially, and only once the user
begins interacting with the component (hover or focus). this way we don't
fetch more than we need to in small courses, and we don't fetch anything
if the teacher isn't using this part of the UI (generally the case). this
has the added benefit of speeding up selenium specs, as it has only one
server thread and the `get` waits for all ajax requests to complete

test-plan:
  part 1:
   - have a course with at least 201 students
   - have an assignment in that course with an override that specifies 11
     students
   - have the 11th student specified for the override be the 201st student
     in the course
   - edit the assignment
   - confirm you see the name for the 201st student (11th in override)
     instead of "Loading..."
  part 2:
   - have a course with 51 students
   - go to edit a new assignment
   - confirm no /users ajax requests happen initially
   - focus the "Assign to" widget so you can manage overrides
   - confirm there are 2 ajax requests for /users
   - confirm you see 7 students in the dropdown (either immediately or
     with a very slight delay, depending on whether you clicked or
     tabbed into the widget)
   - confirm you can search for any of them without additional ajax
     requests

Change-Id: I47ed202eb0d8ac1ad9e4ad21e50ceae930a6f3fe
Reviewed-on: https://gerrit.instructure.com/106693
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Leo Abner <rabner@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
2017-03-31 18:58:45 +00:00
Rob Orton dbd1d7ba8e correctly set filename on make_rootless
refs CNVS-35913

test plan
 - copy file to course in different root_account
 - filename should match

Change-Id: I51786c72e17569aa0c5bdc940d8f8e22e933805f
Reviewed-on: https://gerrit.instructure.com/107025
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2017-03-30 20:58:07 +00:00
Rob Orton 5a8a764d7c save attachment before copy to new namespace
fixes CNVS-35913

test plan
 - copy attachment to course in different root_account
 - it should work

Change-Id: I1b4e99331b2299960522ac628ff3a2cbce27873c
Reviewed-on: https://gerrit.instructure.com/107024
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2017-03-30 20:57:46 +00:00
Clay Diffrient 9bec9774c4 Add toggling between planner screen and card screen
closes FALCOR-173

Test Plan:
  - Enable student planner feature flag
  - Go to the dashboard
  - The dashboard options dropdown should have Planner as an option
  - Changing to planner should show a "Planner placeholder"
    message
  - Refreshing the page should persist the setting

Change-Id: I9062961327e03e750883246d94acd5da3283fcce
Reviewed-on: https://gerrit.instructure.com/105430
Tested-by: Jenkins
Reviewed-by: Stephen Jensen <sejensen@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Colleen Palmer <colleen@instructure.com>
2017-03-30 20:18:11 +00:00
Jeremy Neander 62db47a269 freeze only student, secondary id, custom, and total columns
fixes CNVS-35751

test plan reference:

Four types of columns can appear in the frozen column section:
  1. Student Name (always visible)
  2. Secondary ID (always visible, only in Gradebook)
  3. Total
  4. Custom Columns (includes Teacher Notes)

Three features affect placement and visibility of columns
within (or outside of) the frozen column section in Gradebook:
  1. "Display Totals for All Grading Periods"
    * when enabled, the total grade column is visible
    * available on the Grading Period Set
  2. "Show/Hide Notes Column"
    * when enabled, displays Teacher Notes as the last frozen
      column in Gradebook
    * when disabled, does not affect the visibility of other
      custom columns
  3. "Move to front/end"
    * when "front," moves the Total column to the end of the
      frozen columns section
    * when "end," move the Total column to the end of all columns

test plan:
* ensure Gradebook freezes only the above columns when the
  settings and actions above are changed in any combination
* repeat for Gradezilla

Change-Id: Ic857b310bacfc5cbd67af1f01c413200d0add879
Reviewed-on: https://gerrit.instructure.com/106598
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
2017-03-30 20:04:11 +00:00
James Williams f430cd18c3 master courses: handle assignment overrides when date-restricted
ignores assignment overrides when updating on the backend
if date-restricted and deletes existing ones on import
when restrictions are added later

also some other stuff that snuck in

closes #MC-135

Change-Id: Iade3a64740ce04388bd5d97fc860fbcf7a6ca99f
Reviewed-on: https://gerrit.instructure.com/106848
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-03-30 17:21:46 +00:00
Mysti Sadler 8b22dcf63a Add front page data to exported wiki pages
refs OFFW-185

Test plan
- See https://gerrit.instructure.com/#/c/106615/

Change-Id: Ib966ff4e48b4566eaa00789be7f5221095e1a5e7
Reviewed-on: https://gerrit.instructure.com/106616
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
2017-03-29 22:47:16 +00:00
Pam Hiett 5a06cecbe8 fix missing remove icon for sections and linking students
Fixes: CNVS-35849

test plan:
- as an admin or teacher navigate to a course that has sections
  already set-up (if you don't have any create a few sections)
- select the "people" link from the course sub-nav
- click on the cog at the end of a users row and select the
  "edit sections" option ... there was a bug that the remove
  icon was showing for sections already listed but not for
  ones that were newly added (could still be deleted but the
  icon was not appearing)
  example of fix: https://screencast.com/t/VOQQwKjQXsWZ
- now go back to the cog at the end of an "observing" users row
  and select the "link to students" option... same bugginess was
  persisting where a user could be removed but the remove icon
  was not showing (_if you do not have an observer - edit a
  users role in order to set it as observer_)
  example of fix: https://screencast.com/t/rwswbJCPxC

Change-Id: Ic5d1ab4193a60f3ac48d23513c062469759dd2a7
Reviewed-on: https://gerrit.instructure.com/106150
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Reviewed-by: Stephen Jensen <sejensen@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
2017-03-29 21:31:01 +00:00
Rob Orton 810dbbeb81 allow editing sub accounts through api
fixes CNVS-35275

test plan
 - set sis_account_id on a sub_account through api
 - it should work
 - it should require manage_sis permission
 - it should not work on root_accounts

Change-Id: Ib5fa98481a373599dad4a9956bff0ebfd1ac1a83
Reviewed-on: https://gerrit.instructure.com/106234
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2017-03-29 20:37:59 +00:00
Nick Houle 0b53ae82bb Name Length Validation should not prevent saving assignment/quiz
Fixes: SIS-2815

Test plan:
- Turn the following account settings on:
-- 'Limit Assignment name lengths'
-- Enter a value for the name length restriction
- Navigate to a course
- Create a 'Not Graded' Assignment
- Confirm you can save the assignment with a name too long
- Create a quiz of grading type 'Practice Quiz'
- Confirm you can save the quiz without a name too long
- Create a quiz of grading type 'Ungraded Survey'
- Confirm you can save the quiz without a name too long

Change-Id: If435a052b1b4e304d026f9ac703cf3ed949dd78e
Reviewed-on: https://gerrit.instructure.com/106480
Tested-by: Jenkins
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2017-03-29 20:11:54 +00:00
Nick Houle 52ff436ba7 Due Date Validation should not prevent saving assignment or quiz
Fixes: SIS-2811

Test plan:
- Turn the following account settings on:
-- "Default SIS Sync for assignments, quizzes, grade discussion"
-- "Require assignment due date"
- Navigate to a course
- Create a 'Not Graded' Assignment
- Confirm you can save the assignment without a due date
- Create a quiz of grading type 'Practice Quiz'
- Confirm you can save the quiz without a due date
- Create a quiz of grading type 'Ungraded Survey'
- Confirm you can save the quiz without a due date

Change-Id: I4b0705e0d1f5714c6ed5686292e26a264d58ce33
Reviewed-on: https://gerrit.instructure.com/106451
Tested-by: Jenkins
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2017-03-29 19:45:16 +00:00
James Williams 3af1eddb00 master courses: allow course-level admins to update restrictions
they just shouldn't be able to update associations

Change-Id: Ie49d889a6c9a1deb0f9e13db1267a545a71e5fb3
Reviewed-on: https://gerrit.instructure.com/106600
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-03-29 16:40:56 +00:00
Nathan Mills 236fc456ac allow reg_key to be used for lti2 registration
fixes PLAT-2422

test plan:

- use the oauth2 flow to register a tool proxy using just
the reg_key and reg_password

-it should work

-the developer credentials should still work

-the legacy oauth1 should still work

Change-Id: I74f754c06f0d4a46158588f39bee75321fad3a3d
Reviewed-on: https://gerrit.instructure.com/106623
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2017-03-29 16:06:17 +00:00
Sheldon Leibole e8a205c43d localize arrange by drop down on student grades page
fixes CNVS-32388

NOTE: Will need a Transifex update, so recommending lolcalization
for qa testing.

Test Plan

1. Create a couple courses
2. Add a student to the courses
3. Add some assignments
4. Add some of the assignments to a module
5. Enable multiple grading periods
6. Add some grading periods
7. Set due dates on some of the assignments to be in
   different grading periods.
8. Enable lolcalization by setting the environment
   variable LOLCALIZE to true
   https://instructure.atlassian.net/wiki/display/CE/i18n+QA#i18nQA-YMLFiles
9. You will need to start/stop the rails server / docker and make sure
   the environment variable is picked up.
10. Start the rails server back up.
11. As the student view the student grades page.
12. Verify the Arrange By select menu values are lolcalized.
13. As the teacher view the student grades page.
14. Verify the Arrange By select menu values are lolcalized.

Change-Id: I52e1259b97698c0b608e46180f5055f8be0f3f99
Reviewed-on: https://gerrit.instructure.com/106365
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Pert Eilers <peilers@instructure.com>
2017-03-29 15:26:44 +00:00
KC Naegle 5d3f8dd555 spec: add new tests for grading standards page
spec ids: c3035964 and c3104470

Change-Id: If36831a5cd1c78fa113c7f28afc62ee6d9a3757d
Reviewed-on: https://gerrit.instructure.com/106555
Tested-by: Jenkins
Reviewed-by: Anju Reddy <areddy@instructure.com>
Reviewed-by: Alex Ortiz-Rosado <aortiz@instructure.com>
Product-Review: KC Naegle <knaegle@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
2017-03-28 22:12:09 +00:00
Jacob Fugal 54da1d33f6 additional live events instrumentation
refs CNVS-32764

for address book

- add group_updated and group_membership_updated events
- add associated_user_id to enrollment_created and enrollment_updated
  events for observer enrollments
- add workflow_state to group_memberhsip_created events
- add context_type, context_id, account_id, and workflow_state to
  group_created events

test-plan:
- configure local canvas to write live events to a local kinesis stream

[group fields, group_updated events]
- create a course group; the group_created event in the stream should
  have a context_type of 'Course', a context_id of the group's course,
  an account_id of the group's account, and a workflow_state of created
- create an account group; the group_created event in the stream should
  have a context_type of 'Account', a context_id of the group's account,
  an account_id of the same, and a workflow_state of 'created'
- delete a group; a group_updated event should be emitted in the stream,
  with all the same fields and a workflow_state of 'deleted'

[group_membership fields, group_membership_updated events]
- add a user to a group; the group_membership_created event in the
  stream should have a workflow_state of 'accepted'
- remove the user from the same group; a group_membership_updated event
  should be emitted in the stream, with all the same fields and a
  workflow_state of 'deleted'

[enrollment associated_user_id field]
- create a non-observer enrollment (e.g. teacher); the
  enrollment_created event should not include an associated_user_id
- create an observer enrollment without an assigned observee; the
  enrollment_created event should include a null associated_user_id
- attach the observer enrollment to an observee; the enrollment_updated
  event should include the updated associated_user_id

Change-Id: I15066b7c6cc85f914be433530d542c6f13643e6a
Reviewed-on: https://gerrit.instructure.com/106335
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2017-03-28 21:12:54 +00:00
Nick Houle d6cd06728a Published and Unpublished assignments with Sync to SIS ON/OFF
Fixes: SIS-2697

Test plan:
- Create an assignment
- Check `Post To SIS` option
- Click `Save` NOT `Save and Publish`
- Confirm the `Post To SIS` icon doesn't show up on the assignment
  list index page
- Create a quiz
- Check `Post To SIS`
- Click `Save` NOT `Save and Publish`
- Confirm the `Post To SIS` icon doesn't show up on the quiz
  list index page

Change-Id: Id1df7a4f814509bf036294ae78c54537f708a382
Reviewed-on: https://gerrit.instructure.com/106507
Tested-by: Jenkins
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2017-03-28 21:03:42 +00:00
Nick Houle b6dd8e0ba7 DRY UP front end name too long validations
Fixes: SIS-2812

Test plan:
- Confirm all name too long validations work as expected
- Confirm Post to SIS icon validations on Assignment index page
  work as expected

Change-Id: If93ef1162293fdb2baa7ddb4178e8950518ee7d1
Reviewed-on: https://gerrit.instructure.com/106059
Reviewed-by: Brad Humphrey <brad@instructure.com>
Tested-by: Jenkins
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2017-03-28 21:03:37 +00:00
wdransfield 3a78258abf Auto subscribe to submission_updated subscription
Closes PLAT-2343

Test Plan:
- Associate a similarity detection tool with an assignment
- Verify the subscription created includes the
  'submission_updated' event type

Change-Id: I337c0c57747aa4b465acc7dbe6640618435a12b1
Reviewed-on: https://gerrit.instructure.com/106498
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-03-28 20:49:41 +00:00
Spencer Olson b219df063b set boolean values to false before saving if nil
closes CNVS-35932
closes CNVS-35931

test plan:

1. Create an announcement.
2. Go to the announcements index page at
   /courses/:course_id/announcements.
3. Click the settings cog and select 'Close for Comments'.
4. Verify there is no error.
5. Refresh the page and verify the announcement has been closed for
   comments (there should be a lock icon to the left of the settings
   cog).

Change-Id: Ide9559622460e59dc089291345b4c1da8f0e12d2
Reviewed-on: https://gerrit.instructure.com/106609
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
2017-03-28 19:51:46 +00:00
Jon Jensen 24a0353072 spec: speed up some quiz specs
don't create and load a quiz only to not bother using it in the test

Change-Id: If417507509ea5b2d591f2124b80e5702e1f00d75
Reviewed-on: https://gerrit.instructure.com/106650
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-03-28 19:47:51 +00:00
wdransfield d6f4a9dec1 Plagiarism resubmit event type
Closes PLAT-2404, PLAT-1910

Test Plan:
- Create an assignment associated with a similarity
  detection tool.
- Verify that a subscription with the
  'submission_created' and 'plagiarism_resubmit'
  event types is created in Dynamo.
- Create an assignment of type online upload
- As a student submit a document for the assignment
  submission.
- Create an originality report for the submission with
  the workflow state set to 'error'
- Navigate to the submission in speed grader and
  click the resubmit to TII button.
- Verify canvas emits a 'plagiarism_resubmit'
  event
- Verify you can create/manage subscriptions of this new
  type via the subscriptions api (See https://docs.google.com/
  document/d/12x6Peif-I-0zvl2uMv2JVbQdZumGGqMtspWKYTqlL9o/edit)

Change-Id: Ia9eff1c61bf0b5662e0b6bc1d088026afd03e8af
Reviewed-on: https://gerrit.instructure.com/106187
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-03-28 19:13:55 +00:00
Cameron Matheson 686e47fb5c New "choose home page" dialog / home page prompt
Test plan:
  * Try choosing a new home page with the "Choose a home page" button.
  * In a new (unpublished) course:
    * Select modules as the home page.  Do not make any modules.
    * Try to publish the course, it should prompt you to choose another
      homepage.
    * make some modules, it should now allow you to publish.

Change-Id: I7ef6f92cb95b443d6ba596d5ff6c9499fa943162
Reviewed-on: https://gerrit.instructure.com/102955
Tested-by: Jenkins
QA-Review: Dan Sasaki
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2017-03-28 18:44:10 +00:00
Jeremy Neander 89bb41389d add sort by total grade
closes CNVS-35854

test plan:
A. visit Gradezilla Gradebook
B. open the options menu on the total grade column
C. verify presence of "Sort by" settings
   1. Menu will include a "Sort by" group label
   2. Menu will include settings:
      a. "Grade - Low to High"
      b. "Grade - High to Low"
D. verify sorting behavior
   1. click on 'Sort by > Grade - Low to High'
   2. verify grades are sorted in ascending order
   3. verify the option is selected in the options menu
   4. click on 'Sort by > Grade - High to Low'
   5. verify grades are sorted in descending order
   6. verify the option is selected in the options menu
   7. verify the previous sort setting is no longer selected
   8. sort by a different column
   9. verify grades are sorted by that column
  10. verify that column's sort setting is selected
  11. verify the total grade sort setting is no longer selected
E. verify that settings are enabled after assignments, students,
   and submissions are all loaded

Change-Id: Id9e12def7072c627416c1f9da2c1ff6e2534a2da
Reviewed-on: https://gerrit.instructure.com/106259
Tested-by: Jenkins
Reviewed-by: Sheldon Leibole <sheldon@siimpl.io>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Christi Wruck
2017-03-28 18:32:15 +00:00
Spencer Olson f47c90f81e add sort by student name
closes CNVS-31611

test plan:
A. visit Gradezilla Gradebook
B. open the options menu on the student column
C. verify presence of "Sort by" settings
   1. Menu will include a "Sort by" group label
   2. Menu will include settings:
      a. "A-Z"
      b. "Z-A"
D. verify sorting behavior
   1. click on 'Sort by > A-Z'
   2. verify _sortable_ student names are sorted in ascending order
   3. verify the option is selected in the options menu
   4. click on 'Sort by > Z-A'
   5. verify _sortable_ student names are sorted in descending order
   6. verify the option is selected in the options menu
   7. verify the previous sort setting is no longer selected
   8. sort by grade on an assignment column header
  10. verify that assignment's sort setting is selected
  11. verify the student column sort setting is no longer selected
E. verify that settings are enabled after students are loaded

Change-Id: I3cd994ee0830fe4eb20bf5dc502054379fc5cb44
Reviewed-on: https://gerrit.instructure.com/105978
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Christi Wruck
2017-03-28 18:32:04 +00:00
Jeremy Neander 9ceb8f1bfe use the current grading period for grade calculations
When no grading period is explicitly given with the
`grading_period_id` query parameter, the current grading period
is used as the initial grading period on the student course
grades page. The grade calculations currently depend on the query
parameter, which means no grading period will appear to be
selected, even though the page is rendered within the context of
the actual current grading period.

This commit make the grade calculations use the selected grading
period id of the grading period select element, which is rendered
using the correct information.

closes CNVS-35903

test plan:
A. select or create
  1. an account with grading periods enabled
  2. an enrollment term for the course
  3. a grading period set for the enrollment term
    * with grading period weighting enabled
    * with 'Display Totals for All Grading Periods' enabled
    * with a grading period 'GP1'
      * closed
      * with a weight of 30%
    * with one grading period 'GP2'
      * open
      * with a weight of 70%
  4. a course with assignment group weighting enabled
  5. a teacher for the course
  6. a student enrolled in the course
  7. an assignment group 'AG1'
    a. with a weight of 60%
    b. with an assignment 'A1'
      i.  due in GP1
      ii. worth 10 points
    c. with an assignment 'A2'
      i.  due in GP1
      ii. worth 10 points
  8. an assignment group 'AG2'
    a. with a weight of 20%
    b. with an assignment 'A3'
      i.  due in GP2
      ii. worth 20 points
  9. an assignment group 'AG3'
    a. with a weight of 20%
    b. with an assignment 'A4'
      i.  due in GP2
      ii. worth 40 points

B. set scores
  1. score A1 with 5 points
  2. score A2 with 10 points
  3. score A3 with 12 points
  4. score A4 with 16 points

C. verify calculations
  1. masquerade or log in as the student
  2. visit the student course grades page without using the
    `grading_period_id` query parameter
  3. ensure the final grade is 50%
  * NOTE: The grading period select element will use the current
    grading period when none is explicitly set using the
    `grading_period_id` query parameter.

Change-Id: I7d47fff90d12a25f9f0d1e113b4e1d7330e6d988
Reviewed-on: https://gerrit.instructure.com/106479
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
2017-03-28 17:34:46 +00:00
wdransfield e14f0144b9 Delete subscriptions on tool uninstall
Closes PLAT-1924

Test Plan:
- Install a plagiarism detection tool
- Create multiple assignments associated with the tool
- Uninstall the tool
- Verify a delayed job for each subscription to delete
  is enqued.
- Verify the subscriptions are deleted from Dynamo
  once the jobs finish

Change-Id: I24983ce0692430fb072ca74933b80ba78fac1898
Reviewed-on: https://gerrit.instructure.com/105973
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-03-28 16:24:54 +00:00
Neil Gupta 017c734ccb Add has_weighted_grading_periods flag to course api response
Fixes CNVS-35910

Test plan:
* Hit `@GET("/courses/{courseid}?include[]=term&include[]=permissions&include[]=license&include[]=is_public&include[]=needs_grading_count&include[]=total_scores&include[]=current_grading_period_scores")`
* Make sure it includes a `has_weighted_grading_periods` boolean attr
* Make sure the value reflects the weighted value of the course's
  grading period set
* Remove `&include[]=current_grading_period_scores` from the get request
* Make sure `has_weighted_grading_periods` is not included anymore

Change-Id: I96ea26b568e3ba3a6bf6eb3f1a03c7c0df7dcf5c
Reviewed-on: https://gerrit.instructure.com/106439
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
2017-03-28 00:02:15 +00:00
Ryan Shaw ee4c1228a3 require jQuery when it is used
Change-Id: Ibbc93ceff7e7863af52d89cf7ef9166e404c59cc
Reviewed-on: https://gerrit.instructure.com/106496
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-03-27 21:33:42 +00:00
James Williams cbf492111d improve submissions api performance
reduce permissions calls and fix version_number N+1

Change-Id: I1b1e500804acd22ad8ef81eb0d95d249776f5c16
Reviewed-on: https://gerrit.instructure.com/106318
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-03-27 18:59:00 +00:00
Jon Jensen ed5eaec84e spec: fix flaky image upload specs
test plan:
./spec/selenium/wiki_and_tiny_teacher_images_spec.rb:122 should be less fail-y

Change-Id: I72ed8258ac6f729c717a0928cde0062fc818f389
Reviewed-on: https://gerrit.instructure.com/106465
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins
2017-03-27 18:28:54 +00:00
James Williams 2fa937ce91 default lock_version on enrollment states
(they already seem to be not-null currently but make sure
 so we can drop the pre-calculation update_all)

Change-Id: I60a8b10e7d1ba9e99544c8264eec3ca3d1164170
Reviewed-on: https://gerrit.instructure.com/106426
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-03-27 16:45:25 +00:00
Jon Jensen b038064860 spec: fix brittle spec frd
27a73529 should have had another \n, since that's what the link
enhancement does. but really we don't care about that, so simplify the
string so that we don't care about newlines

Change-Id: I55143ade54f46402f06f97109375bd3c9cfe8427
Reviewed-on: https://gerrit.instructure.com/106433
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-03-27 15:50:18 +00:00
James Williams 2651bd5c85 don't show email/login_id for users with pending enrollments
test plan:
* invite a student to a course
* the people page shouldn't show their login id or email
* accept the invitation
* now the login id should be shown

closes #CNVS-34920

Change-Id: I621ea2c6ceeae4de53b923bf51300aa9bba832de
Reviewed-on: https://gerrit.instructure.com/105942
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Chris Ward <cward@instructure.com>
2017-03-27 12:27:59 +00:00
Jon Jensen 3a32aeb634 spec: remove wait_for_js
it slows things down and is unnecessary ... there is only one javascript
thread, so every selenium action (click, execute_script, etc) will always
happen in the next tick

any places this was helping were incidental, due to it effectively being
a very tiny sleep

Change-Id: I01d9ae715db27bab869fd4584412e48530ea9732
Reviewed-on: https://gerrit.instructure.com/106380
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-03-25 19:48:42 +00:00
Jon Jensen c4a5cf18e6 spec: make wait_for_ajax_requests wait frd
yo dawg i heard you like to wait for ajax

this fixes a bunch of flaky assignment index specs and possibly others ...
now when we do a `get` or explicitly wait for ajax, we'll actually wait
till the chain is complete

test plan:
1. rspec ./spec/selenium/assignments/assignments_discussion_spec.rb:17:27:39
2. it should pass
3. goto 1

Change-Id: I0725b5607a8c00b4b8baa194ae3db2d9cd492afa
Reviewed-on: https://gerrit.instructure.com/106372
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-03-25 05:18:43 +00:00
Jon Jensen 8dd9f45588 spec: remove wait_start, simplify a bit
we don't actually use this and it's not that useful... if no ajaximation
happens, it's effectively a sleep. even if ajaximation does happen within
wait_start, we don't want to encourage people to use these helpers; it's
better to wait for something to change in the UI

Change-Id: Ice8faf9618f724ca0e80ab5891bcf8712159cdda
Reviewed-on: https://gerrit.instructure.com/106322
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-03-25 05:18:37 +00:00
Keith Garner 5e17875d2f lock total columns when gradebook initially loads
When the gradebook initially loads, the assignment group totals and
the total columns are movable. Once moved, they are set to not be
movable. This ensures they aren't movable on initial load.

fixes CNVS-35791

test plan:
 - Have a course with multiple assignment groups and the total showing
 - Load the gradebook and attempt to move an assignment group total or
   the total column
 - Note the column does not move.

Change-Id: I9a6575fe383a0e283b97916e3f46e05c2128ba76
Reviewed-on: https://gerrit.instructure.com/105874
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-03-24 21:30:58 +00:00
Nick Houle 248b01a6b6 Prevent Post to SIS toggle for ungraded survey and practice quiz
Fixes: SIS-2814

Test plan:
- Create a Quiz
- Select 'Ungraded Survey' as the Quiz Type
- Navigate to the quiz index page
- Confirm the Post to SIS icon does not show
  for that quiz item
- Create a Quiz
- Select 'Practice Quiz' as the Quiz Type
- Navigate to the quiz index page
- Confirm the Post To SIS icon does not show
  for that quiz item

Change-Id: I32963674ecf0e476054aa833603b401e83c87d0f
Reviewed-on: https://gerrit.instructure.com/106060
Tested-by: Jenkins
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2017-03-24 20:30:01 +00:00
Jeremy Stanley 27f7c77c4c limit roster visibility by section
test plan: ensure that a section-limited user in a course
 (teacher or student) cannot view the user profile page for
 a user in another section by URL /courses/X/users/Y

closes CNVS-34380

Change-Id: Ib095ff40a303a1b3239115430e2c735b3385f9a6
Reviewed-on: https://gerrit.instructure.com/106233
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Chris Ward <cward@instructure.com>
2017-03-24 20:04:40 +00:00
Brent Burgoyne d225415e9f update rcs token refresh to use new endpoint
added a higher order function for generating a refresh function with
and initial jwt. this was moved from the serviceRCELoader to its own
module since it could be used by other modules in the future. i also
made some other improvements like returning a promise to make error
handleing possible (while keeping the existing callback
functionality), and not making extra api requests if the function is
called multiple times before the the api responds.

closes CNVS-35199

test plan:
- edit a wiki page with rcs enabled
- wait an hour
  - or - temporariy change the expiration of jwts in canvas
    - open lib/canvas/security/services_jwt.rb
    - change the 3600 in the create_payload class method to 30
    - reload the edit page
    - wait 30 seconds instead
- make sure you can still make api requests
  - click load more on something, upload a file, etc

Change-Id: I21c89bfc82d4bf1ae3ff25b467b5f6d1e674cfac
Reviewed-on: https://gerrit.instructure.com/103303
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2017-03-24 17:07:02 +00:00
Jon Jensen 27a73529d0 spec: fix brittle spec
this started failing as of 730fa370, since the link gets enhanced sooner (the
external link icon causes a newline in the .text representation)

Change-Id: I932c7078da379529da57cf37374b2f1e13958bde
Reviewed-on: https://gerrit.instructure.com/106190
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2017-03-24 16:10:53 +00:00
Clay Diffrient b114036d39 spec: convert remainder of syllabus behaviors spec to js
Test Plan:
  - Automated tests pass

Change-Id: Ib51f6e44eb29096bd1025535e722c67c52bae218
Reviewed-on: https://gerrit.instructure.com/106131
Tested-by: Jenkins
Reviewed-by: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2017-03-23 22:20:45 +00:00
Clay Diffrient 03d8fe9b40 Make syllabus set focus to the edit button after cancelling edit
closes CNVS-34871

Test Plan:
  - Go to a course syllabus using a screenreader
  - Edit the syllabus
  - Cancel editing the syllabus
  - Focus should be on the edit button

Change-Id: Iebd3d615195f3dca17e308a7de3417868ff31f4e
Reviewed-on: https://gerrit.instructure.com/106130
Tested-by: Jenkins
Reviewed-by: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2017-03-23 21:58:12 +00:00
Rob Orton dc79f8ac53 handle namespaces in attachment clone_for
fixes CNVS-35296

test plan
 - have an attachment in a root_account
 - a = Attachment.find(id)
 - have a course in a different root_account on
   the same shard
 - c = Course.find(c_id)
 - a2 = a.clone_for(c)
 - a2.namespace should equal the namespace for the
   courses root_account

Change-Id: I52351eb2c212b859b27b2ed0d74556b58f272416
Reviewed-on: https://gerrit.instructure.com/104046
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2017-03-23 20:43:19 +00:00
Jon Jensen 5f8dcd2bdd spec: fix off-by-one regression in sequence resetting
certain seed/shard/sequence combinations can result in a zero (e.g.
28111/2/"external_integration_keys_id_seq"). i would guestimate this
would hit ~3% of builds (we've already seen it once)

Change-Id: Ifdad066c81ebdb44adbcc009a1bfc8404e9ee5a1
Reviewed-on: https://gerrit.instructure.com/106159
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins
2017-03-23 20:42:06 +00:00
Rob Orton 0a85c38d4d make method to destroy and replace content
fixes CNVS-35462

test plan
 - delete a file in console with
   a.destroy_content_and_replace

Change-Id: I89d1b9b666796feb424abd42627cd1164cbd5f59
Reviewed-on: https://gerrit.instructure.com/104405
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2017-03-23 20:39:01 +00:00
MFairbourn 823d481367 spec: skip discussions spec
Test Plan:
- Run Specs on Chrome
- Code Review:wq
Change-Id: I697c00b60ff7b3b088eacdcad313f8df1d951fdc
Reviewed-on: https://gerrit.instructure.com/106137
Tested-by: Jenkins
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2017-03-23 20:37:41 +00:00
Jeremy Neander d3f0a07342 add sorting rows by assignment group grades
closes CNVS-34245

test plan:
A. visit Gradezilla Gradebook
B. open the options menu on an assignment group column
C. verify presence of "Sort by" settings
   1. Menu will include a "Sort by" group label
   2. Menu will include settings:
      a. "Grade - Low to High"
      b. "Grade - High to Low"
D. verify sorting behavior
   1. click on 'Sort by > Grade - Low to High'
   2. verify grades are sorted in ascending order
   3. verify the option is selected in the options menu
   4. click on 'Sort by > Grade - High to Low'
   5. verify grades are sorted in descending order
   6. verify the option is selected in the options menu
   7. verify the previous sort setting is no longer selected
   8. sort by a different assignment group
   9. verify grades are sorted by that assignment group
  10. verify that assignment group's sort setting is selected
  11. verify the previous sort setting is no longer selected
   * note: graded students are sorted above ungraded students
E. verify that settings are enabled after assignments, students,
   and submissions are all loaded

Change-Id: If8e522e8f57994020fa7f26e668bb551399361d0
Reviewed-on: https://gerrit.instructure.com/105876
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Reviewed-by: Brian Park <brian@siimpl.io>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
2017-03-23 20:29:19 +00:00
Jon Jensen 3141bcc65a spec: be less aggressive about resetting the test db, refs SD-2289
should speed up local testing a lot, and jenkins a little bit (mainly the
rerun phase right now). in a subsequent test repo commit we'll speed up
jenkins a lot, as we'll do a truncate right after we migrate, which means
the cost will be incurred in the post-merge build and not the patchset
build

* don't double truncate one of the shards
* don't randomize sequences unless an env var is set
* don't truncate unless it looks like we've never truncated
  (there are Accounts)
* remove some unnecessary switchmanning in rspec-queue

[ci verbose]

test plan:
1. run a spec on a freshly created/migrated test db
   1. confirm you see "truncating all tables"
   2. confirm you do not see "randomizing db sequences"
2. run the spec again
   1. confirm you do not see "truncating all tables"
   2. confirm you do not see "randomizing db sequences"
3. run the spec again with RANDOMIZE_SEQUENCES=1
   1. confirm you do not see "truncating all tables"
   2. confirm you see "randomizing db sequences"
4. in jenkins land on the initial run
   1. confirm you see "truncating all tables"
   2. confirm you see "randomizing db sequences"
5. in jenkins land on a rerun
   1. confirm you do not see "truncating all tables"
   2. confirm you see "randomizing db sequences"

Change-Id: Id24026e70afaa35abef4d02249be2c9ba27f1f21
Reviewed-on: https://gerrit.instructure.com/106043
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-03-23 19:36:56 +00:00
wdransfield 9bdaef11cd Destroy subscription when tool is dissociated
Closes PLAT-2336

Test Plan
- Create an assignment associated with a plagiarism
  detection tool. Verify a subscription is created in
  dynamo. Also note the subscription id.
- Edit the assignment and associate it with a new tool.
- Verify the old subscription is deleted and a new subscription
  is created.

Change-Id: Id52cd7903f5d54b56b7ec51aed2e74f35beeaaaf
Reviewed-on: https://gerrit.instructure.com/105681
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-03-23 19:31:35 +00:00
MFairbourn 8794c4d92a spec: skip a fragile spec on chrome build
Test Plan:
- Pass Jenkins
- Code Review

Change-Id: I78138f054234a49312e581b5baff589cec210821
Reviewed-on: https://gerrit.instructure.com/106119
Reviewed-by: Pedro Fajardo <pfajardo@instructure.com>
Tested-by: Jenkins
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2017-03-23 18:47:41 +00:00
MFairbourn 6d1b6465e7 spec: fix a gradezilla helper to be more robust with chromedriver
Test Plan:
- Pass Jenkins
- Code Review

Change-Id: I160dbb63f1b2d049e5c77b1797c758d74dfc4a27
Reviewed-on: https://gerrit.instructure.com/106113
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
2017-03-23 18:33:40 +00:00
wdransfield 560eb48ba2 Send auth url in registration message
Closes PLAT-2320

Test Plan
- Do an LTI2 registration launch
- Verify the 'ext_authorization_url' parameter is sent and is set
  to the authorization endpoint only when the associated
  feature flat is enabled.

Change-Id: I16d12cddfd6dd84574ccd9394a2cc1d366d5be64
Reviewed-on: https://gerrit.instructure.com/103476
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-03-23 17:41:47 +00:00
Neil Gupta 0066e887d9 Show grading period weights on course grading period page
Fixes CNVS-35805

Test plan:
* Set up account grading periods
* Create a course
* Add that course's enrollment term to your grading period group
* Enable grading period weights and set some weights
* Now turn off weighted grading periods checkbox and save
* Visit the course grading periods page (/courses/:id/grading_standards)
* You should not see any weights
* Go back and turn on weighted grading periods on your account level
  groups
* Visit the course grading periods page again
* You should see your weights now (but not editable)
* Open Rails console:
	  c = Course.find(<your course id>)
	  g = c.grading_period_groups.create!
	  g.grading_periods.create!(title: 'Legacy GP1')
	  g.grading_periods.create!(title: 'Legacy GP2')
* Load your course grading periods page again
* You should see your new legacy grading periods instead of the account
  level ones. Weight should not be visible, all fields should be
  editable.

Change-Id: I1fc22b3e1d03d8b066ed388d27d20e99b5bd9c5c
Reviewed-on: https://gerrit.instructure.com/105937
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Christi Wruck
2017-03-23 17:21:55 +00:00
MFairbourn 0e018d66f9 spec: skip_if_chrome fragile discussions spec
Test Plan:
- Tests pass
- Code Review

Change-Id: I414a9d9b2360adae8d83c7e48db41936c9e55545
Reviewed-on: https://gerrit.instructure.com/106094
Tested-by: Jenkins
Reviewed-by: Pedro Fajardo <pfajardo@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2017-03-23 16:44:56 +00:00
Clay Diffrient c9273b3851 Allow pending, inactive, and concluded status in context cards
closes FALCOR-84

Test Plan:
  - Setup users in pending, inactive, and concluded states in a course
  - On the roster page, pending and inactive should allow loading
    the context card.
  - In the gradebook, concluded enrollments should allow loading
    the context card.

Change-Id: I8b188338320d09c70d15f096d126bea1aaf1e773
Reviewed-on: https://gerrit.instructure.com/105063
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2017-03-23 16:10:48 +00:00
Brian Park 32f4ec98d0 add student display options to gradezilla student column header
closes: CNVS-32364

Test Plan:
1. Navigate to gradebook and expand student column header
2. Observe that "Display as" menu item group is visible
  - "First,Last", "Last,First", and "Anonymous" options are visible
3. Observe that "First,Last" is selected by default
4. Observe that selecting a value changes the displayed name
5. Observe that the selection is stable when the menu is re-opened
* The selection is not expected to be stable across page reloads

Change-Id: I55f417b5754fa91a933774354f7088f377848f7c
Reviewed-on: https://gerrit.instructure.com/105242
Tested-by: Jenkins
Reviewed-by: Sheldon Leibole <sheldon@siimpl.io>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Christi Wruck
2017-03-23 15:48:59 +00:00
James Williams fe2e86c9a2 provide default from name in admin communication messages api
closes #CNVS-35558

Change-Id: I4601d55603563bfc3f9383079528f8270935d636
Reviewed-on: https://gerrit.instructure.com/105949
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-03-23 14:17:51 +00:00
Sheldon Leibole b1c63661b2 display tooltips on keyboard focus in student grades page
fixes CNVS-35546

Test Plan

1. Create a course.
2. Add one or more students.
3. Create a few assignments with various submission types.
4. Mute one of the assignments.
4. Masquerade as a student.
5. Submit some of the assignments.
6. View your grades (/courses/:id/grades)
7. Hover your mouse cursor over the various icons in the
   score column and see what the tooltip says. It will
   differ depending on things like if the assignment is
   muted or not.
8. Turn voice over on (cmd + f5).
9. Press tab to navigate focus to the different icons in the
   score column.
10. Verify that the tooltips for keyboard focus match the
    tooltips for mouse hover.
11. Verify that the voice over is as expected (it doesn't
    necessarily match the tooltip text. Muted assignments,
    for instance, will be read as "Muted, group", but the
    tooltip will say "Instructor is working on grades").

Change-Id: I7701f79a11d7be4acca2282c298187e56cc0ceed
Reviewed-on: https://gerrit.instructure.com/105253
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Product-Review: Nathan Rogowski <nathan@instructure.com>
2017-03-22 22:28:07 +00:00
Cody Cutrer e7d6c5ed4f don't allow the default developer key to be deleted by normal means
fixes CNVS-35700

test plan:
 * go to site admin's developer keys, and try to deactivate the
   User-Generated Key
 * it should error
 * try to delete it
 * error

Change-Id: I87b6e5ee873b0954a33ae4840dd380372bd15a4d
Reviewed-on: https://gerrit.instructure.com/105394
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2017-03-22 21:24:46 +00:00
MFairbourn 6724cf4b6b spec: fix a speedgrader spec in chrome
Test Plan:

-Pass Jenkins
- Code Review

Change-Id: Ie6c1b008664ca39bab3a115698c843279d401d88
Reviewed-on: https://gerrit.instructure.com/105994
Tested-by: Jenkins
QA-Review: Pedro Fajardo <pfajardo@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
2017-03-22 20:52:27 +00:00
Clay Diffrient eaa128a6c3 Hide user tutorial feature flag when account flag is off
closes FALCOR-133

Test Plan:
  - Enable new user tutorials at account level
  - Go to user settings you should see a flag to turn
    it on/off for the user
  - Disable flags at account level
  - Go to user settings again and the flag should not
    be displayed, you may need to login/logout to bust
    the cache
  - Re-enable the account feature flag
  - Login as a user who is only a student
  - Go to the user settings, they should not see the
    user level feature flag.

Change-Id: I4a53c7dff9356d0ac5ed9e034da382e220046ed3
Reviewed-on: https://gerrit.instructure.com/105183
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Christi Wruck
2017-03-22 19:20:49 +00:00
James Williams 3a5ba4b2a4 master courses: setup js_env lock banner helper everywhere
closes #MC-134

Change-Id: I61a6c9f8f1bd782edc08bedd6aaa7bc541e56907
Reviewed-on: https://gerrit.instructure.com/105825
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-03-22 14:06:58 +00:00
James Williams d300bf4c15 master courses: re-work child-side quizzes edit/delete
we have to allow editing now - only restrict deletion

closes #MC-133

Change-Id: Ib18aaa70e451ad6a3fc6fb62e0d9e72d4c58c35e
Reviewed-on: https://gerrit.instructure.com/105819
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-03-22 13:51:47 +00:00
James Williams 9ad99d341f master courses: re-work child-side discussion edit/delete
we have to allow editing now - only restrict deletion

closes #MC-131

Change-Id: I2d194230565b0e05acd27d6e9da967313926f412
Reviewed-on: https://gerrit.instructure.com/105733
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-03-22 13:51:37 +00:00
James Williams 4cf4e25f6a master courses: re-work child-side assignment edit/delete
we have to allow editing now - only restrict deletion

closes #MC-129

Change-Id: I8bbdd7d41c027bec9b6cd9a31458a37814dec63d
Reviewed-on: https://gerrit.instructure.com/105669
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-03-22 13:51:24 +00:00
James Williams 92d33c5cd2 master courses: add helper method to load data in js_env
also refactor some stuff to make the distinction clearer
between child-side restrictions and master-side restrictions

closes #MC-126

Change-Id: Ib630022ce7f1d4bfe2461221787b3b942c22da67
Reviewed-on: https://gerrit.instructure.com/105407
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-03-22 13:51:16 +00:00
James Williams a631102d3f strip html out of body on recent announcements
test plan:
* enable the recent announcements list on the course home
 (when set to show the front page)
* an announcement with html content should only show text
 (and not the html tags)

closes #CNVS-35565

Change-Id: I5162a32caa7da6fa88c5168c0b8791ae0ae38ed5
Reviewed-on: https://gerrit.instructure.com/105680
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Chris Ward <cward@instructure.com>
2017-03-22 12:37:22 +00:00
Jeremy Neander 79f3cb1fbf refactor gradeSort and assignment group column header
This is prework for CNVS-34245.

refs CNVS-34245

test plan:
* smoke test assignment grade sorting in Gradezilla
* smoke test assignment group column header

Change-Id: I4317a67780961af12f948ab69ef4be223b5667c2
Reviewed-on: https://gerrit.instructure.com/105835
Tested-by: Jenkins
Reviewed-by: Brian Park <brian@siimpl.io>
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: Neil Gupta <ngupta@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-03-21 22:14:46 +00:00
Jon Willesen 2aed7dce68 transform locked item links; lock item export fix
for web zip exports, do the link transform even if the item is locked.

bug fix: if an item is locked for the user doing the CC export, that
item should not be exported.

refs OFFW-136

test plan:
* items locked by modules or by date should not have their content
exported in the web zip export, even if the item is not in a module.
* links to locked items in item content should be transformed into local
links the same way as links to unlocked content are transformed.

Change-Id: I7017f6fa489444db6bf519ad7fcbe527057fe471
Reviewed-on: https://gerrit.instructure.com/105786
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
Reviewed-by: Mysti Sadler <mysti@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2017-03-21 20:35:42 +00:00
Felix Milea-Ciobanu 385949f1cd fix blueprint courses table focus loss in IE/Edge
fixes MC-123

test plan:
- in IE11/Edge, select a course from the courses table on the course
  blueprint settings page
- note that as the course disappears, focus shifts to the course that
  came after it
- if the selected course was the the last course in the list, focus
  should go to the course before
- if the course was the last course in the list, focus should go to
  the "select all" checkbox

Change-Id: Iea5886cdb5a58582f96e5c69275619d863ac8f61
Reviewed-on: https://gerrit.instructure.com/105218
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
2017-03-21 20:26:33 +00:00
Jeremy Stanley 94295bcaa5 blueprint course restriction configuration
test plan: on the course settings page, ensure
 1. a user that has permission to manage blueprint courses
   a. sees the "Locked object configuration" fieldset appear
      when "Enable course as a Blueprint Course" is checked
   b. settings are preserved when the course is saved/reloaded
   c. settings are preserved when the course is disabled as
      a blueprint course, saved, and re-enabled
   d. the functionality works on new courses that have never
      been a blueprint course, as well as existing ones
 2. a user that does not have permission to manage blueprints
   a. should have a static "Yes/No" instead of a checkbox
      for "Blueprint Course"
   b. should not see "Locked object configuration"
   c. should still be able to edit other course settings
      without errors

closes MC-111

Change-Id: I177caae79ae6160f95e7a56fe6428e9913bccf10
Reviewed-on: https://gerrit.instructure.com/105383
QA-Review: Heath Hales <hhales@instructure.com>
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
2017-03-21 19:53:07 +00:00
James Williams 16cb4efaff master courses: set restrictions on course and items via API
test plan:
* refer to the API documentation for
 "Courses - Update a course"
* should be able to set a default restriction configuration
on a blueprint course
 (e.g. content and due dates locked)

* refer to the API documenation for
"Blueprint Templates - Set or remove restrictions"
* should be able to set a learning object in a blueprint course
 as "restricted" - either using custom restrictions if specified
 or the default configuration on the course

closes #MC-112

Change-Id: Idd3c7fab66c05412bd0f0c7aa3aee23d87efcf66
Reviewed-on: https://gerrit.instructure.com/105150
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2017-03-21 19:52:15 +00:00
Nick Houle 2c3cee2469 Post to SIS icon validations on Assignment index page
Fixes: SIS-2698

Note:
  The due date validation is currently broken, even though
  the error case is handled in this commit. It will be fixed
  and based off this commit. For tracking purposes/more info
  the bug can be found here: SIS-2811

Test plan:
- Navigate to the account settings page
- Navigate to the `Feature Options` tab
- Turn the `Enable new SIS integration settings` feature flag on
- Navigate back to the `Settings` tab
- Check "Default SIS Sync for assignments, quizzes, grade discussion"
- Check "Require assignment due date"
- Check "Limit assignment names lengths (max 255)" option
- Enter a max assignment name length value
- Save the settings
- Navigate to a course
- Create a graded assignment with a name longe than the name length
  value you set
- Add a due date (please see the note above for why)
- DO NOT CHECK the `Post to SIS` option
- Save the Assignment
- Navigate to the Assignment index page
- Check the `Post to SIS` icon
- Confirm an orange warning message pops up on the top of the
  screen and says:
  "Unable to sync with SIS. Please make sure %{assignment_name}
  name is not too long."
- NOTE: 'SIS' in the message will be the SIS friendly name IF you
  have that setting set to a custom value on the account settings
- To get around the due date bug and test the other 2 scenarios
  please contact me

Change-Id: I70d6e635e7b26188d5ccfc6ca24c28c75146616d
Reviewed-on: https://gerrit.instructure.com/105545
Tested-by: Jenkins
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Oxana
2017-03-21 17:34:19 +00:00
Blake Allan c1ca18f21a fix keyboard focus order on account terms page
fixes: CNVS-33200

test plan:
navigate to terms page for an account
either add or edit and existing term
verify the cancel and update buttons are rendered in a far right column
verify tab order is correct and ends with cancel and update buttons

Change-Id: Ibd1640a2989ca4f49a6d69c5be5dfcc8a2e17319
Reviewed-on: https://gerrit.instructure.com/101983
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2017-03-21 16:54:55 +00:00
Spencer Olson f905f6fe36 announce current grade changes on gradebook history page
When a screen reader user clicks on the "Revert to this grade" links,
they are now informed about changes to the current grade via a screen
reader alert.

closes CNVS-34942

test plan:

1. In Safari with VoiceOver enabled, navigate to the Grade History page
   (Individual Gradebook -> "View Grading History" link).
2. Move VO focus to the name of an assignment and click.
3. In the newly expanded table, move focus to the 'Before' column next
   to a student.
4. Note that it is read as a link titled "Revert to this grade".
5. Click on the link.
6. Note that there is a screen reader alert indicating the current
   grade has been updated.
7. Repeat steps 1-6 but in step 3 move focus to the 'After' column
   instead of the 'Before' column.
* Edge cases: try steps 1-7 with no grade or with a grade of 'EX'.

Change-Id: I0da0ec9ce2d54cbb0bea838b82852c0086097d8d
Reviewed-on: https://gerrit.instructure.com/105369
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Product-Review: Nathan Rogowski <nathan@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
2017-03-21 16:44:26 +00:00
Nathan Mills 7aec3da945 lti2 submission attachment download endpoint
fixes PLAT-2354

test plan:
-create a submission with an attachment on an assignment that has
the originality detection tool associated
-hit the lti2 endpoint to get the submission json
-from the submission json get the attachment url
-use the lti2 credentials with the attachment url to download
the attachment
-it should download the attachment
-try the following, they should all return 401:
-try to download the attachment without the lti2 credentials
-try to download the attachment using a canvas session
-try to monkey with the url to download a different attachment you
shouldn't have access to, i.e. on a different assignment

Change-Id: Ib38bbdbe9a1a649826a6bc98dd0d19b71a32635e
Reviewed-on: https://gerrit.instructure.com/104989
Tested-by: Jenkins
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2017-03-21 01:48:19 +00:00
Jeremy Neander 8f1d5e6345 add sorting rows by assignment grades
closes CNVS-31845

test plan:
A. visit Gradezilla Gradebook
B. open the options menu on an assignment column
C. verify presence of "Sort by" settings
   1. Menu will include a "Sort by" group label
   2. Menu will include settings:
      a. "Grade - Low to High"
      b. "Grade - High to Low"
      c. "Late"
      d. "Missing"
      e. "Unposted"
D. verify sorting behavior
   1. click on 'Sort by > Grade - Low to High'
   2. verify grades are sorted in ascending order
   3. verify the option is selected in the options menu
   4. click on 'Sort by > Grade - High to Low'
   5. verify grades are sorted in descending order
   6. verify the option is selected in the options menu
   7. verify the previous sort setting is no longer selected
   8. sort by a different assignment
   9. verify grades are sorted by that assignment
  10. verify that assignment's sort setting is selected
  11. verify the previous sort setting is no longer selected
   * note: graded students are sorted above ungraded students
E. verify that settings are enabled after assignments, students,
   and submissions are all loaded

Change-Id: I94975a60cd0ceeb7fbc1a48770532d45a6cd7260
Reviewed-on: https://gerrit.instructure.com/105634
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Christi Wruck
2017-03-20 20:42:45 +00:00
Stephen Jensen 1bf8c61633 Roll up toggle settings into dropdown
Closes: CNVS-33353

Test Plan:
- Navigate to the dashboard
- In the top right, instead of a toggle switch, there
  should now be a cog
- Selecting the cog should trigger a popover menu
  containing Dashboard View options
- Choosing 'Recent Activity' should change to the
  recent activity feed
- If you refresh the page, you should still be on
  the recent activity feed
- Selecting 'Recent Activity' while on the recent
  activity feed should have no effect
- Selecting 'Dashboard Cards' should take you back
  to the card dashboard
- If you refresh the page, you should still be on
  the dashboard cards
- Selecting 'Dashboard cards' while on the dashboard
  card view should have no effect

Change-Id: Ib0ce704dbc5c030274401d1b7bdfd13ec4b73be8
Reviewed-on: https://gerrit.instructure.com/97185
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Kyle Follett <kfollett@instructure.com>
2017-03-20 19:02:52 +00:00
August Thornton 1dcdd33828 raise AssignmentSubscriptionError if service not configured
refs PLAT-2287

test plan:
• specs

Change-Id: Id5a36e5f11bff59aaf0c86a50f12c1e2360d7f7d
Reviewed-on: https://gerrit.instructure.com/105305
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Product-Review: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
2017-03-20 16:31:45 +00:00
Jeremy Neander 22d73346be clean up two gradebook files
test plan:
* ensure Jenkins passes

Change-Id: Iaa08d3d2a312537c7218a2d74904a16ab9b3fe11
Reviewed-on: https://gerrit.instructure.com/105642
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
QA-Review: Keith T. Garner <kgarner@instructure.com>
2017-03-20 14:29:28 +00:00
Mysti Sadler d93d9aad54 Export all accessible course items
closes OFFW-128

Test plan
- Create assignments, quizzes, discussions and wiki pages
  that are _not_ in modules
- Export the offline course package
- The non-module items should show up in course-data.js
  in the 'assignments', 'quizzes', 'pages', 'discussion_topics'
  keys
- Data should mostly match what each type looks like in module
  items, but won't have module completion stuff or type and
  the ID will be the export ID.

Change-Id: I7c6a5ea5b43bbbce4ae4ba54578aa0f1359436a3
Reviewed-on: https://gerrit.instructure.com/104819
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
2017-03-17 21:50:04 +00:00
Clay Diffrient cb5dbd41da Merge branch 'baholladay-vericite_import_settings'
Reviewed-on: https://gerrit.instructure.com/105378
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
Product-Review: Keith T. Garner <kgarner@instructure.com>
Change-Id: Ia7155a26723e17d979af2834708e6f00d771036f
2017-03-17 15:07:11 -06:00
Nick Houle bbb1c30574 Use context to find sis settings in AssignmentUtil
Fixes: SIS-2800

Test plan:
- Confirm all existing SIS account settings work as intended

Change-Id: I8adcc62fbc5fcc012bf3d6fa13ca58f01a4120e5
Reviewed-on: https://gerrit.instructure.com/105069
Reviewed-by: Brad Humphrey <brad@instructure.com>
Tested-by: Jenkins
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2017-03-17 18:02:22 +00:00
Jeremy Neander e83b712e41 reformat and fix some code
This is prework to the ticket listed below.

refs CNVS-31845

test plan:
* ensure Jenkins passes

Change-Id: I4ffcb517d3959ccbaa0490e239e39f3ea524a442
Reviewed-on: https://gerrit.instructure.com/105529
Reviewed-by: Brian Park <brian@siimpl.io>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
Product-Review: Keith T. Garner <kgarner@instructure.com>
QA-Review: Keith T. Garner <kgarner@instructure.com>
2017-03-17 17:37:38 +00:00
Brian Park 223a46aa2a move secondary info into student column
refs: CNVS-32362

Test Plan:
1. Navigate to Gradezilla and observe secondary id column is gone
2. Open student column header and observe:
  - 'SIS ID', 'Login ID', 'None' options appear
    - When sections are disabled, 'None' option is default
    - When sections are enabled, 'Section' option appears
      and is default
  - When 'none' option selected, no additional info shown
  - When a different option selected, relevant info shown
* Sections are enabled when >1 sections are present in course
* Does not use account settings for 'Login ID' label, coming
  soon in a following changeset

Change-Id: Id43376d8d76e2ad1c405119f9facc80ae9fbd004
Reviewed-on: https://gerrit.instructure.com/103969
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Tested-by: Jenkins
Product-Review: Christi Wruck
2017-03-17 16:55:08 +00:00
Mysti Sadler c9fdefdb12 Fix assignment due dates for assignments with due date overrides
fixes OFFW-138

Test plan
- Set up assignments with varied due dates
- Add the assignment to a module
- Export the offline package and verify they show up correctly
  when viewing the content

Change-Id: I93c426944c9ddad0b9ac45f4db645b4874335238
Reviewed-on: https://gerrit.instructure.com/105290
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
2017-03-17 16:53:14 +00:00
Brent Burgoyne 7511243ef7 add endpoint to refresh jwt with with workflows
now that services jwts have a concept of workflows and extra data
encoded in the token based on workflow requirements, the existing jwts
endpoint is insufficient for refreshing expired jwts. to some extent
it was already broken since it lost the context when refreshed with
that endpoint

a new refresh endpoint has been addded that takes an exisintg jwt as
a param. this makes it possible to get a new token with the same
workflows, state, and context as an existing expired token as long as
the token matches your user and is requested with a valid session or
oauth token.

tokens may only be used for refresh up to six hours past expiration.

refs CNVS-35199

test plan:
- go to "Pages" in a couse with RCS enabled
- open the console, and get the jwt from ENV.JWT
- wait at least an hour
- make a POST to [same-domain]/api/v1/jwts/refresh with the token as
  the `jwt` param
- it should return a json response with a token property
- copy the token
- open up your rails console
- run Canvas::Security.ServicesJwt.new("[copied token]").original_token
- should return hash with the following proerties
  - should have :sub with your users global id
  - should have :domain that matches your canvas domain
  - should have :context_type of Course
  - should have :context_id of the course you generated the original
    token from
  - should have :workflows with rich_content and ui
- repeat process masquerading as another user
  - when making a the post to the refresh endpoint use your user and
    set a param `as_user_id` to the id of the user you are
    masquerading as
- the hash in the console should have
  - :sub with the global id of the user you are masquerading as
  - :masq_sub with your user id

Change-Id: I399569ed8f2d3d0646728f72910456b77b3ed46a
Reviewed-on: https://gerrit.instructure.com/102909
Reviewed-by: Tucker McKnight <tmcknight@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Tested-by: Jenkins
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2017-03-17 16:22:08 +00:00
Brad Humphrey 004be308c6 set post_to_sis to false for ungradable types
test plan
1. Create assignment with "Post to SIS" enabled
2. Switch assignment setting "Display Grade As" to "Not Graded"
3. Notice that the "Post to SIS" option disappears
4. Save assignment
5. Verify that API still has "post_to_sis" set to "false"

fixes SIS-2655

Change-Id: I469f1e7ac14ca5311f0da04ae7e6a23bf9c3c914
Reviewed-on: https://gerrit.instructure.com/104818
Reviewed-by: Stewie aka Nicholas Stewart <nstewart@instructure.com>
Tested-by: Jenkins
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2017-03-17 15:56:20 +00:00
James Williams 1f663aa7bb restrict instructor notifications for appointments by section
test plan:
* have a course with two sections
* have a teacher assigned to each section and be
 section-restricted
* have an appointment group only for one section
* when a student signs up for the appointment, it should
 only send a notification to the teacher from the same section

closes #CNVS-35538

Change-Id: If2e475e083512793af01b0d7f843515388ab8fb7
Reviewed-on: https://gerrit.instructure.com/104867
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2017-03-17 15:38:27 +00:00
Sheldon Leibole 192f575f94 make kyle (gear) icon in gradebook accessible
closes CNVS-35373

Test Plan

1. Navigate to existing gradebook.
2. Turn Voice Over (or JAWS, or other screenreader) on.
3. Use keyboard to navigate to the "gear" settings icon.
4. Verify that screenreader correctly reads the button
   as "Gradebook Settings".
5. Navigate to Gradezilla.
6. Turn Voice Over (or JAWS, or other screenrader) on.
7. Use keyboard to navigate to the "gear" settings icon.
8. Verify that the screenreader correctly reads the button
   as "Gradebook Settings".

Change-Id: I35ed3e4e26d3774e43b5be4363f75b05e9565519
Reviewed-on: https://gerrit.instructure.com/104941
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Tested-by: Jenkins
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-03-17 14:01:48 +00:00
Jon Jensen 4ff8f772d1 spec: speed up specs, fix flaky one
0:24 -> 0:19 despite adding a spec

publishing a quiz reloads the page, which we weren't waiting for, so
`shows updated options` could fail if it clicked the cog before the event
handlers were attached

only publish the quiz in one (new) spec, and have it be already published
for the others

Change-Id: I577de90135e495ee4f98c8ef3bd789572c806700
Reviewed-on: https://gerrit.instructure.com/105474
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins
2017-03-16 23:01:42 +00:00
Nathan Mills 1bb5f43ebd create lti2 endpoint to get a submission
fixes PLAT-2232

test plan:
- install an lti2 tool with the originality placement
- associate it to an assignment as a tool_settings_tool
- use the /api/lti/assignments/#{@assignment.id}/submissions/#{submission.id}
endpoint to get a submssion
- use the
/api/lti/assignments/#{@assignment.id}/submissions/#{submission.id}/history
endpoint to get the submission history
- make sure you can't access it without the placement enabled
- make sure you can't access it unless the tool is associated to the
assignment
- make sure you can't access it unless the tool is installed
- make sure you can't access it unless the tool is active
- make sure you can't access it if the tool is not in that context

Change-Id: I66d892658a67b04f532f37bda3206efb8666cde7
Reviewed-on: https://gerrit.instructure.com/104803
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Nathan Mills <nathanm@instructure.com>
2017-03-16 22:35:59 +00:00
Andrew Butterfield 692ced4566 Fix double escape in sessionless launch url
fixes PLAT-2069

Test plan:
* go through the repo steps in the ticket
* ensure that the data-api-endpoint url query param is not double url
  encoded

Change-Id: I3d6144202f6ec613e3aa38908d7e2dfef87ba460
Reviewed-on: https://gerrit.instructure.com/105337
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Andrew Butterfield <abutterfield@instructure.com>
2017-03-16 22:14:33 +00:00
Spencer Olson cebfe9c463 fix moderated grading post permissions
closes CNVS-35293

test plan:

1. Create a moderated assignment.
2. As a user who can edit grades, review and give a provisional grade.
3. As a user with the "Moderate grades" and "Edit grades" and "View all
   grades" permissions, visit that assignment's moderation page. Verify
   there is a "Post" button and students are listed. Verify you can
   post grades.
4. As a user with the "Moderate grades" and "Edit grades" permissions
   and without the "View all grades" permission, visit that
   assignment's moderation page. Verify there is a "Post" button and
   students are listed. Verify you can post grades.
5. As a user with the "Moderate grades" and "View all grades"
   permissions and without the "Edit grades" permission, visit that
   assignment's moderation page. Verify there is no "Post" button and
   students are listed.
6. As a user with the "Moderate grades" permission and without the
   "Edit grades" and "View all grades" permissions, visit that
   assignment's moderation page. Verify there is no "Post" button and
   no students are listed. Also verify there is no checkbox next to the
   "Student" header.
7. As a user with the "Moderate grades" and "View all grades"
   permissions and without the "Edit Grades" permission, try to publish
   a moderated assignment via the API (api/v1/courses/:course_id/
   assignments/:id/provisional_grades/publish). Verify the response
   comes back as unauthorized.

Change-Id: Iffacc6c4eb314f7d8730786d627dffaf5623bc4a
Reviewed-on: https://gerrit.instructure.com/104659
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-03-16 21:34:19 +00:00
wdransfield eb295ee57b Change submission service name
Fixes PLAT-2374

Test Plan:
- Install a plagiarism detection tool with a valid service_offered
  with an @id that ends with #vnd.Canvas.SubmissionEvent.
- Create an assignment that uses this tool and verify the auto-created
  subscription uses the endpoint from the service.

Change-Id: Ibc3cdd303738422b547a71fb73efaada5e8cdb6e
Reviewed-on: https://gerrit.instructure.com/105366
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-03-16 20:28:19 +00:00
Ryan Shaw db04f0b3c5 rename all .jsx files to .js
fixes: CNVS-34727

this will make webpack faster because it cuts down
the number of files it has to look for when
it looks a module up. right now, every time
someone asked for a app/jsx/whatever.jsx file
it had to do a stat for app/jsx/whatever.js first
and then look for app/jsx/whatever.jsx. it also
slows every lookup for handlebars/coffescript files
since it has to look for the jsx first

this was just the result of running this command:
find . -type f -name "*.jsx" | while read FNAME; do git mv "$FNAME" "${FNAME//.jsx/.js}"; done

test plan:
* automated specs should pass
* webpack build should run faster than the patchset
  before this one

Change-Id: Ia15ded6dc2b09c10c4f9070edcee9305b5b429ad
Reviewed-on: https://gerrit.instructure.com/101005
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-03-16 20:22:15 +00:00
Jon Jensen 05530d3ad6 spec: fix race condition
if the click happens before the 400ms fadeIn finishes, the spec fails

Change-Id: Iaab037c8c40683f417f25d07c7a724347fa26261
Reviewed-on: https://gerrit.instructure.com/105396
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-03-16 20:18:44 +00:00
Cody Cutrer 3ec5cc9005 rails 5: deprecation warnings found by selenium specs
fixes CNVS-34843

Change-Id: Ie6b340934612823d7bd3523e709140551bb1cf41
Reviewed-on: https://gerrit.instructure.com/105327
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-03-16 19:15:05 +00:00
Cody Cutrer ce21af8ecf rails 5: find and fix lots of deprecation warnings [ci verbose]
refs CNVS-34843

Change-Id: Idd523c2a7c37325381d590f1ee70c406ace2a459
Reviewed-on: https://gerrit.instructure.com/105033
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-03-16 16:03:51 +00:00
Jeremy Stanley b20cf785a2 improve checks on blueprint course setting
test plan:
 - using course[blueprint]=1 in the Update Course API endpoint
   * a teacher without account admin rights (Manage blueprint
     courses) should get a 401 when trying to change this
     setting
   * an appropriate error should be returned if the course
     has enrolled students
   * an appropriate error should be returned if the course
     is a "minion" course (already associated with a blueprint)
 - in the Course Settings page:
   * the checkbox to enable master courses should not be present
     if the user doesn't have permission to manage blueprints
   * the checkbox should be disabled, with explanatory tooltip
     text, if the course has students or is a minion course

fixes MC-124

Change-Id: I4b89a70982f9361276542731459fef4c8d4d4f5b
Reviewed-on: https://gerrit.instructure.com/105027
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2017-03-16 15:48:49 +00:00
Jeremy Neander 293678ae8c accept decimal values for what-if grades
Also ensure What-If score input is internationalized.

fixes CNVS-35443

test plan:
* visit the student grade summary page
* ensure What-If scores accept:
  * integers
  * decimal numbers
  * blanks (nothing entered)
* ensure What-If scores are presented properly according to
  the user's language
* ensure What-If scores are parsed properly according to the
  user's language
* ensure What-If scores persist and are presented properly after
  page refreshes
* ensure the Show Saved What-If Scores button toggles scores
  correctly
* smoke-test the student grade summary page
* perform scoped regression for entering What-If grades

Change-Id: I5439c2ad07275f9d9ee696a8b0b8e9c9d0ef1fec
Reviewed-on: https://gerrit.instructure.com/104844
Tested-by: Jenkins
Reviewed-by: Brian Park <brian@siimpl.io>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-03-16 15:08:04 +00:00
Ryan Taylor ecf0a7e594 Test for ruby 2.4 compatible behavior in numerical_questions
Test Plan:
- Confirm the fix merged in a18c89d17
- Passes Jenkins

Closes CNVS-35668

Change-Id: Ic59c8fb4819422f36e4e3371f532b9eb1acabe69
Reviewed-on: https://gerrit.instructure.com/105182
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
2017-03-16 04:23:54 +00:00
Matthew Berns f2bd113e02 fix points possible not being saved for graded surveys
fixes CNVS-35100

test plan:
- create a graded survey quiz and assign a point value
- create at least one question for the survey that has
  points
- the point total after saving should match the total
  specified when creating the quiz, not the total point
  value of the question(s)

Change-Id: I4394d400f77971081a09c20ecb64880a68f3e389
Reviewed-on: https://gerrit.instructure.com/104969
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Davis Lynn McClellan <dmcclellan@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
Tested-by: Jenkins
2017-03-15 21:31:59 +00:00
Nick Houle 1794ce41fb Enable SIS Sync Name Validations for quick Assignment
Fixes: SIS-2696

Test plan:
- Navigate to the account settings page
- Navigate to the `Feature Options` tab
- Turn the `Enable new SIS integration settings` feature flag on
- Navigate back to the `Settings` tab
- Check "Limit assignment names lengths (max 255)" option
- Enter a max assignment name length value
- Save the settings
- Navigate to a course
- Create an assignment using the quick assignemnt creation modal
- Enter a name that is longer than the value you entered
- Check the `Post to SIS` option
- Click Save/Save & Publish
- Confirm the save fails and you are presented with a UI error
  "Name is too long, must be under #{the_value_you_entered} characters"
- Confirm upon changing the name you are able to save the assignment

Change-Id: I20759f11638554f70f15ac84d9a6bcd23bef3b97
Reviewed-on: https://gerrit.instructure.com/104124
Tested-by: Jenkins
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2017-03-15 20:29:57 +00:00
Nick Houle 9d2f900a0a Fix post_to_sis toggling bug for Quizzes
Fixes: SIS-2764

Test plan:
- Navigate to the account settings page
- Confirm the setting `Default SIS Sync for assignments, quizzes,
  graded discussion` is unchecked
- Navigate to a course
- Create a Quiz
- Check the `Post to SIS` option
- Save
- Edit that same quiz
- Confirm the `Post to SIS` option is checked
- Uncheck the option
- Save
- Edit the Quiz again
- Confirm the `Post To SIS` option is unchecked

Change-Id: I81408f0281503ffe3ac63413243ede0feeacc6b2
Reviewed-on: https://gerrit.instructure.com/102527
Tested-by: Jenkins
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2017-03-15 20:29:32 +00:00
Spencer Olson fee3b6f992 remove feature flag and place on grading period set
The feature flag "Display Totals for All Grading Periods"
is removed and now lives as an option on grading period
sets. All courses using a given grading period set will
display or hide 'All Grading Periods' totals according to
the set's configuration.

closes CNVS-26713

test plan:

1. Verify the feature flag for 'Display Totals for All Grading Periods'
   is gone.
2. Verify the 'Display Totals for All Grading Periods' feature behaves
   the same way it always has, except for the fact that the feature is
   now a setting on grading period sets, meaning a course should show
   or hide 'All Grading Periods' totals based on the setting of its
   associated grading period set.

Change-Id: Ia445c4a66f98587b556fbdb8ce94b4b8b0d03187
Reviewed-on: https://gerrit.instructure.com/104191
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
2017-03-15 19:54:16 +00:00
Clay Diffrient 8507f6ba3a Use attr rather than data for getting ids
closes FALCOR-131

Test Plan:
  - Setup a cross shard situation that makes a big user id
  - Click on a student name
  - Context card should open and load without issues

Change-Id: Ic3fed1b8335fd6ee009d204648fca66f4b9eaab4
Reviewed-on: https://gerrit.instructure.com/104861
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2017-03-15 19:51:39 +00:00
Neil Gupta 3c95f9fd9e Don't blow up if checking effective due dates for a non-assigned user
Fixes CNVS-35631

Test plan:
* Create a course with an assignment and a student
* Create another course with another student
* In rails console:
  edd = EffectiveDueDates.for_course(course1)
  edd.in_closed_grading_period?(assignment, student_in_other_course)

This should return false, rather than crash.

Change-Id: I6facdf0643b2eabc557ff2fc651534d5572bfc0b
Reviewed-on: https://gerrit.instructure.com/104965
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-03-15 19:35:52 +00:00
Ed Schiebel 4d339595d2 Add syllabus, collaborations, import, and conferences tutorial trays
closes FALCOR-122, FALCOR-124, FALCOR-125, FALCOR-123

Test Plan:
  - Enable new user tutorials
   syllabus:
  - Go to the course syllabus  page
  - The proper tray data should show like https://cl.ly/402N2o3Q0J3j
  - Collapsing/Expanding should persist to the server
  collaborations:
  - setup the collaboration lti tool
    - go to https://lti-tool-provider-example.herokuapp.com/xml_builder
    - check Collaborations and choose basic_lti_request from the
      dropdown
    - copy the xml
    - go to course > settings > apps and add a new app
    - choose Configuration Type = Paste XML
    - paste the xml
    - add a name and submit
    - refresh the page
  - Go to the course Collaborations page
  - The proper tray data should show like https://cl.ly/3t2O1t031635
  - Collapsing/Expanding should persist
  Import:
  - Go to the course Settings page
  - click "Import content into this course" button
  - The proper tray data should show like https://cl.ly/1N0T32413N2t
  - Collapsing/Expanding should persist
  Conferences:
  - Go to the course conferences page (presumes you've setup
    conferences)
  - The proper tray data should show like https://cl.ly/2e2Y31113I3I
  - Collapsing/Expanding should persist

Change-Id: Ia158689786e71c7eb03754787f2100cf1a3e65b1
Reviewed-on: https://gerrit.instructure.com/104416
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Dan Sasaki
2017-03-15 19:23:51 +00:00
Ed Schiebel aad5f77cb7 Add discussions tutorial tray
closes FALCOR-121

Test Plan:
- Enable new user tutorials
- Go to the course discussions page
- The proper tray data should show like https://cl.ly/1E294242090J
- Collapsing/Expanding should persist to the serverl trays

closes FALCOR-117, FALCOR-118, FALCOR-119, FALCOR-120

Test Plan:
- Enable new user tutorials
files:
- Go to the course files page
- The proper tray data should show like https://cl.ly/2N1K0O012N2M
- Collapsing/Expanding should persist to the server

Change-Id: I9e8e5b96ad7b658925efb99f028405650fcd3244
Reviewed-on: https://gerrit.instructure.com/104415
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Dan Sasaki
Product-Review: Christi Wruck
2017-03-15 16:55:54 +00:00
James Williams 32a274ec86 fix course new user search with duplicate results for same user
fixes a problem caused by two matching cross-shard
communication channels that happen to belong to the
same user. it tricked the code into thinking there
was a duplicate result but then broken when trying
to find the "other" user

closes #CNVS-35649

Change-Id: I61c555ce563a684d9579747a38a9758515bdbb1a
Reviewed-on: https://gerrit.instructure.com/105155
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-03-15 16:40:51 +00:00
Steven Burnett f1a2823ed1 lowercase all push tokens
fixes CNVS-35500

Test Plan:
- Register for push notifications on IOS
- notice that your token is now lower case
- generate a push notification
- notice you get a push

Change-Id: Ief44ab8c83669bccc5e1c7a68b58fafa2aa9b7cf
Reviewed-on: https://gerrit.instructure.com/105010
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
2017-03-15 16:08:49 +00:00
Hannah Bottalla 850f136839 Extend content_export_complete live event with a qti export
closes: QUIZ-1389

test plan:
pre-reqs: quizzes2 feature enabled, course and quiz made,
kinesis stream setup (doc/live_events.md)
1. on the quiz index page, select "migrate" for the quiz
2. verify you see output in the kinesis stream
3. verify you see the authenticated s3 url in the payload

Change-Id: Iae1d3cd9675b9445ee0036093b2891f2d921a5ba
Reviewed-on: https://gerrit.instructure.com/104554
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Omar Khan <okhan@instructure.com>
Product-Review: Jayce Higgins <jhiggins@instructure.com>
2017-03-15 15:10:22 +00:00
Ed Schiebel 12f2cf3810 Link student context tray avatar to student's page
closes FALCOR-96

test plan:
  - go to a course with students page
  - click on a student's name in the table
  - click on the student's avatar in the context tray that just slid out
  > expected: navigates to the student's page in the course at
    courses/<courseid>/users/<userid>

Change-Id: I222850cecf6b6528d44ea8dcc53e468b5cdb1f22
Reviewed-on: https://gerrit.instructure.com/104589
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2017-03-15 14:10:02 +00:00
James Williams ced16569a9 restore deleted enrollments on attempted observee restore
test plan:
* create two users with sis ids
* add one of them as a student to a course
* use a user_observers.csv file in a sis import to link
 the other user as an perma-observer to the student
* it should automatically create the observer enrollment

* delete the observer enrollment
* re-import the csv
* it should restore the observer enrollment (even though the
 link technically wasn't restored since the link wasn't deleted)

closes #CNVS-35353

Change-Id: I5f091d7d05824463d51750c37d43a7d688aa2e82
Reviewed-on: https://gerrit.instructure.com/104059
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2017-03-15 12:32:01 +00:00
Jon Willesen 7046584c35 export correct file name for webzip exports
use the display_name because that's the name of the file in the export
package. filename has a numeric prefix that disambiguates it from
other attachments with the same name.

refs OFFW-130

test plan:
* see g/104925

Change-Id: I9bc99ad8de985ed39cc73640af5410289450bf67
Reviewed-on: https://gerrit.instructure.com/105021
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2017-03-14 18:15:15 +00:00
Brian Park 436b18e059 rewire assignment muting dialog in gradezilla
fixes: CNVS-33679

Test Plan:
1. Turn on GradeZilla feature and navigate to it
2. Open assignment column header menu (... icon)
3. Observe menu item for muting/unmuting assignment is visible
4. Activate mute/unmute menu item
  - Observe a11y compliant menu item activation (mouse/kb)
  - Observe mute/unmute dialog appears
  - Observe dialog meets a11y/i18n
    - Observe dialog tabbing is a11y compliant
    - Observe user-facing strings are i18n
5. Mute/unmute an assignment
  - Observe that dialog closes and menu is closed
  - Observe that headers are updated
  - Observe that total columns are updated
6. Repeat 2-5 for:
  - Regular assignments
  - Moderated assignments
  - Quizzes
  - Graded Discussions
  - Non-graded assignment
  - Partially graded assignment
  - Differentiated assignment
  - Assignment without students (course without students)

Change-Id: I2427add92737cc4a07794c8051b5cfa282f05955
Reviewed-on: https://gerrit.instructure.com/103008
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: Shahbaz Javeed <sjaveed@instructure.com>
Product-Review: Christi Wruck
2017-03-14 16:30:24 +00:00
wdransfield ae4ee7085a Handle Unicode whitespace in tool launch URLs
Fixes PLAT-2360

Test Plan:
- Add an LTI1 tool to a course that has ascii and unicode
  whitespace (i.e. "\u00A0http://w\tww.test.co m".
- Create an assignment of type external tool and use the tool
  with the crazy launch URL.
- Save the assignment and attempt to access it. Verify the tool
  launches and no error occurs.

Change-Id: Id3bbb5d0ee373aa5c7ffeb8fa5d6e5b097b52fcc
Reviewed-on: https://gerrit.instructure.com/104995
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-03-14 16:02:44 +00:00
wdransfield 20ec685467 Allow setting oauth_compliant via API
Fixes PLAT-2329

Test Plan
- Create a ContextExternalTool via API setting the
  oauth_compliant setting to either true or false.
  Verify the tool is created and the oauth_compiant
  setting has been set.
- Edit a ContextExternalTool via API and set
  the oauth_compliant setting to true or false. Verify
  the tool updates.

Change-Id: I926abfec34fecdc1d42f890b0548fb789e0a6f6a
Reviewed-on: https://gerrit.instructure.com/104931
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-03-14 15:49:27 +00:00
Jeremy Stanley 61b08e3d95 keep track of creations/updates/deletions/skips
test plan: specs (no visible change yet)

closes MC-122

Change-Id: Ie0f2b7b4b164c774c6a69dc827e0a60afbc4a318
Reviewed-on: https://gerrit.instructure.com/104508
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2017-03-14 15:15:47 +00:00
Nathan Mills cdc1e0824f refactor variable expansion specs
fixes PLAT-2361

test plan:
specs should still pass

Change-Id: I84d1d79d652cf501450bb2e769ac522d89d8e8f6
Reviewed-on: https://gerrit.instructure.com/104991
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Nathan Mills <nathanm@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2017-03-14 14:01:49 +00:00
James Williams e125b3aa6d don't cancel appointment slots if other enrollments exist
test plan:
* have a user with two enrollments in two sections in a course
* have them reserve a slot in scheduler
* deleting or concluding only one of the enrollments shouldn't
 cancel the reservation

closes #CNVS-35492

Change-Id: I7cca9b696844c4e76d767bfd04a9fb277da08309
Reviewed-on: https://gerrit.instructure.com/104698
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2017-03-14 12:32:26 +00:00
Blake Allan 9a04032a6d add 'LaTeX: ' prefix to the equation alt attributes from equation editor
Fixes: CNVS-29738

Test Plan:
With an RCE view open, click the insert math equation button
Create a math equation and click insert equation
Ensure that the equation image alt attribute is prefixed by 'LaTeX: '

Change-Id: I6df61e83de9820f54757bbfdd3065275889df88c
Reviewed-on: https://gerrit.instructure.com/102708
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2017-03-14 04:45:00 +00:00
Cody Cutrer 1b411ccef9 rails 5: silence another spec deprecation warning
Change-Id: Ic1bee4948715c62389845b11426e5d1d56d02dad
Reviewed-on: https://gerrit.instructure.com/104947
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-03-13 23:04:53 +00:00
Ryan Shaw 5b88629fe0 Remove RequireJS support
closes: CNVS-31785

test plan:
all builds should pass

Change-Id: I2925934692a3d2f115f1289d7b50cb72d8cb907f
Reviewed-on: https://gerrit.instructure.com/104492
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2017-03-13 22:10:23 +00:00
Michael Brewer-Davis 14b18c137f i18n numbers for assignments, cyoe
closes: OUT-1062, OUT-1110

Test plan:
Assignments:
Verify that i18n has been completed on assignments
related pages, including but not limited to:
Assignment list page (teacher and student)
Assignment show page (teacher and student)
Assignment edit page

CYOE:
Test alongside g/103353

Test plan:
Test that all numbers are properly internationalized
within:
Teacher pages:
- mastery paths edit page
- assignment list page (mastery path ranges)
- assignment view page (mastery path breakdown)
Student pages;
- choose mastery path page (accessed from modules for OR
  assignments)

Change-Id: I226c27dca870dde4801b5e09ab9f6ee5b000bbb0
Reviewed-on: https://gerrit.instructure.com/103354
Tested-by: Jenkins
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Cemal Aktas <caktas@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2017-03-13 20:53:29 +00:00
Cody Cutrer fb67a12ca0 rails 5: improve some deprecation warnings
* completely hide a spec one that we can't (easily) address
 * fix the blame assignment of others to not point at generic
   monkey patches, instead of the actual caller

Change-Id: I76ad1f871b14104d5b73141210bd9069da43b033
Reviewed-on: https://gerrit.instructure.com/104919
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-03-13 20:36:45 +00:00
Cody Cutrer 0fa7d9710b spec: don't silence deprecation warnings at all
Change-Id: Iac93975e9a09bf19afadaa9dc770d19f1d65b280
Reviewed-on: https://gerrit.instructure.com/104759
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-03-13 19:12:21 +00:00
Felix Milea-Ciobanu a6e6a62735 fix filtering focus behavior
fixes MC-106

test plan:
- click into the search filter
- note the courses list expands
- click out of the search filter without typing anything
- note the course list is now hidden
- click into and out of the dropdowns without selecting anything
- note that the courses show then hide
- click into the search field again and type something in
- click outside
- note the courses stay open

Change-Id: I1055dcd44cb9530f8d0c00b3cfb78195d15b2e00
Reviewed-on: https://gerrit.instructure.com/104101
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
2017-03-13 19:07:58 +00:00
August Thornton 7b66ff4e37 fix port comparison in tool consumer profile
fixes PLAT-2333

test plan:
• regression test lti 2 tool proxy registration

Change-Id: I67e6654fdcb3609c9051bd188da50dbbfc37c3e2
Reviewed-on: https://gerrit.instructure.com/104718
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2017-03-13 18:23:41 +00:00
Jacob Fugal f4f97b8d91 add addressbook performance tap option
closes CNVS-34528

another option for the address book strategy chosen in the plugin.
combines answers from current MessageableUser implementation with
traffic directed to the service as if it were in use. but the service is
instructed via `ignore_result` parameter to reply to canvas as quickly
as possible, so that if the service does have performance issues, actual
canvas performance is not affected.

test-plan:
- set up canvas to be able to talk to the address book service
- have a published course with an active teacher and an active student
- do _not_ replicate that data into the address book service; i.e. the
  service answer should be wrong if used
- choose the "AddressBook performance tap" as the address book
  implementation in the plugin setting
- logged in as the teacher, query for the student in the inbox. should
  find the student (backed by the messageableuser implementation)
- check the service request logs; even though the service response
  wasn't used, there should still be a request made against it
- take down the service entirely
- repeat the query in the inbox. should still get the result from the
  messageableuser implementation despite the service being unavailable

Change-Id: I031b7c397d2e20d74d7699a81ca8040064a8df75
Reviewed-on: https://gerrit.instructure.com/104112
Reviewed-by: Andrew Huff <ahuff@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2017-03-13 17:11:02 +00:00
Sheldon Leibole ddabf9bce6 rewire download submissions and re-upload submissions
closes CNVS-35119

Test Plan

1. Enable Gradezilla.
2. Create a course.
3. Add a student.
4. Create assignments with submission types: online upload,
   online text entry, online url.
5. Create another assignment with a submission type not listed above.
6. Navigate to Gradezilla.
7. For each of the assignments click on the three dots in the header
   to display the dropdown menu.
8. Verify that "Download Submissions" and "Re-Upload Submissions"
   are not rendered.
9. Masquerade as the student and submit a submission for each of
   the assignments.
10. Stop masquerading.
11. Navigate to Gradezilla.
12. Click on the three dots in the header for each of the
    three online submission
    assignments and verify that "Download Submissions" is now present
    and enabled.
13. Click on the three dots in the header for the other assignment
    you created and verify that "Download Submissions" is still not there.
14. For each of the three online submission assignments
    a. Click the three dots in the header, click "Download Submissions" to
       download the assignment.
    b. After the download finishes click the "X" in the top right of
       the modal to close it.
    c. Click the three dots in the header, verify that
       "Re-Upload Submissions" is now present and enabled.
    d. Click "Re-Upload Submissions".
    e. Click the button to choose a file.
    f. Select the zip file you just downloaded.
    g. Click the "Upload Files" button.
    h. Verify that after the upload finishes you are redirected to a page
       that says "Attached files to the following user submissions".

Change-Id: I82458d717ad98fbe20d698cea843c93a21600788
Reviewed-on: https://gerrit.instructure.com/103618
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: Shahbaz Javeed <sjaveed@instructure.com>
Product-Review: Christi Wruck
2017-03-13 16:11:26 +00:00
Jeremy Neander 111f345a30 spec: add spec coverage for what-if grades
test plan:
* verify Jenkins passes

Change-Id: Ieb02fed7214b02a8624bd28371593e35dab17063
Reviewed-on: https://gerrit.instructure.com/104835
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Product-Review: Jeremy Neander <jneander@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
2017-03-13 15:01:56 +00:00
Clay Diffrient e880e4faa3 Add mechanism for toggling tutorials
closes FALCOR-70
closes FALCOR-71

Test Plan:
  - Create a new user
  - Add them to a course
  - They should have the tutorial option showing as on in
    user settings
  - Tutorial trays should show from the right side
  - Clicking end tutorial in the tray should open up a
    dialog to confirm
  - Cancelling should do nothing but close the dialog
  - Clicking okay on the modal should trigger the page to
    refresh
  - Tutorial options should be gone and the feature flag
    should be turned off in user settings
Change-Id: I0b287be7278059a24df07c75436def8fb53b3b17
Reviewed-on: https://gerrit.instructure.com/103568
Tested-by: Jenkins
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Christi Wruck
2017-03-13 15:00:08 +00:00
Ed Schiebel 8d3b9e4b2f Support canvas brand themes in inst-ui components
Inst-ui components need to honor a school's brandable theme
settings.

fixes CNVS-33500
fixes CNVS-34223
fixes CNVS-33809

Test Plan:
  CNVS-33500
  - enable high contrast mode
  - navigate to the Grading page of an account (/accounts/#/grading_standards
  > expected reault: 
      - the "+ Set of Grading Periods" button is the high contrast color
  - Click on the "+ Set of Grading Periods" button
  > expected result: 
     - the Create button is the high contrast color
  CNVS-33809
  - with high contrast mode still enabled
  - go to course's people page (/courses/#/users)
  - click on the +People button
  - see that the modal uses high contrast colors (the cancel and next
    buttons are the easiest to see)
    
  CNVS-34223
  setup
    - turn of high contrast
    - go to Admin > Site Admin > Themes
      (/accounts/site_admin/brand_configs)
    - select the State U. theme
    - click Save and give it a name
    - click Apply theme (the UI should get a lot of red)
  test
    - go to a course's people page (/courses/#/users)
    - click on the "+ People" button
  expected result
    - it looks like the rest of the UI
      (e.g. the Cancel and Next buttons are red)

Change-Id: Idf9b9efbad4c1d88f72052d08f161b5d148464db
Reviewed-on: https://gerrit.instructure.com/102908
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
QA-Review: Dan Sasaki
Product-Review: Ed Schiebel <eschiebel@instructure.com>
2017-03-13 13:05:38 +00:00
Rob Orton 57a0917d23 don’t 500 for bad data in lti urls
fixes CNVS-35557

test plan
 - create an external tool with a space or tab in
   front of the url
 - it should still launch

Change-Id: Iac84e1be8870456de52a44612faff486be5cb712
Reviewed-on: https://gerrit.instructure.com/104832
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2017-03-11 18:18:17 +00:00
Mysti Sadler cce1f802f4 Fix internal html links for files and items in modules
fixes OFFW-127, OFFW-131

Test plan
- Have an assignment with various links to other module items
- Should include assignment, discussion, quiz, and wiki pages
  that are linked in the modules
- Any available file link should now work
- Links to the modules and files pages should now work also
- Links to specific modules will currently take you to the
  modules page only
- Links to other things (ie: Grades or the Announcements index)
  will not work yet

Change-Id: I742674a73f473696bced03cc4500875f22db43f1
Reviewed-on: https://gerrit.instructure.com/104678
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
2017-03-11 00:54:51 +00:00
Mysti Sadler 86c5ed5cfb Prevent unenrolled users or admins from download web zip export
fixes OFFW-122

Test plan
- Make a course public
- As an anonymous user and a non-enrolled student/teacher
  attempt to download the web zip export.  The button should not
  show up
- As an admin, attempt to download the web zip export.  The button
  should show up
- As a regular user, ensure the button still shows up
- Do the same with the api/v1/courses/:course_id/web_zip_exports

Change-Id: I23332c1ecb9f492b2bb7a56fe578296f11c7faba
Reviewed-on: https://gerrit.instructure.com/104019
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Tested-by: Jenkins
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
2017-03-11 00:54:38 +00:00
Brad Humphrey e9231a6428 use mastery path override as default due date
test plan
 * create an assignment
 * assign it to Mastery Paths with a due date
 * the sis assignments api should show that the
   assignment is due_at the mastery path due date

fixes SIS-2758

Change-Id: Ia61762863c46bfc75aad4760a1fd567aa6e1a8f5
Reviewed-on: https://gerrit.instructure.com/104156
Reviewed-by: Stewie aka Nicholas Stewart <nstewart@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Tested-by: Jenkins
Product-Review: Brad Humphrey <brad@instructure.com>
2017-03-10 23:52:31 +00:00
Ed Schiebel 378c5b50f3 Add files, people, announcements and grades tutorial trays
closes FALCOR-117, FALCOR-118, FALCOR-119, FALCOR-120

Test Plan:
  - Enable new user tutorials
  files:
  - Go to the course files page
  - The proper tray data should show like https://cl.ly/2N1K0O012N2M
  - Collapsing/Expanding should persist to the server
  people:
  - Go to the course people page
  - The proper tray data should show like https://cl.ly/2s203e0i460M
  - Collapsing/Expanding should persist to the server
  grades:
  - Go to the course gradebook page
  - The proper tray data should show like https://cl.ly/0V0E1M161X2E
  - Collapsing/Expanding should persist to the server
  announcements:
  - Go to the course announcements page
  - The proper tray data should show like https://cl.ly/1Y3S0340342n
  - Collapsing/Expanding should persist to the server

Change-Id: Ieb87982915f00aba4889d6af26c8dccbed1f125d
Reviewed-on: https://gerrit.instructure.com/104218
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Dan Sasaki
Product-Review: Mary Jane Anderson <manderson@instructure.com>
2017-03-10 22:48:27 +00:00
Rob Orton 24ea9b9d34 add limit_section_privileges to enrollments importer
fixes CNVS-34697

test plan
 - enrollment imports should work
 - adding column limit_section_privileges should set
enrollment.limit_privileges_to_course_section

Change-Id: I363c16036de19808ec21793f1b999d004fbf6a12
Reviewed-on: https://gerrit.instructure.com/104049
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2017-03-10 22:14:44 +00:00
Cody Cutrer a99d2a3bdc spec: don't allow raise_error with no arguments
most of these are simple fixes, but there are a few where the spec has
actually been broken due to underlying API changes, that were masked
due to the generic raise_error matcher

fixes CNVS-35542

Change-Id: I982e7ab9af59101b79fdf6b2e0816b374a6a6d5b
Reviewed-on: https://gerrit.instructure.com/104750
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-03-10 21:34:37 +00:00