Commit Graph

197 Commits

Author SHA1 Message Date
Rob Orton e66c5435b5 enable new default report for all accounts
refs CNVS-26643

test plan
 - run migrations
 - new report should be enabled

Change-Id: Id36a8a61200239cbaf1fb9c1b7301abb7268eafe
Reviewed-on: https://gerrit.instructure.com/74287
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2016-03-14 05:08:15 +00:00
James Williams d708539a1b prevent users from double-joining groups
test plan:
* create a group set that allows student self-signup
* add a group
* as a student, visit the groups page
* should be able to click on the "JOIN" link to
 join the group (and then click on "LEAVE" to leave)
* should not be able to click on the links while
 they're submitting to the server

closes #CNVS-27851

Change-Id: Ib4944ff1561287604a3013065633e520fd923ed8
Reviewed-on: https://gerrit.instructure.com/74104
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-03-10 17:13:22 +00:00
James Williams 325d6a1ed5 validate permissions for role override population
refs #CNVS-27475

Change-Id: I241b4c5454fb9d1e306a5a6281dca6f1da439f7c
Reviewed-on: https://gerrit.instructure.com/73357
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-03-01 18:12:08 +00:00
James Williams 85518dc397 migrate yaml in database into a psych compatible format
from now on dumps all yaml with psych and inserts a tag to
differentiate between syck and psych yaml on load

also runs through the database and converts all
incompatible yaml to psych format

after the migrations have run we will be able to switch
to psych fully and clean up the tags

test plan:
* the migrations should work

closes #CNVS-27229

Change-Id: I79ce0691dd455396ca39422051ff79b8fbaebef6
Reviewed-on: https://gerrit.instructure.com/72012
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
2016-02-25 20:07:15 +00:00
James Williams ab75744a6f fix folders with leading spaces as well as trailing ones
closes #CNVS-27257

Change-Id: I21f88c87400cda576f233c57b88026995bf391b5
Reviewed-on: https://gerrit.instructure.com/72224
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-02-17 16:18:27 +00:00
James Williams 4fbb52d681 prevent stream item instance duplicates
test plan:
* basic regressions on dashboard stream items

closes #CNVS-27239

Change-Id: Id173d9c8e117941dabb7b79f681bad6a1d1b2f67
Reviewed-on: https://gerrit.instructure.com/72153
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-02-16 19:50:52 +00:00
Cody Cutrer ac8d12d4d3 spec: ensure temporary models protect attributes
Change-Id: Ib31e29d329b2319109affca2904a7da0a0346a21
Reviewed-on: https://gerrit.instructure.com/72136
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-02-15 16:35:32 +00:00
James Williams 6274d438c8 don't count student attachments in graded discussions for quota
test plan:
* create and publish a course with a graded discussion topic
* enroll a student in the course
* as the student, post a reply to the topic and attach a file
* it should not count toward the quota

closes #CNVS-27114

Change-Id: I6fb847a61a7a10a69dc035d5f5e1f15dda107a04
Reviewed-on: https://gerrit.instructure.com/71691
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
2016-02-10 15:39:52 +00:00
Cody Cutrer da57843b6c fix unread conversations count data fixup for qualified table names
refs CNVS-26480

Change-Id: I8567f11ef6eae2bd88f1138d1c2eea640dd678ef
Reviewed-on: https://gerrit.instructure.com/71836
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-02-10 05:19:57 +00:00
James Williams 4f9a25a79c rails 4.2: fix migration methods + unhack things
fixes index_exists?, add_index, remove_index, and
 add_foreign_key method calls in migrations

unhacks remove_index to fail silently if the index
 doesn't exist (and removes some unnecessary remove_index calls)

also fixes migration specs for rails 4.2

refs #CNVS-26056

Change-Id: Id878aa4cb871fc5ae6d0d4e7c6e8cfe1c5d88d35
Reviewed-on: https://gerrit.instructure.com/70692
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-01-22 14:17:36 +00:00
Cameron Matheson 987b6c2bb1 make canvadocs_submissions entries unique
closes CNVS-26089

Test plan:
  * in a rails console, call
    DataFixup::CreateCanvadocsSubmissionsRecords.run
    a few times
  * run migrations
  * there should be no duplicate entries in canvadocs_submissions
  * you should not be able to create duplicate entries in
    canvadocs_submissions

Change-Id: I38cd3c990c13434d5daa016f3b4d192bdc877e16
Reviewed-on: https://gerrit.instructure.com/69327
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2016-01-21 00:28:13 +00:00
James Williams b1f3daf044 rails 4.2: misc spec fixes
refs #CNVS-26056

