Commit Graph

353 Commits

Author SHA1 Message Date
Jacob Burroughs 3b7130c161 Remove a lot of settings
[ignore-stage-results=Flakey Spec Catcher]

refs AE-551

Change-Id: If7b5191c20cfadc438cdc2bc8b489eb2806582fe
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334831
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2024-01-09 21:32:17 +00:00
Cody Cutrer 3e27ddeae0 bundle update rubocop-performance, rubocop-rails
[skip-stages=Flakey]
[skip-crystalball]

99% of fixes are Performance/StringIdentifierArgument, but one or
two instances of each of Performance/Count, Performance/MapCompact,
Rails/Pluck in safe navigation chains

Change-Id: Ibd2292fb9e7c1e9162068021073c3c0f4b0d65df
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335489
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-12-18 20:28:02 +00:00
Cody Cutrer c32d30f662 bundle update rubocop
[skip-stages=Flakey]
[skip-crystalball]

and apply corrections from new/updated cops:

 * Layout
 * Lint/AmbiguousRange
 * Lint/RedundantSafeNavigation
 * Style/HashEachMethods
 * Style/HashSyntax
 * Style/InverseMethods
 * Style/RedundantLineContinuation
 * Style/RedundantParentheses
 * Style/RedundantReturn
 * Style/SuperWithArgsParentheses
 * Style/SymbolProc

Change-Id: I787e46f5b1c89e0fedebd5452ba74567d66954c1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/334291
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Build-Review: Aaron Ogata <aogata@instructure.com>
Migration-Review: Aaron Ogata <aogata@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-12-06 14:25:02 +00:00
Jacob Burroughs 7dcc507d0a Rubocop for ruby 3.1
[skip-stages=Flakey]

Change-Id: I6abefdfa9fed6dd4525c8786e93efa548b3710f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319603
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
2023-06-06 16:44:26 +00:00
Cody Cutrer 502aa068da rubocop: Layout/Multiline*LineBreaks
[skip-stages=Flakey]

Change-Id: I24912809267088bc19a4082c49bc5f78ca7b76bb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/317302
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2023-05-01 19:31:42 +00:00
Jason L Perry f988fdd5cc Add "shadow" property to feature flags
This allows a feature flag to remain hidden, even after being enabled.
Only Site Admins will be able to see and opt in/out of shadow features.
The generated API documentation is not changed, as the shadow property
is not shown to non-Site Admins and is meant for internal use only.

This also enables the shadow property for the the `send_usage_metrics`
feature flag.

Closes FOO-3277

flag=none

Test Plan:
* Set `shadow: true` on a feature
* Verify it's shown in the UI if you're a site admin.
* Verify you can't see it as a root account admin, even when enabled.

Change-Id: I5d764c50014b1bb1d2064a22cb5f88022d752e3a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/309190
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jason Perry <jason.perry@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2023-02-09 22:03:35 +00:00
Aaron Ogata e3057b6479 remove enable_at / pending_enforcement from feature_flags
refs DE-1195

Change-Id: I7f72cc2040ace3a9ba47ef8853f6e4761c5254d4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/292120
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2022-05-19 01:30:59 +00:00
Cody Cutrer c2cba46851 RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation
[skip-stages=Flakey]

auto-corrected

Change-Id: I4a0145abfd50f126669b20f3deaeae8377bac24d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279535
Tested-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2021-11-25 14:03:06 +00:00
Cody Cutrer c302dd8bc1 RuboCop: Style/SymbolArray, Style/WordArray
[skip-stages=Flakey]

auto-corrected

Change-Id: Id187ed60c5590025e780d81b85b5212f51368f27
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279196
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
2021-11-23 14:30:08 +00:00
Cody Cutrer 60be8542df RuboCop: Security
[skip-stages=Flakey]

manual

this isn't a complete fix, but addresses many offenses

note in particular for feature flags the enable_at key
has changed from doing eval to a Date.parse.

Change-Id: I1381a107c238dc7102a815cc0b38df390299e59f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279085
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-20 21:09:11 +00:00
Cody Cutrer ff99d18138 RuboCop: Style/RedundantSelf
[skip-stages=Flakey]

