Commit Graph

595 Commits

Author SHA1 Message Date
James Williams aadea501ed use action view erubis for rails 3
Change-Id: I1f9cb0a894ce7a1af63b03d432396f7d911c5bf6
Reviewed-on: https://gerrit.instructure.com/29790
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2014-02-07 17:26:33 +00:00
James Williams d4fba8bc78 pin all the gems
Change-Id: I7f02aa4794f91aebc2fe3d02e249ef00ab3c80dd
Reviewed-on: https://gerrit.instructure.com/29784
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
2014-02-07 16:44:22 +00:00
Jeremy Stanley 56dd02c8a1 don't fail module api PUT when position doesn't change
test plan:
 - enable draft state
 - go to modules page
 - publish a module and ensure the cloud icon changes
 - unpublish a module and ensure it changes back, without
   having to reload the page
 - repeat the two previous steps a couple of times

fixes CNVS-10829

Change-Id: I0806a29ccb9d1ff8e37e31e26e6eb39b3aa90fac
Reviewed-on: https://gerrit.instructure.com/29555
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
2014-02-06 23:30:45 +00:00
Rob Orton 64b7d487a8 fix mysql build student report
test plan
 - specs should pass

Change-Id: Ibf7d19287de12f5802a200485951e92c62694f68
Reviewed-on: https://gerrit.instructure.com/29602
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2014-02-04 21:25:29 +00:00
Zach Pendleton 3e6f3edbca allow circular dependencies in polymorphic_type_override
test plan:
  * run specs

Change-Id: Ie6f8be9c23c76ff2ab499641c65ba5425e4a453b
Reviewed-on: https://gerrit.instructure.com/29563
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
Product-Review: Raphael Weiner <rweiner@pivotallabs.com>
QA-Review: Raphael Weiner <rweiner@pivotallabs.com>
2014-02-04 16:01:44 +00:00
James Williams 9d487deb3e resolve rails 3 logger.silence deprecation warnings
Change-Id: I06cdbd4bd8512e382e830a89a1efc246dae65889
Reviewed-on: https://gerrit.instructure.com/29040
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>
2014-02-03 21:06:53 +00:00
Rob Orton 5a08e254b6 optimize students with no submissions report
fixes CNVS-10782

test plan
 - run students with no submissions report
 - it should run much faster

Change-Id: Ib57bac057e61a9ed7a0b2656b3f80c6efe134aa6
Reviewed-on: https://gerrit.instructure.com/29350
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-01-31 18:52:59 +00:00
Raphael Weiner a9f131e55b convert adheres to policy plugin into proper gem
* vendoring gems to allow the gems that we own to reference a locked
* down version in their gemspecs. Specifically, with the old version of
* ActiveSupport that we were getting from the LTS Rails repo, there is
* no way to tell bundler to install a gem that is a subdirectory of a
* git repo.

Change-Id: I32d9d0fae15da1fcf27f11e5cd8fca26af18d383
Signed-off-by: David Julia <djulia@pivotallabs.com>
Reviewed-on: https://gerrit.instructure.com/29438
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stephan Hagemann <stephan@pivotallabs.com>
Product-Review: Stephan Hagemann <stephan@pivotallabs.com>
QA-Review: Stephan Hagemann <stephan@pivotallabs.com>
2014-01-31 17:22:45 +00:00
James Williams bb31a022bb fix update/save_without_callbacks for rails 3
replaces update_without_callbacks with
 save_without_callbacks in specs

fixes ArgumentError:
 "tried to create Proc object without a block"

Change-Id: I62275348cd9fff967d21646e7cd963c4b531790e
Reviewed-on: https://gerrit.instructure.com/29255
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2014-01-31 17:03:16 +00:00
Rob Orton e151b3c0a5 spec allow option to not sort account reports
test plan
 - specs should pass

Change-Id: If1592ae4a2ff3f999a35456fc4fb9487cd7f3ae4
Reviewed-on: https://gerrit.instructure.com/29480
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brandon Broschinsky <brandonbr@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2014-01-31 16:15:06 +00:00
Raphael Weiner 455b2fd840 convert stringex plugin to proper gem
Change-Id: I947b3dee5adc0ac84ef56173c46a1927ca3f2936
Reviewed-on: https://gerrit.instructure.com/29469
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stephan Hagemann <stephan@pivotallabs.com>
Product-Review: Stephan Hagemann <stephan@pivotallabs.com>
QA-Review: Stephan Hagemann <stephan@pivotallabs.com>
2014-01-31 00:31:32 +00:00
Raphael Weiner 55cf0246e8 convert breach migration plugin to proper gem and fix name
Change-Id: Ie26495b5ea3e09f31b6b80d643679fe94ca9816b
Reviewed-on: https://gerrit.instructure.com/29455
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stephan Hagemann <stephan@pivotallabs.com>
Product-Review: Stephan Hagemann <stephan@pivotallabs.com>
QA-Review: Stephan Hagemann <stephan@pivotallabs.com>
2014-01-30 22:55:31 +00:00
Raphael Weiner 371402021d convert mimetype_fu plugin to proper gem
Please enter the commit message for your changes. Lines starting

Change-Id: I633d3e9849cb750010591bc6a46897b3f148bb3e
Reviewed-on: https://gerrit.instructure.com/29467
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stephan Hagemann <stephan@pivotallabs.com>
Product-Review: Stephan Hagemann <stephan@pivotallabs.com>
QA-Review: Stephan Hagemann <stephan@pivotallabs.com>
2014-01-30 20:31:28 +00:00
Raphael Weiner 6d46974518 convert crummy plugin to proper gem
Change-Id: I611b9fbc72d65696ee0c7f4889515eec56d3c463
Reviewed-on: https://gerrit.instructure.com/29451
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stephan Hagemann <stephan@pivotallabs.com>
Product-Review: Stephan Hagemann <stephan@pivotallabs.com>
QA-Review: Stephan Hagemann <stephan@pivotallabs.com>
Tested-by: Stephan Hagemann <stephan@pivotallabs.com>
2014-01-30 18:30:15 +00:00
Rob Orton 7bc760a40e add start_at to report documentation and extra text
refs CNVS-10726

test plan
 - run zero activity report with a start date
 - extra text should have start at

Change-Id: Ic81460e83da7c7d55f0cf95d717b9ffc14b077a1
Reviewed-on: https://gerrit.instructure.com/29425
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2014-01-29 20:03:12 +00:00
Raphael Weiner 91944495c2 convert sanitize field plugin into proper gem: CanvasSanitize
Change-Id: I5562a318bb3f52c1374a3a69f288bfb2381f8ee7
Reviewed-on: https://gerrit.instructure.com/29405
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stephan Hagemann <stephan@pivotallabs.com>
Product-Review: Stephan Hagemann <stephan@pivotallabs.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2014-01-28 22:36:18 +00:00
Rob Orton 7d7713f35a add extra text to reports that run for all terms
fixes CNVS-10726

test plan
 - run zero activity report for all terms
 - ui should show it was run for all terms