Change-Id: Ia94ee2fcfded1ec66cb77a19085b005c81304800
Reviewed-on: https://gerrit.instructure.com/70251
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-01-18 21:45:39 +00:00
James Williams 3e1481aa6e rails 4.2: s/destroy!/destroy_permanently!
destroy! is now a method in rails

refs #CNVS-26056

Change-Id: I66e512265ff5cda6a12d7820e3cf69c77ef9e746
Reviewed-on: https://gerrit.instructure.com/69721
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-01-07 14:00:13 +00:00
James Williams 7ef0b75785 rails 4.2: active record fixes
refs #CNVS-26056

Change-Id: Ie6635bc9df7df4ee6504bba0fb32afb9dcb07e7a
Reviewed-on: https://gerrit.instructure.com/69525
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-01-05 13:53:23 +00:00
Cameron Matheson 862a99b9db fix DataFixup that fails in delayed_jobs
closes CNVS-26090

Change-Id: If42d31c3e262467531f521c3c52dfbed75276c37
Reviewed-on: https://gerrit.instructure.com/69328
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-12-30 19:00:51 +00:00
James Williams 0f46bc4a4f retroactively fix folders with names that end in spaces
refs #CNVS-26055

Change-Id: I9b0dd6f1a65359915122c8f024b737a6d8313880
Reviewed-on: https://gerrit.instructure.com/69350
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-12-23 21:44:56 +00:00
Cameron Matheson cd7bd26a79 associate c(anva|roco)docs with submissions
this is necessary to do permission checks for submissions with multiple
versions

closes CNVS-10734

Change-Id: Ifee6e35d851dc3953c5f3fe1086015bf51e469f1
Reviewed-on: https://gerrit.instructure.com/62648
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2015-11-05 18:47:48 +00:00
Jacob Fugal e2f11f5542 don't try and eager load in a data fixup
fixes CNVS-21318

eager load will try and select all the columns of the joined table by
name. but due to race conditions, being in the middle of running
migrations, it's possible the process will know of a column that hasn't
been created yet. naming it in the select will break the query.

Change-Id: I71ddd01c77f8f6157e36a01103dff52b7b967284
test-plan: N/A
Reviewed-on: https://gerrit.instructure.com/63902
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
2015-09-24 17:05:16 +00:00
James Williams 02f67869f4 fix media comment link replacement in imported questions
test plan:
* create a quiz with a question with a bunch of
 text and a media comment
* export the course to a file
* re-import the course
* the quiz and question should work as before

closes #CNVS-22857

Change-Id: I309a6bd39d55bbc6959c4e89bd4d6ea1f3220c55
Reviewed-on: https://gerrit.instructure.com/63777
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Charles Kimball <ckimball@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-09-23 19:35:01 +00:00
Cody Cutrer 2c2e687e59 qualified names fixes for migrations
refs CNVS-21900

Change-Id: I6b7e323e3c700aee3a7c86cb8f06fce78e5606df
Reviewed-on: https://gerrit.instructure.com/63384
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-09-17 22:03:28 +00:00
Cody Cutrer 56ccea56d4 use preload/eager_load instead of includes
refs CNVS-21901

Change-Id: Ie9e1b2778b72f649392d8a1c47c0c86dae0ef19c
Reviewed-on: https://gerrit.instructure.com/58660
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-09-08 20:32:05 +00:00
James Williams 1aeda6b604 track incomplete requirements in module progressions
also move progressions to 'started' when any submission
has been made toward a "Must score at least" requirement

NOTE: while this is a prerequisite for NC-OR, this is
 going to affect all current students because we may
 as well (it makes more sense this way)

test plan:
* create a module with a "Must score at least" requirement
* as a student, submit an assignment
* the module should be marked as "in progress" for the student now

* basic regression test of backend module progressions

closes #CNVS-22914

Change-Id: Ie240c61e7a70dca0d45fe49f81224a16eb690783
Reviewed-on: https://gerrit.instructure.com/62416
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Charles Kimball <ckimball@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-09-03 19:36:18 +00:00
Steven Burnett e12c380518 fixed title creation of assignment overrides
fixes CNVS-22796

Test-plan:
1. create a course with multiple users and observers attached
2. create an assignment and assign it to only a couple users
3. masquerade as one of the observers and notice that you can't see all the student's names that are assigned to it
4. as any student assigned