auto-corrected

Change-Id: I5f26ad1f8210a74c2198b514235d5134dcd0dae1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279070
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-11-20 16:41:21 +00:00
Cody Cutrer 4d43809cae RuboCop: Style/PercentLiteralDelimiters
[skip-stages=Flakey]

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

Change-Id: I7f7afb11edd63415cde10866822dd2ac5ba0d8be
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278669
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
2021-11-18 23:05:50 +00:00
Cody Cutrer 5851dc6497 RuboCop: Style/EachWithObject
auto-corrected

Change-Id: I3f1a71b7b521b9cd7ddc37f4460d83855c93001f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278777
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-18 21:37:54 +00:00
Cody Cutrer fd6b50710c RuboCop: Style/CaseLikeIf
[skip-stages=Flakey]

auto-corrected

Change-Id: I1f6b8a5f58a97a3ef17004ba9bf7a0940632dd55
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278161
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-12 20:24:23 +00:00
Cody Cutrer ba1fdaf2a9 RuboCop: Style/ConditionalAssignment
auto-corrected

Change-Id: Ie87e4c1b6c05bc31ce13481a94c413dcf7b20278
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277964
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-11 17:39:06 +00:00
Cody Cutrer dbd8c46655 RuboCop: Lint
[skip-stages=Flakey]

auto corrections applied:
 * Lint/AmbiguousOperator
 * Lint/AmbiguousOperatorPrecedence
 * Lint/AmbiguousRegexpLiteral
 * Lint/DeprecatedClassMethods
 * Lint/DeprecatedOpenSSLConstant
 * Lint/NonDeterministicRequireOrder
 * Lint/ParenthesesAsGroupedExpression
 * Lint/RedundantRequireStatement
 * Lint/RedundantSafeNavigation
 * Lint/RedundantSplatExpansion
 * Lint/RedundantStringCoercion
 * Lint/RedundantWithIndex
 * Lint/SendWithMixinArgument
 * Lint/SymbolConversion

Change-Id: I222ec19978033544513bb99755994d109435abad
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274551
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-09-29 03:38:23 +00:00
Cody Cutrer c65d57737a RuboCop: Layout lib
Change-Id: I0655d9a9d750f2debd6378b03d8ddc1403ebc31b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274158
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-09-22 20:01:52 +00:00
Eric Saupe 5d51f78135 Separate feature flags into settings and features
fixes LS-2468
flag=feature_flag_filter

test plan:
 - Enable the Feature Flag Filter flag
 - Flags should be organized first by Feature Option or Settings
 - Subcategories should be the applies_to category
 - Search should still work and hide anything that has no results
 - Filter pills should still work and hide anything that has no results
 - With the feature flag filter off the feature flags page should be
unchanged

Change-Id: I5473df54f1cb473b88a889bdec50316689617130
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/271373
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Eric Saupe <eric.saupe@instructure.com>
2021-08-18 17:46:20 +00:00
Eric Saupe bd8a05e557 Add documentation for pending_enforcement
fixes LS-2415
flag=feature_flag_filter

Change-Id: I54eb1f2418dc4b5333c076196782bb7ffa50ebdc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/271097
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Eric Saupe <eric.saupe@instructure.com>
2021-08-10 17:53:15 +00:00
Eric Saupe 26010f52cc Add feature flag filtering and additional status
fixes LS-2389, LS-2401
flag=feature_flag_filter

test plan:
 - Go to the site admin feature flags
 - Verify the only filtering available is the search
 - Enable the Feature Flag Filters feature flag
 - Refresh the settings page and go to the feature flags tab
 - Verify there is an additional filtering field to filter by flag state

Change-Id: I27569f187310d7f74703ceb58e0e79ef3f217919
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/269638
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeff Largent <jeff.largent@instructure.com>
QA-Review: Jeff Largent <jeff.largent@instructure.com>
Product-Review: Erin Hallmark <erin@instructure.com>
2021-07-28 19:08:35 +00:00
Cody Cutrer 3025cdbe42 Revert "Revert "re-implement in_batches and friends""
This reverts commit 2c5c3584ff.

