Commit Graph

29317 Commits

Author SHA1 Message Date
Jeremy Neander 15d8b35bc2 remove unused submission cell code
New Gradebook no longer uses this anywhere.

refs GRADE-932

test plan:
 * ensure Jenkins passes

Change-Id: I73ecccfd031a352863fa69e70c3a5963cf081089
Reviewed-on: https://gerrit.instructure.com/143011
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
QA-Review: Keith T. Garner <kgarner@instructure.com>
2018-03-08 21:39:15 +00:00
Venk Natarajan e25768453e Attempt to fix flaky spec.
Spec is creating 5 students when 2 is probably enough for this
test.  Hopefully this speeds things up enough to result in
lower run times.

Fixes COMMS-955

Test Plan:
* Test still passes.

Change-Id: I1e4ef980a910275b865966add4c80af60ce392a0
Reviewed-on: https://gerrit.instructure.com/143032
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Venk Natarajan <vnatarajan@instructure.com>
QA-Review: Venk Natarajan <vnatarajan@instructure.com>
2018-03-08 21:32:00 +00:00
Anju Reddy 8ba14348cc spec: POC pact consumer
test plan: passes Jenkins

see README.md for how and where to build the pact files

Change-Id: Ia0f27a1edce21e2bd467fb8d56f037a96cbdf1e2
Reviewed-on: https://gerrit.instructure.com/143020
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
2018-03-08 20:56:35 +00:00
Stewie (Nicholas Stewart) fb749a4461 Improve json parse calls in specs
Refs: PLAT-3187

Test plan: specs still pass

Change-Id: Ie737e05023db13849d6a98ec4d8d92ae01081c1f
Reviewed-on: https://gerrit.instructure.com/142909
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Stewie aka Nicholas Stewart <nstewart@instructure.com>
2018-03-08 20:52:19 +00:00
KC Naegle 1c8938c05d spec: add testRail ids
Change-Id: Icb22c93fc1ef3fe08aa5032b7509d8698464d914
Reviewed-on: https://gerrit.instructure.com/142804
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: KC Naegle <knaegle@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
2018-03-08 20:06:36 +00:00
Clay Diffrient 497fe4d5ea Update to yarn 1.5.1
closes GH-1250

Test Plan:
  - Everything builds

Change-Id: Id51b8997f5ae1b53c24c2b4b616c6956833ed2b5
Reviewed-on: https://gerrit.instructure.com/142553
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
2018-03-08 19:53:13 +00:00
Shahbaz Javeed 04349fe757 run DueDateCacher only once for some bulk operations
closes GRADE-927

test plan:
* Create a course with an assignment and a quiz
* Enroll three students in the course
* For the assignment
  - Add two overrides with one student in each and ensure the
    "Everyone Else" group isn't present in any overrides
  - Observe the Rails logs while saving this to ensure DueDateCacher
    runs only once
  - Verify DueDateCacher only runs for the assignment and recalculates
    grades at the same time
  - Edit the assignment and submit without any changes
  - Verify DueDateCacher does not run
* For the quiz
  - Add two overrides with one student in each and ensure the
    "Everyone Else" group isn't present in any overrides
  - Observe the Rails logs while saving this to ensure DueDateCacher
    runs only once
  - Verify DueDateCacher only runs for the assignment and recalculates
    grades at the same time
  - Edit the assignment and submit without any changes
  - Verify DueDateCacher does not run
* For the Course
  - From the Course settings page, Copy the course with the following
    settings:
    > Change the start date to one year out
    > Choose "Shift dates" for the Date adjustment
  - Observe the Rails logs while saving this to ensure DueDateCacher
    runs only once
  - Verify DueDateCacher only runs for the course

Change-Id: Ia97620132f3f1ccc42668610deb125e67c45bd9a
Reviewed-on: https://gerrit.instructure.com/142197
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2018-03-08 19:45:59 +00:00
Jeremy Neander 466bf83490 interleave loading students and submissions
closes GRADE-210

