Commit Graph

5917 Commits

Author SHA1 Message Date
Marc Phillips a01a549b4c Add update to LTI Data Services
closes PLAT-4763

Test Plan:
 it updates the subscription

Change-Id: I80289d2bea6c88b70726718cec7b9087e4879aa9
Reviewed-on: https://gerrit.instructure.com/206505
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Jenkins
QA-Review: Marc Phillips <mphillips@instructure.com>
Product-Review: Marc Phillips <mphillips@instructure.com>
2019-08-26 22:21:46 +00:00
Marc Phillips 1f2394e982 Add subscription show to LTI DataServices
closes PLAT-4761

Test Plan:
 - see that a call to this endpoint will show a sub

Change-Id: Ifc299aebe5cfbadaf82a1970f75ad182ffa31b29
Reviewed-on: https://gerrit.instructure.com/206489
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Jenkins
QA-Review: Marc Phillips <mphillips@instructure.com>
Product-Review: Marc Phillips <mphillips@instructure.com>
2019-08-26 22:21:25 +00:00
Rob Orton 1fac78417e keep api errors consistent
fixes CORE-3257

test plan
 - specs should pass

Change-Id: I56a1e7b02b84a063b9816556d163bb3e247f8d73
Reviewed-on: https://gerrit.instructure.com/206616
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2019-08-26 19:25:44 +00:00
Rob Orton c691ec57df move update outside of main process method
this allows this to be overwritten easier

refs CORE-3276

test plan
 - specs should pass

Change-Id: Ia149c35ab23ac7432a2e481f8b88d660d8e7fb13
Reviewed-on: https://gerrit.instructure.com/206627
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2019-08-26 19:25:11 +00:00
Rob Orton afc4e4c6f5 set workflow_state to merging for new user_merges
also update the updated_at to get elapsed time of user merge

Change-Id: I699365cbba2530bd6a5eab4439704b1adeecaa13
Reviewed-on: https://gerrit.instructure.com/198715
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2019-08-26 19:24:57 +00:00
Weston Dransfield da7a26af2d Compact live event payload
fixes PLAT-4773

Test Plan:
- Verify the new "compact_live_event_payloads"
  release flag is visible in the root account and
  defaults to "off"
- Enable the feature flag
- Verify null values are removed from live event
  payloads
Change-Id: I8f91ead101fa3cd81fe8553f7f8ff6e94b294128
Reviewed-on: https://gerrit.instructure.com/206307
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Jenkins
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
Product-Review: Oxana Jurosevic
2019-08-26 19:24:30 +00:00
Marc Phillips d2e26c9295 Add DataServices create action
closes PLAT-4757

Test Plan:
 - create a subscription using the lti service, note that it works

Change-Id: Ia7cb10e4f2c1fd1e6d4a13be2f3d25b2f05e9bc7
Reviewed-on: https://gerrit.instructure.com/206291
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Marc Phillips <mphillips@instructure.com>
Product-Review: Marc Phillips <mphillips@instructure.com>
2019-08-23 13:54:29 +00:00
Mysti Lilla 6d9e4516b1 Add create content share API
closes ADMIN-2809
flag=direct_share

Test plan
- Ensure you can create a content export
  and share content between users
- Users cannot create shares for other
  users or share content they do
  not have access to

Change-Id: Ic3c748ad800f85eddd24ac6f0995a363619eed2b
Reviewed-on: https://gerrit.instructure.com/204338
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
2019-08-22 19:10:27 +00:00
James Williams 45d23e3ab6 fix restoring deleted default sections via sis
test plan:
* create a course
* edit the default section to have a sis id
* delete the section
* create a new default section somehow
* try to restore the deleted section
* it should restore without error

closes #CORE-2344

Change-Id: I941ce9a6cc7927c584d7412d0c7141aaae86829a
Reviewed-on: https://gerrit.instructure.com/205331
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-08-22 19:03:52 +00:00
Marc Phillips c7cd834b27 Add DataServices LTI integration
refs PLAT-4757

Test Plan:
 - tests pass

