Commit Graph

590 Commits

Author SHA1 Message Date
Cody Cutrer cd60456c66 pass job, not batch, to perform_batch
refs CNVS-12606

Change-Id: I77a937d55fe3b29fd57f0c0a495514f7576b32c0
Reviewed-on: https://gerrit.instructure.com/33852
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>
2014-04-25 16:56:39 +00:00
Cody Cutrer 306982b6e6 log an error report to get a full stack trace of a broadcast policy error
refs gh-349

Change-Id: I04ab0d1dc666daacf6a35f14d6e7d70069d185b1
Reviewed-on: https://gerrit.instructure.com/33796
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-04-24 20:42:33 +00:00
Joseph Rodriguez 32f45d6956 remove #grade_submission from QuizSubmission
fixes: CNVS-12565

test plan:
- as a student take a quiz
- verify that:
  - background submissions are working
  - end of time / date submissions are working
  - manual submsissons are working
- verify various question types are graded correctly
- verify outcomes work as previously defined

Change-Id: Ia85141559e8026993c0e270267947128a5a0466b
Reviewed-on: https://gerrit.instructure.com/33669
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Jason Madsen <jmadsen@instructure.com>
2014-04-23 19:28:03 +00:00
Brian Palmer f6bd12da18 spec: fix redis job specs in rails3
This class doesn't rely on ActiveRecord::Base in rails3, and the ==
method needed to be a bit smarter.

Change-Id: I64fc2b58fc29ebb85772567634c5ea3c4c41b9fb
Reviewed-on: https://gerrit.instructure.com/33754
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2014-04-23 17:19:03 +00:00
Brian Palmer 14d8e65a9d spec: fix fragile redis delayed_job specs
Jobs on separate strands inserted at very close to the same time might
get processed in a different order, due to the way that redis uses
timestamps for ordering rather than database ids.

This can also change which of the two calls in some specs return the
job, and which don't, after manual redis manipulation.

Change-Id: I2029ccd4ddd273a98b9bb7fdc19ccfc5cfd9e488
Reviewed-on: https://gerrit.instructure.com/33733
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2014-04-23 02:58:59 +00:00
Braden Anderson 5aaf487658 fix checkbox and radio button labels
fixes CNVS-12202

test plan:
  * open the edit page for a discussion topic in Firefox
  * click the label "Allow threaded replies"
  * verify that its checkbox is toggled
  * regression test checkboxes and radio buttons

Change-Id: I7bea6f82307b3834ba7f69de3d3c215386f26e26
Reviewed-on: https://gerrit.instructure.com/32847
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
2014-04-18 20:45:02 +00:00
Bracken Mosbacker 5a47d29e50 bump moodle2cc gem
fixes CNVS-12321 CNVS-12350 CNVS-12340 CNVS-12323 CNVS-12324 CNVS-12332 CNVS-12337 CNVS-12423 CNVS-12483

Change-Id: Ie4120083b150a492aa23c63537a7c0796d196d5b
Reviewed-on: https://gerrit.instructure.com/33456
QA-Review: Nathan Rogowski <nathan@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2014-04-17 02:03:26 +00:00
Jason Madsen 6dd6129c96 move quiz importing to individual class
closes CNVS-12397

test plan:
  - verify that existing specs pass
  - import a quiz with various question types
    - verify import works as previously defined

Change-Id: I25b778aea06ffbd1ad23a7076cd597e9123c32bf
Reviewed-on: https://gerrit.instructure.com/33294
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Jason Madsen <jmadsen@instructure.com>
2014-04-16 21:32:22 +00:00
Joseph Rodriguez bfbaf63de6 move acts_as_list to gems (empty vendor/plugins)
fixes CNVS-12056

test plan:
  * ordering/reordering of modules/module items should still work
  * ordering/reordering of discussion topics should still work

Change-Id: I599b559933a4a89c9329d631d71f83343c6f24da
Reviewed-on: https://gerrit.instructure.com/32516
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2014-04-07 22:37:09 +00:00
Nathan Mills c2fbc1172e update moodle2cc gem to 0.2.2
Change-Id: Ic00b3ace9a2016808ece2fb35c2e35d1d7aa98c8
Reviewed-on: https://gerrit.instructure.com/32808
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2014-04-03 18:07:36 +00:00
Braden Anderson a4d56a3bd0 discussions: add "move to" option
fixes CNVS-9044; fixes CNVS-12110

test plan:

  * open discussions as a user with moderation permissions
  * click the gear menu on a pinned discussion topic
  * click the "Move To" option
  * select a new position for the discussion topic
  * verify that the discussion topic is moved
  * refresh the page
  * verify that the change persists