QA Notes:
 * New load order should be generally top-to-bottom. Depending on
   where testing occurs, the server might occasionally respond out of
   order. This is not a bug, just the way of the world.
 * To verify actual requests, open the Network tab in the browser's
   developer tools and observe the requests as they are created and
   processed. When students and submissions are requested, there will
   be a series of groups of requests like the following:

   …/api/v1/courses/1/users
   …/api/v1/courses/1/students/submissions
   …/api/v1/courses/1/students/submissions
   …/api/v1/courses/1/students/submissions

   This means that for each "chunk" of users (50 per page, typically),
   their submissions are being requested immediately after and before
   additional requests for users.

test plan:
 1. Create a large Course
    a. 100+ Students
    b. 20+ Assignments
    c. assign everything to everybody
 2. Load New Gradebook
 3. Verify students and submissions load in groups
    * refer to QA Notes
 4. Verify everything loads

Change-Id: Iddab038a71ce4163472db7ba5b67f6dc30d70f50
Reviewed-on: https://gerrit.instructure.com/142826
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
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>
2018-03-08 19:44:19 +00:00
Neil Gupta 62a65a21f8 add links to the outcome import csv format docs
fixes OUT-2026

Test plan:
* Generate API docs: `bundle exec rake doc:api`
* View outcomes page. There should be a link to the outcomes csv doc
* Click Import to open the import modal. Oh, look there's a link!
* Import an invalid csv file and check your email. The failure
  notification should have a link to the docs
* All of the links should take you to the outcomes CSV formatting doc

Change-Id: I380ab2c36be27ec1260179a02eb629bf91cfc748
Reviewed-on: https://gerrit.instructure.com/142946
Tested-by: Jenkins
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
QA-Review: Neil Gupta <ngupta@instructure.com>
2018-03-08 19:35:07 +00:00
Neil Gupta 8d6c05d8bf sort errors in outcomes import email to be in row order
fixes OUT-2024

Test plan:
* Enable mailcatcher docker service:
	add `docker-compose/mailcatcher.override.yml` to your COMPOSE_FILE var
* Perform an outcomes import with a CSV file with 200 rows, make sure
  none of them have a vendor_guiid
* The import should fail
* Check mail.canvas.docker

You should see an import failure email with the first 100 rows listed

Change-Id: I7ea00e7a428d78c55492e48270b2a127aace1ef0
Reviewed-on: https://gerrit.instructure.com/142887
Tested-by: Jenkins
Reviewed-by: Frank Murphy <fmurphy@instructure.com>
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Leo Abner <rabner@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-03-08 18:54:39 +00:00
Stewie (Nicholas Stewart) 6653dce26c Set developer_key_management_ui_rewrite to not be seen in prod
Refs: PLAT-3185

Test Plan: Verify only shows in site-admin.  Not shown in root accounts
or sub accounts

Change-Id: I95d867abb603013e0bef32710b2692ba1cb1a4cf
Reviewed-on: https://gerrit.instructure.com/142855
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Stewie aka Nicholas Stewart <nstewart@instructure.com>
2018-03-08 18:19:18 +00:00
Steven Burnett 2b9853c82d fix footer logo in footer of emails
fixes COMMS-939

Test Plan:
- send any email in canvas
- notice the footer image is there
- inspect the html source, and notice that the host is
  your local Canvas install
- enable CDN config, run `node_modules/.bin/gulp rev`,
  and `rake canvas:cdn:upload_to_s3`
- send another enable
- notice the footer image is still there
- inspect the html source, and notice that the host
  is the CDN
Change-Id: Ieaed838dee02168a2aa67f3448d8d68fb6f5b701
Reviewed-on: https://gerrit.instructure.com/142889
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Gentry Beckmann <gbeckmann@instructure.com>
Product-Review: Gentry Beckmann <gbeckmann@instructure.com>
2018-03-08 17:53:17 +00:00
Shahbaz Javeed 63a4b40bcd reset filters to default when hiding them
When a gradebook filter is hidden it should reset to its default value
so teachers don't see a filtered view without realizing it

closes GRADE-735

