Commit Graph

698 Commits

Author SHA1 Message Date
Simon Williams 26bda5b611 upgrade rubocop and rubocop-rspec to latest
closes CNVS-34657

test plan: rubocop should still work

Change-Id: Ibdd340dd7ba516639ee5b7225449422b324bd33a
Reviewed-on: https://gerrit.instructure.com/100831
Tested-by: Jenkins
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2017-02-02 16:16:39 +00:00
Cody Cutrer e4b5bcc2fe fix parsing of SQS incoming mail
it _is_ double-json'd even with aws-sdk v2?

Change-Id: Ice998bdda790673378d1dd2463acb2eba862b5de
Reviewed-on: https://gerrit.instructure.com/100782
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2017-01-29 02:08:48 +00:00
Simon Williams 1511fa6c6a bump mail gem to 2.6.4
closes CNVS-34065

test plan:
- do something that sends an email
- it should work

Change-Id: I21c40bd414bd43580faf7423a829fca85c5625ad
Reviewed-on: https://gerrit.instructure.com/95345
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Pedro Fajardo <pfajardo@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
2017-01-27 16:01:17 +00:00
jshaffer 67fd784f87 Add group categories and extra group params to the group report
Test Plan: Run the group and group_categories reports, make
sure you get all group categories, with course and account contexts
and make sure you get context information for the group report

Change-Id: Ie769a8679edf1240db571a6acaaa40009c060a22
refs: PFS-6415
Reviewed-on: https://gerrit.instructure.com/100180
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
QA-Review: Trevor Byington <tbyington@instructure.com>
Product-Review: Chad McGuire <cmcguire@instructure.com>
2017-01-25 23:43:17 +00:00
Cody Cutrer 6beba043bc fix some ruby 2.4 deprecations
the thread_safe gem has deprecations too, but they'll require Rails 5.1
until they're fixed (when both activesupport and tzinfo no longer
depend on it)

Change-Id: Ic53839d911ba8ed4d463d17f9dd7207673510f3a
Reviewed-on: https://gerrit.instructure.com/100499
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-01-25 21:53:37 +00:00
James Williams f4fa3411fd add more qti parsing for multiple dropdowns, matching questions
test plan:
* import the packages referenced in the tickets
* the questions (in the question banks) should come over
in some useful fashion

closes #CNVS-34360

Change-Id: I5766ae856de9f3e6a1551109d4cb69f6c6ae7dfd
Reviewed-on: https://gerrit.instructure.com/100222
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2017-01-25 16:54:46 +00:00
Cody Cutrer 1f03606627 aws sdk v2 support for attachments
closes CNVS-33615

test plan:
 * upload and download files using S3
 * submit an assignment
 * do an SIS import with parallel
 * do a course copy
 * export and import a course
 * upload some custom css file in theme editor
 * test a canvadoc and crocodoc preview

Change-Id: I9145b39728938e7e5903d23c4a4598fc8df4ef45
Reviewed-on: https://gerrit.instructure.com/93002
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
2017-01-24 21:09:14 +00:00
Cody Cutrer f7271c4e3e run linters on previous commit if there are no local changes
this was lost in https://gerrit.instructure.com/#/c/90657/33

Change-Id: Ie3a0c38cb7df0b627954ebc00ec9b0fc99bf43c7
Reviewed-on: https://gerrit.instructure.com/100330
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-01-24 18:53:38 +00:00
Cody Cutrer 7d6f5980ee whitelist Shackles use for migrations
Change-Id: I521a23e99f24de53ed5d72acb282284cb5e42e72
Reviewed-on: https://gerrit.instructure.com/100216
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-01-23 17:22:28 +00:00
Cody Cutrer 78a03a0aef add a few items to the migration autoload whitelist
Change-Id: I00e095e84ca8fa902192c041af735f1811cb8c3b
Reviewed-on: https://gerrit.instructure.com/100156
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-01-23 15:58:32 +00:00
Jon Jensen 9c03f444ed spec: model/datafixup linter fix, fixes SD-2020
correctly whitelist things that chain off of whitelisted methods, e.g.
connection