Reason for revert: I'm back in the office and can debug the problems

Change-Id: Ib469fff450a8d51d7ca59cb9d7fa29874d6b6e53
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/268386
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-07-06 19:54:25 +00:00
Jacob Burroughs 2c5c3584ff Revert "re-implement in_batches and friends"
This reverts commit 230033611d.

Reason for revert: COPY strategy is broken

Change-Id: I2cb4e5430c180caa1ceae6570d27a4c86a12d704
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/267654
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2021-07-02 16:52:51 +00:00
Cody Cutrer 230033611d re-implement in_batches and friends
* do everything as in_batches, returning a relation. properly
   super `load` param in each backend
 * plumb strategy through all entry points so it can be explicit
 * special case in_batches.delete_all with no explicit strategy to
   do a loop on a limited delete_all (avoids a dumb ORDER BY, or
   having to transfer ids back and forth)
 * since in_batches can easily be used with pluck now that a relation
   is returned, just make find_in_batches_with_temp_table a shim that
   does it the "nice" way

Change-Id: I716f188cdf676a725588f94a1036981ae798b09c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/266882
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-06-21 21:28:07 +00:00
Jacob Burroughs f4a5f2da33 Quad-state feature flags
Allow feature flags to be "allowed on".  Updates user facing langauge
to be enabled/disabled + "(always)" or "(default)", which is clearer
than allowed, especially with 4 states.  Also moves from backbone UI
to react UI rather than retrofitting the changes to the old UI. The
backbone ui can be killed in a separate PS.  The new UI is easier to
ctrl-f on and presents the flags in alphabetical order according to
the user's current locale.

This includes a somewhat gross workaround for a bug in InstUI <Menu>
which is why it goes in an explicit <Popover>

fixes FOO-835

test plan:
- Ensure 'New Feature Flags' feature is off
- Make sure feature flags work in all the expected ways at the siteadmin, account, and course level
- Turn on 'New Feature Flags'
- Make sure that you can still use the feature flag ui in natural ways at each level
- Try turning a feature flag "on" but unlocking it/leaving it unlocked
- Ensure it is inherited on but overridable

Change-Id: I520824cdf6e18b5a7da5ab5f552a7fd3140fd4bf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249917
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2020-12-15 23:18:33 +00:00
Cody Cutrer 06763dd519 add # frozen_string_literal: true for lib
Change-Id: I59b751cac52367a89e03f572477f0cf1d607b405
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251155
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-10-27 20:49:50 +00:00
Jeremy Stanley a0d93f12a3 make feature flag validation a bit more helpful
instead of saying a feature "is not valid in context",
say "does not exist" or "does not apply to context"

test plan: you should get distinct validation errors
when trying to set a flag for a nonexistent feature
vs. trying to set a flag in an non-applicable context
(i.e., setting an account feature flag in a course)

flag = none

Change-Id: Idf88c4050d0e8bce760f36c7262b0986e97739fc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/238466
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
2020-05-28 17:13:28 +00:00
Jeremy Stanley 118ce03fa7 clean up obsolete feature flags
test plan:
 - do not apply this PS yet...
 - check your database for feature flags associated with
   no-longer-existing features, and create some if there aren't
   any that are older than 60 days (either by doing raw db inserts
   or updating existing flags via update_all to circumvent validators)
 - apply this patch set and restart the server and jobs
 - in a console, find the weekly periodic cleanup job
   and update it to run immediately

    job = Delayed::Job.where(tag:
      "periodic: Feature.remove_obsolete_flags").take
    job.run_at = Time.now
    job.save!

 - the obsolete feature flags should be removed
 - do the find again and you should see the run_at set for
   next Sunday at 08:00 UTC

flag=none
closes LA-470

Change-Id: I93f5e91fc5e4a4794e49322185beeb89903ef5c5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/224922
Reviewed-by: James Williams <jamesw@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2020-02-07 15:13:24 +00:00
Rex Fleischer 71df8c6e19 add SiteAdmin as a valid level for feature applies_to
fixes: ADMIN-2843

flag=none

Test-Plan:
- ensure the test ff can be toggled
- ensure the test ff can only show in site admin