Change-Id: I3a0f5884eb66c6b2614481c44a3bec85ddd30742
Reviewed-on: https://gerrit.instructure.com/29359
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2014-01-28 20:45:35 +00:00
Derek DeVries 336a4adfb0 allow before_save callback for redis job to initialize defaults for rails3
Change-Id: I9da990f81835f6a9afb2ab77a5408b7532dacf3b
Reviewed-on: https://gerrit.instructure.com/29272
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
QA-Review: Derek DeVries <ddevries@instructure.com>
2014-01-28 20:23:42 +00:00
James Williams d9ae1efd2c spec: replace it_should_behave_like with include_examples
Change-Id: I8a10679218b9a6ff8485b7822a21c704bdfaa398
Reviewed-on: https://gerrit.instructure.com/29213
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2014-01-24 16:02:26 +00:00
Joshua Simpson 1e81ea7caa move quiz into quizzes namespace as a precursor to enginifying
fixes CNVS-10679
this commit refactors quiz into a quizzes namespace. it contains various
shims to facilitate the data migration of polymorphic relationships
('Quiz' -> 'Quizzes::Quiz').  JIRA contains several tickets linked to
the above tickets in regards to removing these shims after the data
migration, as well as the strategies on reverting the shims once the
data migration is complete.
Change-Id: I30c566d60a87af6ee83e9d0041fdcb909ead6a89
Reviewed-on: https://gerrit.instructure.com/28573
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
2014-01-24 00:08:46 +00:00
James Williams 5518c4275a fix delayed_job before_save callback for rails 3
Change-Id: I0cbd7e32700df6df7cde4c7911fcc9403ae40a5b
Reviewed-on: https://gerrit.instructure.com/29039
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-01-22 19:49:37 +00:00
James Williams 22e168cf3d upgrade moodle2cc gem
test plan:
* import the package referenced in the ticket
* module items that were previously only brought in
as standalone links should now be wiki pages with
description text

fixes #CNVS-10280

Change-Id: Ic997b091afd185afd1b6f33ba1c298430f33c91b
Reviewed-on: https://gerrit.instructure.com/28992
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2014-01-21 21:45:12 +00:00
Cody Cutrer a983e3fa79 fix remove_from_list when destroying for not null columns
basically, don't bother setting position to null

Change-Id: I560b129e499552d94f3cd4709a361432a54db627
Reviewed-on: https://gerrit.instructure.com/28367
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-01-21 21:22:52 +00:00
Cody Cutrer cc93da5b8c integration specs are request specs in rspec2
Change-Id: Iffee4243a9fa27e43f7020919a18777031e9724f
Reviewed-on: https://gerrit.instructure.com/28833
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-01-21 19:29:58 +00:00
Cody Cutrer 69053bf08c spec: fix delayed jobs specs on mysql dependent on subsecond precision
refs CNVS-7032

Change-Id: I6ac3cba00d45bccec6c0c8067ff43a2b0c21161d
Reviewed-on: https://gerrit.instructure.com/28808
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-01-20 19:59:58 +00:00
Cody Cutrer 9e576a9a76 mark models returned from old versions as not new records
rails 3 optimizes to not do certain operations on new records,
breaking things

Change-Id: I9dea310f042cc1713e1693b353bf8c35ffe3c840
Reviewed-on: https://gerrit.instructure.com/28721
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-01-20 17:22:26 +00:00
James Williams e54a8dcbc8 don't extend current_version_unidirectional
Change-Id: I410c7784cb988e077a470eead493d15c5682e427
Reviewed-on: https://gerrit.instructure.com/28860
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-01-20 17:15:39 +00:00
Cody Cutrer 909097c2f3 attr_protected doesn't exist when you only include ActiveModel::Callbacks
Change-Id: I3903160ec24128fed732c3f8d4998d9842653bd8
Reviewed-on: https://gerrit.instructure.com/28705
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-01-17 17:13:25 +00:00
James Williams 5ff6df6b56 fix simply versioned association for rails 3
Change-Id: I9545f224ef8340f3efeda04682999ace811c2352
Reviewed-on: https://gerrit.instructure.com/28535
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-01-16 19:45:43 +00:00
Cody Cutrer 1be6ce3fe0 remove superfluous transaction
refs CNVS-7032

Change-Id: I4ba80222d8b733b46538bfb8168f4869f87a2c19
Reviewed-on: https://gerrit.instructure.com/28655
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-01-16 18:50:41 +00:00
Cody Cutrer 66fb573bc0 fix manual locking in mysql used by delayed job singletons
refs CNVS-7032

Change-Id: I6fb05ca85a1cc14a0a7091d277e224b2e5be237e
Reviewed-on: https://gerrit.instructure.com/28574
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-01-15 22:35:12 +00:00
Rob Orton e88e87fa27 spec fix intermittent spec failure
test plan
 - specs should pass

Change-Id: Id93d10d36a4f321be7db82fa9cccb7976a13767a
Reviewed-on: https://gerrit.instructure.com/28568
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2014-01-15 07:07:56 +00:00
James Williams a3906ecfcf fix attachment_fu callbacks for rails 3
Change-Id: I7edc978b22fee7e4cb4c8c9c97188858c64b3795
Reviewed-on: https://gerrit.instructure.com/27677
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2014-01-14 13:12:33 +00:00
Rob Orton 63de820ee2 include deleted courses in provisioning report
this will still exclude courses that have been
deleted longer than 6 months ago

closes CNVS-7848

test plan
 * delete a course that has no sis id
 * run report with include deleted objects
 * it should include the course

Change-Id: I93787fd37cb16e523de0987e99bba5640666a5eb
Reviewed-on: https://gerrit.instructure.com/28436
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2014-01-13 18:48:50 +00:00
Rob Orton 790b2af9fe don't include users multiple times in report
fixes CNVS-10382

test plan
 - enroll user in multiple courses or multiple times
 - run last_user_access report
 - user should be included once per pseudonym

Change-Id: I82673fee4780da10b713b20c8cf7ee197928d54d
Reviewed-on: https://gerrit.instructure.com/28402
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2014-01-13 18:48:30 +00:00
Rob Orton 1382e58109 add to extra text if include deleted objects is set
test plan
 - run outcomes report with include deleted objects
 - report ui should show it was set

Change-Id: I0108b59a3a7f04a3831938e51a56c40602e924b2
Reviewed-on: https://gerrit.instructure.com/28403
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2014-01-13 16:54:09 +00:00
James Williams 70fa975524 use self.primary_key and self.table_name
in order to avoid rails 3 deprecation warnings

Change-Id: If4c6ece9496e1161718770420384003de23f0421
Reviewed-on: https://gerrit.instructure.com/28206
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2014-01-09 12:34:12 +00:00
James Williams d9f08f1527 fix simply_versioned version before_create callback for rails 3
Change-Id: Ide8ba029dbcde7ce4df4d3d874b1ffd4d146c32f
Reviewed-on: https://gerrit.instructure.com/28158
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2014-01-08 21:35:53 +00:00
Rob Orton d5ad89ed09 fix report query update progress less often
fixes CNVS-10286

test plan
 - run outcome results report
 - it should work

Change-Id: I8c32fa9302c5af8c3af3c6ce4a5b2c4a42809ffa
Reviewed-on: https://gerrit.instructure.com/28117
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2014-01-07 18:05:27 +00:00
James Williams 54f574d892 fix erubis template handler for rails 3
fixes i18n:check

Change-Id: I319e4db05d1bc2b99f910118809569aba864df6b
Reviewed-on: https://gerrit.instructure.com/27974
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2013-12-31 18:37:15 +00:00
James Williams 3332c6d60e i18n and html safety fixes for rails 3
Change-Id: Ibae01f4cd57bffff8d4875f0efdd229564a40a85
Reviewed-on: https://gerrit.instructure.com/27577
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2013-12-31 18:37:12 +00:00
Cody Cutrer 0f2a67e0ec unlock_expired_jobs doesn't exist anymore
Change-Id: Ib96d6a579473eb3165711c30941ac50640b65a73
Reviewed-on: https://gerrit.instructure.com/27652
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-12-20 16:57:04 +00:00
James Williams 51782bd474 fix acts_as_list for rails 3
Change-Id: I8f95167fd157e11f1041fce6cfe45ecbaf6152f7
Reviewed-on: https://gerrit.instructure.com/27636
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2013-12-18 17:14:54 +00:00
Cody Cutrer 65da18174e improve acts_as_list
fixes CNVS-9622

basically, stop with the assumption that lists must be contiguous,
so that we don't have to keep compacting them all the time. allows
for far simpler queries adding things to lists.

test plan:
 * regression test on lists - files, context modules, assignments,
   etc.
 * basically make sure that adding new items puts them in the same
   spot as it did before (bottom of list?), and that reordering
   still works