Change-Id: I695ce7c88e47a38115e397d4e29eccd9171e7bf2
Reviewed-on: https://gerrit.instructure.com/206063
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Marc Phillips <mphillips@instructure.com>
2019-08-22 15:02:49 +00:00
Clint Furse 0a3dd07e03 add logging around tool reinstallation
closes PLAT-4725

Test Plan:
- verify the ability to still add/remove a tool, preferrable
  the plagarism platform tool
- verify that removing and adding tool logs all relavant method
  calls

Change-Id: Ia7e7f41ba0503d58faf64de7fe0d19c3ac9eaf61
Reviewed-on: https://gerrit.instructure.com/205803
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Tested-by: Jenkins
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Clint Furse <cfurse@instructure.com>
2019-08-22 14:28:55 +00:00
Ryan Shaw 6c3bde3a9a refactor media_object_iframe for less flaky tests
Changes:
* refactor tests to be less brittle
* better code reuse
* make sure we mark the media_object as viewed if they load the iframe


Test plan:
* the /media_objects_iframe/blahblah endpoint should work exactly
  as it did before

Change-Id: I632b5b6f21cbb1536a02764de59227558c26e9c9
Reviewed-on: https://gerrit.instructure.com/206204
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2019-08-22 03:55:45 +00:00
Rob Orton a4b4a14640 api: add ability to set grade_passback_setting
fixes CORE-3216

test plan
 - in api set grade_passback_setting on course

Change-Id: Ief381fae7b81e2eb6db096adcebfcf999e987b3f
Reviewed-on: https://gerrit.instructure.com/205916
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
2019-08-21 21:40:07 +00:00
Rob Orton 57616667df make variable expander for grade_passback_setting
fixes CORE-3215

test plan
 - have a course with grade_passback_setting
 - use gradePassbackSetting variable in lti tool
 - it should return the setting

Change-Id: I0f598c8563d9f9d40e1d1f49c483a93bbde364a0
Reviewed-on: https://gerrit.instructure.com/205841
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-08-21 19:57:54 +00:00
Cody Cutrer 4f267c41b9 various rails 6 fixes
Change-Id: I9a2da0fe619170e6a297ad5d1b9dd3e11daf3782
Reviewed-on: https://gerrit.instructure.com/206054
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-08-21 19:47:32 +00:00
Cody Cutrer aa5811bdff drop support for a Redis ring as MultiCache
plz to just use HACache

Change-Id: I06bb7d23ee24e1ef11be87af7745880ddcebd4bf
Reviewed-on: https://gerrit.instructure.com/205564
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-08-21 18:21:46 +00:00
Adrian Packel d561e2070d Make muted/unposted droppable once more
When the grade calculator attempts to apply drop rules, don't
automatically exempt muted assignments (or unposted submissions in the
case of Post Policies) from being dropped. Continue treating them as 0
points (if computing final score) or ignoring them altogether (if
computing posted score), but generally allow them to be dropped. This
fixes a calculation issue that could occur for an assignment group with
drop rules: muted/unposted submissions that should have been dropped
completely were still included (but treated as 0 points), with the
result that the group's points_possible value was higher than could ever
have been attained given the drop rules in place.

fixes GRADE-2356

Test plan:
- Have a course with New Gradebook and Post Policies enabled
- Set up an assignment group
  - Add 2 assignments worth 10 points each
  - Set a drop rule to drop the lowest assignment
- Open Gradebook
  - Grade a student on the first assignment but not the second
- Export to CSV
  - The "final score" column should reflect just the one graded
    assignment and should not treat the ungraded assignment as 0

- Repeat this setup in an Old Gradebook course
  - Mute the second assignment (to make it "unposted")
- Export to CSV
  - The "final score" column should be the same as above

Change-Id: I91903d481fcbedf60180e5dcabe96106308586e9
Reviewed-on: https://gerrit.instructure.com/205856
Product-Review: Keith Garner <kgarner@instructure.com>
Tested-by: Jenkins
Reviewed-by: Keith Garner <kgarner@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
2019-08-21 15:28:50 +00:00
Cameron Matheson ed30b3dce9 remove address book specs/plugin
Test plan: specs pass