Change-Id: I354f3a296c393b2e73c0487bff6fc10247f0fe9e
Reviewed-on: https://gerrit.instructure.com/206698
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Rex Fleischer <rfleischer@instructure.com>
2019-08-28 14:54:43 +00:00
Jeremy Stanley 4e928c7757 per-environment overrides for feature definitions
this is a more flexible replacement for `development` and
`hidden_in_prod` - any feature registration option can be
customized based on the environment

test plan:
 - this feature replaces "hidden_in_prod" and "development"
   and these changes are covered in specs
 - experiment with other customizations to feature
   definitions in the YAML

closes ADMIN-2760

Change-Id: Ie2c76f4b7da2ccc43bb244000dc0a490d78de9de
Reviewed-on: https://gerrit.instructure.com/202933
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2019-08-02 21:59:44 +00:00
Rex Fleischer 04ca6ab6dd separate feature flag definitions from code
fixes: ADMIN-2539

this moves and loads feature flags from yaml files. there should be
absolutely no changes to functionality of anything in the system.

Test-Plan:
change things with feature flags and different feature options, and make
sure they work the same way as before.

Change-Id: Id096e6c9975f86224c1ee07304cef79a0d4c7755
Reviewed-on: https://gerrit.instructure.com/187804
Reviewed-by: Carl Kibler <ckibler@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Rex Fleischer <rfleischer@instructure.com>
2019-04-18 15:56:54 +00:00
Han Yan be41ada218 remove first_or_create from quizzes_next feature flag
closes QUIZ-6326

test plan:
- with the patch, find local account
- make sure quizzes_next FF works in account and course
- remove account.settings[:provision], the FF should be removed from
  account and course settings in Canvas UI.

Change-Id: I0f838775494c0c56dc826fd190483d006d3f6823
Reviewed-on: https://gerrit.instructure.com/189078
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2019-04-12 15:25:26 +00:00
Ryan Shaw 4f97c6df56 remove all the legacy RCE code
closes: CORE-2588 CORE-2591

This completely removes the legacy RCE codepath. So you will need to
Have an https://github.com/instructure/canvas-rce-api running to use
sidebar in any Rich Content Editors.

Test plan:
* smoke test to make sure that the editor and sidebar work as it did
  When you had the RCS feature flag on.
* there should not be any more settings or feature flags around turning
  on the RCS service

Change-Id: I1c3e7f5a45eed5e010d8e425ae561e45f739fd3a
Reviewed-on: https://gerrit.instructure.com/186525
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
2019-04-04 18:19:12 +00:00
Clay Diffrient 55316bdda3 Create feature flag for RCE development
closes CORE-2590

Test Plan:
  - Enable/allow "RCE Enhancements" at the Account level
  - Go to an RCE instance
  - The JS console should log out a message saying
    `Using enhanced RCE`.
  - When the flag is off this message should not appear.

Change-Id: Iae44086ee36351201e3953ddeaa3dba24992c682
Reviewed-on: https://gerrit.instructure.com/187398
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2019-03-28 20:22:28 +00:00
Clay Diffrient dd5af1de5d Switch CSP flag to allow test environments to use it
closes CORE-2582

Test Plan:
  - Feature shows up in beta/test/etc.

Change-Id: I6b4bac94c9470622398af8a211c59138be7bfd5e
Reviewed-on: https://gerrit.instructure.com/186091
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
2019-03-20 16:17:41 +00:00
Erin Hallmark 54f2d4473a Remove beta label from feature options
This commit also removes excess wording from the Usage
Rights feature option, which included verbiage about
a feature option that is no longer available, and removes
beta labels from api documentation.

REFS: ADMIN-2497

Test plan:
- beta labels do not display next to the feature options
included in the ticket
- specs pass without error