test plan:
* Create a course with two sections, S1 and S2; two grading periods, GP1
  and GP2; two assignment groups AG1 and AG2; and two modules, M1 and M2
* Create an assignment A1 in assignment group AG1 and module M1 and due
  in grading period GP1
* Create an assignment A2 in assignment group AG2 and module M2 and due
  in grading period GP2
* Enroll two students, U1 and U2 into sections S1 and S2 respectively
* Go to New Gradebook
* Enable filters for Sections, Modules, Assignment Groups and Grading
  Periods

* Filter by grading period GP2
* Verify you only see assignment A2 in the gradebook
* Hide the grading period filter using the View menu
* Verify you only see assignment A1 (in the current grading period) in
  the gradebook

* Filter by assignment group AG1
* Verify you only see assignment A1 in the gradebook
* Hide the assignment group filter using the View menu
* Verify you see both assignments A1 and A2 in the gradebook

* Filter by section S2
* Verify you only see student U2 in the gradebook
* Hide the section filter using the View menu
* Verify you see both users U1 and U2 in the gradebook

* Filter by module M1
* Verify you only see assignment A1 in the gradebook
* Hide the module filter using the View menu
* Verify you see both assignments A1 and A2 in the gradebook

Change-Id: I462164f23cfd866d7d99f9416415bbf0cff743f7
Reviewed-on: https://gerrit.instructure.com/140082
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
QA-Review: Keith T. Garner <kgarner@instructure.com>
2018-03-08 17:41:12 +00:00
Jon Willesen 76aa64977a fix student planner item override caching
This uses a meta cache key so we can limit the cache invalidation to
just the planner items instead of invalidating the whole user cache.

fixes ADMIN-791

test plan:
- Refreshing the list view should use the Redis cache. One way to see
this is to look at the redis activity in the server log:
`bundle exec rails server | egrep 'Redis.*planner_items'
When refreshing the page, you should only see gets. If you flush your
redis cache, you will also see setex.
- In list view, if you create, complete, edit, or delete a todo item,
refreshes should persist these changes.
- In list view, completing other items (like an assignment), should also
persist on refresh.
- In card view, on the to do sidebar, dismissing items should persist
across refreshes.

Change-Id: I9e0e028346974b46ab5750c285b4e2c332906c84
Reviewed-on: https://gerrit.instructure.com/142795
Tested-by: Jenkins
Reviewed-by: Mysti Sadler <mysti@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-03-08 17:07:32 +00:00
Transifreq d2fe6282d6 update hy translation
Change-Id: Id21105d463733686cd42d121d6dfceaa8e6de798
2018-03-08 06:02:09 -07:00
Robert Lamb 9c8688f0d2 spec: POC pact consumer
test plan: passes Jenkins

see README.md for how and where to build the pact files

added copyright and fixed gergich formatting

Change-Id: I570ab23152f50f8b04994c4e1ed59a5ed63b42fa
Reviewed-on: https://gerrit.instructure.com/142881
Tested-by: Jenkins
Reviewed-by: Anju Reddy <areddy@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
2018-03-08 01:16:32 +00:00
Ryan Shaw 9cf2308aa8 Make tooltip for edit button actually show up
Fixes: CORE-1056

Test plan:

* go to accounts/x/users
* hover over the “edit” pencil
* a tooltip should appear

Change-Id: Ic1d6b0a4ff2196549a1578bc596f39c965d0fe2f
Reviewed-on: https://gerrit.instructure.com/142915
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-03-08 00:12:47 +00:00
Jeremy Neander 7465090131 update complete/incomplete grade cell formatter
closes GRADE-932

test plan:
 1. full test of Complete/Incomplete assignment cells
    * no functional changes
    * things just look prettier (display only)
 2. smoke test other cells (display only)

Change-Id: Ibc5b829d46865b518813ef6b32c358f388885132
Reviewed-on: https://gerrit.instructure.com/142682
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2018-03-07 23:50:58 +00:00
Ryan Shaw 0fb79382aa Re-exclude moment locales from vendor bundle
It turns out our the webpack IgnorePlugin we set up stopped working
so this fixes it and adds a spec that will catch it if it ever breaks
again in the future

Test plan:
* the webpack vendor should be smaller
* date strings in other languages should still work

Change-Id: I3a23c358eec73309f97bac119c7028e25d52e448
Reviewed-on: https://gerrit.instructure.com/142416
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-03-07 23:28:24 +00:00
James Williams d56dbc06ca validate default_view on courses
don't let UI restrictions on 'wiki' type be bypassed via API

test plan:
* use the courses update API endpoint to
 update the 'default_view' value
* should only be able to set to 'wiki' if a wiki front
 page exists
* should not be able to set to values other
 than those specified in the API documentation

closes #ADMIN-828

Change-Id: Ib18e8cc1df4cda7de3b8b639589a6d46a6e7c031
Reviewed-on: https://gerrit.instructure.com/142832
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2018-03-07 22:22:06 +00:00
Ryan Shaw f1b0c8631b rm a config line for a file that has been rm’ed
Vendor/md5.js doesn’t exist anymore, we get it from npm directly
So we don’t need this config line

Change-Id: Ib6de829e7d708d07d9a3bd5bc666ab8dc4e99a4a
Reviewed-on: https://gerrit.instructure.com/142824
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-03-07 22:19:48 +00:00
Ryan Shaw 227317110a Remove unneeded imports of ‘i18n’
Closes: CORE-1096 

These files don’t actually use i18n but import it

this will reduce our js bundle sizes in production because:
when a file says `import I18n from 'i18n!some_bundle', what it does in
production is make a file in pub/javscripts/translations/some_bundle.js
and imports that before importing this file. but that means you get ALL
the strings for all the languages of any other file that also imports
from 'i18n!some_bundle'. That's bad enough, because, for example, since
we require one module to pick the usage rights for a file in the wiki 
sidebar and that file imports from 'i18n!react_files' and since the 
wiki sidebar code is included in the common bundle, 
all of the other strings from 'i18n!react_files' are also included in 
the common bundle.