Change-Id: I31c9ad4ed9b7db2b23e032617d4a01611c8e3c03
Reviewed-on: https://gerrit.instructure.com/26709
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-12-17 19:55:43 +00:00
Rob Orton fe245efdc5 change conclude to completed on sis_export report
closes CNVS-2470

test plan
- have a concluded course
- run sis export{courses, include deleted objects}
- csv should have concluded course as completed

Change-Id: I13242e4e5b9a0ab2e68d3e801a29214ec0af182e
Reviewed-on: https://gerrit.instructure.com/27538
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2013-12-16 16:43:32 +00:00
Landon Wilkins ee58627c64 optimize random group assignment
fixes CNVS-9457

test plan:
* regression testing of random group assignment
* verify that the assignment is much faster

Change-Id: Icfc72f6041f6367e43561d8b8240e6a2ffde4801
Reviewed-on: https://gerrit.instructure.com/26568
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-12-13 22:30:48 +00:00
James Williams ee95910ff3 use activemodel to extend redis::job in rails 3
Change-Id: I4182d2bc2c4ef29aec8e33bc8e97264bcc48b5b3
Reviewed-on: https://gerrit.instructure.com/27023
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2013-12-11 19:58:25 +00:00
Rob Orton 600adefeab show when an account report fails in the ui and api
test plan
 * manually break a report so it will generate an error
 * ui should show that the report failed and give an error_report id
 * api extra text will also display the error