Change-Id: I2b45bc2ab262994cba2f97716386085e8c881169
Reviewed-on: https://gerrit.instructure.com/62021
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Jenkins
QA-Review: Adrian Russell <arussell@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-09-03 16:22:41 +00:00
James Williams 19e16ce43a don't unresolve links in quiz data when shifting dates
test plan:
* create a quiz with a question with a link to a file
 (or anything, really)
* copy the course with date shifting
* the link should work when taking the quiz as a student

closes #CNVS-22615

Change-Id: I5eaf1026d74473e14ffbcbd166b71b245cc2f731
Reviewed-on: https://gerrit.instructure.com/62360
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-09-03 02:55:10 +00:00
Alex Boyd efb47145bc Handle cross-sharded conversation attachments correctly
Fixes CNVS-10826

Test plan:
 - Set up a Canvas instance with multiple shards
 - Create a course on a shard other than the default one
 - Create a user on that shard and add them to the course
 - Add a user on the siteadmin account (which should be
   on the default shard) to the course
 - Log in as the siteadmin user to the shard on which the
   course was created
 - Send a conversation message to the user created directly
   on that shard, including an attachment with the message
 - Log in as the user created on that shard
 - Open the message and verify that you can see and download
   the attachment

Change-Id: Ie77219151f283cb8a3a82e8054841c54e542aa9a
Reviewed-on: https://gerrit.instructure.com/56812
Tested-by: Jenkins
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2015-09-01 19:37:10 +00:00
Nick Houle debb304d02 Set sis_app url as canvas account setting
Fixes: SIS-700
Change-Id: I95e475f00c1e00a00a4e04e099f7734c94604cad
Reviewed-on: https://gerrit.instructure.com/60592
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2015-08-19 21:51:03 +00:00
James Williams 9359807670 rewrite activity stream summary for performance
adds a notification_category column in order to move all
the calculation of stream item counts to the db instead
of loading all the instances and items

test plan:
* regression test activity stream summary api endpoint

closes #CNVS-22424

Change-Id: Ia0abf9d89e02d53800bcd5d62fdf1a36131bd6f8
Reviewed-on: https://gerrit.instructure.com/60578
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-08-13 19:43:34 +00:00
Weston Dransfield 2b0b7d26b0 Move placements to capabilities in the tool proxy. Placements are still written to both message_handler and resource_handler.
fixes PLAT-957

Test Plan:
     - Make sure a 'message_handler_id' column is added to the 'lti_resource_placements' table after migration
     - Use the master branch of https://github.com/westonkd/lti_tool_provider_example and make sure
       placements work as expected in Lti2Launch
     - use the 'placements_to_message' branch of https://github.com/westonkd/lti_tool_provider_example and
       make sure placements work as expected in Lti2Launch

Change-Id: I2d681eb8efb2a1c25e0250a89c09bb5d0c8ad797
Reviewed-on: https://gerrit.instructure.com/58654
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2015-08-06 15:48:13 +00:00
James Williams 600165e7b2 rails4: deprecate Relation#all in favor of Relation#to_a
refs #CNVS-21596

Change-Id: I5dedaab90a2abe6bf288ff30401c9b31629b45b2
Reviewed-on: https://gerrit.instructure.com/59220
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-07-24 21:28:14 +00:00
Cody Cutrer c472370223 use qualified table names in EXISTS subqueries
refs CNVS-21900

Change-Id: Ic49c570888ad8712d7ba93de632d952ddf2b53e1
Reviewed-on: https://gerrit.instructure.com/58629
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-07-19 00:09:24 +00:00
Cody Cutrer 9e353116ce quote table names in joins
refs CNVS-21900

Change-Id: I260c8dbae3c4abd7fe436f2051e1cc852ef1675f
Reviewed-on: https://gerrit.instructure.com/58554
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-07-16 16:35:31 +00:00
Rob Orton 71e065a35a validate that pseudonyms belong to root_accounts
fixes CNVS-21700

test plan
 - in rails console run

a = Account.default
u1 = User.create(name: 'test user1')
p1 = Pseudonym.create!(account: a, user: u1,unique_id: 'so_unique')
a2 = Account.create!(name: 'sub_account1')
u2 = User.create!(name: 'test user2')
p2 = Pseudonym.create!(account: a2, user: u2,unique_id: 'so_unique')
u3 = User.create(name: 'test user3')
p3 = Pseudonym.create!(account: a2, user: u3,unique_id: 'more_unique')
a2.parent_account_id = a2.root_account_id = a.id
a2.save!