Change-Id: Id3830dae04a3de72dbc66934c72757f93be9b67b
Reviewed-on: https://gerrit.instructure.com/184920
Tested-by: Jenkins
Reviewed-by: Mysti Lilla <mysti@instructure.com>
QA-Review: Mysti Lilla <mysti@instructure.com>
Product-Review: Erin Hallmark <erin@instructure.com>
2019-03-14 01:35:25 +00:00
James Williams e846bd8d70 raise a useful error on invalid feature config
Change-Id: If080fd04d47e6070e4fdfabb4d3e2ab7f03c7893
Reviewed-on: https://gerrit.instructure.com/184982
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2019-03-13 12:00:01 +00:00
Marc Phillips 5f40773897 Update 1.3 FF
Need to hide in prod 1.3 ff until we are
ready to launch.

closes PLAT-4267

Test Plan:
 - n/a

Change-Id: I7e9087ef3f4d232a08ff8ebe0ceb57b0b839f3e7
Reviewed-on: https://gerrit.instructure.com/184118
Tested-by: Jenkins
Reviewed-by: Xander Moffatt <xmoffatt@instructure.com>
QA-Review: Marc Phillips <mphillips@instructure.com>
Product-Review: Marc Phillips <mphillips@instructure.com>
2019-03-07 16:10:52 +00:00
Derek Bender 248734ffd1 Remove beta tag from New Gradebook
Closes: GRADE-2053

Test Plan: `Beta` tag is no longer present for New Gradebook Feature

Change-Id: I95598d0ad70739f329c3b061fe970542068c800c
Reviewed-on: https://gerrit.instructure.com/183844
Reviewed-by: Keith Garner <kgarner@instructure.com>
Tested-by: Jenkins
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2019-03-05 17:48:50 +00:00
Gary Mei 36740a81f8 remove requirement for new gradebook feature flag
change_course_state permission is no longer required for users to
enable the New Gradebook. Instead, they must have either a teacher
enrollment or be an admin.

closes GRADE-764

Test Plan
- Disable the New Gradebook at the course level, if it was already
  enabled. This may need to be done via the console.
  `Course.find(course_id).disable_feature!(:new_gradebook)`
- Disable the "Course State - manage" permission for the teacher
  role.
- As a teacher, navigate to the course's feature flag settings tab,
  and verify that you are able to successfully enable New Gradebook.

Change-Id: Icc9f6a25d4d60d6ca1f03bfee4336211170b6ba4
Reviewed-on: https://gerrit.instructure.com/182529
Tested-by: Jenkins
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2019-02-28 14:31:24 +00:00
Marc Phillips 95c9ddc4f1 Remove development only flag from LTI 1.3
closes PLAT-4186

Change-Id: I6404c8b8e03172e5e7bc8209bf6f0467da57cf0c
Reviewed-on: https://gerrit.instructure.com/182338
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: Weston Dransfield <wdransfield@instructure.com>
Product-Review: Marc Phillips <mphillips@instructure.com>
2019-02-22 17:32:26 +00:00
Caleb Guanzon 4bfb768b25 remove lor_for_user feature flag
fixes CM-734

test plan:
- commons should still work

Change-Id: Ic656e5a619439656f5cb89a688bb9f2b405433b0
Reviewed-on: https://gerrit.instructure.com/179928
Tested-by: Jenkins
Reviewed-by: KC Naegle <knaegle@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
2019-02-08 23:35:46 +00:00
Derek Bender 57487c244c make grade overrides dependent on new gradebook
closes: GRADE-1964

Test Plan
=========
This patchset will require careful setup, since the environment can be
considered "tainted" if you've ever had New Gradebook enabled and created a
late policy or also had enabled the Final Grade Override Feature Flag.
For the sake of a "clean slate" I recommend creating a fresh canvas
install or creating a new shard and only trying these steps out there.
Due to the nature of this "one-way" feature, it's difficult to undo
certain steps.

One way to force a reset is to do so via the rails console like so:

    account = Account.find(account_id)
    course = account.courses.find(course_id)
    account.feature_flags.where(
      context: [account, course],
      feature: [:new_gradebook, :final_grades_override]
    ).update_all(state: :off)

If the following instructions say "Reset Flags" this code snippet should
be ran before proceeding. It's assumed that other backwards incompatible
features are not introduced during this process (e.g. late policies).