Change-Id: Id3394d6da6c738db078754c97398eb5112458550
Reviewed-on: https://gerrit.instructure.com/205138
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2019-08-20 22:51:37 +00:00
wdransfield a63c1f0468 Create default tool assignment from "quick create"
Closes PLAT-4695

Test Plan:
- Create a a default tool assignment from the
  quick create modal in the assignment index page
- Edit the new assignment
- Verify you can select content from the default
  tool as the default
- Verify you can save and launch the assignment
- Verify you can create non-default external
  tool assignments as before
- Verify you can create non-default and default
  external tool assignments withouth the "quick
  create" modal

Change-Id: I94578f99c3d200e3dac57a13a7d5f7157413618b
Reviewed-on: https://gerrit.instructure.com/204847
Tested-by: Jenkins
Reviewed-by: Clint Furse <cfurse@instructure.com>
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2019-08-20 21:58:49 +00:00
Rob Orton a0012b2fb3 make course grade passback setting sticky
fixes CORE-3214

test plan
 - import courses and set setting
 - change setting
 - import should not override the setting

Change-Id: Ic1a9695cdcfe252102ec85324b658effa152407e
Reviewed-on: https://gerrit.instructure.com/205832
Tested-by: Jenkins
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-08-20 20:49:35 +00:00
James Williams 32615c5823 add updated_at to enrollment_states
Change-Id: I5d66e52d993dc2d9692dbe1690a2060a3336220d
Reviewed-on: https://gerrit.instructure.com/202960
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-08-20 17:06:58 +00:00
Drake Harper 88e41e069a Add asset_name property to asset_accessed event type
Fixes PLAT-4718

Test Plan:
-create an event
-verify asset_name is in body of event

-create a context external tool
-verify asset name is not in body of event

Change-Id: I96d38dfc74b1888aae962e62ee06d025f83ff35b
Reviewed-on: https://gerrit.instructure.com/204268
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Oxana Jurosevic
2019-08-20 15:28:14 +00:00
Adrian Packel efb1deb064 Exclude deleted groups from filter
Do not show deleted groups/group categories in the student group filter.
If a filter is selected and then subsequently deleted, behave as though
no filter is applied until such time as a valid group is selected.

fixes GRADE-2275

Test plan:
- Have a course with New Gradebook and some group sets/groups
  - Enable the "Launch SpeedGrader filtered by student group" setting
- Open New Gradebook and filter by a group
- Go to the course's People page and delete the specific group you're
  filtering by
- Return to New Gradebook
  - The group filter should be cleared and all students should be shown
  - The submission details tray should disable the SpeedGrader link
    because no group is selected (except for group assignments)
- WITHOUT selecting a new group:
  - Open the view page for an assignment:
    - The SpeedGrader link/group select on the right-hand side should
      not have a group pre-selected, and the list of eligible groups
      should not include the deleted group
  - Open SpeedGrader directly for an assignment:
    - /courses/<course_id>/gradebook/speed_grader?assignment_id=<id>
    - All students should be shown (we should not attempt to filter by
      the selected-but-deleted group)
- Select a new group for real and make sure things work as before:
  - Check that Gradebook filters properly by the now-selected group
    - Check that the submission details tray now allows you to access
      SpeedGrader
  - Check that the view page for an assignment recognizes the selected
    group
  - Check that SpeedGrader filters by the selected group

Change-Id: Ib528e6594afc80e50d4e0127b62a161226c674bb
Reviewed-on: https://gerrit.instructure.com/205287
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Keith Garner <kgarner@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2019-08-19 19:00:29 +00:00
James Williams 38b9fc59a1 fix multicache redis disconnections on job fork
Change-Id: Icfde84927a8a1a9da1b419227b78ee882d3ed347
Reviewed-on: https://gerrit.instructure.com/205291
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
2019-08-15 18:39:14 +00:00
Drake Harper d766d16326 Remove feature flag for lti advantage
Fixes PLAT-4698

Test Plan:
-verify lti 1.3 and lti advantage flag is gone
-verify that all lti 1.3 features are still available/functional

