Commit Graph

25 Commits

Author SHA1 Message Date
Daniel, Torok b685d23dc2 XML parsing support for Discussion Checkpoint related fields
refs VICE-4576
flag=discussion_checkpoints

test plan:
 - tests pass

Change-Id: I1f59bb8e30a2b5d11c3980f85aacf22340913b92
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/356047
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Dora Csolakov <dora.csolakov@instructure.com>
Product-Review: Kata Virag Keri <kata.keri@instructure.com>
Reviewed-by: Viktor Szpisják <viktor.szpisjak@instructure.com>
2024-09-04 14:42:13 +00:00
Omar Gerardo Soto-Fortuño efb3347b0a Add Discussion anonymous state to Course Importer
flag=none
closes VICE-2774

Test Plan:
 - Tests pass
 - Go to course A
 - Create an Anonymous Discussion Topic
 - Go to course B
 - Go to Settings
 - On the right side, click on Import Course Content
 - On Content Type select Copy a Canvas Course
 - Search for the course A (whatever name it has)
 - On Content choose: "Select specific content"
 - Click on Import
 - Then on the Current Jobs table click on Select Content
 - Expand Discussion Topics (clicking on the arrow)
 - Select the discussion topic to import
 - Click on Select Content.
 - Once the job is completed, verify that the
     Discussion Topic was added to the course
     as anonymous.

Change-Id: I0ce26478c3f3fea3a7fb3c305ef8985390ab606a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/295548
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Jeffrey Johnson <jeffrey.johnson@instructure.com>
Product-Review: Jeffrey Johnson <jeffrey.johnson@instructure.com>
2022-07-19 18:13:44 +00:00
Jeffrey Johnson 4d6d231c2c Revert "Add Discussion anonymous state to Course Importer"
refs VICE-2952

Test Plan
1. Repro steps in VICE-2952 should not remove author of announcemcent

Change-Id: Ia1ed4f360bd7a5745dc2d5dffc07e9931276c636
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/294466
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Omar Soto-Fortuño <omar.soto@instructure.com>
QA-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
Product-Review: Omar Soto-Fortuño <omar.soto@instructure.com>
2022-06-22 12:57:55 +00:00
Omar Gerardo Soto-Fortuño dffb146bd1 Add Discussion anonymous state to Course Importer
flag=none
closes VICE-2774

Test Plan:
 - Tests pass
 - Go to course A
 - Create an Anonymous Discussion Topic
 - Go to course B
 - Go to Settings
 - On the right side, click on Import Course Content
 - On Content Type select Copy a Canvas Course
 - Search for the course A (whatever name it has)
 - On Content choose: "Select specific content"
 - Click on Import
 - Then on the Current Jobs table click on Select Content
 - Expand Discussion Topics (clicking on the arrow)
 - Select the discussion topic to import
 - Click on Select Content.
 - Once the job is completed, verify that the
     Discussion Topic was added to the course
     as anonymous.

Change-Id: Ib9c4e2ba3e112805e5d68b7feabd94ab34bae20b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/293232
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
QA-Review: Chawn Neal <chawn.neal@instructure.com>
2022-06-06 14:33:23 +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 4d43809cae RuboCop: Style/PercentLiteralDelimiters
[skip-stages=Flakey]

auto-corrected, with a post-review looking for multiline strings
to convert to heredocs

Change-Id: I7f7afb11edd63415cde10866822dd2ac5ba0d8be
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278669
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-18 23:05:50 +00:00
Cody Cutrer 58d528037e RuboCop: Lint/AssignmentInCondition
[skip-stages=Flakey]

(manual)