Change-Id: I20d08a01542154933752660a86a0570491ac7945
Reviewed-on: https://gerrit.instructure.com/26539
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2013-12-02 22:57:25 +00:00
Cody Cutrer 16335a2edf fix wiziq timezone
Change-Id: I13dd915be29384889a06283c3b577c61ae0265c9
Reviewed-on: https://gerrit.instructure.com/25865
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-11-27 17:37:12 +00:00
Cody Cutrer 10bd2f16bf allow ruby 2.0
* add iconv and syck gems since they are removed from ruby 2.0
   core
 * patch rubygems to provide a stub for a method that rails 2.3 relies on
 * use a ruby 2.0 compatible debugger gem
 * fix DJ to make a before_save not private (the Callbacks modules was
   skipping it, due to
   http://tenderlovemaking.com/2012/09/07/protected-methods-and-ruby-2-0.html)

Change-Id: I661395ca97492c65e12a093d045d35b7c7ffbd81
Reviewed-on: https://gerrit.instructure.com/26599
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-11-27 15:39:53 +00:00
Rob Orton 6227d58815 don't include sections from deleted courses in report
closes CNVS-9680

test plan
 - delete a course that has sections
 - run provisioning report for sections
 - sections from course should not show up

Change-Id: I2a33db9a5ae5e4333f7c8b94908a3cd1e1138663
Reviewed-on: https://gerrit.instructure.com/26692
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2013-11-26 20:52:30 +00:00
Brian Palmer c5114c418a rails3: errors_add_to_base was removed
The errors.add_to_base(...) method was removed in rails3, so this replaces
all instances of that with errors.add(:base, ...) which also works in
rails2 and is forward compatible with rails3, semantically as well as
syntactically.

test plan: specs cover some of these error responses, generally you'll
want to make sure that validation errors still get displayed correctly.
for instance when accessing /plugins/etherpad and saving the settings
without filling in all the fields, should display an appropriate error

Change-Id: Icab1592470bf5bd86912655d5b847cfe413bd003
Reviewed-on: https://gerrit.instructure.com/26180
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2013-11-25 16:57:42 +00:00
Jeremy Stanley 1e29a97ee0 rubyzip 1.0.0 upgrade
test plan: zip functionality should continue to work, including:
 * course exports and imports
 * zip file uploads
 * zip submissions

also, the selenium dependency on rubyzip 1.0.0 is resolved
and we're making progress toward > 4GB exports

Change-Id: I58c5b0644b1e7fbb289821c9c0901f00750988de
Reviewed-on: https://gerrit.instructure.com/25474
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2013-11-22 19:23:34 +00:00
Josh Simpson b5b627efa6 Quiz question refactor / api implementation
fixes CNVS-7982
Changes parsing mechanisms for question data, and adds
API for quiz questions.

Change-Id: I483fc9c4718af50e1bed2ee3547905f857de6285
Reviewed-on: https://gerrit.instructure.com/25346
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
2013-11-22 17:03:45 +00:00
Rob Orton 9281bb21d8 spec implement new spec helper
also remove unused spec helpers

test plan
 * specs should pass

Change-Id: If95b4da8b6d0f4237d92e489d8c6f0f731560f46
Reviewed-on: https://gerrit.instructure.com/26198
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2013-11-20 23:04:31 +00:00
Cody Cutrer 38bb3ca38a don't save a ContentMigration for AcademicBenchmark before all the fields have been set
Change-Id: I0f4bce0d47ac3e42e67976882b25771de64432de
Reviewed-on: https://gerrit.instructure.com/26518
Reviewed-by: Jake Sorce <jake@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-11-20 21:39:18 +00:00
Rob Orton 36f3f17d32 write zip reports to csv file then add file to zip
fixes CNVS-4418

test plan
 * run sis export report with multiple files
 * should return zip file
 * run other reports
 * they should still work

Change-Id: Ibfa598c12b730a54aee1c5af9fdb6c08d7e0cb36
Reviewed-on: https://gerrit.instructure.com/26197
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Adam Phillipps <adam@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-11-20 20:54:46 +00:00
James Williams ab8417528c import webct multiple short answer questions as fimb
test plan:
* import the course referenced in the ticket
* the question previous imported as short answer
should now be imported as a fill-in-multiple-
blanks question

fixes #CNVS-9355

Change-Id: Ia8f175249513bc4443a8ba339f867f3905f1d17d
Reviewed-on: https://gerrit.instructure.com/26447
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
2013-11-20 18:06:36 +00:00
Rob Orton 627f858967 spec add new helper for running account reports
this helper takes an options hash and can return a
report object instead of the parsed file
this will also read from the zip file instead of
reading from the hash generated by the report

test plan
- specs should pass

Change-Id: I200aa9d29ba95d6468dca8b192e9d7c415584517
Reviewed-on: https://gerrit.instructure.com/26192
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2013-11-19 20:21:03 +00:00
Jacob Fugal 845b36d0ae fixup middleware for rails3
refs CNVS-4704

test-plan:
 - 2.3 rails still boots and works

Change-Id: I107637f3abf107ad652aec959567dd5d738229c0
Reviewed-on: https://gerrit.instructure.com/26335
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
2013-11-19 18:43:49 +00:00
James Williams 9568a68504 bring in webct question answer files
test plan:
* import the course referenced in the ticket
* quiz question answers should not have broken
image links

fixes #CNVS-1556

Change-Id: I8c99cc0c7c6940738e75a2b0d661880281411c91
Reviewed-on: https://gerrit.instructure.com/26417
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
2013-11-19 16:35:10 +00:00
Jacob Fugal 52beb9a1c3 Revert "switch from rails_xss plugin to gem"
this reverts commit c8a4c453ff.

while the gem *appears* recent, it hasn't merged upstream changes from
http://github.com/rails/rails_xss since before we vendored it, so we
can't make the switch after all.

instead, I've just silenced the rails3 warning and left a TODO marker.

Change-Id: I8957e676c38ef7cdeac0e6266f2cac3288b1ec7d
Reviewed-on: https://gerrit.instructure.com/26374
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
2013-11-18 16:18:04 +00:00
Bracken Mosbacker 83334fb653 allow creating content migration with url to cartridge
Now a user can specify a url to the content to import instead
of having to upload the file directly to canvas.

Test Plan:
 * Using the content migration api, create a CC migration with
   a settings['file_url'] instead of doing an attachment
 * the file url must be publicly accessible from the canvas instance
 * it should happily import
 * Also do a zip file import

closes PLAT-206

Change-Id: Ide387b8e66625e5eb5c546054900a4a0fc50eb0c
Reviewed-on: https://gerrit.instructure.com/26287
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-11-15 20:14:04 +00:00
Jacob Fugal c8a4c453ff switch from rails_xss plugin to gem
fixes CNVS-9384

but maintain our patchup from 0fe0ba0

Change-Id: I828fdd8ef64ca04d10d2ef5b925d07243fb65be7
test-plan: specs
Reviewed-on: https://gerrit.instructure.com/26229
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
2013-11-15 15:48:16 +00:00
Cody Cutrer 204e52a125 Merge branch 'fix-preview_reuploaded_files' of github.com:sfu/canvas-lms 2013-11-12 09:35:11 -07:00
Justin Ball 8ae4ba8ee8 Fixed style gauntlet regex to allow for negative values such as margin:-18px 2013-11-11 16:34:05 -07:00
Rob Orton 0f23818a30 spec don't use default account for report specs
fixes CNVS-9301

test plan
 * specs should pass

Change-Id: I66c9304f6d7ad8767840d5b1eba3ea1725486f13
Reviewed-on: https://gerrit.instructure.com/26015
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2013-11-06 20:40:24 +00:00
Rob Orton 71257d3942 spec fix fragile course report specs
refs PS-719

test plan
 * specs should pass

Change-Id: Ic4dfa202682166ea0ffd35ca4095123756d241dc
Reviewed-on: https://gerrit.instructure.com/26008
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2013-11-06 20:40:11 +00:00
Rob Orton c0a26cc4ae include state standards in learning outcome reports
fixes CNVS-9204
refs CNVS-8921

test plan
- import a state standard
- have an outcome result for the state standard (graded item tied to outcome)
- run learning_outcome_results report
- run student_competency_report
- reports should have result

Change-Id: I8c39f235022b8f4d0a642a9364b7082e313d9c4e
Reviewed-on: https://gerrit.instructure.com/25849
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2013-10-31 19:51:17 +00:00
Andrew Leung 8a5beb735f Fix inability to preview deleted/re-uploaded file
The problem affects an instance using local storage and Google Docs
Preview. When previewing a file that was previously deleted, an error
message saying "unable to find the document at the original source" will
be displayed in Google Docs Preview. This is because the preview URL is
no longer valid. In fact, it redirects to the login page.

Test Plan:
* Disable Scribd but enable Google Docs Preview
* Upload a brand new file to a course
* Preview the file
* Delete it, and re-upload the same file
* Confirm that the file can still be previewed
2013-10-30 09:46:59 -07:00
Rob Orton db130fd333 get rid of scribd_account
refs CNVS-8282

test plan
 - have scribd enabled
 - upload a scribdable document to a course
 - document should be rendered with scribd
 - previously created documents should still render

Change-Id: Id8d7ea962c7bbe16b0f124e23447c66a48dd4100
Reviewed-on: https://gerrit.instructure.com/25566
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2013-10-25 16:56:59 +00:00
Cody Cutrer c4130f340c get rid of jobs max run time
refs CNVS-86

orphan detection works good enough, and some jobs legitimately run that long

Change-Id: I0be6f4182c5f303b0c0b07888db98d2d0f5fd740
Reviewed-on: https://gerrit.instructure.com/25479
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-10-23 15:46:52 +00:00
James Williams 0fe0ba0180 change block helpers for rails 3.2 compatibility
closes #CNVS-5018

Change-Id: If1cef73759f090efe2a58dc97c351410a552ae1d
Reviewed-on: https://gerrit.instructure.com/25109
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2013-10-11 23:09:37 +00:00
James Williams 84a1d121ba fake rails3 generator for simply versioned
closes #CNVS-8668

Change-Id: I1c842ba228c6cba0d36ecfe5b9f545c714ccb1b6
Reviewed-on: https://gerrit.instructure.com/25148
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
2013-10-10 16:09:12 +00:00
Jacob Fugal dfab0425e3 use CANVAS_RAILS2 for conditionals
rather than CANVAS_RAILS3 or Rails.version

this is to be consistent, and to reinforce that any "special" branches
are for rails 2.3 backwards compatibility while trying to target rails
3, rather than rails 3 "forwards compatibility".

Change-Id: I4494b65e3f71108a43d09032c1569c478646a828
Reviewed-on: https://gerrit.instructure.com/24998
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
2013-10-10 15:58:43 +00:00
Cody Cutrer d935ab98b1 deprecate Setting.get_cached
now that we have SIGHUP, we were changing everything to it anyway,
so just let caching in-proc be the default

Change-Id: Id1b44722522ac9693b17695da7107c99a359d5ac
Reviewed-on: https://gerrit.instructure.com/25020
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-10-10 00:42:52 +00:00
James Williams 6f669330a8 update qti_exporter spec
Change-Id: Ib1d576ed98854fcbc9e2790687160bed4aed18ac
Reviewed-on: https://gerrit.instructure.com/25050
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2013-10-05 21:53:50 +00:00
Cody Cutrer a19b3ef8dd spec: run transaction commit callbacks when down to 1 transaction
removes need for run_transaction_commit_callbacks all over the place

Change-Id: Id878276ed86bb37f625ef34412b16d1f75a63bca
Reviewed-on: https://gerrit.instructure.com/24758
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>
2013-10-01 23:51:04 +00:00
James Williams 66799050ba expand angel fill-in-multiple-blanks question answer importing
test plan:
* import the package referenced in the ticket
* check the quiz titled "Test 7"
* check the question titled
 "3.3 find p-value two-tailed mu with website"
* confirm that the question has answers

fixes #CNVS-5672

Change-Id: I8e2597475ead30a10e57b9a9edac18c0e10d6fe6
Reviewed-on: https://gerrit.instructure.com/24677
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-10-01 18:43:44 +00:00
Brandon Broschinsky 11593a2b8c fixed report helper to account for user account timezone
fixed PS-534

Change-Id: I8b5233d80edf179337efdb23e33e959bfda1c72d
Reviewed-on: https://gerrit.instructure.com/24504
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brandon Broschinsky <brandonbr@instructure.com>
QA-Review: Brandon Broschinsky <brandonbr@instructure.com>
2013-09-25 20:04:27 +00:00
James Williams 9d4660b641 fix respondus question bank and quiz importing
test plan:
* publishing through respondus should work for question banks
and for quizzes when settings are applied

fixes #CNVS-8276 #CNVS-4297

Change-Id: I3b254c6375aa5524f6ecf78c31e64d34a13ba4a7
Reviewed-on: https://gerrit.instructure.com/24566
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
2013-09-24 19:39:51 +00:00
Jacob Fugal 0f8b2775ab don't delete s3 objects on attachment destruction
refs CNVS-8056

we don't want to actually delete objects from s3 (at least not due to
the Attachment being destroyed). With our root attachment deduplication
scheme it just gets too messy and buggy.  We'll just GC them later.

test-plan:
 - be using s3
 - upload a file, call this a1
 - upload the same file again, call this a2. a2 should have a1 as its
   root attachment
 - in script/console, call a2.destroy!. a2 should be removed completely
   from the database
 - a1 should still work (its s3object should not be gone)

Change-Id: Ie1f488e28b44c983a0d8528d61ce8ae99b8c6736
Reviewed-on: https://gerrit.instructure.com/24280
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2013-09-23 19:47:13 +00:00
Brian Palmer 49adf6050a search the right namespace for this constant
We're in the Delayed::Backend module here, and there's also a
Delayed::Backend::ActiveRecord class, so this call was ambiguous if
ActiveRecord wasn't already fully loaded.

Change-Id: I7071e2b1af454b2837e52204ef8282fb312002e1
Reviewed-on: https://gerrit.instructure.com/24424
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
2013-09-18 16:50:50 +00:00
Brian Palmer 7928155ea9 extract delayed_job redis lua utilities into a gem
We'd like to re-use some of this code elsewhere, and there's nothing
canvas-specific about it.