Change-Id: I8be9e02fb2d32a92098bde43099ba0198e8d3329
Reviewed-on: https://gerrit.instructure.com/204381
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
Tested-by: Jenkins
2019-08-14 21:21:58 +00:00
Cody Cutrer d6c46625be helper to easily find the cause of a failure to Marshal.dump
Change-Id: I9d51d92050f3b8296cc0b622915ab50a0bd42d84
Reviewed-on: https://gerrit.instructure.com/205104
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-08-14 20:21:19 +00:00
Cody Cutrer 0604c55d7d hush you, spring
Change-Id: I4646d174c3a661f16f5b9de1dcc5da50b6ce965c
Reviewed-on: https://gerrit.instructure.com/204950
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-08-14 20:07:29 +00:00
Cody Cutrer 7a146dc566 add whitelist of includes when using token scopes
Change-Id: I8d68faea166a16e4284433845d38b23ab98ab0a7
Reviewed-on: https://gerrit.instructure.com/204380
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Marc Phillips <mphillips@instructure.com>
Tested-by: Jenkins
Product-Review: Jesse Poulos <jpoulos@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2019-08-12 22:45:25 +00:00
Cody Cutrer bffe7a4883 switch to SCrypt for password storage
use a custom class so that we can set the scrypt parameters
directly, instead of that silly calibration stuff. also implement
cost_matches so that authlogic transitioning will work if we
were to ever change said parameters

Change-Id: Icc6e3a592e18beb6c15e01fa4e489d93e2d3b6e0
Reviewed-on: https://gerrit.instructure.com/204705
Tested-by: Jenkins
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
2019-08-12 20:39:22 +00:00
Cody Cutrer cbf7b720a3 add rails6 gem, and boot console
disable bullet in rails 6

Change-Id: Ic84a291c9bd81dd1ef93d414b9ef73d277d07273
Reviewed-on: https://gerrit.instructure.com/204711
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-08-12 20:09:56 +00:00
Cody Cutrer f753a5e432 update authlogic
two breaking changes:
 * validations are gone, just use vanilla rails validations
 * authenticates_many is gone. use a scoping call instead

Change-Id: Iad2a5d4655ad116e85ea3ea98bc209b37cbdba39
Reviewed-on: https://gerrit.instructure.com/202619
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-08-12 18:02:02 +00:00
Pat Renner 6121e6f4db Ensure outcome imports update active records over deleted records
It is possible for multiple outcomes/outcome groups with the same
`vendor_guid` to be present in a given context.
When updating an outcome/group via CSV, we should
always prefer to update an active outcome to restoring a deleted outcome.

fixes OUT-3138

test plan:
- For both an outcome/outcome group, create two records
 with identical `vendor_guid's`. To do this, create two records via CSV
with guids that you define. After importing the CSV, manually update both
records to have the same `vendor_guid`.
- Mark one record as deleted and delete (via CSV)
- When updating a record, ensure only
 the active record is updated

Change-Id: I420a2435255af4bfb807be7d5dd761456151a016
Reviewed-on: https://gerrit.instructure.com/204087
Tested-by: Jenkins
Reviewed-by: Frank Murphy III <fmurphy@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2019-08-12 13:55:01 +00:00
Cody Cutrer c9aab282ba use rails built-in RedisCacheStore
RedisStore is no longer supported

somewhat surprisingly, the serialization formats are compatible, so we don't
need to do any namespacing

Change-Id: Iede3a023cada95313875f0ce419b649c364ee97c
Reviewed-on: https://gerrit.instructure.com/202663
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2019-08-09 20:22:56 +00:00
Cameron Matheson a8cb21616c load dynamodb config from consul instead of yml
Change-Id: Ib0c30b4d398144a398de1ac156332959674d6ae6
Reviewed-on: https://gerrit.instructure.com/204452
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
2019-08-09 19:01:38 +00:00
Ethan Knapp caf1158b43 add sis_source_id to Assignments
Test Plan:
- Canvas Migrations should run successfully
- Attempting to save Assignments (within the same RootAccount) with the
    same sis_source_id should fail
- [API] Assignment GET should include sis_assignment_id field
- [API] Assignment POST should allow setting the sis_assignment_id
- [API] Queries involving an Assignment should support the `assignments/sis_assignment_id:BLAH` syntax

refs PFS-11978, PFS-12661