Change-Id: If118e41066d224dbb3153113c67372ecdd2b3007
Reviewed-on: https://gerrit.instructure.com/32423
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
2014-04-02 22:50:40 +00:00
Nathan Mills 8b6b9f73c0 add moodle2 course import
fixes PLAT-433
fixes PLAT-328
fixes PLAT-463

test plan:

* .mbz files should be selectable from the course import
* moodle 2 packages should import into canvas
* moodle 2 sections should import as modules with visibility, position, and title
* moodle 2 files should appear in the files section
* moodle 2 pages should import with links to files working
* moodle 2 forums should import as canvas courses
* moodle 2 assignments should import as canvas assignments
* moodle 2 books should import as canvas modules, items, and pages
* moodle 2 glossary items should import as canvas pages
* moodle 2 quizes should import
* moodle 2 section items should import as module items
* moodle 2 links should be converted to canvas links

Change-Id: Id024e7b1ba8899f4398702ea6927bbcf8bfb2957
Reviewed-on: https://gerrit.instructure.com/30158
QA-Review: Nathan Rogowski <nathan@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2014-04-02 21:11:16 +00:00
Brian Palmer 6036139f49 fix `delayed_job run` stdout logging in rails3
Also fix rails3 not logging to log/delayed_job.log

None of this affects syslog, only when using the local CanvasLogger

refs CNVS-11992

Change-Id: I508fee29316e9a16857576fe0eb542380a42caa0
Reviewed-on: https://gerrit.instructure.com/32710
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2014-04-02 19:12:44 +00:00
Simon Williams b9d3460aaa respondus: link assignment to quiz correctly
fixes CNVS-8915

test plan:
- use the respondus quiz builder tool to create a quiz
- in the settings tab, check 'publish now'
- export the quiz to canvas
- take the quiz as a student
- the score you get should show up in the gradebook

Change-Id: I36dd1046b1ee1b82a7ad4bafac2a7e53dd309b59
Reviewed-on: https://gerrit.instructure.com/32617
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-04-02 17:01:48 +00:00
Cody Cutrer 5327d7d1cd don't stop the boot if you don't have permission to create a tmp folder
Change-Id: Ia4498c2c6795c20c440930e844ad88b4b39a2c01
Reviewed-on: https://gerrit.instructure.com/31771
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2014-03-26 16:15:09 +00:00
Cody Cutrer 045049036c add foreign keys part 16
fixes CNVS-6202

Change-Id: If5b037b65c49b4722616a80e6438d65cda3dbf3a
Reviewed-on: https://gerrit.instructure.com/32042
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-03-25 21:56:22 +00:00
James Williams 7a3785e1dd use rubyzip version 1.1.0
allows the creation of zip files over 4GB

fixes #CNVS-10492

Change-Id: Ia7bb37937572d8b11be3d0072a807217ab480ef3
Reviewed-on: https://gerrit.instructure.com/31069
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2014-03-12 12:20:22 +00:00
Cody Cutrer 2a416bc83f spec: use truncate_all_tables helper
Change-Id: I52ceb101adb933e42ad98230ac034a0f5e869156
Reviewed-on: https://gerrit.instructure.com/31739
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-03-11 19:58:58 +00:00
James Williams f8ff96565f remove after_resize and callback_with_args from attachment_fu
also remove unused test files

Change-Id: Iec05883f4c54150bba46d520013f44486ca3bc7f
Reviewed-on: https://gerrit.instructure.com/31547
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-03-10 15:22:16 +00:00
Cody Cutrer 4fe8d42a2a fix fragile student_reports_spec for rails 3
Change-Id: I13f11e8566fd6f7bae25699c4796fc5708b164e5
Reviewed-on: https://gerrit.instructure.com/31532
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-03-10 13:55:31 +00:00
James Williams db5503405c don't taint classes when unmarshalling from memory_cache in rails 3
fixes the underlying problem for g/31510

Change-Id: Ic7b9f050c54436a8204a2771bf1bc7c04ef89d15
Reviewed-on: https://gerrit.instructure.com/31525
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-03-07 18:33:34 +00:00
Jeremy Stanley 729d2f9625 spec: test InstructureMetadata sanitization in qti converter
correlates with qti_migration_tool commit
I7934a036f9f96c83ae013c1881736a2f579c40a3

refs CNVS-11196

Change-Id: I70ce963366414d10277526e6af62ce20141d57fb
Reviewed-on: https://gerrit.instructure.com/30874
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bracken Mosbacker <bracken@instructure.com>
2014-03-07 17:32:34 +00:00
James Williams f9f3f443d5 fix respondus endpoint spec for rails 3
calling Marshal.load before the RespondusAPIPort class is
defined seems to cause all its dynamically defined methods
to be run with $SAFE = 4