refs CNVS-7008

test plan: redis delayed job specs still pass

Change-Id: Iaa19ee60419d01bb451cccf2861a1015a7ba087a
Reviewed-on: https://gerrit.instructure.com/24255
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2013-09-17 15:09:38 +00:00
Jake Sorce b4264e7fa1 add ext param to generate file
default the param to csv
also support tab delimited parsing in report spec helper

refs PS-526

Change-Id: I962877d1937f1d88072861f456a29d2c31f2a3d4
Reviewed-on: https://gerrit.instructure.com/24330
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
2013-09-16 23:47:12 +00:00
Rob Orton e0b5f33f90 limit students with no submissions report to two weeks
closes CNVS-8167

test plan
 - report should only report on a 2 weeks time range
 - if time range is over two weeks it will use the end date and 2 weeks before it for the start date
 - report should not time out

Change-Id: I2750d53f358a41b351e36e718bfbbb04e61aa198
Reviewed-on: https://gerrit.instructure.com/24382
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2013-09-16 21:49:03 +00:00
Cody Cutrer 025fbec05e clear active connections after each job
in a sharded environment, this helps to clear out idle connections

this is similar to what
ActiveRecord::ConnectionAdapters::ConnectionManagement middleware
does after each web request

test plan:
 * run some jobs
 * they should not fail

Change-Id: I431205ff1e9197940bddf4028d3c4c7662a74056
Reviewed-on: https://gerrit.instructure.com/24285
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-09-16 18:43:46 +00:00
Brandon Broschinsky 8fd37a4f88 added report helper method to format timezone string
fixes PS-534

Change-Id: I04329795ddd8eee2082b7e6523189d008013f342
Reviewed-on: https://gerrit.instructure.com/24356
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Brandon Broschinsky <brandonbr@instructure.com>
QA-Review: Brandon Broschinsky <brandonbr@instructure.com>
2013-09-13 22:22:18 +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
Brian Palmer 4d7ce65aa8 add strand to delayed job "Processing" log line
This would've helped some debugging I was doing today.

test plan: run delayed jobs, see that the "Processing <job tag> {job details}"
log line now includes the strand along with the other info

Change-Id: I569429d2f320486f161adbcab2985f93f9a68a99
Reviewed-on: https://gerrit.instructure.com/24169
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2013-09-10 21:24:56 +00:00
Nathan Mills 0399b80ecc add report helper for extra text
Change-Id: I073bce65c59d68e89b714671ea81fe908879784b
Reviewed-on: https://gerrit.instructure.com/24091
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-09-07 16:25:11 +00:00
Rob Orton bc13f12a18 write report file object on master
fixes CNVS-7775

test plan
- run an account report 
- report should work

Change-Id: I96bcadd05b704247fb9b0b79ad30f8f36896d592
Reviewed-on: https://gerrit.instructure.com/23787
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2013-08-27 18:40:05 +00:00
Rob Orton 1d704e4893 spec change fragile spec in course report
fixes CNVS-7717

test plan
 - specs should pass

Change-Id: Icc47fdb60216095158142186ff10f53172bdf6fc
Reviewed-on: https://gerrit.instructure.com/23686
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
2013-08-24 00:49:43 +00:00
Rob Orton ae0a3f5e1f implement protection against HTTPS BREACH attack
fixes CNVS-7383

test plan
 - take a quiz
 - it should not error
 - the token should change on each request
 - visit a page in canvas and open browser console(chrome, right click, inspect element) console is on the right side
 - run ENV.AUTHENTICITY_TOKEN
 - reload the page
 - run ENV.AUTHENTICITY_TOKEN
 - the tokens should not match

Change-Id: I405e749b37c7195af55b784d6b4f10346a15f377
Reviewed-on: https://gerrit.instructure.com/23506
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2013-08-23 19:48:20 +00:00
Nathan Mills 17a4a0b356 add a section helper for api find
refs PS-314

Change-Id: I2af0622de09a4eecf86d983a695457cf6b93717b
Reviewed-on: https://gerrit.instructure.com/23474
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-08-22 14:36:15 +00:00
Simon Williams 147d171aa1 correctly maintain assignment/rubric <-> outcome links
There are a few old LearningOutcomeResults that have a nil artifact, and
many that have a Submission as an artifact.  We want to get rid of these
because they come from bad data, and step 1 toward that goal is to stop
creating them and hide them in the UI.

The LORs with a nil artifact are very old and I believe came from a very
early incarnation of outcomes.  The LORs with a Submission as an artifact
came from a combination of two code problems.  The first was old code
that allowed an assignment that was aligned with an outcome but did not
have a rubric to create LORs directly based on it's submission.  The
second was a bug that prevented the assignment <-> outcome link from
being destroyed when a rubric with an outcome was removed from an
assignment.

fixes CNVS-7495
fixes CNVS-7498

test plan:
- try different combinations of adding a rubric with an outcome to an
  assignment.
- when you grade the assignment, the grade create a learning outcome result
  (which can be seen on the outcome show page, or in the account outcome
  report) if the rubric+outcome are currently attached to the assignment.
- so for example, add a rubric with an outcome, check, remove just the outcome
  row, check, add a new outcome row, check, remove the whole rubric, check.
- be sure to check both the show page and the outcome report

TODO:
- datafix migration

Change-Id: I37700e3e5c08fc6cfb8fcf1cac42ea6693fcaba3
Reviewed-on: https://gerrit.instructure.com/23303
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2013-08-20 22:40:01 +00:00
James Williams 64ccf532c1 fix moodle multiple_dropdowns importing
test plan:
* import the package referenced in the ticket
* importing should not fail

* however, it should give migration warnings explaining that
 the "Multiple dropdown" questions may be incorrect,
 including direct links to the questions

fixes #CNVS-7048

Change-Id: Iff001c0181086986be0b4ead38970df7abd9878a
Reviewed-on: https://gerrit.instructure.com/23165
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-08-20 20:08:06 +00:00
Brian Palmer fc22e21830 remove redis.pipelined usage
Unfortuanately the current ruby redis gem doesn't support pipelining
with a redis cluster, even if all the commands are acting on the same
key. Since we're working on turning the data redis into a cluster, these
have got to go.

test plan: specs should cover all this. could also do a quick regression
test on failed logouts (shouldn't error, should still limit failed login
attempts)

Change-Id: Ifa950268416e9086b72610914d7efc8a816d628b
Reviewed-on: https://gerrit.instructure.com/23457
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2013-08-19 20:33:45 +00:00
Stanley Stuart 9b76539a3e add the ability to regrade a quiz
This commit gives teachers the ability to regrade quizzes by using
different options per quiz question:

* Current Correct Only
* Full Credit (regardless of answer choice)
* Previous and Current Correct
* No Point change (for updating the display of a question)

Test Plan:
  You'll want to run through each question regrade option making sure
  scores change appropriately.

"I seldom end up where I wanted to go, but almost always end up where I
need to be." - Douglas Adams

Change-Id: I9dbb88154cd3ac630bf59dbf3e997a87f75649dc
Reviewed-on: https://gerrit.instructure.com/22018
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
2013-08-19 17:29:26 +00:00
Nathan Mills 1a351ecf20 add header option to account report helper
Change-Id: I7b5f0bffe46ed2559af833121902af86bf79afa2
refs: PS-314
Reviewed-on: https://gerrit.instructure.com/23400
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brandon Broschinsky <brandonbr@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
QA-Review: Nathan Mills <nathanm@instructure.com>
2013-08-19 17:20:38 +00:00
Cody Cutrer 4b6ee35a88 spec: fix respondus spec fragility
sometimes a Pathname object instead of a string gets added to $LOAD_PATH.
just .to_s it so that regex will work