Change-Id: I37a8d396bb409e98f6372abdc5b08f25f1d8d0f7
Reviewed-on: https://gerrit.instructure.com/199025
Tested-by: Jenkins
Reviewed-by: Tyson Brown <tbrown@instructure.com>
QA-Review: Trevor Byington <tbyington@instructure.com>
Product-Review: Collin Anderson
2019-08-08 23:02:51 +00:00
Drake Harper 96b6be4d2d Fix follow oauth2 flow for scopes error handling
Fixes PLAT-4681

Test Plan:
-set up an lti key
-hit /login/oauth2/auth?client_id=tool_id&response_type=code
	&state=YYY&redirect_uri=some_url&scope=url:GET
-verify that redirect was redirected to with error type and description

Change-Id: I724f503e31edd449f29e3a894d492a11cca61279
Reviewed-on: https://gerrit.instructure.com/203250
Tested-by: Jenkins
Reviewed-by: Marc Phillips <mphillips@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2019-08-07 21:04:12 +00:00
Adrian Packel 83102cef94 Save post policy in content migrations
closes GRADE-2289

Test plan:

Course copy:
- Have a course with New Gradebook and post policies enabled
- Create the following assignments/post policies:
  - A Manual posting policy for the course overall
  - An auto-posted assignment (A1)
  - A manually-posted assignment (A2)
  - An anonymous assignment (A3)
  - A moderated assignment (A4)
- From the course's Settings screen, make a copy of the course
- Enable New Gradebook for the new course if needed
- Check that the newly-created copy has retained the overall post policy
  for the course and the individual post policies for the assignments
  (i.e., A1 should be auto-posted and A2-A4 should be manually-posted)
  - Note that A4 should be manually-posted, even if you had previously
    released grades and set the policy to automatic (course copy does
    not carry over the grade-publishing status)

Blueprint:
- Enable the "Blueprint Course" account feature option
- Create a new course with the same assignment/post policy loadout as
  the course in the above step
- In the Settings menu, check the "Blueprint Course" checkbox for the
  course
- Set up another course using this one as a blueprint
- Change around some of the assignment post policies in the blueprint
  - Make sure these register as unsynced changes for the assignments,
    and check that syncing carries them over
- Change the course post policy for the blueprint
  - Make sure that syncing the course carries the new post policy over
    (it should not apply the new course policy to any assignments, only
    set it on the course level)
  - To have the policy transfer over, you'll need to make sure you
    include course settings in the sync

Change-Id: I1fec3d5e88a8aa333ba511780d3934e98a4d7c2c
Reviewed-on: https://gerrit.instructure.com/203194
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2019-08-06 18:47:57 +00:00
Gary Mei 80177704c6 fix gradebook sort when filtering by student group
When New Gradebook is sorted by total grade, filtering by student
group now works.

fixes GRADE-2276

Test Plan
- Create at least 2 groups.
- Add some students to one group, and some students to another group.
- Navigate to the New Gradebook.
- Sort by Total Grade.
- Filter by student group.
- Verify that only students in the selected student group appear.

Change-Id: Ib690569b679956bff60d7bf801edf906fdf0a76e
Reviewed-on: https://gerrit.instructure.com/203373
Tested-by: Jenkins
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Gary Mei <gmei@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2019-08-06 18:44:13 +00:00
Matt Sessions eec763a245 Add grading status filter to submissions connection
refs: MBL-12809

Test Plan:
 - Create an assignment with a submission that needs grading, and
   a submission that is already graded
 - request submissions for the assignment through gql using the
   gradingStatus filter for needs_grading
 - It should return the submission requiring grading and
   not the other one

Change-Id: I2ac6b7e95819122d085898255a352a002aefa9f7
Reviewed-on: https://gerrit.instructure.com/202156
Tested-by: Jenkins
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Matt Sessions <msessions@instructure.com>
Product-Review: Matt Sessions <msessions@instructure.com>
2019-08-06 16:27:32 +00:00
Matthew Lemon 1f903ce7aa update files API for uploading via url
fixes COMMS-2257

This adds a flag to the Files API when uploading a file via a url to be
able to avoid automatically submitting the assignment associated with
the file. The flag is defaulted to true to avoid any issues that could
arrise from other services depending on the current API.