Change-Id: If6890616354af2bb92893585ddfc325bc69d2a75
Reviewed-on: https://gerrit.instructure.com/31510
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-03-07 15:44:10 +00:00
Rob Orton 1be0a2db95 add unique index to enrollments users per section
index should be unique per user, section, role,
type, and associated_user_id

fixes CNVS-7698
fixes CNVS-7700

test plan
 - add duplicate enrollment in script console
   - run migrations
   - duplicates should be removed
   - attempt to add duplicate enrollment in console
   - duplicate enrollment should fail
 - test user merge with conflicting enrollments
 - test creating, deleting, and restoring enrollments
 - enrollment regression testing

Change-Id: I0fb600ba6ff98054f71dc41a8519680413507494
Reviewed-on: https://gerrit.instructure.com/30986
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-03-06 22:20:30 +00:00
Rob Orton 19e658ac45 fixes typo in report description
fixes CNVS-11646

test plan
 - specs should pass

Change-Id: I6a598ad7fde9825b30265d980c1d5e0ffb3fd4a1
Reviewed-on: https://gerrit.instructure.com/31358
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-03-05 22:12:35 +00:00
James Williams 6c0ad2476e frd fix student_reports_spec for rails 3
Change-Id: I480f8e6a31ee36a78c67dcea653d778accf4d921
Reviewed-on: https://gerrit.instructure.com/31140
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-03-04 17:11:14 +00:00
James Williams bde0b19b30 fix student_reports_spec for rails 3
Change-Id: Ib9cd7cf32d03c054016bd4babcd6230d7389bbae
Reviewed-on: https://gerrit.instructure.com/31089
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-28 20:05:33 +00:00
Rob Orton e8aa7b257e fix student reports with no params in api
fixes CNVS-11479

test plan
 - in api with no params do
 - run zero activity report
 - run no submissions report
 - reports should not fail

Change-Id: I059be8dfaab2658f4c7008acde92a971e9e0208b
Reviewed-on: https://gerrit.instructure.com/30896
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2014-02-26 22:25:25 +00:00
James Williams beae490a64 change attachment callbacks for rails 3 compatibility
Change-Id: I696d920ae0e042593505e4b17ae1d0112dcd6825
Reviewed-on: https://gerrit.instructure.com/28967
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-26 20:22:01 +00:00
Rob Orton 7b3a489ffc add enrollment state column to report
also add option to filter by enrollment state

fixes CNVS-11233

test plan
 - run students with no submission report
 - use new enrollment state options
 - filters and additional column should work

Change-Id: Id221b45bb741e7286d98a892f71591118438417a
Reviewed-on: https://gerrit.instructure.com/30671
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2014-02-25 23:33:02 +00:00
Cody Cutrer e8767e6655 fix moodle converter spec for rails 3
Change-Id: I5a761e6ce627aa6d12caf6b29daa5d9307445580
Reviewed-on: https://gerrit.instructure.com/30741
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-02-25 16:27:17 +00:00
Cody Cutrer a22380588c don't disconnect the database during tests
Change-Id: I7e182abf124324c7f449adcd1ceb3efbf7c78d8c
Reviewed-on: https://gerrit.instructure.com/30378
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-02-21 19:04:41 +00:00
Cody Cutrer 14bc43d2e4 don't use update_without_callbacks cause it's gone in rails 3
Change-Id: I0af3c874c33c993da827ad72ab74731520a87782
Reviewed-on: https://gerrit.instructure.com/30337
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-02-20 22:17:56 +00:00
Cody Cutrer 21e967dd9f redis jobs for rails 3
since we're not inheriting from AR::Base, we have to implement some more
stuff ourself. still better than getting all of AR::Base, though.

Change-Id: Ifb21966310b90864394e135d97f1bef1ed6650a4
Reviewed-on: https://gerrit.instructure.com/30254
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-02-19 23:25:52 +00:00
Joshua Simpson ae814421e0 namespace all of quiz into quizzes module
This commit namespaces the rest of quiz related code into a Quizzes
namespace: controllers, views, models, and classes that previously lived
under lib/ that are Quiz-related.

Test plan:

Full regression test on all quiz related items

refs CNVS-10457

Change-Id: If54b61213945056539e03271a936d233abb66188
Reviewed-on: https://gerrit.instructure.com/29351
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
2014-02-18 22:17:13 +00:00
James Williams 018008ae56 set answer text to identifier for bb learn true/false questions
test plan:
* import the package referenced in the ticket
* should not import the wrong answer text for the questions

fixes #CNVS-9381 frd

