test plan (ADMIN-51):
- have a blueprint syncing to multiple associated courses
- change the syllabus text in the blueprint and in one associated course
- in the blueprint, the "Unsynced Changes" should include the syllabus
and the Sync button should be present
- perform a sync
- the syllabus text should be updated in courses where the syllabus
was not changed downstream
- the sync history in the blueprint course should show the syllabus
was synced, and should show the exception in the course whose
syllabus was changed downstream
- the sync history in the associated courses should show that the
syllabus was changed and indicate whether this change was applied
(course settings / Blueprint information in the right sidebar)
test plan (ADMIN-1283)
- have a blueprint and associated course that are syncing
a syllabus body
- detach the associated course and attach it to a different
blueprint
- the associated course's syllabus body should be overwritten
with the new blueprint's syllabus body after a sync happens
- changing the syllabus body in the associated course should
prevent future syncs from overwriting the syllabus
also regression test:
- course settings (e.g. tab order) are copied to a newly added
course
- course settings are overwritten in child courses if the
"copy course settings" box is checked
fixes ADMIN-51
fixes ADMIN-1283
Change-Id: I44f7086746f279059d5bb86e177ceb8f18a15e56
Reviewed-on: https://gerrit.instructure.com/158247
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Luke Kingsley <lkingsley@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
include the links in the export even if they haven't been
updated recently
test plan:
* create an account level outcome
* create a blueprint course with an associated course
* create a rubric in the blueprint course associated
with the account-level outcome
* sync the course
* it should be linked in the associated course
closes #ADMIN-1205
Change-Id: I0c70ba7093311e94e755657f8f03993510ac4ea8
Reviewed-on: https://gerrit.instructure.com/156210
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
also ensure a failed export leaves the job marked failed,
rather than stuck in "exporting"
test plan:
- enable post to SIS in a course
- create an ungraded (practice or survey) quiz
- attempt to migrate it to quizzes2
- it should not fail and leave content exports stuck
fixes ADMIN-990
Change-Id: I717153e62f03be8a5f3974bec925377e608c08df
Reviewed-on: https://gerrit.instructure.com/148254
Reviewed-by: Steve Kacsmark <skacsmark@instructure.com>
Reviewed-by: Carl Kibler <ckibler@instructure.com>
Tested-by: Jenkins
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
closes QUIZ-203, closes QUIZ-3434
test plan:
case 1: when a root account is not provisioned by uuid provisioiner
- 'Quiz Next' feature flag is not visible in root account, sub
accounts and courses
case 2: when a root account is provisioned by uuid provisioiner
- should see 'Quiz Next' feature flag in root account
- when the FF in root account is turned to On, all courses have access
to Quizzes.Next (Quiz Migration and Easy button)
- when the FF is off, all courses don't have access to Quizzes.Next
- when the FF is allowed, subaccounts and courses should have options
to turn Quizzes.Next On or Off
Change-Id: Ib41ce2db9943151f47ad42a676d29b744c381799
Reviewed-on: https://gerrit.instructure.com/135805
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Dariusz Dzien <ddzien@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
fixes RECNVS-12
and make public links explicit. note that for non-inst-fs file storage,
the user parameter to the existing authenticated_url method is unused.
so for non-inst-fs, the following sets of methods are equivalent:
* authenticated_url_for_user(*) == public_url == authenticated_url
* download_url_for_user(*) == public_download_url (was download_url)
* inline_url_for_user(*) == public_inline_url (was inline_url)
the choice of `public_...` over `..._for_user` methods in the refactoring
should thus be a no-op except when inst-fs is enabled. with inst-fs enabled,
the `public_...` methods produce URLs usable by any user (including
those not logged in!); this matches non-inst-fs behavior. the
`..._for_user` methods produce URLs usable only by the user for whom
they were generated, and should be preferred where public access is not
necessary.
after this refactor, make public links for google doc previews short
lived and consolidate some code around google doc preview links.
test-plan:
- enable inst-fs
[per-user inst-fs JWTs]
- have a student and a teacher in a course with an assignment
- as the teacher upload an image to the course files, then add the
image to the course syllabus
- as the student, attempt to view the course syllabus. should see the
image in the course syllabus (prior to this commit would fail)
- copy the inst-fs URL the student's browser was redirected to when
viewing the file
- as the teacher attempt to access the image directly using the
student's inst-fs URL; should fail
[public inst-fs JWTs]
- as the teacher, upload a course card image (example of public file)
- as the teacher, view the course card image and copy the inst-fs URL
redirected to
- as the student, attempt to access the course card image directly
using the copied inst-fs URL; should succeed
[google docs preview]
- disable canvadocs on the account if enabled
- as the teacher, upload a PDF to the course files
- find the PDF in the course files and preview it
- preview should be displayed via embedded google docs iframe
- preview should succeed
Change-Id: I8384cbb89f1522022e2f06579e6381de5ed0076c
Reviewed-on: https://gerrit.instructure.com/133889
Tested-by: Jenkins
Reviewed-by: Andrew Huff <ahuff@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
test plan:
* have an external tool configured on the account level
that adds a course_navigation (sidebar tab)
* on a blueprint course, view the course settings,
"navigation" tab and drag the external tool
tab into the bottom section to hide from students
* sync the blueprint course to an associated course,
(marking "include settings")
* the tool navigation item should be hidden
in the associated course
closes #CNVS-38061
Change-Id: I24a7b5e94b531d83c6bfb7e7d3a16852b583aac6
Reviewed-on: https://gerrit.instructure.com/127243
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
when deleting attachments permanently this will
now also delete the s3object. this also makes it
avoid FK error when there are children attachments
fixes CNVS-39122
test plan
- destroy_permanently_plus should work
- download submission zip and it should work
- download eportfolio export and it should work
Change-Id: Ie995b9b3fac739e8aa3e9554c819b263cb67026b
Reviewed-on: https://gerrit.instructure.com/125236
Tested-by: Jenkins
Reviewed-by: brian kirkby <bkirkby@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
test plan:
* create a master course
* in the course settings, 'navigation' tab, create
a custom navigation configuration
* add an associated course
* the initial sync should bring over the tab navigation
* subsequent syncs should not
* use the api to queue a migration (sync), setting the
optional parameter "copy_settings"
* it should copy over the navigation
closes #MC-205
Change-Id: Ia6501af6bb0fdeea58803a08bcf17a13a480658a
Reviewed-on: https://gerrit.instructure.com/111616
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
closes CNVS-37071
test plan:
- export course content, user content, and a folder
- tweak their created_at dates
- try different values of Setting.get('content_exports_expire_after_days', '30')
- the UI should show expired and api should not return an attachment url
Change-Id: I91923666752bc1e5d11f1e5319a83e040a363d41
Reviewed-on: https://gerrit.instructure.com/112720
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
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>
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>
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>
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>
test plan:
- link a blueprint course to one or more other courses
- sync some content across
- delete content from the blueprint
- ensure this content is deleted from the linked courses
after another sync is performed
- unless the content is modified in the linked course
closes MC-100
Change-Id: I1b01e789ca86dc372e30cce0e427a7124813827a
Reviewed-on: https://gerrit.instructure.com/103396
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Tested-by: Jenkins
Product-Review: Jeremy Stanley <jeremy@instructure.com>
closes: QUIZ-1235
test plan:
pre-reqs: quizzes2 feature enabled, course and quiz made,
kinesis stream setup (doc/live_events.md)
1. hit the content export endpoint with your quiz id
2. verify the content export has a completed status
3. verify you see output in the kinesis stream
4. verify you see the assignment payload in the settings hash
5. verify the payload includes:
a. resource link id
b. title
c. context title
d. context_type
e. context_id
Change-Id: I967a5c9260830ff99afc36e4a098435b81431f83
Reviewed-on: https://gerrit.instructure.com/103755
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Tested-by: Jenkins
Product-Review: Hannah Bottalla <hannah@instructure.com>
closes: QUIZ-1234
test plan:
1. tests pass
2. feature is hidden behind flag and is development only
3. qa-cr
Change-Id: I602f7c41ec88f13248910bae3523420c670f134e
Reviewed-on: https://gerrit.instructure.com/102053
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Chris Wang <cwang@instructure.com>
Because of some changes in YAML serialization we're seeing sadness with
content migrations, this stems from the converter being passed as a
constant rather than a full object.
Refs: CNVS-34329
Test Plan:
- Job based things still work
Change-Id: I592045db8450678644ff441a4c74a359c93651cc
Reviewed-on: https://gerrit.instructure.com/99930
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
Tested-by: Jenkins
closes #MC-64
Change-Id: I0f9e8f683a3b75d53e4c1c59120d9225404c3f62
Reviewed-on: https://gerrit.instructure.com/99922
Reviewed-by: Dan Minkevitch <dan@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: 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>
refs #CNVS-32574
Change-Id: I272579bba8c1993fc5af872abe685f21318833a2
Reviewed-on: https://gerrit.instructure.com/94567
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
i never know if what i'm writing is the right way to go but
this is at least a starting point
using serialized columns here adds some overhead but gives us
more flexibility in the long-run if we have to add more
granular locks
closes #MC-9
Change-Id: I2d1d9b3ef8681e3a2d1675e66e4d2e5294e5d8df
Reviewed-on: https://gerrit.instructure.com/96656
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
maybe this is totally overkill but whatever
it'll put my mind at ease about conflicts in the future
also we can hack this later if we want to make
content exports for future courses shard-aware too
Change-Id: I1568e47ec1037d6e7554e7ccb0ea80965842db49
Reviewed-on: https://gerrit.instructure.com/96482
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
don't recopy all the things - also move some logic directly
onto content_exports to facilitate future refactors
Change-Id: I915ec03be634d8ef763a5b8f265fe356dc0f3e73
Reviewed-on: https://gerrit.instructure.com/96464
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
implements framework for master course migrations
adapts course exports to go straight to the intermediate json
and allows multiple imports to derive from it
only does full exports at the moment
closes #MC-11
Change-Id: I135e55a4d0ec159edc3055daee6c15a69db75f84
Reviewed-on: https://gerrit.instructure.com/95849
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-30511
Change-Id: Ia75f7265c3771a318e99548d45ff2bac696fa02c
Reviewed-on: https://gerrit.instructure.com/86346
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
closes #CNVS-30349
Change-Id: Ia9e314f6495cf89127cf55ad38a28c5dc1791d10
Reviewed-on: https://gerrit.instructure.com/84594
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
services can be integrated to be told when a course export
(or course copy) occurs and can send custom data to be
saved in the package
the data can use keys with the format '$canvas_TYPE_id'
where TYPE is a canvas object (e.g. 'assignment')
where the values are ids for objects in the source course
so when the package is imported, the saved data will have the
ids translated to the new copied objects, thus preserving
relationships between objects
closes #CNVS-30161
Change-Id: Iee5400c45d6189305b8626219dbe9aef345fea9e
Reviewed-on: https://gerrit.instructure.com/83531
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
test plan:
* create a course with an announcement
* use the content exports api to create a course export
using the parameter "select[discussion_topics][]" with the
announcement id to try to export the announcement selectively
* importing the package in another course should bring over
the announcement
closes #CNVS-29947
Change-Id: Ib18b8613fc60c2b79a9f8e298a2b19fbe769d36d
Reviewed-on: https://gerrit.instructure.com/82601
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Alex Morris <amorris@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan:
1. have a course with an announcement
2. use the content exports API to export all announcements:
POST /api/v1/courses/X/content_exports.json?type=common_cartridge
with json body
{ "select": "all_announcements" }
save the id and progress_url from the response.
3. repeatedly GET the progress_url from step 2 until you see
"workflow_state": "completed" in the response
(this will probably happen quickly assuming your job server
is running and not backlogged)
4. do a GET to /api/v1/courses/X/content_exports/Y
where Y is the id returned in step 2.
save the url in the response.
5. download the export file returned in step 4 and import it
into a new course shell
6. ensure the new course contains the announcement from step 1
7. repeat steps 2-6, but select an individual announcement
using a step 2 json body
{ "select": { "announcements": [Z] } }
where Z is the id of the announcement to export
fixes RD-2488
Change-Id: Iecc14ffa275461e7939345a721014b5b8e380dc6
Reviewed-on: https://gerrit.instructure.com/75529
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Tested-by: Rob Orton <rob@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jeremy Stanley <jeremy@instructure.com>
destroy! is now a method in rails
refs #CNVS-26056
Change-Id: I66e512265ff5cda6a12d7820e3cf69c77ef9e746
Reviewed-on: https://gerrit.instructure.com/69721
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
fixes CNVS-25978
test plan:
- Generate an ePub export.
- Observe that the progress bar shows greater variation than it used to.
- Generate a normal content export without an ePub export.
- Observe that it generates as usual.
Change-Id: I46debe8280e8a227fde1933334923ed011b624fa
Reviewed-on: https://gerrit.instructure.com/69085
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: John Corrigan <jcorrigan@instructure.com>
write_attribute returns the original object but not
the actual stored object anymore
refs #CNVS-26056
Change-Id: I3f602a9060daf244d3c90f89286f571e804f43f0
Reviewed-on: https://gerrit.instructure.com/69498
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
fixes CNVS-21793, CNVS-21794, CNVS-21795
- Adds EpubExport model to manage state of generated epubs.
- Adds controller to list, create & show epub exports.
- Adds a mini react app to manage UI for creating epub exports.
- Adds shared ApiProgressBar react comoponent to diplay a progress bar
that polls the progress API.
- Updates ContentExport to have a relationship with EpubExport.
test plan:
- Navigate to `/epub_exports`.
- Observe a list of courses that are active & user is enrolled in.
- Click on the Generate button.
- Observe that info about the state of the export and the timestamp are
added to the middle of the row.
- Observe that a progress bar is displayed while the export is in
progress.
- Observe that upon completion, the progress bar is replaced by two
button / links: Download & Regenerate.
- Observe that Download at the moment does nothing... this is because
the backend is not yet hooked up to generate the epub.
- Observe that the Regenerate button triggers the process all over
again.
Change-Id: I6cd844baa06db0c6648ad19389d235b89659919c
Reviewed-on: https://gerrit.instructure.com/62135
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
closes CNVS-6016
No more error reports! (soon)
this commit builds up sentry integration through the new
Canvas::Errors module, along with other things that need
to happen on every exception. ErrorReports
should now get pushed towards just being used for representing
a complaint a user filed via the get help form.
I fixed about half the things that got linted as well
while I was in here, but because this touches to much
I fear divergence from tackling too many (I think we
can safely say it's "better than we found it")
I left a lot of the infrastructure for error reports in place
until other commits for plugins can be merged
TEST PLAN:
1) setup your raven.yml config file with the dsn for our
sentry install
2) force an error to happen in a request response cycle.
3) see the error in sentry
4) force an error to happen in a job
5) see the error in sentry
6) statsd increments shoudl still fire
7) for the moment, an error report should still get created.
Change-Id: I5a9dc7214598f8d5083451fd15f0423f8f939034
Reviewed-on: https://gerrit.instructure.com/51621
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
test plan:
* quiz imports and course copying should
be unaffected
closes #CNVS-19012
Change-Id: I6000fce1d6f08459bb7266c97b9d47424bedc1de
Reviewed-on: https://gerrit.instructure.com/49762
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan:
0. create a course with some assignments in separate assignment groups
1. do a course copy without selecting content. the assignment groups
should be copied to the new course, with the assignments in there.
2. do a course copy and select an entire assignment group, plus
some (but not all) assignments in another assignment group.
the selected group and its assignments should be copied to the new
course. the individually selected assignments should be in the
"Imported Assignments" group
3. create a new course with an assignment group having the same name
as one from step 0. add an assignment to the group, and set a
"drop lowest assignment" rule on the group. selectively import
an assignment from the course in step 0 in the group having the
same name as this group. the assignment should be imported into
the "Imported Assignments" group, and the group with the same name
should be unaffected (with its drop rule intact).
fixes CNVS-18650
Change-Id: I49266dfc42753566c9d6dbef74b6c70cfabd7e33
Reviewed-on: https://gerrit.instructure.com/49285
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
given a course that references question banks, rubrics,
outcomes, and/or external tools in its account, if the course
is exported and re-imported into a different institution
in a different shard, there's a chance that the wrong item(s)
may become associated with the copied course.
to solve this,
(1) export the root account's uuid with a cc export;
(2) ignore external references on import if the saved uuid
does not match the root account of the destination
course.
test plan:
1. arrange the following in a course:
a. an external tool module item referencing a tool
defined in the account
b. a learning outcome imported from an account
c. an assignment using an account rubric for grading
d. a quiz containing a question group puling from an
account question bank
2. export this course to a common cartridge
3. import it into a course in the same root account.
it should import without warnings, and the account
references should be intact.
4. unzip the export package from step 2.
in course_settings/course_settings.xml, change
the root_account_uuid value. re-zip.
5. import the modified package into another course
in the same root account. (we tricked canvas
into thinking it's a different root account,
because that's easier than actually setting up
another shard and "decoy" items with matching ids).
-> you should get warnings about the external tool,
rubric, outcome, and question bank
-> the rubric and outcome should still be present,
but are copies and not the original account items
fixes CNVS-15101
Change-Id: I60d2a8377995f9d9476a87776c993d677b838b1b
Reviewed-on: https://gerrit.instructure.com/40391
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
this is a friendly alias for select[attachments], done to be
more consistent with existing API names, and following the
example of select[modules], select[pages], etc.
test plan:
- do selective content exports with the content export API,
using select[files][]=(id), and ensure the correct file(s)
are exported
- test both common cartridge and zip exports
fixes CNVS-15129
Change-Id: I004ae1e8ba28ea8b7cf480c8fee5bd9633375781
Reviewed-on: https://gerrit.instructure.com/40115
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Test Plan:
* Create a ContentExport through the api setting the skip_notifications to false
* When it finishes you shouldn't get an email
closes PLAT-591
Change-Id: I036c65012bec6fe7cb57f6b79b3684c3b9eadf3f
Reviewed-on: https://gerrit.instructure.com/39015
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
test plan:
1. use the content exports api with export_type=zip
to export files from courses, groups, and users
a. confirm only users who have permission to
download files from these contexts can perform
the export
b. confirm that deleted files and folders do not show
up in the downloaded archive
c. confirm that students cannot download locked files
or folders from courses this way
d. check the progress endpoint and make sure
it increments sanely
2. perform selective content exports by passing an array
of ids in select[folders] and/or select[attachments].
for example,
?select[folders][]=123&select[folders][]=456
?select[attachments][]=345
etc.
a. any selected files, plus the full contents of any
selected folders (that the caller has permission
to see) should be included
- that means locked files and subfolders should
be excluded from the archive
b. if all selected files and folders are descendants
of the same subfolder X, the export should be named
"X_export.zip" and all paths inside the zip should be
relative to it. for example, if you are exporting A/B/1
and A/C/2, you should get "A_export.zip" containing
files "B/1" and "C/2".
3. use the index and show endpoints to list and view
content exports in courses, groups, and users
a. confirm students cannot view non-zip course exports
(such as common cartridge exports)
b. confirm students cannot view other users' file (zip)
exports, in course, group, and user context
c. confirm teachers cannot view other users' file (zip)
exports, in course, group, and user context
(but can still view course [cc] exports initiated by
other teachers)
4. look at /courses/X/content_exports (web, not API)
a. confirm teachers see file exports they performed
b. confirm teachers do not see file exports performed by
other teachers
c. confirm teachers see all non-zip course exports
(cc/qti) including those initiated by other teachers
5. as a site admin user, perform a zip export of another
user's files. then, as that other user, go to
/dashboard/data_exports and confirm that the export
performed by the site admin user is not shown.
fixes CNVS-12706
Change-Id: Ie9b58e44ac8006a9c9171b3ed23454bf135385b0
Reviewed-on: https://gerrit.instructure.com/34341
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
test plan:
* as a student, visit /dashboard/data_exports
* should be able to export a zip file containing
all of the student's submissions
refs #CNVS-14242
Change-Id: Iaab216e7411c27fa6d259f677e40a75d3de3f5a8
Reviewed-on: https://gerrit.instructure.com/36872
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
test plan:
* test the undocumented content_list api endpoint:
api/v1/courses/:course_id/content_list
which returns the same content list that would be shown by the
selective_content endpoint of a pending course copy content migration
with no 'type' parameter, it should return a list of
exportable categories and urls for each expandable type
with a type parameter (e.g. content_list?type=context_modules), it
should send a list of items with their titles and ids (asset strings)
these ids can be used to select the content for the export
* use the content_exports_api create endpoint to create a
common_cartridge export, but add an additional argument,
"select" (equivalent to the "copy" parameters for
the content_migration api)
e.g. api/v1/courses/:course_id/content_exports?
select[all_wiki_pages]=1&
select[context_modules][context_module_42]=1
(replacing :course_id and :module_id)
* also try using arrays of ids as a parameter
e.g. api/v1/courses/:course_id/content_exports?
select[context_modules][]=42&
select[context_modules][]=43
this should create a package that only contains the
specified content, and any course files referenced in
html content (confirm by re-importing)
closes #CNVS-13502
Change-Id: I5bdcdc8255b30c5f78585dc335d25eb19bd5a7c0
Reviewed-on: https://gerrit.instructure.com/36655
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
test plan:
- have an assignment in a course that has points possible
and submission types
- use the content exports API to export the course,
supplying the currently undocumented parameter
version=1.3
a) examine the exported XML and verify that it follows
the IMS standards
http://www.imsglobal.org/cc/ccv1p3/AssignmentContentType.htmlhttp://www.imsglobal.org/cc/ccv1p3/CCv1p3Variantguidelines.pdf
b) ensure the exported course re-imports correctly
fixes CNVS-13503
Change-Id: Iad8a54e94696962d362cfdb48fe03e06a90937ff
Reviewed-on: https://gerrit.instructure.com/36283
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>