Commit Graph

38 Commits

Author SHA1 Message Date
Jacob Burroughs 7dcc507d0a Rubocop for ruby 3.1
[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>
2023-06-06 16:44:26 +00:00
Rajmund Csehil 3b1ceec840 Keep rich content as-is during classic to new quiz migration
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>
2023-04-25 11:42:41 +00:00
Cody Cutrer 62fc5c033d rubocop: prep for updating rubocop-rspec
auto-correctable cops applied

[skip-stages=Flakey]

Change-Id: I17e18e2e1a230ef7b27f01ddb7e587045eabf97f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315809
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-04-12 19:30:10 +00:00
Matheus 637b50f6c6 Log content import and export durations
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>
2023-03-27 22:41:45 +00:00
Jorge Arteaga 30021690da show short term quiz migration limitation message
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>
2021-12-16 13:52:27 +00:00
Adrian Diaz 22b2ac4d8d qti includes account banks when migrating quiz
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>
2021-12-03 16:48:43 +00:00
Cody Cutrer c2cba46851 RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation
[skip-stages=Flakey]

auto-corrected

Change-Id: I4a0145abfd50f126669b20f3deaeae8377bac24d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279535
Tested-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2021-11-25 14:03:06 +00:00
Cody Cutrer e73cf9ddf4 RuboCop: Style/HashSyntax
[skip-stages=Flakey]

auto-corrected

Change-Id: I9371a61046aee6b148f89dd434114a8ba2b1188c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279533
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2021-11-25 14:02:35 +00:00
Cody Cutrer c302dd8bc1 RuboCop: Style/SymbolArray, Style/WordArray
[skip-stages=Flakey]

auto-corrected

Change-Id: Id187ed60c5590025e780d81b85b5212f51368f27
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279196
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
2021-11-23 14:30:08 +00:00
Cody Cutrer 06a2c9df42 spec: remove manual requires of spec_helper
[skip-stages=Flakey]

Change-Id: Id65c835b72e1c0a4bb825b58490ce0ff7c8d9873
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276829
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-10-26 20:38:27 +00:00
Jeremy Stanley cabece352d log job ids in exports and imports
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>
2021-10-15 16:11:28 +00:00
Cody Cutrer 99012579f2 rubocop: fix some grammar issues introduced by auto-correct
[skip-stages=Flakey]

Change-Id: Ife388b6e821615edb3c475380db9806ac9fa05e7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274341
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-09-24 18:26:52 +00:00
Cody Cutrer b6e406ddcf RuboCop: RSpec/ExampleWording
[skip-stages=Flakey]

Change-Id: I291432cd1f51fdaefb3cf6160d423879fb858c11
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274253
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-09-24 02:15:35 +00:00
Cody Cutrer 8e0327867e RuboCop: Layout spec/models
[skip-stages=Flakey]

Change-Id: I25b7f97dc3bb7fd9f24e63e372d7127c42cd3147
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274147
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-09-22 19:17:48 +00:00
Jeremy Stanley 52e4e7c864 check correct shard for content share linked to export
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>
2021-04-26 20:00:08 +00:00
Cody Cutrer f2a9c756f1 update to inst-jobs 1.0 via shims
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>
2020-10-28 13:46:49 +00:00
Cody Cutrer 81d0bbc465 add # frozen_string_literal: true for specs
Change-Id: Id508bec1817937b1c24c29f1db7221e09cb9c2ab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251157
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-10-27 20:48:35 +00:00
Han Yan 2706a2af1c align quiz migration behaviors with quiz duplication
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>
2019-10-22 22:18:35 +00:00
Jeremy Stanley b6323bd15a don't expire content exports that are part of content shares
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>
2019-09-25 20:43:55 +00:00
James Williams 97fbbcaad3 allow cross-shard course copy
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>
2019-04-22 12:25:06 +00:00
Jeremy Stanley 86fe63bd13 fix quizzes2 exports with ungraded quizzes and post-to-SIS
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>
2018-05-04 01:44:48 +00:00
Han Yan f1bb548d7c Quizzes Next Feature Flag support
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>
2018-01-11 22:39:42 +00:00
Jacob Fugal b29eb06383 involve user in generating non-public links
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>
2018-01-09 22:21:38 +00:00
Jayce Higgins 43485101fd Add course UUID to course_export_complete event
Fixes: QUIZ-2081

Test-Plan:

- Setup live event testing locally
- Trigger quiz migration event
- Assert that live event body contains course UUID matching the course
  that the quiz was migrated from.

  o key: `['assignment']['course_uuid']`

Change-Id: I16a98a0c62a26dff24a9c689a1d96b1675ab362f
Reviewed-on: https://gerrit.instructure.com/115554
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: John Corrigan <jcorrigan@instructure.com>
2017-06-15 22:52:41 +00:00
Simon Williams f20a840f70 mark content exports older than 30 days as expired
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>
2017-05-23 19:51:12 +00:00
Landon Wilkins 242581edd3 da licença part 48
add consistent license headers to all source files

Change-Id: Ib581cddb21430cf4971aeb14980727c2935e31e4
Reviewed-on: https://gerrit.instructure.com/110154
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-28 18:59:33 +00:00
Hannah Bottalla 850f136839 Extend content_export_complete live event with a qti export
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>
2017-03-15 15:10:22 +00:00
Hannah Bottalla ea8a3c8409 Push quiz_export_complete live event from Canvas
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>
2017-03-08 17:00:27 +00:00
Hannah Bottalla bcac712b2c API Endpoint for Quizzes2 ContentType
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>
2017-02-22 20:40:11 +00:00
Hannah Bottalla 1a64ef0d4c Add Quizzes2 content type behind FF
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>
2017-02-21 17:03:26 +00:00
Cody Cutrer 912a2cb083 rspec 3-ify spec/models
refs CNVS-16239

Change-Id: I0dc5ac9cb86fbb5dd0335d9e21d77d4a48ecb774
Reviewed-on: https://gerrit.instructure.com/42697
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2014-10-14 20:10:03 +00:00
Jeremy Stanley 3fa2e9c3db give content_exports polymorphic context
test plan:
* content export regressions

closes #CNVS-13468

Change-Id: I44dcf077967d4273c0ae9056074b03853d66a5dc
Reviewed-on: https://gerrit.instructure.com/35745
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-07-09 16:34:39 +00:00
Jon Jensen fc9161d3f8 spec: once-ler spec/models/{b,c}*
in rails3, reduce runtime by >25% (25.5min -> 18.5min locally)

Change-Id: If2980f721f59fc04cff8d77857bb8554190c1935
Reviewed-on: https://gerrit.instructure.com/37072
Reviewed-by: Dave Donahue <ddonahue@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2014-07-01 16:19:44 +00:00
Cody Cutrer d3f0b18684 validate nullness in the db on a bunch of columns
fixes CNVS-7414

Change-Id: I60978f66d88d916dc5736dbb975715172bd1e14b
Reviewed-on: https://gerrit.instructure.com/23141
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-09-12 22:20:39 +00:00
Joel Hough 37d829ec9f spec: don't use user for user_id in communication_channel_model
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>
2013-03-20 22:47:22 +00:00
Simon Williams ef121ba567 ensure course export includes all content; fixes #8693
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>
2012-05-24 09:04:56 -06:00
Simon Williams 72be6ba687 fix immediate migration notifications
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>
2012-05-11 13:59:26 -06:00
Bracken Mosbacker 37a65cec7c allow selective course exports
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>
2012-04-02 17:28:51 -06:00