Change-Id: I42e125c64bf5009b4384d7cc18edf75d7bcfc9f1
Reviewed-on: https://gerrit.instructure.com/30164
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2014-02-14 23:05:49 +00:00
Derek DeVries 4654c34bef rails3: fix for erubis issues and quizzes controller specs
things fixed:
  - erubis is in actionpack gemspec in rails3, so we don't need it in the gemfile
  - don't directly initialize a SafeBuffer, and instead initialize OutputBuffer
  - Fix comparison of hash with indifferent access in quizzes spec
  - plugins in rails3 aren't loaded in init.rb so rails_xss is still being
    loaded in rails3. However we have parts of the code that actually reference
    rails_xss classes directly so we want to keep the RailsXss::Erubis constant
    defined in erubis.rb. However we don't want to actually monkey patch
    the activesupport or string methods anymore for xss (rails3 takes care of
    this for us)

Change-Id: I327bf042dfa7dcedd39acb463eda1420d3dbd98c
Reviewed-on: https://gerrit.instructure.com/30108
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
QA-Review: Derek DeVries <ddevries@instructure.com>
2014-02-14 22:12:31 +00:00
Cody Cutrer d1ad316334 fix respondus middleware loading in rails 3
it can't go in a to_prepare block, cause the middleware stack has already
been initialized at that point

Change-Id: I6820eb89decf394e6b3acef8ea39556b494ab99d
Reviewed-on: https://gerrit.instructure.com/30150
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-02-14 16:10:54 +00:00
Cody Cutrer a389fd18c1 rails 3 doesn't auto-require csv, so require it where necessary
Change-Id: Id76980c82024a082855f5b7b5b60cd7e760730a9
Reviewed-on: https://gerrit.instructure.com/30132
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-02-14 16:04:34 +00:00
Brian Palmer b0064032bc log mem/cpu stats for jobs as well
This logs the STAT line in the same format as for web requests, though
omitting the @@last_sample at the end.

Rather than implementing it directly in worker.rb, I pulled in the new
Lifecycle callback code that delayed_job added after we forked, and
added the logging as an around filter in our canvas initializer.
Eventually I'd like to pull the other canvas-specific code into
lifecycle callbacks as well, making delayed_job more generic and
extractable.

test plan: run jobs, and verify that they still complete successfully,
and log a STAT line at the end with information on cpu and memory usage.

Change-Id: I18e17b286f5df8aa3c9774f0ac92841f4b92e193
Reviewed-on: https://gerrit.instructure.com/30037
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2014-02-13 17:38:01 +00:00
Ryan Florence af973b4a53 remove multiple ids
datepickers were getting their state all
screwed up

fixes CNVS-4925

Change-Id: I119113e4e5ecfde7bf5ab0a25fa9c05dab2bed76
Reviewed-on: https://gerrit.instructure.com/30065
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2014-02-12 23:08:09 +00:00
Cameron Matheson 69d88c8288 Revert "rails3: fix erubis for messages"
This reverts commit f91d65639a.

Change-Id: I8af64741607c2647f2e9488884c5831b6d7c6cfc
Reviewed-on: https://gerrit.instructure.com/30012
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2014-02-12 22:17:00 +00:00
Cameron Matheson f91d65639a rails3: fix erubis for messages
it's weird/scary that this wasn't an issue for the message tests

Change-Id: I2189eb1f39c3613735fc13beeb4d997f4f9a71cb
Reviewed-on: https://gerrit.instructure.com/29924
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2014-02-11 20:44:17 +00:00
Josh Simpson 91167736a7 fix polymorphic overrides
fixes CNVS-11041
this commit fixes PolymorphicTypeOverride.  PolymorphicTypeOverride was
added as a shim to assist in namespacing models that are referenced in
polymorphic relationships.  It did this by overriding read_attribute on
the particular attribute (e.g., for ContentTag#content_type).
Unfortunately, in some cases, Rails does not use #read_attribute to
access these types (specifically, when calling .preload_associations).
This adds an override for the attr_reader/method associated with the
attribute to be overridden.

Test plan
- Test affected models with old and new data with sharding enabled.

In a sharded environment:
- Attach an old quiz (one created prior to January) to a module
- when navigating to the module, the attached content items should
  display correctly.

Change-Id: Ibfbff5a0d5dc63f6cc3714b22fc3bf4dc04e66cb
Reviewed-on: https://gerrit.instructure.com/29858
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
2014-02-10 22:31:33 +00:00
Cody Cutrer 9f3f835181 pend fragile mysql specs
Change-Id: I85180d0151775f756c488d8b61d07e860534d609
Reviewed-on: https://gerrit.instructure.com/29852
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-10 15:53:52 +00:00
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