Change-Id: If3279881edc302b27941bb2ac91a61c0bbf5759b
Reviewed-on: https://gerrit.instructure.com/23422
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-08-19 14:55:07 +00:00
Brian Palmer e5db3b351b raise a NameError when a periodic job is no longer scheduled
This way the job deserialization code will properly handle the error and
delete the job. The ArgumentError was causing the worker to blow up and
leave the job in the queue, causing a neverending cycle of worker
failure.

fixes CNVS-7578

test plan: specs

Change-Id: If79fa107c0d7942416971d90cfbc1a01feb0d54a
Reviewed-on: https://gerrit.instructure.com/23390
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2013-08-16 14:31:31 +00:00
Rob Orton b3d9e566ce fix unused courses reports to ignore deleted files
test plan
 - create a file in a course 
 - course should not show up in unused courses report
 - delete the file
 - course should show up in unused courses report

Change-Id: I0075fa039493192746d1201fa5e872a8b19861b4
Reviewed-on: https://gerrit.instructure.com/23273
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2013-08-14 22:32:00 +00:00
Cody Cutrer c36b0231dd don't let jobs master die when unlocking jobs
the db might go away, so fork and then we don't care about errors

Change-Id: I29e8487a1c1b7f5e6b4e0b74b306625dbcbfab56
Reviewed-on: https://gerrit.instructure.com/23312
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-08-14 22:26:18 +00:00
Rob Orton 294be5d3f5 create outcome results report
closes CNVS-7299

test plan
- create an account level outcome
- create a quiz bank and tie to outcome
- create a quiz
- as a student take the quiz
- the result should be in the outcome report

Change-Id: Ie5c9ad25266e32a204cb6f44cebbc8d46a39a032
Reviewed-on: https://gerrit.instructure.com/23243
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2013-08-14 20:58:47 +00:00
Mark Severson e595ebe375 only create page versions on content change
test plan:
 * editing a page (through the UI or API)
   - saving changes to a page should only create revisions when body or title are changed
 * editing a page as a different user
   - saving non-content changes as a different user should not create a new revision

fixes CNVS-7247

Change-Id: Icbcafc8ce70f82908b3b517a9eb5ce09bd0bae09
Reviewed-on: https://gerrit.instructure.com/23178
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
2013-08-12 21:31:32 +00:00
Rob Orton 3dec746126 fix course api helper for account reports
test plan
- make a course in a sub_account
- use a report that has a course filter on a root_account
- report should work

Change-Id: I17e4f62d2049ab2f73b6baee37b0f85e578e6c7d
Reviewed-on: https://gerrit.instructure.com/23057
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2013-08-06 20:04:39 +00:00
Rob Orton fc0b9dbdc8 update account report progress on master
test plan
- run Student Competency report
- progress should work(this may take thousands of outcomes to see progress in api)
- report should not fail
- run recently deleted courses report
- run unpublished courses report
- reports should not fail

Change-Id: I0020af16a73c0aec5d017ab048b926e3e7e93279
Reviewed-on: https://gerrit.instructure.com/22936
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2013-08-06 18:54:32 +00:00
Nathan Mills 9e134d97a5 add helper for writing csv files
refs PS-451

Change-Id: I9efdfc2ac218642321cff152e905f8544e8ff2ad
Reviewed-on: https://gerrit.instructure.com/22995
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2013-08-05 21:06:30 +00:00
Jake Sorce b117b3957e add status column to grade export report
closes PS-516

test plan:
  1. run grade export report
  2. verify extra status column is included in report
  3. the status column is the users workflow state

Change-Id: I17b5d8562a92ae94b0d211da6b9d7315fc94d303
Reviewed-on: https://gerrit.instructure.com/22833
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2013-08-02 15:29:34 +00:00
Bracken Mosbacker d1651922c4 add link to source course in new migration ui
adds a column to the new migration UI that has a link to
either the uploaded file or to the source course.

also sorted the content type box and put course copy and
canvas packages first.

Test Plan:
 * run a file upload migration and a course copy one
   (or just go to a page with existing ones)
 * There should be a link to the uploaded file and the source course
 * The type column should also make more sense, for example,
   it'll say 'Course Copy' instead of 'Copy Canvas Course'
 * The content type box should be in the order of: course copy,
   canvas cartridge, .zip file, then alphabetical

closes CNVS-7178

Change-Id: I639e00db0188ce5119daac792119abd1da546908
Reviewed-on: https://gerrit.instructure.com/22742
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-07-30 19:31:17 +00:00
Rob Orton d5eff95ba0 create unused courses report
closes PS-442

test plan
 - create an empty course shell
 - courses should show on report
 - add something to the courses
 - courses should not show on the report

Change-Id: If2f47cbb343eee64ad9b485b635f7bf7e8d6f42a
Reviewed-on: https://gerrit.instructure.com/21691
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2013-07-24 21:23:17 +00:00
Duane Johnson 1c297e632b add an on_load callback to simply_versioned
refs CNVS-6869

When a version is loaded from the database, the on_load callback
gives the model an opportunity to process or modify the data if
necessary. For example, if current information on the model should
override a cached attribute, this would be the place to do it.

Test Plan:
- in the console, create a submission, e.g.
  >> s = Submission.create :assignment => a1, :user => u1
- add an on_load callback, e.g.
  >> submission.simply_versioned_options[:on_load] =
     lambda{ |model, version| model.grade = 'A' }
- now, no matter what grade you set (and save) in a versioned copy of
  the submission, you should get 'A' back

Change-Id: I9dde0118e2833c72e6209f3d632d9503db1e1eb3
Reviewed-on: https://gerrit.instructure.com/22472
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Duane Johnson <duane@instructure.com>
2013-07-24 16:14:39 +00:00
Rob Orton 95662eb9a4 create zero activity and last user access reports
also change enrollment_term to enrollment_term_id
and course to course_id for api parameters but make
it backwards compatible

closes PS-440
closes PS-441
refs CNVS-6265

test plan
- run zero activity report
  report should return users that have not participated
  since the given date in the course
- run las user access report
  report should return all users in an account and 
  the last time they accessed canvas
- verify that parameters[enrollment_term] works in 
  addition to parameters[enrollment_term_id] when
  using the api to post new reports
- verify that parameters[course] works in 
  addition to parameters[course_id] when
  using the api to post new reports

Change-Id: I6d65bdf21c270f9c227ebeb1b044397fc1d5807d
Reviewed-on: https://gerrit.instructure.com/22539
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brandon Broschinsky <brandonbr@instructure.com>
QA-Review: Tyler Belnap <tyler@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2013-07-23 19:43:44 +00:00
Cody Cutrer b27e4dcf99 move a bunch of SIS export reports to the slave
Change-Id: Iddb53e417c2b42e9b282e419719386afe1e86051
Reviewed-on: https://gerrit.instructure.com/22368
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-07-18 22:27:03 +00:00
Cody Cutrer 2deb504378 useful find_each
* automatically does with_exclusive_scope
 * if the scope has an order or group by, use an alternate
   implementation so it's not broken
 * alternate methods are cursors (postresql only) or temporary
   tables. if a transaction is already open, or we're on a slave,
   prefer a cursor (even over the normal method, since the query
   might be slow even without an order or group by)

test plan:
 * migrations should still work (especially data fixups)
 * lots of account reports use find_each; make sure they still run

Change-Id: If876b7b3401e6cda1d41f1c94b93af4810b78cf4
Reviewed-on: https://gerrit.instructure.com/22364
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-07-18 22:26:46 +00:00
Brian Palmer bfb4285864 extend n_strand jobs to support the per-root-account use case
refs CNVS-6970

This allows passing two params for the :n_strand parameter, and looking
up the Setting based on just the first param. For example
["course_copy", root_account.global_id] will create an n_strand per root
account, but allow the "course_copy_n_strands" to control the # of
strands for every root account. You can also override for a specific
account with a "course_copy/<global_id>_n_strands" setting.

test plan: specs

