[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>
NQ can render and edit content made in Classic.
Simplest way to move CQ rich content to NQ is to
not touch rich content wwhen content stays in course.
closes QUIZ-11030
flag=new_quizzes_migrate_without_content_rewrite
test plan:
- create CQ
- add 1 question
- add rich content: images, videos, links, docs
- click on kebab, click Migrate
- wait, until migration is done
- check the NQ and validate that content is unchanged
2
- export CQ from the course export content menu
- check zip, html fields should contain palceholders
3
- do a course copy
- ContentExport.last
- find the download url
- unzip file and check that placeholders are in content
- check target course and verify links are replaced
4
- do a copy to with the CQ
- go to target course
- check that links are replaced
5
- create a blueprint course
- create a CQ with content
- create a new course
- sync bp into new course
- ensure CQ has updated links
Change-Id: I6ea48e78c2fd1e30c45b7639ba243b3f0d29e039
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315752
Reviewed-by: Luis Oliveira <luis.oliveira@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Viktor Szpisják <viktor.szpisjak@instructure.com>
QA-Review: Ferenc Marcsó <ferenc.marcso@instructure.com>
Product-Review: Tamas Balogh <tamas.balogh@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
closes LS-3466
flag=none
test plan:
- Check that migration content still
works normally
- Passes jenkins
Change-Id: I9f77843cac28dda0e153d9fdbcccae55d0c1cadc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/314314
Reviewed-by: Jackson Howe <jackson.howe@instructure.com>
QA-Review: Jackson Howe <jackson.howe@instructure.com>
Product-Review: Luis Oliveira <luis.oliveira@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
closes QUIZ-9083
flag = none
test plan:
- import a classic quiz with migrate to NQ enabled
- wait for the import to finish
- navigate to the course
- observe that there's a message about the
limitations of the quiz migrations
- close the alert and refresh the page
- the alert should not appear again
- repeat the same process with a course copy
and a quiz migration
Change-Id: I3afe50f299cd374f17f8bccb88663b583e5928b4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279470
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
Reviewed-by: James Logan <james.logan@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Susan Sorensen <susan.sorensen@instructure.com>
closes QUIZ-8893
flag=new_quizzes_account_bank_migrations
test plan:
- create an account bank
- create a course and a quiz
- add the account bank as part of the quiz
- go to quizzes section of the course
- click on "migrate" link of the quiz
- let the process to finish
- go to a canvas lms rails console:
- execute the following:
ContentExport.last.settings["quizzes2"]["qti_export"]["url"]
- use the url to download the zip file
- unzip it
- take a look at non_cc_assessments
- take any .xml.qti file
- verify it includes something like this
<qtimetadatafield>
<fieldlabel>bank_type</fieldlabel>
<fieldentry>Account</fieldentry>
</qtimetadatafield>
- Importing as Classic Quiz must work
note: remember to keep live events and qti migration tool enabled
Change-Id: Ia278438a02b5c11d79d70ddf80028df71f83d250
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275878
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Mark McDermott <mmcdermott@instructure.com>
Product-Review: Susan Sorensen <susan.sorensen@instructure.com>
Reviewed-by: James Logan <james.logan@instructure.com>
if something goes wrong, but not so wrong that the entire export
or import fails (so there is no captured exception), it's
essentially impossible to review logs of the migration. if we
store the job id, we can provide it to the log-downloader script.
test plan:
1. a. perform a common cartridge export
b. in the console, examine ContentExport.last and ensure
settings[:job_id] is set
c. look at log/delayed_job.log and verify the log lines
for the recent export include that id
2. a. perform a course copy
b. in the console, examine ContentMigration.last and ensure
migration_settings[:job_ids] contains a job id
3. a. perform a common cartridge import, choosing to import everything
b. same as 2(b)
4. a. perform a common cartridge import, choosing to import selectively
b. make some kind of selection and complete the import
c. ensure migration_settings[:job_ids] contains two job ids
(one for each stage of the migration)
flag = none
closes LS-2730
Change-Id: I5d4028f4384111a06fa10d6327dce99c487fb9d6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275929
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
the content share lives in the user's shard, not necessarily
the export's shard or the domain root account's shard
test plan:
- have multiple shards set up
- as a teacher/admin, find a content share you sent
more than 30 days ago (or create a new content share
and modify the linked content_export's created_at date
to be older than 30 days)
- ensure if you hit the /api/v1/users/self/content_shares/sent
endpoint, the attachment is included under the content_export
in the results, regardless of which domain you hit the endpoint
from (the user's native domain or another one)
fixes LS-2171
Change-Id: I56390adaf29f600f4fbf666d8dbed06615a7fadb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263550
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Eric Saupe <eric.saupe@instructure.com>
QA-Review: Eric Saupe <eric.saupe@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Change-Id: Id39b1e8d3bebcc0f9b7ded920b450f275565f708
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250923
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>
closes QUIZ-6791
test plan:
- test the ps with quiz_lti patch
- make sure quiz migration works
- quiz shell is created
- quiz shell status is updated when quiz migration is done
Change-Id: Ia002ceb48ded582849301e3efd8631396d9ffe95
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/210548
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Kevin Dougherty <jdougherty@instructure.com>
test plan:
- create a content share via the API
- using the console, make the export appear old enough to expire:
ContentExport.where(id: content_share.content_export_id).udpate_all(created_at: 1.year.ago)
- ensure the content exports API still includes the export's attachment
fixes ADMIN-2913
flag=direct_share
Change-Id: Ia3eb5a5da847c3b533fff151f36acffdc89e1c95
Reviewed-on: https://gerrit.instructure.com/210489
Tested-by: Jenkins
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
test plan:
* before checking this commit out, copy some
content into a course
* after checking it out, make sure re-copying
the course overwrites the content from
the earlier copy (tl;dr migration identifiers
are being changed but not for old exported/copied courses)
* make sure course copies/imports/exports still work
closes #CORE-2718 #CORE-2720
Change-Id: I7515c7ec2943afaaf502432f1510d3e580f13ced
Reviewed-on: https://gerrit.instructure.com/188371
Tested-by: Jenkins
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Rob Orton <rob@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>
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>
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>
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-1251
test plan:
pre reqs: create a course and a quiz in the course
1. verify ```curl 'http://canvas.docker/api/v1/courses/1/content_exports' -H 'Authorization: Bearer 1~urtoken' -X POST -F 'export_type=quizzes2' -F 'quiz_id=1'```
returns proper json response
2. verify content export returns a workflow_state completed
at url json response provides
(you may have to wait and refresh)
3. tests pass
4. qa-cr
Change-Id: I4df13c40dce626f2ee07524475ced87c0938a9ee
Reviewed-on: https://gerrit.instructure.com/102825
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
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>
fixes CNVS-4791
it might work with ruby 1.8.7, but it sets user_id to 1 in 1.9
which lets duplicate paths through sometimes
anyway, it's redundant because communication_channel_model sets
channel.user to @user already
Change-Id: I7b4a8f24efdbf6022a57a77145ef91325153ffb1
Reviewed-on: https://gerrit.instructure.com/18747
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
a course export by default includes all content, but it uses the same path as
a selective export which ensures that referenced content is included even if
it's not explicitely requested. this is done by adding referenced content to
a hash, which caused the full export to be confused and think it too was
selective. this change makes explicit that the course export is to include
everything, and also prevents adding referenced content if the export already
includes everything.
test plan:
- in a course with content in at least two modules
- export the course as an .imscc package
- import the package, and make sure all content is available for import
Change-Id: I3dc7643b8941a1fb97102de2429a3d4f28b01795
Reviewed-on: https://gerrit.instructure.com/11007
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
fixes#8460
refs #8318
we already fixed course migration notifications to send immediately, but we
missed content export notifications. also, the previous fix would only work for
users who didn't already have a NotificationPolicy for the migration emails.
this fix also removes those NotificationPolicy objects for existing users.
test-plan:
- make sure you already have a non-immediate notification policy for the
'Other Administrative Alerts' category. you can do this simply by going
to the notifications page and hitting save.
- to to courses/:id/content_exports, and perform a course export
- you should get an email when it completes
- perform a course copy
- you should not get any migration/export related emails.
Change-Id: Ie0aaeee1d8d2be4ad30fecf552973fc49e25ee28
Reviewed-on: https://gerrit.instructure.com/10652
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Test Plan:
* There is no UI for this yet, so check the specs.
refs #4645
Change-Id: Ibe159d222ba9a05e2edc4ead5eeb3e48b77c3542
Reviewed-on: https://gerrit.instructure.com/9741
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>