but these files were even worse: they were forcing all the strings
from different scopes to be included in a bundle, even though the didn't
actually use ANY of them.

there was also few that I found that were not importing it correctly
(using lowercase i18n instead of I18n) and since our i18nliner extract
command only looks for capital I18n, we were never sending those strings
to translators.

and there were a few files that imported a scoped I18n object that just
did I18n.n, whose behavior doesn't differ in scoped vs non-scoped 
versions, so they could safely import the unscoped 'i18nObj' instead and
not force whatever bundle they are into include all the strings for 
that scope.


test plan:
* prod webpack bundles should be smaller
* no actual behavior should change

Change-Id: I9173d8ac7c6074ba43e04a7c5e7c74fed37e6c0e
Reviewed-on: https://gerrit.instructure.com/142568
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-03-07 22:19:13 +00:00
Venk Natarajan b52a7ca046 Add Close/Open for comments to discussion v2 menu.
Closes COMMS-728

Test Plan:
* Have a course (and group) with discussions.
* Go to the course and group discussions pages and:
* Close and open discussions.
* A pinned discussion should stay pinned.
* Unpinned ones should move back and forth between the
  boxes.
* Try to break this against other combinations of actions.

Change-Id: Ic556adc606ba5c9a4d7973604307a098bb202905
Reviewed-on: https://gerrit.instructure.com/142821
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
Tested-by: Jenkins
Reviewed-by: Aaron Kc Hsu <ahsu@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
2018-03-07 22:07:07 +00:00
Venk Natarajan 179e344bec Add pin to manage discussion menu.
Refs COMMS-727

Test Plan:
* Make section-specific discussions enabled.
* Have closed, unpinned, and pinned discussions.
* Anything not in the "pinned" section should have a working
  "pin" element in the menu.
* A discussion in the "pinned" section should have an "unpin"
  item in the menu; triggering this should move to the
  "unpinned" or "closed for comments" section depending on
  whether it was locked.
* Make sure this works in concert with duplicating.

