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>
closes GRADE-1472
test plan:
- Ensure New Gradebook can be set to On at account level
Change-Id: I42fbaf135bc171bea6fcce7e8bfddb9eb177c221
Reviewed-on: https://gerrit.instructure.com/160718
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Gary Mei <gmei@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Kuang <rkuang@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
Given certain circumstances the new gradebook would be in a locked off
state. The original intention was to leave it locked on once backwards
incompatible features were used.
fixes GRADE-1419
test plan:
- Have a course with new gradebook turned on
- Use one of the backwards incompatible features such as manually
marking late status
- In the rails console force the new gradebook feature flag off with
a command line such as:
FeatureFlag.where(context_id: <course id>, context_type: "Course",
feature: "new_gradebook").update(state: 'off')
- Visit the course settings feature flag editors and ensure that New
Gradebook has a toggle in the office position not the locked "Off"
- Turn on the new gradebook. Reload the feature flag page, note that
its now in a locked on position.
Change-Id: Iba2dc617ddeaf33888d0d97cf5e1f91c1cb0ec19
Reviewed-on: https://gerrit.instructure.com/158548
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
closes GRADE-767
test plan:
* Create a sub-account 2 levels deep
* Create a course for this sub-account
* Go to the root account and look for the "New Gradebook" feature flag
* Verify visually that you're allowed to turn the flag off
* Enable the "New Gradebook" feature flag on the course
* Go to the root account and look for the "New Gradebook" feature flag
* Verify visually that you're no longer allowed to turn the flag off
* Disable the "New Gradebook" feature flag on the course
* Enable the "New Gradebook" feature flag on the sub-account
* Go to the root account and look for the "New Gradebook" feature flag
* Verify visually that you're no longer allowed to turn the flag off
* Disable the "New Gradebook" feature flag on the sub-account
* Go to the root account and look for the "New Gradebook" feature flag
* Verify visually that you're allowed to turn the flag off
Change-Id: Ifc7444ff114d8fb3b297ea20f5e2891a450497c5
Reviewed-on: https://gerrit.instructure.com/142011
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
Product-Review: Pert Eilers <peilers@instructure.com>
This patchset updates the new gradebook feature flag to 1) allow
teachers to enable the new gradebook for a course (if the admin has
set new gradebook to allow) and 2) disable the ability to turn off the
new gradebook for a course if backwards incompatible features are
used. For now, the features that would stop a move backwards are
enabled late or missing policies, or any submission that had a
late_policy_status manually set.
closes GRADE-691
test plan:
- As an admin, in the account settings set new gradebook to allow
- Create a course with a teacher, a ta, a student, and an assignment
- As a ta, go the course settings and confirm you can't configure new
gradebook
- Perform the following actions as a teacher unless otherwise
specified
- go to the course settings and enable the new gradebook
- in the gradebook, configure a late policy
- go the course settings and confirm you can't turn off new
gradebook
- as an admin, go to the course settings and confirm you can't
turn off new gradebook
- in the gradebook, turn off the late policy and configure a
missing policy
- go the course settings and confirm you can't turn off new
gradebook
- as an admin, go the course settings and confirm you can't turn
off new gradebook
- in the gradebook, turn off the missing policy
- go the course settings and confirm you can turn off new
gradebook (but leave it enabled)
- as an admin, go the course settings and confirm you can turn off
new gradebook (but leave it enabled)
- go into the gradebook, set a missing or late status on the
assignment for the student
- go the course settings and confirm you can't turn off new
gradebook
- as an admin, go the course settings and confirm you can't turn
off new gradebook
Change-Id: Ibfde1398c60254de1fd2b9697e8155fabbb1b781
Reviewed-on: https://gerrit.instructure.com/134521
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
fixes CNVS-36920
fixes CNVS-36919
Rename the :gradezilla feature flag to :new_gradebook, with the
following attributes
display_name: t('New Gradebook')
No longer display the "Gradezilla" code name in the UI or URLs
Many internal code objects still keep gradezilla names for now
applies_to: 'Course'
The feature must be enabled at a course level to be used
state: 'hidden'
The feature flag is hidden and cannot be enabled until an
Instructure site admin allows it
root_opt_in: false
Root account admins cannot turn the feature ON at once for all
the courses they control
beta: true
The "beta: label is displayed next to the feature toggle element
development: true
The feature cannot be enabled in production. Beta is allowed
admin_only: true
Only site, account or subaccount admins can enable the
feature for a course. Teachers cannot enable the feature.
The admin_only attribute is new, added here as an experiment.
It is false by default, and the code supporting it is kept
as localized as possible in case it is later decided this
functionality is not desired in Canvas
version query parameter is now development-only
Test Plan:
1. Before enabling "New Gradebook" feature as site admin
a. non-INST admin does not see the flag at account level
b. teacher does not see the feature flag at course level
c. site admin sees it at account level, but can only
choose "Off" or "Allow"
d. site admin does not see the flag at course level
2. After enabling feature as site admin at account level
a. non-INST admin can modify the flag at account level
to "Off" or "Allow" but not to "On"
b. non-INST admin can modify the flag at course level
to "Off" or "On"
c. teacher can see but not modify the flag at course level
3. After enabling feature as non-INST admin at course level
a. "Gradezilla" is replaced with "New Gradebook"
in both standard and individual views of the UI
b. teacher sees "New Gradebook" feature as "On"
4. As Developer
a. Use the version query parameter to override feature flag
b. Use the version query parameter to override user preference
Change-Id: I20a03832544a8e60d3b9b726694d3e88f01381fb
Reviewed-on: https://gerrit.instructure.com/112457
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
closes FALCOR-70
closes FALCOR-71
Test Plan:
- Create a new user
- Add them to a course
- They should have the tutorial option showing as on in
user settings
- Tutorial trays should show from the right side
- Clicking end tutorial in the tray should open up a
dialog to confirm
- Cancelling should do nothing but close the dialog
- Clicking okay on the modal should trigger the page to
refresh
- Tutorial options should be gone and the feature flag
should be turned off in user settings
Change-Id: I0b287be7278059a24df07c75436def8fb53b3b17
Reviewed-on: https://gerrit.instructure.com/103568
Tested-by: Jenkins
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Christi Wruck
Closes CYOE-86
Test Plan:
* Enable the "Conditional Release" feature
in Canvas for a new account & course
* Verify in CYOE that a request has been made
and a corresponding Account model has been
created for the root account of the feature
enabled course.
Change-Id: Ide8ed35f664ddafbf61e26cda0d0233bbf4f3781
Reviewed-on: https://gerrit.instructure.com/77455
Tested-by: Jenkins
Reviewed-by: Christian Prescott <cprescott@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
fixes a problem where running feature_spec will break
any future specs in the same run that depend on features
Change-Id: Ia81c8f0ff89a475b84290bff0ed996ddcd3aaeea
Reviewed-on: https://gerrit.instructure.com/43731
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
this is 'hidden' in production environments and 'allowed' elsewhere
test plan:
- The 'better_file_browsing' feature should be hidden in production
environments (such as a portal with config/testcluster.yml
removed).
fixes CNVS-16352
Change-Id: Ic8eefcb53122d27fbf9094cbc010efdbd40e2a59
Reviewed-on: https://gerrit.instructure.com/43098
Reviewed-by: Jon Willesen <jonw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
also remove the 'development' tag on existing features, other
than those that manually made themselves invisible in prod.
we'll let 'beta' suffice for the purpose of informing the user
that a feature is not fully baked.
test plan:
- Deploy normally to your QA portal. The 'quiz stats'
feature flag should be available and operational.
- Remove the testcluster.yml file from your config/
directory (or move / back it up to a safe place)
- Restart your QA portal.
- The quiz stats feature flag should not be available
or visible.
fixes CNVS-15724
Change-Id: I9e4e46f8cc4f54ac62f5226dbca09ae4885c93a9
Reviewed-on: https://gerrit.instructure.com/41551
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
the "Allowed" state means a feature is off in an account, but
sub-accounts or courses below it are allowed to enable it.
the 'allowed' state does not, however, make a lot of sense for
features that apply to RootAccount. since the feature cannot
be controlled in sub-accounts or courses, the 'allowed' state
is equivalent to 'off' here.
so to make this less confusing, remove the "allowed" state
for RootAccount features.
(specifically, lock the transition in the API, and make the
UI hide buttons for locked transitions that don't have
messages to display when the user tries to perform them)
test plan:
- set the Use New Styles feature to "Allowed" in Site Admin
account settings
- in a root account settings page, ensure the 'Allowed'
option is not selectable for this feature
- ensure that the API reports the new_styles feature is "off"
and its "allowed" transition is locked
i.e., GET /api/v1/accounts/1/features/flags/new_styles
includes state: 'off' and transitions: {allowed: {locked: true}}
- ensure the API refuses to set the new_styles feature to "allowed"
in the root account
i.e., PUT /api/v1/accounts/1/features/flags/new_styles?state=allowed
should return a 403 error and not change the state
- regression test: in a sub-account, ensure the 'Use New Styles'
feature does not appear
- regression test: verify that when a (non-site-admin)
root account admin attempts to disable Draft State in
an account, the Off button is still there, and a message appears
when you click it, and the feature remains enabled
fixes CNVS-13220
Change-Id: I4d41076c10696b02d0c482a778d2555714487f17
Reviewed-on: https://gerrit.instructure.com/35473
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
test plan:
0. render and consult the API documentation on feature flags,
specifically looking at the 'transitions' member that
was added to FeatureFlag
1. enable draft state in a course
2. use the API to show the draft state feature flag for the
course (GET /courses/X/features/flags/draft_state)
- verify that transitions['off'] contains a warning
message about what happens to unpublished data
3. allow draft state in an account
4. as a non-site-admin user, use the API to show the
draft state feature flag for the account
(GET /accounts/X/features/flags/draft_state)
- verify that transitions['on']['locked'] is false
- verify that transitions['off']['locked'] is true
and is accompanied by an explanatory message
5. attempt to turn the feature off via the API
(still as a non-site-admin user)
- you should get a 403 Forbidden error
6. repeat step 4 as a site-admin user
- neither transition should be 'locked', but the
message should still accompany 'off'
7. repeat step 5 as a site-admin user
- it should succeed
fixes CNVS-10355
fixes CNVS-10356
Change-Id: I36b0d387ad09f98cdf3d4de9e4e351bfd6aa8c58
Reviewed-on: https://gerrit.instructure.com/28541
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
test plan:
- install the test_features plugin (since no real features exist yet)
- render and consult the feature flags documentation
- have a test environment with a root account,
sub-account, course in sub-account, and user
- Use the "list features" endpoint as a root account admin
(with no site admin privileges), on the root account context, and
confirm that hidden features do not show up
- Use the "list features" endpoint as a site admin user,
on the root account context, and confirm that hidden features
show up
- Use the "list features" endpoint on the site admin account
and confirm the hidden features show up
- Use the "set feature flag" endpoint on a hidden feature on site
admin and ensure the feature becomes visible in all root accounts
- Use the "set feature flag endpoint" on a hidden feature on a
single root account, and ensure the feature becomes visible to
that root account and not others
- Confirm that root_opt_in features appear "Off" by default
in root accounts, after being "Allowed" in code or site admin
- Confirm a feature flag that is set to "on" or "off" (vs. "allowed")
cannot be overridden in a lower context (and the API returns
locked=true for them)
- Confirm that setting locking_account_id requires admin rights
in the locking account
- Confirm that a feature flag with locking_account_id cannot be
changed without admin rights in the locking account (e.g.,
set a feature flag on a course, locked with the root account's id,
and make sure a teacher who is not an account admin can't change it)
- Confirm feature flags can be deleted with the "remove feature flag"
endpoint (and they are only deleted where they are defined, not
when called on an object that inherits a flag)
Change-Id: I3e12e23b4454889b6e8b263f1315e82d8f2ada52
Reviewed-on: https://gerrit.instructure.com/25502
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>