Change-Id: I855b13a7888f4926df42fe6306cc248e611efdf6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274712
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-29 03:38:39 +00:00
Cody Cutrer c65d57737a RuboCop: Layout lib
Change-Id: I0655d9a9d750f2debd6378b03d8ddc1403ebc31b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274158
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 20:01:52 +00:00
Cody Cutrer 06763dd519 add # frozen_string_literal: true for lib
Change-Id: I59b751cac52367a89e03f572477f0cf1d607b405
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251155
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:49:50 +00:00
Dan Minkevitch 277720c2a3 Add "Closed for comments" setting to topic migration
Closes ADMIN-703

Test Plan:
* Create an course with and an announcement, lock
  the announcement after posting.
* Go to Course Settings > Copy Course start new course Copy
* Navigate to course announcemtns in new course, notice migrated
  announcement is closed for comments.

Change-Id: I25856f0a44b2c70a9cac54673bac8cab55fde50e
Reviewed-on: https://gerrit.instructure.com/140713
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2018-02-13 21:07:43 +00:00
Jeremy Stanley ad18235015 refactor package content management
extract PackageRoot to handle common tasks on extracted packages,
such as translating between absolute and package-relative paths,
and enumerating contents

test plan:
 - ensure the package attached to the ticket is handled correctly
 - regression test course copies and Canvas cartridge imports

refs ADMIN-528

Change-Id: I76b67076a48c8acedcde523d46aac8e2ccef76d0
Reviewed-on: https://gerrit.instructure.com/132389
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2017-11-15 18:03:18 +00:00
Dan Minkevitch 1218033b3e Add new planner fields for course copy
Closes FALCOR-241

Test Plan:
* As an admin
* In a course with the "Student Planner" feature
  flag enabled
* With discussion topics and wiki pages that have
  been marked as "Add to student to-do" and have
  corresponding todo dates
* Run a course copy for the discussion topics and
  wiki pages
* The newly copied topics and pages should have
  the todo date set the same as the original

Change-Id: Ib1ceb3ed87351b2fac5b68c31b4d3d6066cf6688
Reviewed-on: https://gerrit.instructure.com/114827
Tested-by: Jenkins
Reviewed-by: Mysti Sadler <mysti@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Dan Sasaki <dsasaki@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2017-06-12 17:58:27 +00:00
Landon Wilkins f1359d33e2 da licença part 27
add consistent license headers to all source files
(ruby, coffeescript, javascript)

except for vendor files

Change-Id: I331826e3e3be8b7d73bbf4f6afe3a79ec1340f54
Reviewed-on: https://gerrit.instructure.com/110051
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-27 21:53:31 +00:00
James Williams a869a26b73 separate discussion topics and announcements in importers
test plan:
* import the package referenced in the ticket,
 selecting discussion topics
* it should not bring it announcements

closes #CNVS-30348

Change-Id: I733deb2bb22601f3f4c912cf9b81ab7b9a109bda
Reviewed-on: https://gerrit.instructure.com/84785
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-07-12 13:30:10 +00:00
Jeremy Stanley efbf0f1e2a import group discussions into matching existing group set
user groups and group sets aren't migrated with courses;
however, with this commit we will remember the name of the
group set we came from and import into a group set with
the same name in the destination course, if it exists

(basically this is 446930d0 but for graded discussion topics)

test plan:
 - create a group set on course A's People page
 - create a group discussion topic in course A and assign it
   to this set
 - create a new course B and create a group set with
   the same name
 - copy content from A to B
 - the group discussion topic in B should be associated
   with the group set created in the previous step

fixes CNVS-29477

Change-Id: Ibbfb0d87863d5416080b1d6aaf7b9be046b956ef
Reviewed-on: https://gerrit.instructure.com/80163
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2016-05-24 18:56:09 +00:00
Jeremy Stanley a7509c9fa2 persist discussion topic "allow liking" settings across migration
test plan:
 - "allow liking" and the sub-settings "only graders can like"
   and "sort by likes" should persist across course copy or
   export/import

fixes CNVS-22723