Test Plan:
* passes jenkins

Change-Id: I40e569a5126a0d9e5607f1a799269dc7d20204ed
Reviewed-on: https://gerrit.instructure.com/203105
Tested-by: Jenkins
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2019-08-05 20:16:19 +00:00
Jeremy Stanley 4e928c7757 per-environment overrides for feature definitions
this is a more flexible replacement for `development` and
`hidden_in_prod` - any feature registration option can be
customized based on the environment

test plan:
 - this feature replaces "hidden_in_prod" and "development"
   and these changes are covered in specs
 - experiment with other customizations to feature
   definitions in the YAML

closes ADMIN-2760

Change-Id: Ie2c76f4b7da2ccc43bb244000dc0a490d78de9de
Reviewed-on: https://gerrit.instructure.com/202933
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2019-08-02 21:59:44 +00:00
Michael Brewer-Davis 398ca11a8c add i18n to outcome reports, lmgb export
closes OUT-3197

Test plan:
With permutations of the following feature flags
 - Account:
   Enable i18n features in outcomes exports
 - User:
   Include BOM in compatible exports
   Use semicolons in compatible exports
   Autodetect separators in compatible exports

Test that the following reports obey the
requested settings:
 - Account reports
   - Outcome Results
   - Student Competency
 - Learning Mastery Gradebook
   - Export report
   
See g/199468 for details on how reports should respond
to each setting

Change-Id: Iea942bdbc6d1efc560b0c4fc422c7c14a8fd90c4
Reviewed-on: https://gerrit.instructure.com/203101
Tested-by: Jenkins
Reviewed-by: Nathan Prabhu <nprabhu@instructure.com>
Reviewed-by: Frank Murphy III <fmurphy@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2019-08-02 21:42:51 +00:00
Cody Cutrer a127528a6f drop rails 5.1
add flags for 6.0, even though it doesn't actually do anything yet

Change-Id: If8aba4d9f92e8a8ec890deadba7a94e21e01a804
Reviewed-on: https://gerrit.instructure.com/202686
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-08-01 14:09:31 +00:00
James Williams e30f505827 fix file deletion and replacement for inst-fs
test plan:
* with inst-fs enabled, should be able to
 run `attachment.destroy_content_and_replace` in a
 rails console successfully
* it should replace the file with the tumbleweed doc
* should be able to run `attachment.resurrect_from_purgatory`
 in a rails console
* the file should be restored

closes #CORE-3166

Change-Id: If12f4e3d7db0ef5a019bcd251c45b91579857521
Reviewed-on: https://gerrit.instructure.com/200098
Tested-by: Jenkins
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
2019-08-01 12:30:48 +00:00
James Williams c0eccb61a2 redirect back to original file url on expired file token
send them back to hopefully get a new fresh verifier

test plan:
* have an environment with a files domain
* using a developer console preserving logs, download a file,
and note the initial redirect url to the files domain
(should include a "sf_verifier" parameter)
* wait 5 minutes for the verifier to expire and then directly
 access that files domain url
* it should still work (after redirecting back to original
 domain and getting a new sf_verifier)

closes #CORE-3196

Change-Id: I1dafa045acb3be95ce55863fdd72c70adcdb6fe8
Reviewed-on: https://gerrit.instructure.com/203244
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2019-08-01 12:29:51 +00:00
James Williams 2521226b54 use subject user for courses API is_favorite value
test plan:
* as an account admin, calling
/api/v1/users/X/courses?include[]=favorites
for a student should return whether the student
has favorited the course, not the admin

closes #ADMIN-2763

Change-Id: If52ce5c9405bc2895fbdf6fb456cfca8f4163fbf
Reviewed-on: https://gerrit.instructure.com/201520
Tested-by: Jenkins
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Mysti Lilla <mysti@instructure.com>
2019-07-31 19:49:15 +00:00
Nathan Prabhu d5fe2754f0 Expose rub. assessment's assessor user & avatar in submiss. api
closes OUT-3168