Change-Id: I4dcd74541a764a93d643522b33d6f603b3685b18
Reviewed-on: https://gerrit.instructure.com/142748
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
QA-Review: Aaron Kc Hsu <ahsu@instructure.com>
Product-Review: Venk Natarajan <vnatarajan@instructure.com>
2018-03-07 21:33:07 +00:00
Nate Collings e8a11e12a9 don't add the graded_at index on pg < 9.5
test plan:
  - make sure the index is created on
    postgres 9.5+

refs PFS-10106

Change-Id: I93fdcdb796813324d3ee93f47157b1a76f995895
Reviewed-on: https://gerrit.instructure.com/142891
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
2018-03-07 21:14:28 +00:00
Andrew Huff c6783ad4cb update instfs dynamic_settings examples
test plan: none

Change-Id: I34b1c44edbac29118c290c715eb22e12736eaa05
Reviewed-on: https://gerrit.instructure.com/137635
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins
Product-Review: Andrew Huff <ahuff@instructure.com>
QA-Review: Andrew Huff <ahuff@instructure.com>
2018-03-07 20:58:17 +00:00
Cody Cutrer c22365fae2 sign SAML LogoutRequests and LogoutResponses
fixes CORE-1025

test plan:
 * configure SAML with an IdP that supports SLO, and enable
   message signing with an algorithm of your choice
 * configure Canvas to have a private key for use with SAML
 * sign out _at the IdP_
 * observe in your browser request logs that Canvas gets a SAMLRequest,
   and then generates a redirect back with a SAMLResponse; that
   SAMLResponse should also have a Signature and SigAlg query
   params
 * sign in, then sign out at Canvas
 * observe in your browser request logs that Canvas generates a
   SAMLRequest param taht has Signature and SigAlg query params
   too

Change-Id: Ie2ce89ad8b937f00576bf63ad29732a001251947
Reviewed-on: https://gerrit.instructure.com/141364
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2018-03-07 20:55:25 +00:00
Aaron Kc Hsu 4a18d66e1f Add Move To KO Functionality to New Discussions Page
fixes COMMS-724

Test Plan
  * Turn on new discussions feature flag
  * navigate to the menu of a dicussion
  * notice the moe to option
  * use the move to tray
  * make sure that all move to cases are working as
    suspected
  * be creative

Change-Id: Id557e5db5e8d56ca1eb25ab6802c4b2023190672
Reviewed-on: https://gerrit.instructure.com/142278
Reviewed-by: Venk Natarajan <vnatarajan@instructure.com>
Tested-by: Jenkins
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
2018-03-07 20:48:16 +00:00
Steven Burnett c46c7d2007 Revert "fix footer logo in footer of emails"
This reverts commit 789e37c932.

Change-Id: Iddf79c419ffee694719f11b7d7c229efeadea594
Reviewed-on: https://gerrit.instructure.com/142886
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
2018-03-07 20:35:15 +00:00
Adrian Packel fde37d2773 Set flex-basis of assignment cell divs explicitly
Set the flex-basis of .Grid__AssignmentRowCell__StartContainer and
EndContainer explicitly, with appropriate values for grading
scheme-configured assignments, instead of trusting the browser to
come up with the right width. This fixes some alignment issues in IE11.

fixes GRADE-911

Test plan:
* Setup a course with at least one assignment with a grading scheme and
  one without, and assign them to at least one student.
* In a VM running IE11, open new Gradebook.
* For both assignment types, check that the assignment row cells have their
  content centered (i.e., the scores do not appear pushed to the right) as
  they do in non-delinquent browsers. Also check that the content is
  properly aligned/centered when the cell is in edit mode.
* Finally, make sure the appearance in other browsers has not changed.

Change-Id: I7277828cd246f854368a9696f4b343047f137851
Reviewed-on: https://gerrit.instructure.com/142699
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2018-03-07 20:27:16 +00:00
James Williams 1213696e5f don't show hard_inactive enrollments in courses list
even if they're in the future

test plan:
* enroll a student in a course set to begin
 in the future
* deactivate the student's enrollment
* the course shouldn't show up in the
 student's list of future courses (/courses)

closes #ADMIN-401