Change-Id: Id505365e00ef276087c8c3299019887799e7e028
Reviewed-on: https://gerrit.instructure.com/75380
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2016-03-25 20:10:15 +00:00
Jeremy Stanley 56a3f80dd1 find or create a group category for imported discussions
test plan:
* create a group discussion topic
* copy the discussion topic
* it should still have "This is a Group Discussion" marked
* it should have created/found a default group called
 "Project Groups" (i.e. the default name populated in
 the dialog if there are no other group sets)

fixes CNVS-21926

Change-Id: If88b0f5e461ab4a769f911e9d5e359fa3bbdd685
Reviewed-on: https://gerrit.instructure.com/58725
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-07-20 17:25:45 +00:00
Jeremy Stanley b19f89d6ff preserve "Until" time when copying discussion topics
test plan:
 - create an ungraded discussion topic with "Available at"
   and "Until" dates
 - copy the course
 - confirm the dates are preserved
 - confirm both dates move appropriately when you shift dates

fixes CNVS-19043

Change-Id: I81b694b87e745dc098e2c6b306c2c0d6656c38ca
Reviewed-on: https://gerrit.instructure.com/49898
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
2015-03-05 17:12:43 +00:00
James Williams 9989eaa9a1 retain unpublished state for discussion topics on copy
test plan:
* create an unpublished discussion topic and a
 published one
* copy the course (or export/import it)
* should retain their respective states

closes #CNVS-14201

Change-Id: If7702b67701b50ce4e2a027d1d4b5ab441d86003
Reviewed-on: https://gerrit.instructure.com/37900
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-21 17:25:10 +00:00
James Williams 9c70e3e8b4 parse cc assignment extension data
test plan:
* importing the example package with cc assignment data
 should bring in canvas specific assignment data (like grading type)

* cc and canvas package import regressions

closes #CNVS-13270

Change-Id: Ic053837aa7642212bc0360f5e5ecf2cd27a88d9b
Reviewed-on: https://gerrit.instructure.com/35747
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2014-06-03 20:28:27 +00:00
James Williams 4f23cbd214 copy discussion topic require_initial_post attribute
test plan:
* create a discussion topic
* require 'Users must post before seeing replies'
* copy the course
* copied topic should still retain option

fixes #CNVS-2690

Change-Id: I2621b5a384c30152dc318a3553cd18d4494039f3
Reviewed-on: https://gerrit.instructure.com/23693
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
2013-08-23 22:26:51 +00:00
James Williams f5947ff2be copy discussion topic pinned attribute
test plan:
* create a pinned discussion topic
* copy the course
* copied topic should still be pinned

fixes #CNVS-6956

Change-Id: Ifa0e1d79cad8eddccbded7bb6a2585da8437e8c5
Reviewed-on: https://gerrit.instructure.com/22577
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: August Thornton <august@instructure.com>
2013-07-23 16:48:54 +00:00
James Williams a2b3c60902 copy discussion_type in course copy
test plan:
* create a discussion topic in a course, checking
 "allow threaded replies"
* copy the course
* the new discussion topic should retain the option

fixes #CNVS-1589

Change-Id: I0a37babac340c1f6ee869e4805217553d954e165
Reviewed-on: https://gerrit.instructure.com/20152
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-04-30 16:33:31 +00:00
Bracken Mosbacker 609577264d improve canvas cartridge import robustness
The canvas cartridge import would fail if there was no
'non_cc_assessments' folder, or if the discussion topic
meta file was incorrectly referenced

Test Plan:
 * Import the new .zip fixture
 * It shouldn't fail and there should be a discussion topic

closes #8886

Change-Id: I94c965c2e1f52437a395288e389cbf4c6fa89d41
Reviewed-on: https://gerrit.instructure.com/11271
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-06-04 15:25:05 -06:00
Bracken Mosbacker bfb4378490 move canvas-specific import code into its own namespace
refs #4153

Change-Id: Id09baee420203ba6a6d723e9096168d9968af7c2
Reviewed-on: https://gerrit.instructure.com/5699
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-09-23 13:10:34 -06:00