Base Cases
----------
* Given a Course in an Account
* When the Account New Gradebook is "Off"
* Then the Account New Gradebook can be changed to "Allow"
* Then the Account New Gradebook can be changed to "On"
* Then the Account Final Grade Override is locked to "Off"
* Then the Course New Gradebook is locked to "Off"
* Then the Course Final Grade Override is locked to "Off"

* Given the Account New Gradebook is "Allow" and the page is reloaded
* When the Account New Gradebook is changed to "On"
* Then the flag successfully changes

* Given the Account New Gradebook is "Allow" and the page is reloaded
* When the Account New Gradebook is changed to "Off"
* Then the flag successfully changes

* Given the Account New Gradebook is "On" and the page is reloaded
* When the Account New Gradebook is changed to "Allow"
* Then the flag successfully changes

* Given the Account New Gradebook is "On" and the page is reloaded
* When the Account New Gradebook is changed to "Off"
* Then the flag successfully changes

* Given the Account New Gradebook is "Allow"
* When the Course New Gradebook is set to "On"
* Then the Account New Gradebook cannot be changed to "Off"

* When the Account New Gradebook is "On"
* Then the Course New Gradebook is locked to "On"

New Behavior
------------
* When the Account New Gradebook is "Allow" and the page is reloaded
* Then the Account Final Grade Override is set to "Off" and can be
  set to "Allow" and "On" is not available
* Then the Course New Gradebook is "Off" and can be set to "On"
* Then the Course Final Grade Override is locked to "Off"
* Reset Flags

* When the Account New Gradebook and Final Grade Override flags are
  "Allow" (reload necessary to change second flag)
* Then the Course New Gradebook is "Off" and can be set to "On"
* Then the Course Final Grade Override is locked to "Off"
* Reset Flags

* Given the Account New Gradebook and Final Grade Override flags are
  "Allow" (reload necessary to change second flag)
* When the Course New Gradebook is "On" and the page is reloaded
* Then the Course Final Grade Override is "Off" and can be set to "On"
* Reset Flags

* Given the Account New Gradebook and Final Grade Override flags are
  "Allow" (reload necessary to change second flag)
* Given the Course New Gradebook is "On" and the page is reloaded
* When the Course Final Grade Override is changed to "On" and the
  page is reloaded
* Then the Course Final Grade Override is locked "On"
* Then the Account New Gradebook cannot be changed to "Off"
* Then the Account Final Grade Override cannot be changed to "Off"
* Reset Flags

* Given the Account New Gradebook is "On" and the page is reloaded
* Given the Account Final Grade Override is "Allow"
* When the Course Final Grade Override is changed to "On" and the
  page is reloaded
* Then the Course Final Grade Override is locked "On"
* Then the Account New Gradebook cannot be changed to "Off"
* Then the Account Final Grade Override cannot be changed to "Off"
* Reset Flags

* Given the Account New Gradebook is "On" and the page is reloaded
* When the Account Final Grade Override is "On" and the page is reloaded
* Then both flags are locked to "On" and cannot be changed
* Then both Course flags are locked to "On" and cannot be changed
* Rest Flags

Change-Id: I40bc544914a7f3f8b3753c10615dc789c5aeffc2
Reviewed-on: https://gerrit.instructure.com/180049
Reviewed-by: Keith Garner <kgarner@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Tested-by: Jenkins
Product-Review: Keith Garner <kgarner@instructure.com>
2019-02-06 20:27:55 +00:00
Adrian Packel 542e5d39d6 Add post policy feature flag
closes GRADE-1944