p1.workflow_state # should = 'active'
u1.reload.workflow_state # should be 'pre_registered' or 'registered'
p2.reload #should be ActiveRecord::RecordNotFound: Couldn't find Pseudonym with id=x
u2.reload.workflow_state # should be 'deleted'
p3.reload.account_id # should be Account.default.id
u3.reload.workflow_state # should be 'pre_registered' or 'registered'

Change-Id: I298fb662716fae7d0ba806db6878959e38cec322
Reviewed-on: https://gerrit.instructure.com/57677
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2015-07-15 20:22:48 +00:00
James Williams b8238e5e91 rails4: use preload instead of includes for context associations
also random spec file tweak

refs #CNVS-21596

Change-Id: Ia009265af517e7902cd915b48eb8d08d75ee1d74
Reviewed-on: https://gerrit.instructure.com/57828
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-07-08 13:03:29 +00:00
Brian Finney 8a2f143b4d Fix missed quiz_questions affected by CNVS-19292
If migration 20150506164227 was previously ran automatically it would
not have missed any records.
If migration 20150506164227 was previously skipped and
DataFixup::FixCorruptAssessmentQuestionsFromCnvs19292 was ran manually
as below, then it could have missed some records. Rerun to fix any missed
records.
If migration 20150506164227 has not previously been run, the below will
no longer miss any records.

rails console
  DataFixup::FixCorruptAssessmentQuestionsFromCnvs19292.run(
    [
      'calculated_question',
      'numerical_question',
      'matching_question',
      'multiple_dropdowns_question'
    ],
    Date.parse('2015/3/14').beginning_of_day, # Beginning of corruption
    Date.parse('2015/3/18').end_of_day        # End of corruption
  )

Fixes CNVS-20704
Change-Id: Idef1cc00c1713753563e63889b63241051b0d416
Reviewed-on: https://gerrit.instructure.com/55489
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Brian Finney <bfinney@instructure.com>
QA-Review: Brian Finney <bfinney@instructure.com>
2015-06-10 18:03:32 +00:00
Cody Cutrer 167910e8ef fix sso settings population migration
Change-Id: Ic6875c5f13f64fe64cb53494fae9444d8fe2ffc4
Reviewed-on: https://gerrit.instructure.com/55745
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2015-06-05 15:09:07 +00:00
Ryan Taylor 6ebff05c4a Fixes event rebuild tools, optimization for event_aggregator
This should make event rebuilding equivalent with versions rebuilding
in the most substantial ways (doesn't cause bug in quiz showing with
unsupported question types).

Refs CNVS-20069

Test Plan:
  - contact Ryan for DB migration script
  - Run custom migration
  - Delete a single quiz submission with raw SQL query
  - Rebuild that quiz_submission from the events log
  - Confirm that the quiz is viewable, contains the same questions, and
    is properly graded.

Change-Id: Ia66a3f15e86e5dffd8ba2eff1ce5ff1ce663ad9b
Reviewed-on: https://gerrit.instructure.com/55164
Tested-by: Cameron Sutter <csutter@instructure.com>
Reviewed-by: Brian Finney <bfinney@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
2015-05-29 17:14:48 +00:00
Ryan Taylor e4bc5515a3 Adds 'grade changed' reporting to data fix logging
Refs CNVS-20069

Change-Id: Idad58a30f5b155661c8aa0dcea007d9c3a1fc63a
Reviewed-on: https://gerrit.instructure.com/54823
Reviewed-by: Brian Finney <bfinney@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
QA-Review: Cameron Sutter <csutter@instructure.com>
Tested-by: Cameron Sutter <csutter@instructure.com>
2015-05-21 16:55:25 +00:00
Ryan Taylor 775e7533fd Rebuild QSes from versions data again
Refs CNVS-20069

Change-Id: I46cfb844ff062596af4bb3a594cb3cec381c570b
Reviewed-on: https://gerrit.instructure.com/54796
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Ryan Taylor <rtaylor@instructure.com>
Tested-by: Ryan Taylor <rtaylor@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Pedro Fajardo <pfajardo@instructure.com>
Tested-by: Jenkins
2015-05-21 15:29:18 +00:00
Ryan Taylor 34f74c8275 Rebuild QSes from versions data
Refs CNVS-20069