Change-Id: Ie72468588fa1172ea967e1f0a072c9d565bae62f
Reviewed-on: https://gerrit.instructure.com/22461
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-07-18 19:41:33 +00:00
Rob Orton 50f8160861 create students with no submissions report
closes PS-439

test plan
 - report should return students that have no submissions in date range

Change-Id: I412791e9631f54cb2050ae2ac180872a2f170a2e
Reviewed-on: https://gerrit.instructure.com/21688
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2013-07-18 17:14:30 +00:00
Brian Palmer b5c1506e94 reconnect to redis when forking for unlock_orphaned_jobs
test plan:
* run jobs (script/delayed_job run), verify that jobs are still
  processed without error.
* create a long-running job (you can just Kernel.send_later(:sleep,
  300)), then while the job is running, kill -9 the delayed_job
  processes. When you next start jobs, the sleep job should get
  unlocked and re-queued to run again.

Change-Id: Ic3efba2537b29dabd2adad63699ac768512dbbe6
Reviewed-on: https://gerrit.instructure.com/22302
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2013-07-18 15:59:56 +00:00
Cody Cutrer 685096c442 fix sis courses export report on a sub account
fixes CNVS-4439 FRD

test plan:
 * in a sub account, run the sis export report, selecting the courses
   option
 * it should work

Change-Id: I1fe42aa4ceeb59742376dfdbeeb7481152cf7286
Reviewed-on: https://gerrit.instructure.com/21598
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-07-16 16:35:03 +00:00
Jake Sorce 6e99c9db46 grab all AB Standards not just grade types
closes PS-488

test plan:
  1. run academic benchmark import with state guid
  2. once that is imported verify all standards are imported

Change-Id: I82455878ea947e33a0c8b5974582106b0633c86e
Reviewed-on: https://gerrit.instructure.com/22183
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
2013-07-10 17:24:46 +00:00
James Williams 6855e451fe qti exporter angel import substring fill-in-the-blank answers
test plan:
* import the package referenced in the ticket
* in the quiz titled 'Exam II', last question,
the 5th answer field should have an expected answer

refs #CNVS-5757

Change-Id: Ie412626d53a52f464f4d488a2b991898d455e349
Reviewed-on: https://gerrit.instructure.com/22088
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-09 16:09:28 +00:00
Bracken Mosbacker 89508bf997 make new migration UI the default
removed old migration UI.

Test Plan:
 * rejoice
 * zip file uploads in files UI for courses, groups, and users should work
 * the links /courses/:id/imports and /courses/:id/imports/list should redirect to new UI
 * the course copy api should work
 * doing a course copy in the UI should work
 * rejoice

closes CNVS-6499

Change-Id: Icd71c5f7bf8a97570f6572938b01504589a6a718
Reviewed-on: https://gerrit.instructure.com/21943
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2013-07-08 17:19:06 +00:00
James Williams ffa674f18d update moodle2cc gem
fixes two separate issues

CNVS-4048 - test plan:
* import the moodle package referenced in the ticket
* should include discussion topics

CNVS-6081 - test plan:
* import the moodle package referenced in the ticket
* the first questions in the question bank 'Test 2'
should include images

fixes #CNVS-6081 #CNVS-4048

Change-Id: I386cdc3c7380580758a8924c75801d3fb721d3bd
Reviewed-on: https://gerrit.instructure.com/21798
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
2013-07-02 19:17:04 +00:00
Brian Palmer 89ec89930c rails3 fixes
* disable i18nema until we're on rails 3.2
* fix how we access session_options
* fix how we access the basic auth header
* fix attachment_fu callbacks

test plan: none of these fixes should affect rails 2

Change-Id: I7f9b6f18c04d51284ec3e5e9fdd39fb93539c91b
Reviewed-on: https://gerrit.instructure.com/21728
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2013-06-26 20:22:26 +00:00
James Williams 7d79140483 fully remove style tags in html sanitizer
test plan:
* test the sanitizer through the api by
creating or updating an object with html content
(such as a wiki page body attribute)

* the following html:
  <p><style>should ignore this text</style></p>

* should be sanitized to:
  <p></p>

fixes #CNVS-5828

Change-Id: I735f031eafdeeb8d7ae05fd977327fb3cc7e9251
Reviewed-on: https://gerrit.instructure.com/21689
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>
2013-06-25 19:13:20 +00:00
James Williams e370322471 prevent incompatible character encodings errors
refs #CNVS-5828

Change-Id: Id0a165363de05f000eee956bf976ffcff70adfc7
Reviewed-on: https://gerrit.instructure.com/21674
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2013-06-25 19:13:13 +00:00
James Williams ef90ab60e2 preserve links to other content in quizzes on course copy
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>
2013-06-24 18:54:31 +00:00
Cody Cutrer 5d16bd674b minor optimizations around simply_versioned
refs CNVS-5805

first, don't do a count if we're just going to load the whole association anyway

second, don't use empty? on an association - that does a count. instead you
should use exists?, but the next branch does another query anyway that
would tell us the same information, and still only query one row

test plan:
 * basic regression testing around versioned models (assignments, overrides,
   wiki pages, etc.)

Change-Id: I9d29eacbaa67dbc267ee09400d62651ef6ccdc0a
Reviewed-on: https://gerrit.instructure.com/20901
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-06-18 21:05:27 +00:00
Cody Cutrer e852ebb6da delay creating jobs in other dbs until transaction completes
this prevents the job from accessing data that hasn't committed yet,
as well as many instances of it waiting for the first transaction to
release a lock cause the two transactions are referencing the same
data

test plan:
 * general smoke test in a production environment (since lots of
   things run sync in non-production environments)

Change-Id: I7b132b6119f60e38ae1ba4d17dea18ac49114960
Reviewed-on: https://gerrit.instructure.com/21168
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2013-06-17 20:19:08 +00:00
James Williams 9a718e36f6 delay migration job_progress creation for academic benchmarks
Change-Id: Ia07bf2e963d48605b388a1ca16de26825558aebb
Reviewed-on: https://gerrit.instructure.com/21410
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-06-12 20:18:10 +00:00
Rob Orton b2e9773832 create account level course reports
closes PS-326

test plan
- unpublished courses report should run
- recently deleted courses report should run
- specs should pass

Change-Id: I3de16037b3b6b010610309628b698e3ef3247d3f
Reviewed-on: https://gerrit.instructure.com/20744
Tested-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Tyler Belnap <tyler@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2013-06-10 20:52:06 +00:00
Rob Orton fd12cc5630 add course sections to student competency report
closes CNVS-5923

test plan
- student competency report should run and include sections name, id, sis_id
- specs should pass

Change-Id: I4543dbc80bada79ab54b206ed4f39cf8d6ff2588
Reviewed-on: https://gerrit.instructure.com/20745
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2013-05-31 23:19:59 +00:00
Jon Willesen 5a4a84a487 add back-end recording to big blue button conferences
fixes CNVS-5660

test plan:
 - setup the BBB conferences plugin.
 - create a new BBB conference, and click the checkbox to record
   the conference.
 - start the conference, do some stuff, logout, and then wait a
   few minutes.
 - start script/console and find the conference you just
   created: `wc = WebConference.find(1234)`
 - in the console, type `pp wc.recordings; nil`
 - you should see a recording_id, a duration_minutes, and a
   playback_url.
 - copy-and-paste the playback_url into your browser. you
   should go to the BBB playback page and be able to view the
   recorded conference.

Change-Id: I326ac25ef0280350a85a37215a5659fc6a827151
Reviewed-on: https://gerrit.instructure.com/20783
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
QA-Review: Jon Willesen <jonw@instructure.com>
2013-05-28 16:20:30 +00:00
Brian Palmer 02e8efdcd7 skip checking override versions when not needed
if we're dealing with the actual assignment/quiz instead of the model
from one of its versions, we don't need to align the history of the
overrides with the history of the assignment/quiz. we can just use the
most recent version of each override.

