[skip-stages=Flakey]
Change-Id: I6abefdfa9fed6dd4525c8786e93efa548b3710f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319603
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
refs AE-92
These deprecated methods were previously a wrapper around URI::DEFAULT_PARSER.*. Just convert them to the underlying method for the least risk.
Change-Id: I2d7e24e61fca15346c2c9d7254ad4f3eff0cbae2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/307348
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
[skip-stages=Flakey]
auto-corrected with post review ensuring line breaks continue to
convey original meaning of separated conditions, and cleaning up
some now-duplicated conditions
Change-Id: Ib9b31226de0665a2e4427fe595639d0d91a33f83
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279151
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
[skip-stages=Flakey]
auto-corrected
had to rework some instfs to play nice with stubs in its specs
Change-Id: I894831c6503095c6b197154e39fe17e803702d9c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278785
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
[skip-stages=Flakey]
auto-corrected for the most part, but I went through specs and used
the have_key matcher when possible
Change-Id: I4a2df1cdd536a94f3b493668386883d1148660c9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278050
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
all manual
several instances I noticed that the entire method was unused, so removed it
Change-Id: I14ffe7d4b6966ee790e32410f1dbaf5b26ea7f21
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276513
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
refs FOO-2226
flag = granular_permissions_manage_assignments
test plan: with different subsets of granular permission, visit
a question bank show page.
- Add should only see the add question button
- Edit should see all buttons (we consider adding/deleting questions to
be part of editing as well)
- Delete should see only the delete bank button
Change-Id: I73ea8edb8964992f05eb6a0a572a84479fa94078
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/273147
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
refs FOO-2226
flag = granular_permissions_manage_assignments
I originally intended to keep the original manage_assignments permission
and use it when the flag was on for edit/manage specific permissions,
but this made labeling and documentation difficult, especially since our
rollout strategy for this flag is gradual rather than all at once. So
this commit shifts gears to create a separete granular edit flag and
only use the old permission when the flag is off.
test plan:
- labeling and documentation on the account permissions page should be
clearer and make more sense
- everything should continue to work as before
Change-Id: I93e4cbe0daa319217e17007e3391f905f1a9d77d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/273020
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
closes FOO-2226
flag = granular_permissions_manage_assignments
Split manage_assignments_add and manage_assignments_delete off from the
main manage_assignments permission.
These permissions control more granularity for adding and deleting the
following types of content:
- Assignments
- Assignment Groups
- Quizzes
- Question Banks
- Questions within Question Banks
- Live Assessments
test plan:
[ with the flag off ]
- Smoke test creating, editing and deleting assignments, assignment
groups, quizzes, and question banks.
- It should all work as before.
[ with the flag on ]
- Create roles that have only the add permission, only the manage
permission, and only the delete permission.
- With those three roles, as well as with a role with all permission,
try creating, editing, and deleting assignments, assignment groups,
quizzes, and quesiton banks.
- It should make sense with the role.
Change-Id: I06505509e55e7ac6c3b5ef1c688ef1353e2045d8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/271290
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
Change-Id: I70825be7ec7e24458afe0c63dc48c5a76158f520
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251150
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
when included into a visible quiz question
test plan:
* upload and add an image to a question bank question
* import that question into a quiz
* edit the quiz question content
* the image should be visible by the student when
taking the quiz
closes #CORE-1921
Change-Id: I1e63c16c3af3927d97b84be6f75c2742e0d4acb1
Reviewed-on: https://gerrit.instructure.com/165262
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
rails uses callbacks internally to manage dirty state tracking. in
a recent update, skipping these callbacks when saving a new object
breaks any future updates to that object (because id_from_database is
not populated, which is then used as `nil` when trying to do
a subsequent update). see:
6932998fc7 (diff-1a091d0f7eb7b0b2ca95c82f5ba0e1fb)
Because of that I feel like saving without any callbacks is somewhat
dangerous. I think if you have to do it, use one of the built in active
record methods that skips callbacks:
http://guides.rubyonrails.org/active_record_callbacks.html#skipping-callbacks
Or use our active_record-suspension gem to skip specific app-level
callbacks.
test plan: tests pass
Change-Id: I7bfb87e328317430fb2a77edca56cace2cd372b5
Reviewed-on: https://gerrit.instructure.com/146139
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
refs CORE-1196
* avoid calling saving in an after_save callback. things just get weird
* enable logging of deprecation warnings in specs (so that you can
use the log to figure out which spec caused it)
Change-Id: I64804f7b02e4edee0650caa6346cc58bcbe69628
Reviewed-on: https://gerrit.instructure.com/144667
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
test plan:
* have a blueprint course with a question bank with
two questions and a quiz with a question group
* sync it to an associated course
* delete the question group in the quiz
and one of the questions in the question bank
* the deletions should carry over to the
associated course
closes #ADMIN-720 #ADMIN-721
Change-Id: I85ba7d5e9b0417e7627b3546c610b40e7376a0cd
Reviewed-on: https://gerrit.instructure.com/140972
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan:
* import the package referenced in the ticket
* delete the imported question bank
* reimport the package
* the question bank's questions should have functional images
closes #CNVS-36280
Change-Id: I8872e0d6206357c15d424805747b52df13bab8dc
Reviewed-on: https://gerrit.instructure.com/108486
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
basically means we don't have to reload the contexts
all the time
also make sure that inverse associations are populated
when calling temp_record
Change-Id: I2a0baefeccc814746a241f506a8f2db02aa8eebf
Reviewed-on: https://gerrit.instructure.com/99642
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Tested-by: Jenkins
basically means we don't have to reload the contexts
all the time
also make sure that inverse associations are populated
when calling temp_record
Change-Id: I22adf77d218f8084f76632d397161c05945cbae4
Reviewed-on: https://gerrit.instructure.com/98381
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs #CNVS-32574
Change-Id: I3ba018a7110a7530c9af4a59c97422f626a749b6
Reviewed-on: https://gerrit.instructure.com/99260
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
treats questions as part of bank content
TODO: extend to quiz questions
closes #MC-19 #MC-22
Change-Id: Ib3e142832772958495c305e7151c191c2cba2d57
Reviewed-on: https://gerrit.instructure.com/97816
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
refs CNVS-32804
otherwise it will still query individually
Change-Id: I46b078b6f3bcf509e8844c3e698b991178ee838e
Reviewed-on: https://gerrit.instructure.com/94370
Tested-by: Jenkins
Reviewed-by: brian kirkby <bkirkby@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
fixes CNVS-32804
test plan:
* general regression test of quiz creation and taking for quizzes
with both inline groups, and groups pulling from question banks
* be sure to test groups that specify more questions than are in
the bank
* especially more than double - it should continue duplicating questions
when you take the quiz, to meet the number of questions allowed
Change-Id: If7f86b37928e9f83b34506b6e2ccf1772000c900
Reviewed-on: https://gerrit.instructure.com/93733
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
refs #CNVS-32574
Change-Id: I2785c562c33980a7e230296c200538b8bb0ca6b5
Reviewed-on: https://gerrit.instructure.com/92728
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
test plan:
* import the package referenced in the ticket
* edit the quiz
* clear the comments from one of the questions and save
* re-open the question
* the comments should still be gone
closes #CNVS-10165
Change-Id: I9875a390014a9bd20245466e6fba0ef2b305b742
Reviewed-on: https://gerrit.instructure.com/88023
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>