Change-Id: I38ec4699b324d0e5d26de6bde36d841fa696d7e5
Reviewed-on: https://gerrit.instructure.com/100186
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-01-21 04:44:09 +00:00
Jon Jensen 85070f2c4e spec: fix brittle spec
don't let the values from these specs affect later specs

Change-Id: I91169aa3990607966c31c898479dfdfcfd01c2e9
Reviewed-on: https://gerrit.instructure.com/100188
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins
2017-01-21 00:44:51 +00:00
Jon Jensen dae95700ba spec: fix occasional failure when selinimum capture is enabled
fixes SD-2006

mixing `singleton_class.prepend` and `extend` appears to cause `super`
to misbehave every once in a while (~1/250 workers in ~20% of builds)
... perhaps a ruby 2.3.1 bug?

just use `singleton_class.prepend` like autoextend does. 30+ test builds
with this tweak, and zero failures :yuss:

also change a couple `include` calls to `prepend`

test plan:
n/a, specs

Change-Id: I35629d63ed3855d95ae427c1cd992d12b950880c
Reviewed-on: https://gerrit.instructure.com/99613
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-01-18 22:30:16 +00:00
Jon Jensen 037783f7fa don't include unnecessary modules into Object, fixes SD-2013
also add a cop to prevent it in the future

Change-Id: Ic949cc4448f546736aa3aeee17fc1fc33a1f2808
Reviewed-on: https://gerrit.instructure.com/99847
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-01-18 19:20:00 +00:00
Jesse Poulos 2ef7a5191e add custom variable for course workflow_state
Before this fix, there was not a way to determine the workflow_state of the
course without accessing API. This fix adds a way to send the course
workflow_state during an LTI launch.

Test plan:
1) create a course
2) install a tool with the $Canvas.course.workflowState custom field
3) launch the tool and verify that the course workflow_state is passed in
the launch parameters

Fixes PLAT-1956

Change-Id: I933ddcd45c689ecd054e692c7e4dc993874dc995
Reviewed-on: https://gerrit.instructure.com/94987
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2017-01-13 19:56:20 +00:00
Simon Williams 472ce5ecaa refactor LinkedIn::Connection
cleaner interface, with the bonus of making it easier to avoid mocking
`any_instance` on this class.

closes CNVS-33856

test plan:
- register linked in as a user service
- it should work

Change-Id: I158e132314569dd960e04c6c863db90146b8062a
Reviewed-on: https://gerrit.instructure.com/97542
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
2017-01-10 22:41:32 +00:00
Jon Jensen 95e74317d8 spec: fix selinimum capture finalization
in aws-sdk v2, this `.read` doesn't take a block, so the files were empty

verified manually by (re-)finalizing 42613b97

Change-Id: I07fecc2fba31b46de891a000ab16c298cf9a9cc1
Reviewed-on: https://gerrit.instructure.com/99250
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
2017-01-10 22:34:07 +00:00
Cody Cutrer 1339e44130 fix autoextend detecting nested modules from autoloading
fixes CNVS-34248

Change-Id: I8b4c899568f06886354d66f1a1462141a557d3da
Reviewed-on: https://gerrit.instructure.com/99225
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-01-10 20:52:15 +00:00
Clay Diffrient fec3811d5c Make eslint avoid the campsite cleanup rule
closes CNVS-34242

This makes dr_diff have an option to avoid checking
lines surrounding changes.  It also sets up eslint
to take advantage of this rule.

Test Plan:
  - Automated Tests Pass
  - Eslint only flags errors on changed lines
    (when run through Gerrit/Jenkins/Gergich or
     via script/eslint)
Change-Id: I900430f21c4c925e8fd87bd62e75b271fa84d08e
Reviewed-on: https://gerrit.instructure.com/99048
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-01-10 20:44:24 +00:00
James Williams 6fc0f8c28b strong_params part all the rest
refs #CNVS-32574

Change-Id: If0a354295f9433fcf4dc2a776d93ae45833a44bd
Reviewed-on: https://gerrit.instructure.com/94683
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-01-10 18:19:55 +00:00
James Williams 26ee38350a strong params part E-F
refs #CNVS-32574