refs CNVS-5805

test plan: existing specs cover that this optimization doesn't break
reading overrides of older versions

Change-Id: I52d55da0619688744d63d6523e1bc055ecdaa667
Reviewed-on: https://gerrit.instructure.com/20813
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2013-05-23 20:46:49 +00:00
Jon Jensen 53dc3ad6a6 fix various i18n issues
fix all the places we incorrectly translate during rails initialization
rather than at runtime

test plan:
1. canvas should work
2. those strings should now get translated

Change-Id: I1c0e3b9513103cfddfd4ad94dde4b3a0dd49203e
Reviewed-on: https://gerrit.instructure.com/20468
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2013-05-23 18:54:55 +00:00
Rob Orton 1cc013d539 removes a race condition for report file downloads
spec plan
-specs should pass

Change-Id: Ia85b8976b07619cacbf3865dea197454ac15c0a3
Reviewed-on: https://gerrit.instructure.com/20691
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2013-05-20 21:17:17 +00:00
Sterling Cobb 947f458d85 Add new content migration UI
This adds the ability for you to process migrations quickly. Includes a
paginated list for migrations and issues.

Test Plan:
 * Make sure old migrations UIs work the same
 * Make sure new UI works wonderfully
   * go to /courses/:id/content_migrations to see the new UI

fixes: CNVS-4732

Change-Id: I7cabc51348c32ed03d581e495756eefbf1060ad3
Reviewed-on: https://gerrit.instructure.com/20349
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-05-18 04:58:35 +00:00
Bracken Mosbacker 98bb4c7980 add migration endpoint to list available migrators
allows api users to find available migrators since different
canvas installs can have different oens available.

Test Plan:
 * Hit the api/v1/courses/:id/content_migrations/migrators
   endpoint and verify it works

refs #CNVS-4228

Change-Id: I3a2585cea8286b09c9e1039fd722d05a2e82d558
Reviewed-on: https://gerrit.instructure.com/20318
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
2013-05-17 22:34:25 +00:00
Bracken Mosbacker 3f94f55256 create course copy and zip migration workers
Course copying and importing .zip files will now work the
same as other content migrations.

Test Plan:
 * Using the ContentMigration api test course copy and zip imports
 * Make sure the current course copy and zip import UIs still work
   * for course copy make sure selective options work

closes CNVS-4228

Change-Id: I80a849471dffaf44d683e980cf0b73505b353d83
Reviewed-on: https://gerrit.instructure.com/19740
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
2013-05-17 22:34:15 +00:00
Bracken Mosbacker 93643f6d6c content migration creation api
allows creating content migration through the api

Test Plan:
 * Create a content migration through the api along with a file upload
 * You should be able to follow along with the progress and
   the migration should be complete when the progress is done
 * Try to update the migration type, you should get an error
 * Upload a wrong file type the first time, then go through
   the file upload process again on the update endpoint.

refs CNVS-4228

Change-Id: Iab1082ca68b61d1b0493c191b48169a164444d06
Reviewed-on: https://gerrit.instructure.com/19108
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
2013-05-17 22:34:09 +00:00
Rob Orton 51cca64e77 fixes ambiguous query in sis_export
fixes CNVS-4439

test plan
- specs should pass

Change-Id: Iede9966c6979cc7682096e14d1651dcb84a5396b
Reviewed-on: https://gerrit.instructure.com/20636
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2013-05-15 14:20:51 +00:00
Rob Orton 60b101d86d exclude student view student from reports
also removes a race condition for report file downloads

fixes CNVS-5768
fixes CNVS-5769
fixes CNVS-5784

test plan
 - in a course use the student view student
 - in the account for that course run the users, and enrollments provisioning report
 - neither report should include the student view student 

Change-Id: I03544c7a38d91bd7d356c4ae73ea8857f948da7e
Reviewed-on: https://gerrit.instructure.com/20517
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2013-05-10 21:00:12 +00:00
Cody Cutrer 6a08e9058b use the birth shard so that the default shard can be changed
Change-Id: Ia7684c0b50df9d5fae4608b7e8e3d8d6dea291cc
Reviewed-on: https://gerrit.instructure.com/19748
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-05-07 15:44:17 +00:00
Brian Palmer 37e7f7f141 upload attachments to s3 outside of the AR#save db transaction
fixes CNVS-5505

This utilizes our after_transaction_commit callback mechanism to delay
uploading the file until the database trasaction is committed, so that
we aren't holding the transaction open for the entire upload to S3. At
best this causes <IDLE> transactions, and at worst it keeps other rows
locked for the duration of the upload.

It also introduces a new callback on AttachmentFu models,
after_save_and_attachment_processing, which is called like a normal
after_save when the attachment is uploaded immediately, and after the
attachment is uploaded (so after the transaction) when the upload is
delayed.

test plan: most attachment upload paths are covered by selenium tests.
for manual testing, we'll want to check each location in the application
where files can be uploaded for regressions. this includes anywhere that
a zip file is uploaded or generated and downloaded.

Change-Id: I033bd19d63a6becc421143c929dfe7c19c7f4e51
Reviewed-on: https://gerrit.instructure.com/20210
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2013-05-06 19:28:37 +00:00
Brian Palmer 31f33164b5 remove 1.8 compatibility shims
- update the Gemfile to be 1.9 only, and raise an exception on wrong
  ruby version
- remove RUBY_VERSION checks, replacing with the applicable code
- remove the FasterCSV compatibility shim, just use CSV now

test plan: trying to bundle install on ruby 1.8 or 2.0 should raise an
exception, specs should pass, canvas should work as normal on 1.9

Change-Id: I49088e9d227c59c6d5d5acb417c2df971129474a
Reviewed-on: https://gerrit.instructure.com/19806
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2013-05-03 01:43:52 +00:00
James Williams b993954788 enable import/export with file_upload_question types
test plan:
* Enable the file_upload_question type for
 the root account in the console:
 > a = LoadAccount.default_domain_root_account
 > a.settings[:file_upload_quiz_questions] = true
 > a.save!

* Create a course with a question of type
"File Upload Question"
* Copy the course
* Confirm that the course copies successfully
 and that the new question is the same type

closes #CNVS-1158

Change-Id: I99d872ee8557a83647fb2fa1425050c20a4ba518
Reviewed-on: https://gerrit.instructure.com/20013
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-04-29 15:57:44 +00:00
Duane Johnson 9c55ed33f9 simplify SimplyVersioned option storage and add callbacks
SimplyVersioned plugin needs callbacks for the addition of the
submission_versions index table. Whenever a submission version is
saved, we will want to add an entry to the submission_versions table
in addition to the versions table. This patch provides hooks for
those callbacks.

Test Plan:
- Versioned anything should still work

Refs CNVS-2802

Change-Id: I02a862c5894a98ece8a586330f264680751ab52f
Reviewed-on: https://gerrit.instructure.com/19520
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Duane Johnson <duane@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2013-04-20 13:20:29 +00:00
Jeremy Stanley 9938feab15 whitelist <font> tags in sanitizer
fixes CNVS-4957

test plan:
 - import content containing <font> tags
   (such as the course attached to CNVS-4957)
 - these should survive the import process

note: the text in the course above won't actually appear in
hebrew unless you have the bwhebb.ttf font installed
but you can inspect the element and see that the <font> tags
are still there

Change-Id: Ifd219097b6a92813892669cb908d2e7c2d9dd4ca
Reviewed-on: https://gerrit.instructure.com/19712
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>
2013-04-19 18:21:54 +00:00
Mark Severson 26a4204b87 fix failing specs (caused by libxml2 upgrade)
test plan:
 * specs pass

Change-Id: I2041fa39cbabfd11a51de5aae28d611cacb280e5
refs: #CNVS-5269
Reviewed-on: https://gerrit.instructure.com/19687
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
2013-04-18 16:29:44 +00:00