Change-Id: I2bc3cee5a3e9b2e19e2236c6a815fd2801b03c23
Reviewed-on: https://gerrit.instructure.com/54624
Reviewed-by: Brian Finney <bfinney@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
QA-Review: Cameron Sutter <csutter@instructure.com>
Tested-by: Cameron Sutter <csutter@instructure.com>
2015-05-20 21:26:19 +00:00
Cody Cutrer 6636445f69 optimize rebuilding of quiz submissions
don't load questions one at a time, instead load all of the questions for
the quiz at once. also set inverse relations so accesses back to the quiz
don't cause another query

Change-Id: I4a90a012c7b2bb832c55adfb3dd4a23ecd798a9d
Reviewed-on: https://gerrit.instructure.com/54404
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-05-15 18:48:36 +00:00
Ryan Taylor 0aaff54d9f QS missing data fix update
Refs CNVS-20069

Change-Id: Ic46d118c1987964ddcab67bf2225e71233e123a5
Reviewed-on: https://gerrit.instructure.com/54333
QA-Review: Ryan Taylor <rtaylor@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins
2015-05-14 22:30:57 +00:00
Ethan Vizitei af463d923d refactor views for unified AAC administration
closes CNVS-20076

First, pull a presenter out of the AAC index

This thing needs more flexibility before introducing
multiple OAuth connectors.  This commit adds a couple characterization
specs for the AAC controller, then drives out a presenter to pull
as much logic and config out of the nested views as possible.

Then, this commit refactors the
previously-somewhat-bespoke-and-presumptive sac
configuration into a workflow that shows each aac
in turn according to it's type, creating forms for
each type at the bottom, and
showing the relevant form for a new one based on
selection on the right.

Have regression tested in the browser to the level
of CRUD functionality, but also deserves solid QA
for SSO functionality post-configuration.

DONE:
-successful CAS creation/editing/deletion
-successful LDAP creation/editing/deletion
-proper differentiation between LDAP primary and secondary
-proper SAML creation/editing
-move away from "update_all" deprecated endpoint
-Selenium Spec fixes
-ensure discovery URL and debugging workflows for saml
-remove duplication from views
-tear down old JS workflow
-apply appropriate tests for new behavior
-remove presenter methods that are no longer valuable
-Moved change_password_url and login_handle_name
-up to account settings, removed them from AACs, and built
-migrations to manage the transition.
-Found and fixed all references to change_password_url on AACs
-Found and fixes all references to login_handle_name on AACs
-add datafixup for migrating AAC data to account settings
-unify repetative individual files into single form delcarations \o/
-remove old SAML editing js
-Make sure SAML still works
-Make LDAP partial flow just like SAML/CAS
-Unify position information across all types
-update "acts_as_list" to support STI classes
-move discovery URL into account auth form
-remove discover URL js management
-Unify form generation between new/existing aacs
-deprecate discovery url API endpoints
-update docs for authorization settings to deprecate their usage in AAC
  api and redirect their values to current settings for now
-make delete links non-js-y to stop this silly page refresh on api
  completion
-make form submissions actually submit the form rather than do this silly
  page refresh on api completion
-See if anything needs “Edit Details” button, remove if not
-Wire up removing account settings by blanking out form
-Removed "cancel" button from form because fields are always open
-placate gergich
-Test removing config info
-Test population fixup on real data
-write docs for authorization settings
-fix existing specs
-fix routing and docs to not break doc generation
-fix stupid jenkins task that thinks it can’t see controls
-re-fix selenium
-fix saml debugging workflow
-write tests for acts_as_list behavior
-write tests for authorization settings
-remove auth_info types of things
-clean up and unify styles where possible

TEST PLAN:
 Regression test creating/deleting/editing and logging
 in with SSO solutions for CAS, LDAP, and SAML.
 Should be no functional behavior modification, though
 workflow will be a little more unified between the
 3 currently supported types (each one will
 require using the menu in the right sidebar
 to add a new AAC).

 Also test setting and deleting account settings through
 the form underneath the configs when there are AACs in existence.

 Finally, make sure that the SAML Debugging workflow still works.

Change-Id: I448db10185512d1b9469c2a425be0a3bcf9e6ebf
Reviewed-on: https://gerrit.instructure.com/53448
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-05-14 21:47:05 +00:00
Ryan Taylor 6cf8fd9caa Updates for data fix script for missing QS
This updates the functionality of our QS data fix script to allow for
finding/fixing in a single delayed_job operation

Also, corrects a bug in the existing event_aggregator which
unnecessarily looped over the answers repeatedly.  This should speed up
the data fix by orders of magnitude.

Refs CNVS-20069

Test Plan:
  - Confirm script works well on beta

