Commit Graph

8 Commits

Author SHA1 Message Date
James Williams a4d97c923c rails4: fix importer dependencies
refs #CNVS-21596

Change-Id: I7b5f5d08f063a8a00a611295585fad0e41f57686
Reviewed-on: https://gerrit.instructure.com/58248
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-07-13 15:45:59 +00:00
James Williams 91646b65eb imported link refactoring
test plan:
* regression test links within copied content

* should also fix a pre-existing bug where
 links to content within assessment/quiz questions
 were not being copied

closes #CNVS-20890 #CNVS-20740

Change-Id: I1d1b89faba468690eaddaa1e29cd2936c807cc60
Reviewed-on: https://gerrit.instructure.com/55830
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-06-16 20:04:32 +00:00
Cody Cutrer 102fdfc849 no more dynamic finders (models)
refs CNVS-15126

Change-Id: I2996e0e262c41274c34d0ea3bfde757074416b8c
Reviewed-on: https://gerrit.instructure.com/40973
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-09-24 20:51:48 +00:00
Jeremy Stanley aa75b03a5b use root account uuid to scope external ids in migrations
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>
2014-09-09 19:16:41 +00:00
James Williams 924a4cf832 fix date shifting for re-imported items
(also keep track of other imported items as well)

test plan:
* import a canvas export package (such as the one
referenced in the ticket) with assignments and graded
discussions
* import them into a course
* delete the assignments, etc. from the course
* re-import the package, while shifting the dates
* the re-imported (i.e. undeleted) assignments should
 have their dates shifted

fixes #CNVS-13252

Change-Id: I396059cdcf58fe3386f21cc7cffe62ac8951cd05
Reviewed-on: https://gerrit.instructure.com/36743
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>
2014-07-07 21:19:34 +00:00
James Williams 5f927946c5 import/export learning outcome alignments
test plan:
* create a course with a question bank and
questions
* create learning outcomes (either on the course
or account level)
* align outcome(s) to the question bank(s)
* copy the course, or import/export it
* confirm that the question banks in the new course
retain their alignments

fixes #CNVS-5917

Change-Id: I16a80371af4433a4debdcc29d09d7fa1f43bc41e
Reviewed-on: https://gerrit.instructure.com/34572
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
2014-05-14 12:31:11 +00:00
James Williams 2ba4531f73 migration refactor: account question banks import
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>
2014-05-12 16:30:10 +00:00
James Williams 7692af009a move all importing methods into models/importers
test plan:
* migration regressions

Change-Id: Ibed8d4820c05b9c69101b215932af32055c3e006
Reviewed-on: https://gerrit.instructure.com/33728
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2014-05-02 17:31:15 +00:00