Test plan:
- Make sure "Post Policies" appears as a course feature flag
  (it doesn't do anything yet)

Change-Id: Icec04b5ab60a2500c8bd6bcc0305ac7374758b10
Reviewed-on: https://gerrit.instructure.com/179408
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2019-01-30 18:40:02 +00:00
Derek Bender e49dd8db64 release final grade override
closes: GRADE-1965

test plan:
 - This feature cannot be reversed
 - New Gradebook cannot be disabled if final grade override is either
 allowed or on

Change-Id: I398b6e0a370d2ab507cad088a7947d35be989037
Reviewed-on: https://gerrit.instructure.com/179263
Reviewed-by: Keith Garner <kgarner@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
Tested-by: Jenkins
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Keith Garner <kgarner@instructure.com>
2019-01-28 17:27:10 +00:00
Han Yan 956504e552 implement clean submission history for Quizzes.Next
closes QUIZ-5514

test plan:
The patch should be tested with /c/quiz_lti/+/170099/
QA live event path:
  These containers and their dependencies should be up running:
  - Canvas: web
  - quiz-lti: ui, api, kinesis2sqs-quizzes and sqs2quizlti
  - quiz-api: web, work (you can kill elasticsearch and events_consumer to
    save cpu and memory)

  test auto grading:
  create one Q.N quiz, with a couple questions and multiple attempts
  enabled (default highest), but without essay questions.
  1) As a student, take the quiz 3 times, there should be 3 history items
  in speedgrader history list

  test manual grading:
  create one Q.N quiz, with a number of questions, with at least 1 essay
  question and multiple attempts enabled.
  As a student, take the quiz 3 times
  1) make sure speedgrader history list has 3 records after 3 attempts are
  taken
  2) test manual grading on previous attempts in different order
  - manually grade the attempts in different order (1st attempt: 10%,
    3rd attempt: 80%, and 2nd: 50%)
  - make sure speedgrader has 3 history items, grades are corresponding to
    (10%, 50%, 80%), and in this order
  3) manual grading a same attempt won't add additional history items
  - manually change grade for the 1st attempt from 10% to 60%
  - make sure speedgrader still has 3 history items, grades are
    corresponding to (60%, 60%, 80%)
  - then manually change grade for the 1st attempt from 60% to 90%
  - make sure speedgrader still has 3 history items, grades in the list
    are (90%, 90%, 90%) and in the exact order

  test the similar steps for score_to_keep: average and latest

QA webhook path:
  These containers and their dependencies should be up running:
  - Canvas: web
  - quiz-lti: ui, api
  - quiz-api: web, work (you can kill elasticsearch and events_consumer
    to save cpu and memory)

  repeat the test cases for live event path.

Change-Id: I2e7ff4ea669ce2b84a95aa4f3ddf4a6f6c2a8002
Reviewed-on: https://gerrit.instructure.com/171695
Reviewed-by: Stephen Kacsmark <skacsmark@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
Tested-by: Jenkins
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Kevin Dougherty III <jdougherty@instructure.com>
2018-11-28 15:41:17 +00:00
Derek Bender cad9bb0da1 change description of AIA flag
closes: GRADE-1811

test plan:
 - no typos

Change-Id: I5f3e89b8ea23af7653a408a9484bfdce4088d202
Reviewed-on: https://gerrit.instructure.com/173185
Tested-by: Jenkins
Reviewed-by: Gary Mei <gmei@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-11-27 16:41:23 +00:00
James Williams 77d6d56b5e raise error on missing feature
because clay can't spell

also get rid of that feature flag enabling on
every user in specs

also handle development features disabled in prod

Change-Id: Ifd6c590011e6963e7acea90f8f58bd2372123d26
Reviewed-on: https://gerrit.instructure.com/171781
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-11-26 16:22:32 +00:00
Keith T. Garner d638923967 fix visibility and rename final_grade_override feature flag
closes GRADE-1852

Change-Id: I8c0448d4eb24aa4ba14d42a4ccc9ff4b396bbf6f
Reviewed-on: https://gerrit.instructure.com/173084
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: KC Naegle <knaegle@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Adrian Packel <apackel@instructure.com>
2018-11-20 22:25:08 +00:00
Steven Burnett 197049ff48 remove development feature flag for HTML5
Test Plan:
- check the HTML5 integrate arc FF
- notice its not in development

Change-Id: I6abecea070cd5bdcb17e816ece4652fceb811de5
Reviewed-on: https://gerrit.instructure.com/173082
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
2018-11-20 22:14:45 +00:00
Jeremy Stanley 45f01ddaf5 remove master_courses feature flag
closes ADMIN-1321

Change-Id: If8202e2ad743a55282808fe9134a9e9e6d22ea4c
Reviewed-on: https://gerrit.instructure.com/171778
Tested-by: Jenkins
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2018-11-19 16:27:40 +00:00