Change-Id: Icd4a1b1fa866650162a2b1b4ac97201efe6d5e76
Reviewed-on: https://gerrit.instructure.com/54249
Reviewed-by: Ben Chobot <bench@instructure.com>
Reviewed-by: Brian Finney <bfinney@instructure.com>
Product-Review: Brian Finney <bfinney@instructure.com>
Tested-by: Jenkins
QA-Review: Robert Lamb <rlamb@instructure.com>
2015-05-14 16:35:37 +00:00
Ryan Taylor 1948dec40a Fixes to DataFixup::RebuildQSfromQSE
Refs CNVS-20069

Change-Id: I62d46f0f2876e8c55851eb3508a2a9e66fbbd4ce
Reviewed-on: https://gerrit.instructure.com/53413
Tested-by: Jenkins
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Ryan Taylor <rtaylor@instructure.com>
2015-05-08 22:04:36 +00:00
Brian Finney 335f065c5c Fix multiple_dropdowns_question affected by CNVS-19292
migration 20150506164227 should be skipped on large environments and the
following command should be manually run instead.

rails console
  DataFixup::FixCorruptAssessmentQuestionsFromCnvs19292.run(
    [
      'calculated_question',
      'numerical_question',
      'matching_question',
      'multiple_dropdowns_question'
    ],
    Date.parse('2015/3/14').beginning_of_day, # Beginning of corruption
    Date.parse('2015/3/18').end_of_day        # End of corruption
  )

Fixes CNVS-19365

 - Increments AssessmentQuestion version numbers so quizzes will pull new
   data on next quiz take

Test plan
 - Effected quizzes should be fixed

Change-Id: Iafae6525ae2406a6a4b3ae88c6f61e451719dd2b
Reviewed-on: https://gerrit.instructure.com/53536
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Brian Finney <bfinney@instructure.com>
QA-Review: Brian Finney <bfinney@instructure.com>
2015-05-06 21:43:33 +00:00
Cody Cutrer 471195854a remove shackles env munging in datafixups
refs CNVS-20203

it's now handled automatically

Change-Id: I5a0058b3541e0264422e3c104766c3e2a978cda8
Reviewed-on: https://gerrit.instructure.com/53406
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-05-04 20:56:35 +00:00
Cody Cutrer 8a77125244 don't switch from deploy env to slave
fixes CNVS-20203

this messes up creation of new shards

Change-Id: Ib2e9dad3dccbe19775572f3da01f1f33fecaf126
Reviewed-on: https://gerrit.instructure.com/53399
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-05-04 19:57:22 +00:00
Ryan Taylor b4f620599e Rebuild tools for missing QS
Refs CNVS-20069

Test Plan:
  - Ideally, test against production errors in beta.
  - Confirm functionality locally, requires removal of FK from
    quiz_submission_events and quiz_submission_events_[2015]_[4]
  - Removes deprecated migration_lint scripting

Change-Id: Ic2580718e2e4e7d50280ff5cc2a6c6345036c55f
Reviewed-on: https://gerrit.instructure.com/53234
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Ryan Taylor <rtaylor@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
2015-05-04 16:27:32 +00:00
Strand McCutchen 7f659c2ce7 cleanup refactor of Rubocop's Lint/DeprecatedClassMethods
fixes: CNVS-20009

This change replaces deprecated methods (like `.exists?`)
with their current counterparts (like `.exist?`)

This cleanup refactor was automatically generated using
this command:

  `rubocop $(find . -name '*.rb') --only Lint/DeprecatedClassMethods --auto-correct`

These code changes were autocorrected then reviewed.

Change-Id: I385dbfc402d94a1f37330293123c6003aaac5b30
Reviewed-on: https://gerrit.instructure.com/52886
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Strand McCutchen <smccutchen@instructure.com>
QA-Review: Strand McCutchen <smccutchen@instructure.com>
2015-04-28 18:38:24 +00:00
Strand McCutchen 19271f0521 cleanup refactor of Rubocop's Style/WhileUntilDo
fixes CNVS-20009

Prefer while/until without `do`s.

This cleanup refactor was automatically generated using
this command:

  `rubocop $(find . -name '*.rb') --only Style/WhileUntilDo --auto-correct`

These code changes were autocorrected then reviewed.

Change-Id: Ie78f62c0caea4e154339365e2ad207d77cde967c
Reviewed-on: https://gerrit.instructure.com/53001
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Strand McCutchen <smccutchen@instructure.com>
QA-Review: Strand McCutchen <smccutchen@instructure.com>
2015-04-28 18:37:29 +00:00