Change-Id: I5fad047abbd285733cceb7f5d452916c71bec161
Reviewed-on: https://gerrit.instructure.com/142770
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2018-03-07 20:25:07 +00:00
Cameron Matheson 11a46b8fb3 [ci selinimum capture] Revert "re-add and disable graphql feature flag"
This reverts commit 02cb94cdc1595b9209700a44c6c623b0addfd635.

Change-Id: Ifcb20d6036822f4ef8c562a4036c40b89a2af5bc
Reviewed-on: https://gerrit.instructure.com/142760
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-03-07 20:15:45 +00:00
Cameron Matheson 01cdb978e8 "properly" "handle" graphql types in selinimum
closes ???

Change-Id: I0f249e4fd38099615d2a2affdbf791cc2365cf3a
Reviewed-on: https://gerrit.instructure.com/142829
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2018-03-07 20:15:24 +00:00
Jared Crystal 2675735aaa fix regrading for multiple attempts
refs QO-319

test plan:
 - create a quiz with 5+ MC questions all in the same question group
   which pulls 3 of those questions
 - allow multiple attempts (3 attempts)
 - take the average score of the attempts (probably not significant)
 - take the quiz all 3 times as 2+ students
 - regrade a question which was part of the final attempt for at
   least one student, but which was not in the final attempt for
   at least one other student, but which was in a previous attempt
   for that other student. (sorry if that's confusing)
   - example: studentA had question2 in his first attempt, but not
     in the third. studentB had question 2 in her third attempt.
     So question2 is ready for the regrade
 - regrade that question by changing the correct answer and only
   awarding points for the correct answer
 - moderate/view the submission attempts for the students
 - all attempts should accurately report the regrade, regardless
   of whether or not that question was in the final attempt for
   that student
 - sanity check: create a regular quiz without a question group
   and without multiple attempts. Regrading should work as expected

Change-Id: I0a66473d1ee63a464ad02c93d938af58b337114f
Reviewed-on: https://gerrit.instructure.com/142256
Reviewed-by: Steve Kacsmark <skacsmark@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Michael Hargiss <mhargiss@instructure.com>
2018-03-07 19:54:39 +00:00
Nate Collings 4ec3a769ba add an index on submissions.graded_at
This is to improve some very slow queries
that are filtering on huge numbers of
submissions.

test plan:
  - make sure the index exists

refs PFS-10106

Change-Id: I1b21ac3db2ec59f8a83144d263e20003550698ea
Reviewed-on: https://gerrit.instructure.com/142853
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2018-03-07 19:50:40 +00:00
Jacob Fugal 14d54e7eb3 export attachments to instfs
closes RECNVS-43

This datafixup finds attachments which do not have an instfs_uuid,
creates `references` for them, posts them to instfs /references
endpoint. The endpoint imports them into instfs and returns an array
of the references with their new uuids. The attachments are updated
to include the uuids from instfs

Test plan
- turn on s3 storage for files in canvas
- with inst-fs off in canvas (deactivate the plugin), upload a file
- Enable the inst-fs plugin
- in the rails console, run
  `DataFixup::ExportAttachmentsToInstfs.run(Account.find(1))`
  (or whatever your account id is)
- verify using instfs /debug/attachments/ls route that the attachment
  was posted
  to instfs
- verify using the rails console that the attachment has an instfs_uuid

Change-Id: I26720c2324b7302a3a843f04932785518ac699e7
Reviewed-on: https://gerrit.instructure.com/142572
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Michael Jasper <mjasper@instructure.com>
Reviewed-by: Michael Jasper <mjasper@instructure.com>
2018-03-07 19:38:50 +00:00
Spencer Olson b67573c55c fixup complete/incomplete selenium
refs GRADE-76

Test Plan:
- specs pass

Change-Id: Ia8e155e54b44fc1cc5ad8a62b8fdaf0265cce0df
Reviewed-on: https://gerrit.instructure.com/142876
Tested-by: Jenkins
Reviewed-by: Indira Pai <ipai@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
2018-03-07 19:13:55 +00:00
Jayce Higgins 4121436abc Create quizzes next migration service for cc export
closes: QUIZ-3861, QUIZ-4113

Test-Plan:
  - QA-CR because it's not hooked up yet

Change-Id: I9028c91f485b63bc8ca8d2c70567c78945c2a848
Reviewed-on: https://gerrit.instructure.com/142304
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jayce Higgins <jhiggins@instructure.com>
2018-03-07 18:37:59 +00:00
Spencer Olson cb6d513cc2 new gradebook: implement complete/incomplete menu
closes GRADE-76

Test Plan:
* Note: this commit only covers the functionality of the cell when it
  is in 'editing' mode. There is a separate ticket which handles the
  view/functionality of the cell when it is in 'read-only' mode.

A. Setup
	1. Select or create a Course
	2. Ensure at least one Student exists for the Course
	3. Create a Complete/Incomplete Assignment worth 10 points
	4. Visit New Gradebook

B. Verification for Clicking Menu Options
  1. Click to edit a submission for the Complete/Incomplete Assignment
  2. Click on the Complete/Incomplete Menu Button
  3. Verify "Complete" (green checkmark), "Incomplete" (black X),
     "Ungraded", and "Excused" are options.
  4. Verify "Excused" is the last item
  5. Verify clicking the green checkmark causes the value to the left
     of the menu button to populate with a green checkmark.
  6. Verify clicking the black X causes the value to the left of the
     menu button to populate with a black X.
  7. Verify clicking "Ungraded" causes the value to the left of the
     menu button to populate with "–".
  8. Verify clicking "Excused" causes the value to the left of the menu
     button to populate with "Excused".
  9. Verify tabbing away from the cell commits the grade change (reload
     the page to make sure the grade is saved).

C. Verification of Keyboard Navigation
  1. Navigate to the cell using the keyboard
  2. Verify that the menu button receives focus by default
  4. Verify you can tab to the tray button, and can shift-tab back to
     the menu button
  5. Verify that "Enter" opens the complete/incomplete menu
  6. Verify that "ESC" dismisses the complete/incomplete menu

D. Smoke test grade entry for other:
  1. Assignment types
  2. "Enter Grades as" settings

Change-Id: I8f1651c5ca12d0368988ed4aef86442f8351b6a2
Reviewed-on: https://gerrit.instructure.com/142757
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Tested-by: Jenkins
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2018-03-07 18:37:43 +00:00
Simon Williams 8bc559e7b1 spec: fix flaky announcement spec
Change-Id: I8840602958d3b1a3df76a6f4b599b1a45b634d54
Reviewed-on: https://gerrit.instructure.com/142861
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2018-03-07 18:16:43 +00:00
Ryan Shaw 69002ce14d rm calendars_wizard_box, it’s not used anymore
I couldn’t find anywhere this is used, can you?

test plan:
* there should not be a hidden part of the calendar page
  that stops working when this is deleted

Change-Id: Idb5b6901d907817b8555ff37def4345bdc066bbc
Reviewed-on: https://gerrit.instructure.com/142147
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-03-07 18:09:58 +00:00
Ryan Shaw 1d83b67fdd rm context_media_comment, it’s not used anymore
I couldn’t find anywhere this is used, can you?

test plan:
* there should not be a hidden part of the app 
  that stops working when this is deleted

Change-Id: I9928c4f21a9fa37c1248ccd9e0033685e75f8f16
Reviewed-on: https://gerrit.instructure.com/142148
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-03-07 18:09:30 +00:00
Shahbaz Javeed 9f7ee5f6b3 prevent disabling new gradebook if any sub-account/course uses it
closes GRADE-767

test plan:
* Create a sub-account 2 levels deep
* Create a course for this sub-account

* Go to the root account and look for the "New Gradebook" feature flag
* Verify visually that you're allowed to turn the flag off

* Enable the "New Gradebook" feature flag on the course
* Go to the root account and look for the "New Gradebook" feature flag
* Verify visually that you're no longer allowed to turn the flag off

* Disable the "New Gradebook" feature flag on the course
* Enable the "New Gradebook" feature flag on the sub-account
* Go to the root account and look for the "New Gradebook" feature flag
* Verify visually that you're no longer allowed to turn the flag off

* Disable the "New Gradebook" feature flag on the sub-account
* Go to the root account and look for the "New Gradebook" feature flag
* Verify visually that you're allowed to turn the flag off

Change-Id: Ifc7444ff114d8fb3b297ea20f5e2891a450497c5
Reviewed-on: https://gerrit.instructure.com/142011
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Pert Eilers <peilers@instructure.com>
2018-03-07 17:30:49 +00:00
Cody Cutrer d24fd96e05 avoid error in Canvas::Reloader when something hasn't been loaded yet
Change-Id: I282e2403cc4817c4e485f5a4d08813dc617f3b90
Reviewed-on: https://gerrit.instructure.com/142843
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2018-03-07 17:18:59 +00:00
Robert Lamb 6bbc5a9b7b spec: fix flaky Chrome spec
replace submit_dialog_form with <form_element>.submit

Change-Id: I1d61fb841d7030aa792275a7ef71a5d7adab0024
Reviewed-on: https://gerrit.instructure.com/142844
Tested-by: Jenkins
Reviewed-by: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
2018-03-07 17:18:31 +00:00
Jacob Fugal 171ef86f81 set Attachment.current_root_account during jobs
and rename that suite of methods to make more sense

test-plan: N/A

Change-Id: Iffc520ea55141ac47da669663838a4d3c3d8712c
Reviewed-on: https://gerrit.instructure.com/142486
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
2018-03-07 17:18:24 +00:00
Simon Williams bf894df070 spec: add missing require
Change-Id: I5b4e381623625804a1007a87f2a0e5ef47164131
Reviewed-on: https://gerrit.instructure.com/142849
Reviewed-by: Anju Reddy <areddy@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2018-03-07 16:50:29 +00:00
Collin Parrish 45007e0979 test instfs assignment submission integration
closes RECNVS-339

test plan:
    run this test in e2e instfs environment

Change-Id: I1edb781bc32d3d11a384410056d88adf4b370f73
Reviewed-on: https://gerrit.instructure.com/142145
Tested-by: Jenkins
Reviewed-by: Michael Jasper <mjasper@instructure.com>
Product-Review: Collin Parrish <cparrish@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
2018-03-07 16:48:07 +00:00
Steven Burnett 5fecce989d add ordered by recent activity text
fixes ???

Test Plan:
- With SSD on go to the discussions index page
- notice the text content that says
  "Ordered by Recent Activity" on only the
  unpinned and closed for comments containers
- make sure this text content doesn't need to be
  a header for accessibility.

Change-Id: I64ffc6c825d31fa2eae7dd975ed5b0f0272d4f00
Reviewed-on: https://gerrit.instructure.com/142828
Tested-by: Jenkins
Reviewed-by: Venk Natarajan <vnatarajan@instructure.com>
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
2018-03-07 16:46:06 +00:00
Landon Gilbert-Bland 8de06a4022 Load all discussions in the discussion index page
Fixes COMMS-851

Test Plan
  * Create more then 40 discussions in a course. Ex with rails console:

    ```
    c = Course.find <id>
    t = c.teachers[0]
    1.upto(100) do |n|
      c.discussion_topics.create!(title: n.to_s, message: 'm', user: t).save!
    end
    ```

  * Enable the section specific discussions feature flag
  * Go to the discussions index page for the course
  * Verify that all the discussions are loaded
  * Go to the javascript console and verify that `GET_DISCUSSIONS_START`
    and `GET_DISCUSSIONS_SUCCESS` are only dispatched once.
  * Make sure the announcement pages still loaded (with and without
    section specific announcements enabled)

Change-Id: I4b7d0a26d6bdbf1d2416080333da93b58c85dc7f
Reviewed-on: https://gerrit.instructure.com/142372
Reviewed-by: Aaron Kc Hsu <ahsu@instructure.com>
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Venk Natarajan <vnatarajan@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2018-03-07 03:58:43 +00:00