test plan:
* import the test assignment fixtures as a common cartridge file
* there should be an assignment in the course
* also test import of flat manifest xml files
closes #CNVS-5906 #CNVS-13219
Change-Id: I0b765ed0d140516f78a5f4fb5dbe9b81ac77ecd4
Reviewed-on: https://gerrit.instructure.com/35394
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
test plan:
* course migration regressions (canvas cc, course copy)
* in addition:
use the content migrations api to queue a content migration
for an account ("/accounts/:account_id/content_migrations")
to import a qti/cc package.
* confirm that the question banks from the package
that would have been normally imported into a course are now
imported into the account
closes #CNVS-12529
Change-Id: I2ef306341d2f7defe03c63a981679a3987f1aaa0
Reviewed-on: https://gerrit.instructure.com/34303
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
test plan:
* import that package reference in the ticket
* should not have 1000+ missing link warnings
fixes #CNVS-12911
Change-Id: Icea97472635a93b22bac0c3f571496ffe2bcf458
Reviewed-on: https://gerrit.instructure.com/34465
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
test plan:
* import the package referenced in the ticket
* the link on the wiki front page pointing to
"Header 3 on Index page (directly)" should work
fixes #CNVS-12812
Change-Id: I2d532442d49fd62efe3a333c215a5349b1629bc7
Reviewed-on: https://gerrit.instructure.com/34192
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
test plan:
* create a course with html content, with links pointing to a given
domain (e.g. "http://www.example.com/somewhere")
* in the rails console, manually configure the account settings
as follows, (replacing -COURSEID- with the id of the course):
a = Course.find(-COURSEID-).root_account
h1 = {"http://www.example.com" => "https://www.not-example.com"}
h2 = {:domain_substitution_map => h1}
a.settings[:default_migration_settings] = h2
a.save!
* copy the course
* the links should all be translated to the new domain
(e.g. "https://www.not-example.com")
fixes #CNVS-12325
Change-Id: I0ac2ddf628303ae760995e44c72e2c90a836f966
Reviewed-on: https://gerrit.instructure.com/33472
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Test Plan:
* import a common cartridge package with html that has a
<a href="#something">hey</a> in it
* That href value should not change after imported
refs PLAT-433
Change-Id: I84229c5f587020ebc4279baf9bb7138db8c79223
Reviewed-on: https://gerrit.instructure.com/32152
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
test plan:
- with draft state enabled
* create a wiki page
- use the sidebar to add a link to another wiki page
* save the page
* edit the page
- html view should show the href as ../pages/.. not ../wiki/..
- copy the link, changing the href to be ../wiki/..
* save the page
* copy the course
* navigate to the copied wiki page
- both links should point to the page in the new course
fixes CNVS-11443
Change-Id: Ib7f8b175ac6d894a9bfa651f8536b7cd48b60aac
Reviewed-on: https://gerrit.instructure.com/30780
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
the dynamic finder on the association causes scoping to be called
before delegating the dynamic finder to the class, which works
until the preloader tries to load the owning class, and BOOM,
tries to preload itself
fixes at least one spec for rails 3
Change-Id: Ia22b31a013cb6ac984eb77ca29406372538ea57f
Reviewed-on: https://gerrit.instructure.com/30393
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
test plan:
* create a quiz that includes a link to other content
in the course, such as an assignment or a wiki page
* copy the course
* the links should be copied correctly
fixes #CNVS-2303
Change-Id: Ie5eb41c9193bad4d3786d2cd312b31a3be6c4ddf
Reviewed-on: https://gerrit.instructure.com/21600
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
in particular, fixes a problem where having any parameter
in import html content would cause "/preview" to not
be appended
test plan:
* import the package referenced in the ticket
* the wiki page 'coverslip smears' should have
functioning images
fixes #CNVS-5230
Change-Id: Ifd45efd841fa94f54d0478d040709d32b6b5fc5e
Reviewed-on: https://gerrit.instructure.com/19741
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
adds migration warnings when links and other references point
to missing or unknown internal content
test plan:
* upload a content migration with missing relative links
(an example is attached in the ticket)
* import all the content
* view previous migrations for the course
(at "/courses/:id/imports/list")
* confirm that warning messages are shown
* the ui in in progress, but the warnings should
have links associated with them that point to the
content with missing links. to see them, use the
migration issues API
closes #CNVS-134
Change-Id: I1d0a9217fe0c1678968410be8b2eba5b990b8305
Reviewed-on: https://gerrit.instructure.com/19367
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
all value attributes were being treated as urls when importing
into canvas and were thus getting bad values. This makes
it so that only ones marked as actual urls are updated
Test Plan:
* import package associated with this ticket
* Look at the html of the mentioned quiz question
* the param tags for 'controls', 'controller', etc. should not look like urls
closes#11466
Change-Id: Ic2dd5648285432c775d7b5745c02e6f2e79834ff
Reviewed-on: https://gerrit.instructure.com/14695
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
This fixes two cases that were missed before. Sometimes the
webct relative resource id starts with a '/' and sometimes
not, this accounts for that.
Also, finding a file by a relative path was trying to find it
by the URI escaped version instead of the unescaped one. And
sometimes webct data has differently-cased file paths in the
QTI, so this tries finding files in all lower case.
Test Plan:
* Import a webct course that has files in quizzes
* All the images should import correctly into canvas. (meaning the url should be like /courses/:id/files/:id/preview)
closes#9520
Change-Id: I110c7f1968ae5a050fbd6b4e21332e8168481a15
Reviewed-on: https://gerrit.instructure.com/12474
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Some href values are incorrect for media comments in
existing data. When those links are copied the import
code tried to find the file at the href value. Since the
file doesn't exist it strips out the media comment id even
though that is still valid. This commit will instead grab
the media id and make the link copy correctly.
Test Plan:
* Create a media comment
* Edit the html of the media comment and change the href in it to just "%24IMS_CC_FILEBASE%24/#"
* Copy the course
* In the new course the media comment should work correctly and the href should be "media_objects/#{the_id}"
closes#9471
Change-Id: Ieae7e65a22099afab32a3a1af91e3e227ef27250
Reviewed-on: https://gerrit.instructure.com/12360
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
test plan:
* create a course with a module that has an external tool link in it;
* link to the external tool from a wiki page (you'll need to do this
manually by copying the link from the modules page and taking the
path);
* create a new course and copy the first course's content into it;
* verify that the link exists in the wiki page and properly links to
the external tool.
Change-Id: Ia7a3169ba1deb9e42955b658a3bf26203d311e5d
Reviewed-on: https://gerrit.instructure.com/10997
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Test Plan:
* In a wiki page create an image link to "/images/preview.png"
* copy the course
* the link to that image should not be broken
closes#8503#8493
Change-Id: Ib0ed374ac573a826d122d1d9adaa3c3dacc3fda2
Reviewed-on: https://gerrit.instructure.com/10617
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Test Plan:
* Create a text area with an equation in it from the default
equation editor.
* copy the course
* the equation should still be there in the new course
closes#8237
Change-Id: I9238f8e0a305ee95963e0774651f45624d50e459
Reviewed-on: https://gerrit.instructure.com/10335
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Test Plan:
* Copy quizzes that have html in the answers
* The resultant quizzes should have the html
closes#8236
Change-Id: I18efdca6e915aeab2a8d117b49324591289ef824
Reviewed-on: https://gerrit.instructure.com/10314
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
File in the root folder of a course we being copied into
and extra folder called "course files" in the destination
course. And media object references linking to non-existant
.flv files in the course when copied.
Test Plan:
* Create some files in the root of a course
* Create a media comment on a wiki page or the course syllabus
* Copy the course
* The files should be in the root in the new course and the media comment should work
closes#8299
Change-Id: I505007d195c962eb249975f7e6d4afc9733fb59e
Reviewed-on: https://gerrit.instructure.com/10254
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
When importing, urls starting with '/' were flagged as not
relative. This commit changes the relative url detection
to use the URI library. There are also a lot of unit tests
added for the ImportedHtmlConverter.
Test Plan:
* Import a package that has a relative mage url starting with '/' on a wiki page
* The image should render when the import is complete
closes#6813
Change-Id: I008bb603b1abb53ae8753b44413cac8b9b1f4245
Reviewed-on: https://gerrit.instructure.com/8022
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
We've decided to approach this another way. See redmine #2635.
This reverts commit d9d5715b2b.
Change-Id: Ib497319994294a4fc0fe0da47acbde692e00fd91
Reviewed-on: https://gerrit.instructure.com/7961
Tested-by: Zach Wily <zach@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
prepend all wiki page urls with the object id to ensure that,
even if the title/url change, the record can still be retrieved
with the id.
test plan:
1. create a new wiki page;
2. in the body of another wiki page, link to the newly created
wiki page;
3. change the title of the newly created wiki page;
4. verify that the link to the new wiki page still works (even
though the title has changed).
Change-Id: I4a6ab2dea3e156abe88d022ae5f17cd7a0fb3924
Reviewed-on: https://gerrit.instructure.com/6792
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
this also makes it so that urls in html are exported with
'%20' instead of '+' from now on
refs #4903
Change-Id: I8982b7e38a151101e33a7ea33301bff64f56079d
Reviewed-on: https://gerrit.instructure.com/4710
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
This fixes another relative url format for another system
where the migration_id of the file is referenced instead
of a relative path to the file
closes#4605
Change-Id: I08852c2bb207a7065c854e1a120fb9ba52c7c7c8
Reviewed-on: https://gerrit.instructure.com/3867
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Before we were stopping at ['"], but that was unecessary (and wrong) because
what we have is the actual, parsed attribute value. This also means we didn't
get a full filename if it had a quote in it.
Change-Id: Ib4b44a2bdf3f7dc0d2f216415c1fcbfd9ac3e126
Reviewed-on: https://gerrit.instructure.com/3178
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
started the framework for importing the canvas flavored
common cartridge packages. There is also some minor
refactoring of the export step to allow for easy testing
of both exporting and importing
course settings, assignment groups, and external tools
are imported and tested with this commit
refs #3396
Change-Id: I4e8a2ebfc9df7e31f8859b189fea23f9584d7ef4
Reviewed-on: https://gerrit.instructure.com/3042
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
The text helper was double escaping urls from external migrations
refs #3667
Change-Id: Ica89af6fffab47ec1fee82167acc1d34551e63e4
Reviewed-on: https://gerrit.instructure.com/2232
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>