Change-Id: Ib1fc9c81dbfa4ece200a15a23105dbfa6f84d0c6
Reviewed-on: https://gerrit.instructure.com/94677
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-01-10 18:16:54 +00:00
Simon Williams bf7456da8c refactor Twitter::Connection
cleaner interface, with the bonus of making it easier to avoid mocking
`any_instance` on this class.

closes CNVS-33854

test plan:
- register twitter as a user service
- it should work

Change-Id: I9dd2c7b85dd9937ebe2653a5e1309757812b6bf2
Reviewed-on: https://gerrit.instructure.com/97537
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2017-01-09 19:09:21 +00:00
Augusto Callejas e4badb2694 Add columns for Academic Benchmarks GUID update
refs OUT-450

test plan:
  - enable Academic Benchmarks using v1 credentials
  - import any set of standards
  - confirm that only vendor_guid and migration_id
    columns in learning_outcomes and learning_outcome_groups
    are populated
  - clear out all outcomes and outcome groups
  - configure Academic Benchmarks using v3 credentials
  - enable the use of the new GUID columns by running the following
    in a Rails console:
    * plugin = Canvas::Plugin.find('academic_benchmark_importer')
    * pluginSettings = PluginSetting.find_by_name(plugin.id)
    * pluginSettings.settings[:new_guid_columns]=true
    * pluginSettings.save!
  - import any set of standards
  - confirm that only vendor_guid_2 and migration_id_2
    columns in learning_outcomes and learning_outcome_groups
    are populated
  - restore the use of the current GUID columns by running
    the following in the previous Rails console:
    * pluginSettings.settings.delete(:new_guid_columns)
    * pluginSettings.save!

Change-Id: I77e5d578a55a0967310208029f1c5225188c3455
Reviewed-on: https://gerrit.instructure.com/98347
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Cemal Aktas <caktas@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2017-01-09 18:59:38 +00:00
Jon Jensen cfc2ef675f remove i18nema and syck
fixes CNVS-34164

test plan:
 * basic smoke test that translations still work

Change-Id: Ia88fc88de8b52aeaa92b65ea43b93eef5adb1dcc
Reviewed-on: https://gerrit.instructure.com/95065
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2017-01-06 19:34:55 +00:00
Cody Cutrer 4dc757f693 upgrade selinimum to aws-sdk v2
Change-Id: Ia638ed5c7d5ac8bc05472ce10323304f6fd9812c
Reviewed-on: https://gerrit.instructure.com/92871
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-01-05 17:49:42 +00:00
Jon Jensen 3d8e304e26 deterministic described classes, refs SD-1969
This cop encourages explit require_dependency calls for ambiguous nested
constants in specs. What does that mean? Consider:

    module Analytics
      describe Assignments do

