test plan:
- have canvas set up with inst-fs
- put an SVG file in course files
- in the files tab, you should be able to click the SVG and
see a preview
- export the course to a canvas cartridge
- import it to another course
- the file preview should work in the new course
fixes LS-1602
flag = none
Change-Id: Ib6a66a803a23be66eb62244a90e03dd76258e96d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/254507
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Change-Id: Ib49bc8939cf1706e758429e531a87c57d0231a37
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251156
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>
fixes RECNVS-583, RECNVS-594, RECNVS-595
reverts commit efdb13e9a9, restoring
3da400a75e, but adds fixes for the bugs
that caused the original revert. in particular:
* refactor to avoid `eof?` (RECNVS-594)
in some situations, the file contents stream doesn't implement `eof?`.
the only required interface for `IO.copy_stream` is `size` and `read`,
so we'll restrict our interface to that and only expect no more than
that interface of the parts.
* keep trying the same stream on partial read (RECNVS-595)
the IO#read docs indicate that if the read result has fewer than the
bytes requested, it's because the stream is at EOF. the
SequencedStream output sticks to that behavior. but in some
situations, the file contents stream will return a partial read before
EOF. so we need to keep asking for the remainder until we either get
as much as we wanted or an explicit EOF (nil returned).
test-plan:
- ensure the following all still work with inst-fs enabled:
- content exports, particularly of larger courses. don't just verify
the file is created and can be downloaded from inst-fs, but the
generated file should also be a valid zip file (file extension is
imscc, but format is zip) that can be extracted into the expected
course contents. exercises RECNVS-595
- content migrations, particularly of larger courses, where you choose
a source Canvas course when executing "Import Course Content" in a
destination Canvas course. also exercises RECNVS-595.
- SIS imports via API
- create a simple courses.csv with a new course defined in it a la
https://canvas.instructure.com/doc/api/file.sis_csv.html
- POST this CSV to the SIS imports API documented at
https://canvas.instructure.com/doc/api/sis_imports.html#method.sis_imports_api.create
use the mechanism described under the text "If you decide to do a raw post,
you can skip the 'attachment' argument..." in the description of
the attachment parameter. exercises RECNVS-594.
Change-Id: Ie7e7fecff491ac2344a48d97f1c6b27eb24885c8
Reviewed-on: https://gerrit.instructure.com/162584
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
Tested-by: Jenkins
Product-Review: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Xander Moffatt <xmoffatt@instructure.com>
This reverts commit 3da400a75e.
closes RECNVS-592
Change-Id: I51fb152a1ceef45a51b4434575afd1b25a955aa5
Reviewed-on: https://gerrit.instructure.com/162120
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
Product-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
fixes RECNVS-547
generally, in Multipart::Post, you can get a stream representation of
the body instead of a string, and in CanvasHttp.post you can request
that stream be supplied to the underlying request's body_stream instead
of the string to the underlying body. inst-fs then supplies the
streaming flag during direct upload.
this avoids an error when the body as a single string is too large to
POST.
test-plan:
- confirm general upload-from-canvas functionality is preserved by
triggering uploads from canvas to another server
- e.g. inst-fs enabled course export
- e.g. inst-fs enabled course export
- confirm specific upload-from-canvas functionality with streamed larger
files
- i.e. inst-fs enabled course export where the export size is larger
than 2GB
- note that there may be a new HTTP 504 error when the upload size
approaches 3GB. this is a separate issue not related to this commit
Change-Id: I15e22e6688233a77783d1cd86960bbaaa64eb0dc
Reviewed-on: https://gerrit.instructure.com/160105
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Jasper <mjasper@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
as of this commit, all canvas gems should be on rspec 3.5, and pass
without deprecation warnings.
closes CNVS-34040
test plan: specs should pass without deprecation warnings
Change-Id: I556b1a4a5aeb791c6ddd50ee35b51c513e025019
Reviewed-on: https://gerrit.instructure.com/98414
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins
This reverts commit e3148346df
This reverts commit 16f518a130
This partially reverts 9d34baed66
fixes CNVS-12021
test plan (e3148346df)
- rails 3 specs should pass
test plan (9d34baed66)
- import content including a video file into a course
(such as the QTI file attached to CNVS-11602)
- the import should complete
test plan (16f518a130)
- submit a document to turnitin
- it should successfully receive a score
Change-Id: I0622d9eceee4b94e488f103db68290f1b641b555
Reviewed-on: https://gerrit.instructure.com/32333
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>