Test plan:
* Create an assignment submission with a rubric
* Log in as an assessor with an avatar and make a rubric assessment
* Hit the following endpoint: /api/v1/courses/:course_id
    /assignments/:assignment_id/submissions/:user_id
    ?include[]=full_rubric_assessment
* Verify you see something along these lines:
    {
        ...
        "full_rubric_assessment": {
                "id": 1,
                "rubric_id": 1,
                "rubric_association_id": 1,
                "score": 33,
                "artifact_id": 8,
                "artifact_type": "Submission",
                "assessment_type": "grading",
                "assessor_id": 1,
                "artifact_attempt": 2,
                "data": [
                    {
                        "id": "blank_2",
                        "points": 0,
                        "criterion_id": "_3856",
                        "learning_outcome_id": null,
                        "description": "No Marks",
                        "comments_enabled": true,
                        "comments": "Comment",
                        "comments_html": "Comment"
                    },
                    {
                        "id": "1_3114",
                        "points": 30,
                        "criterion_id": "1_2790",
                        "learning_outcome_id": null,
                        "description": "Full Marks",
                        "comments_enabled": true,
                        "comments": ""
                    }
                ],
                "rubric_association": {
                    ...
                },
                "assessor_name": "nprabhu@instructure.com",
                "assessor_avatar": null
            }
    }
* Data should only be accessible to assessor, teacher/moderator, &
  student owning the assignment. Same visib. rules as any submission.
* If no rubric assessment was done, response should still succeed but
  not contain the "full_rubric_assessment" field

Change-Id: Ic6586b11eb6205311e15c7ce733bb394328dfac2
Reviewed-on: https://gerrit.instructure.com/202280
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
Reviewed-by: Frank Murphy III <fmurphy@instructure.com>
Tested-by: Jenkins
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2019-07-30 18:52:42 +00:00
Ryan Shaw bced49e475 mv some js_bundle and css_bundle’s to controller
by moving these js_bundles and css_bundles to the controllers instead
Of the views, once we actually start streaming these pages, they will
end up in the <head> and so the browser will find out about them faster
than if they were left in the view.html.erb files

Test plan:
* nothing should change
* as in, in code review, you should be able to statically analyze these
  Changes and see that each of these new things in a controller action
  Was just cut/pasted from the view erb file for that action

Change-Id: I78817c12c02d41f9c9e7651cfc8352993e98382b
Reviewed-on: https://gerrit.instructure.com/202773
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
2019-07-29 16:55:37 +00:00
James Williams 2b82831efe drop unused columns from submissions
Change-Id: I5f11f902ff7c7a155956b2cf4d6d8dcb275d3f7a
Reviewed-on: https://gerrit.instructure.com/202806
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2019-07-26 15:23:59 +00:00
Nathan Prabhu 7510bc181a Implement I18N support for Canvas outcomes exports
closes OUT-3166

test plan:
* Create gradebook exports and outcomes exports w/these feature flags:
- Byte-Order Mark (user)
- Semicolon separator (user)
- Autodetect field separators (user)
- Enable i18n features in outcomes exports (account)

* Verify the results in the tables s.t.
1) it accurately represents gradebook exports
2) it accurately represents outcomes exports *only if* its FF is on
- if the FF is off, expect no BOMs and expect delims to always be ','
  in all testcases

  byte-order-mark | present? (most editors will say if so)
  ----------------+--------------------------------------+
       no         |      no                              |
       yes        |      yes                             |

  semicolons | Autodetection | Language | CSV separators
  -----------+---------------+----------+----------------
       no    |      no       |    en    |       ','
       no    |      no       |    is    |       ','
       no    |     yes       |    en    |       ','
       no    |     yes       |    is    |       ';'
      yes    |      no       |    en    |       ';'
      yes    |      no       |    is    |       ';'

- is = icelandic

* Open exports in excel versions/language combos that Gradebook used
- Just verify that they open correctly (smoke test is sufficient)

Change-Id: Id3357d37342b98d8a8582e5a7de3c418acaa0e5e
Reviewed-on: https://gerrit.instructure.com/199468
Tested-by: Jenkins
Product-Review: Jonathan Fenton <jfenton@instructure.com>
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
2019-07-24 22:19:22 +00:00