Depending on what has been required and/or autoloaded, `Assignments` could
either resolve to `Analytics::Assignments`, or just the top-level
`Assignments`. This is a cause of flickering failures and test-queue woes.
This example should either have an explicit `require_dependency` call, or
get rid of the module and just do `describe Analytics::Assignments``

Correct all existing ones in the codebase, except for a few
ActiveRecord-related ones (the auto-correct isn't quite perfect, i.e. it
assumes the file path will be `const_name.underscore`, which is no bueno
for things like ActiveRecord::ConnectionAdapters::PostgreSQLAdapter)

Test plan:
n/a, specs

Change-Id: Ic24bf3e0f547ca11c46887d4af92804da091912a
Reviewed-on: https://gerrit.instructure.com/98752
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-01-04 21:07:07 +00:00
Simon Williams 178455d31d upgrade rubocop to 0.46.0 and rubocop-rspec to 1.8.0
note: Astrolabe::Node is now just Rubocop::Node

closes CNVS-34077

test plan: rubocop should still lint correctly

Change-Id: Id5feb1700ad78cc0b34c6cb90d2a75320b210138
Reviewed-on: https://gerrit.instructure.com/98512
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2017-01-03 21:25:40 +00:00
Cody Cutrer 331b60a832 convert incoming_message_processor to AWS SDK v2
Change-Id: I0a0630d7dace8ec0cfc21721ccf67c0e7a7fa9b5
Reviewed-on: https://gerrit.instructure.com/92792
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2016-12-28 23:50:35 +00:00
Simon Williams 57497719a7 spec: rename the `course` helper to `course_factory`
closes CNVS-34046

test plan: specs should pass

Change-Id: I8684d30e5af7be04566b2d3903db2b7f4b14b24b
Reviewed-on: https://gerrit.instructure.com/98439
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2016-12-27 20:25:29 +00:00
Simon Williams ece65b5a89 spec: rename the `user` helper to `user_factory`
closes CNVS-34042

test plan: specs should pass

Change-Id: I20709a69f0cb28fb55eba18ca81f89f4d7673b56
Reviewed-on: https://gerrit.instructure.com/98426
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2016-12-27 20:25:25 +00:00
Simon Williams 359c6dea13 upgrade many canvas gems to rspec 3 syntax
as of this commit, all canvas gems should be on rspec 3.5, and pass
without deprecation warnings.

closes CNVS-34040

test plan: specs should pass without deprecation warnings

Change-Id: I556b1a4a5aeb791c6ddd50ee35b51c513e025019
Reviewed-on: https://gerrit.instructure.com/98414
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins
2016-12-27 18:44:23 +00:00
Simon Williams e402017e17 upgrade canvas_quiz_statistics to rspec 3 syntax
refs CNVS-34040

test plan: specs should pass

Change-Id: Ic81ccbc5382dbc5c3b1e997281d2f988c7e350dc
Reviewed-on: https://gerrit.instructure.com/98413
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2016-12-27 18:44:20 +00:00
Simon Williams b7fe6659de upgrade incoming_mail_processor to new rspec syntax
refs CNVS-34040

test plan: specs should pass

Change-Id: Ifea91036ccb1f4981c29c3247fe40966b741a4ce
Reviewed-on: https://gerrit.instructure.com/98412
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins
2016-12-27 18:37:36 +00:00
Simon Williams 61d8bdd9f7 remove mocha in incoming_mail_processor
refs CNVS-34039
refs CNVS-34040

test plan: specs should pass

Change-Id: Ib630feea70c46d037e0de743ab0bf59b62727367
Reviewed-on: https://gerrit.instructure.com/98411
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2016-12-27 18:18:43 +00:00
Simon Williams 6c6f10d402 remove mocha from several canvas gems
refs CNVS-34039
refs CNVS-34040

test plan: specs should pass

Change-Id: I9ef587edd9a5f47fcbe2f6fee74cc4c52efca6fb
Reviewed-on: https://gerrit.instructure.com/98410
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2016-12-27 18:18:38 +00:00
James Williams c034643938 tweak qti question text parsing
apparently some people like to wrap their choiceInteraction
nodes around div's which confuses the question text parser
and ends up sanitizing away all the data away

test plan:
* import the package referenced in the ticket
* the imported questions in the question bank
 should have answers

closes #CNVS-33920

Change-Id: I245f2242f54048efacbf20967a5ae7c90d4f84ca
Reviewed-on: https://gerrit.instructure.com/97906
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-12-21 21:22:28 +00:00
James Williams 1ee5d4e40e bump moodle2cc
test plan:
* import the package referenced in the ticket
* it should be successful

closes #CNVS-33964

Change-Id: Ia57e59b3e66afcdf2b59021cd04edc0760c4cc4e
Reviewed-on: https://gerrit.instructure.com/98135
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-12-21 17:53:44 +00:00
Cody Cutrer adf329b5f0 improve autoextend to hook into ActiveSupport
refs CNVS-33695

this allows immediate detection of modules that came from autoloading,
and also allows delaying calling your extension until the class
is fully loaded if desired (to call a method on the base class, for
example)

Change-Id: I2ddd2055e3cf184d3ee149f114da7ec93bd0ead8
Reviewed-on: https://gerrit.instructure.com/97928
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-12-20 20:23:26 +00:00
Matthew Berns a1aeb610fb revert OUT-20
closes OUT-1012

test plan:
- full regression testing of outcomes, including:
creation
deletion
moving
migrating
importing
taking
results
report export

Change-Id: Id0708d9133bab8977e6fcf7f91a56fb25f15b735
Reviewed-on: https://gerrit.instructure.com/97729
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Alex Ortiz-Rosado <aortiz@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
Tested-by: Matt Berns <mberns@instructure.com>
2016-12-20 00:20:34 +00:00
Jon Jensen 27dc313afc spec: gradebook-related TLC, refs SD-1810
modest speedup and lots of cleanup...

* :once a lot of common gradebook setup
* ensure we're not stubbing sessions in a :once
* remove lots of wait_for_...
* include_text
* have_size

Change-Id: I33883add7c34d2cf8867c3d6709ffd2cf92dd9bf
Reviewed-on: https://gerrit.instructure.com/97851
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2016-12-17 03:57:06 +00:00
Dan Minkevitch 600c8433f0 Adjust grouping of terms dropdowns
Fixes CNVS-33657
Refs CNVS-33562

Test Plan:
* In an account with multiple terms
  spanning across past, present, and
  future, go to account settings

Part 1:
* The "Show courses from the term:" dropdown
  on the right should include groups for Default,
  Active, Future, and Past (in that order)
* The terms in the dropdown are categorized
  correctly based on their start and end dates
  and alphabetized

Part 2:
* Click "+ New Course" on the right hand side
* The enrollment terms dropdown should match the criteria
  from Part 1.

Part 3:
* Select the Reports tab
* Configure a report
* A modal should appear with a terms
  dropdown that matches the criteria from Part 1 & 2.

Change-Id: Id46de9052ada9841cf7b2ad77246bb63258fc017
Reviewed-on: https://gerrit.instructure.com/96802
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2016-12-15 23:04:50 +00:00
Cody Cutrer a09f82c7b4 avoid invalid UTF-8 in source strings
so that CodeClimate will stop choking on them

Change-Id: I139b57d6bd0636710825bf1dbf6c28f1c640e039
Reviewed-on: https://gerrit.instructure.com/97586
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-12-14 21:13:59 +00:00
Landon Wilkins e46bb63047 lint: discourage NoSuchElementError, fixes SD-1770
test plan:
* see test commit

Change-Id: Iab77491cdacf65249a8edd732617d7c771c0c78e
Reviewed-on: https://gerrit.instructure.com/97276
Tested-by: Jenkins
Reviewed-by: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
2016-12-14 18:09:45 +00:00
Jon Jensen 7aa48475d9 bump gergich, fixes SD-1818
* better eslint support (absolute paths)
* don't output :allthethings: in dr_diff'd stuff

Change-Id: I49aeb41f622ea5e79feb624806b44bda760c8b84
Reviewed-on: https://gerrit.instructure.com/97511
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-12-13 21:56:08 +00:00
Landon Wilkins 53fb4e67e4 lint: discourage strftime in specs, fixes SD-1849
test plan:
* see test commit

Change-Id: I6eb901ef97c437ed48ac5c867e214a58db228688
Reviewed-on: https://gerrit.instructure.com/97250
Tested-by: Jenkins
Reviewed-by: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
2016-12-13 01:03:12 +00:00
Benjamin Porter debeb07af4 Add Academic Benchmark API v3 support
fixes OUT-476
[ci-coverage]

test plan:
  - load /plugins/academic_benchmark_importer
  - confirm that no API v3 partner key value is present
  - enter API v1 api key
  - perform an import using the outcomes importer tool
  - confirm that the outcomes are imported properly without errors
  - clear out all learning outcomes
  - load /plugins/academic_benchmark_importer
  - enter an API v3 partner key
  - perform an import using the outcomes importer tool
  - confirm that the outcomes are imported properly without errors

Change-Id: I07fad9a4745e2dde35c67c2e862115d2a30d5957
Reviewed-on: https://gerrit.instructure.com/94489
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Cemal Aktas <caktas@instructure.com>
Tested-by: Jenkins
Product-Review: Jessica Hill <jhill@instructure.com>
2016-12-12 20:29:18 +00:00
Zach Wily 5a2087fea7 make activesupport-suspend_callbacks threadsafe
closes CNVS-33609

This used class instance variables to store callback suspension
information at the class level. Now that is stored in thread data
so that requests across threads don't stomp on each other.

test plan:
 * run canvas in threaded mode with lots of simultaneous requests
   and make sure they don't stomp on each other.
 * or, see spec

Change-Id: I62de11fba229192df54756f9b87dfb81c3772323
Reviewed-on: https://gerrit.instructure.com/88073
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Zach Wily <zach@instructure.com>
Tested-by: Jenkins
2016-12-09 23:31:41 +00:00
Shahbaz Javeed 95283746ea prevent grading if submission is due in closed grading period
closes CNVS-32229
closes CNVS-32232

test plan:
* Create a course with MGP enabled and two grading periods in
  the default term
* Create two assignments for this course, one in a closed GP and
  one in an open GP
* To test overrides, create the following as well:
  * For one of the students, make the open assignment due in the
    closed grading period
  * For another student, make the closed assignment due in the
    open grading period

* Ensure the following steps work for all assignment/student
  combos due in a closed grading period.

** CNVS-32229 **
* Login as a teacher
* Go to speedgrader for the assignment in the closed GP
* Notice that the grade input is locked down
* Right click on the locked-down input and select 'Inspect'
* Remove the 'ui-state-disabled' class and remove
  readonly="readonly" from the input field's HTML
* Notice the input is no longer grayed out and you can enter
  a grade
* Enter a grade and tab out of the input
* You should see an error message that says something went wrong
  and notice in the Network tab of your dev tools that the AJAX
  post failed, meaning the submission was not gradeable
* Refresh the page and notice the grade is not there.
* Verify it isn't there in Gradebook either

* Login as an admin
* Go to speedgrader for the assignment in the closed GP
* Notice that the grade input is *not* locked down
* Enter a grade and tab out of the input
* You should *not* see an error message that says something went
  wrong meaning the submission was graded successfully
* Refresh the page and notice the grade is there.
* Verify it is also present in Gradebook

** CNVS-32232 **
* Login as a teacher
* Go into a gradebook that has an assignment that is
  locked down because it is in a closed grading period
* Notice that the grade cells for the assignment are locked
  down (because the submissions fall in a closed grading period)
* Right-click on one of the locked-down cells and select 'Inspect'
* Remove the 'grayed-out' and 'cannot_edit_in_closed_grading_period'
  classes
* Notice the cell is no longer grayed out and you can enter a grade.
* Enter a grade
* Click on another cell.
* You should see an error message that says something went wrong
  and in the Network tab of your dev tools verify the AJAX post
  failed, meaning the submission was not gradeable
* Refresh the page and notice the grade is not there

* Login as an admin
* Login as a teacher
* Go into a gradebook that has an assignment that is
  in a closed grading period
* Enter a grade in a cell that should be due in a closed grading
  period
* Click on another cell
* You should *not* see an error message that says something went
  wrong meaning the submission was graded successfully
* Refresh the page and notice the grade is there.
* Verify it is also present in Gradebook

Change-Id: Ia80e4de626616309c5e9dffb78ed0f9671ad1076
Reviewed-on: https://gerrit.instructure.com/95687
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2016-12-08 21:01:07 +00:00
Dan Minkevitch 3af0d6b676 Update ruby_parser for Ruby 2.3
Change-Id: Ib3508783c65270fcfb14657f5ed092db8b71954c
Reviewed-on: https://gerrit.instructure.com/96971
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
2016-12-07 19:21:05 +00:00
Jon Jensen 09506c7212 spec: refactor selenium setup, refs SD-1852
* remove dead code
* don't pollute rspec methodspace with stuff internal to
  SeleniumDriverSetup
* get rid of global variables
* set up webserver and webdriver concurrently for a little speedup
* set up webdriver in a before :suite so that badness makes it bail early
  (instead of "failing" every example in the first group)

Change-Id: I19e38a19afab671f1a3fbdedc38f81758179faa2
Reviewed-on: https://gerrit.instructure.com/96550
Tested-by: Jenkins
Reviewed-by: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
2016-12-02 16:56:44 +00:00