canvas-lms/app
Jackson Howe 0a60fff133 Allow observers in appointment groups
When the observer_appointment_groups feature flag is enabled, add
a checkbox to account settings. This setting is inheritable but
not lockable (lower accounts inherit but can change a parent's
setting). When enabled, it will add a checkbox to the appointment
group creation workflow. If this is selected, observers in the course
can reserve an appointment slot. If the appointment group belongs to
multiple contexts, all the contexts' accounts must allow observers
to reserve appointment groups. If an account later disables the
setting, existing appointment groups that support observer reservation
are unaffected, but teachers cannot create new appointment groups for
observers. However, if an appointment group that supports observer
sign-up is amended to include a context that does not allow observer
sign-up, then observers will no longer be able to make reservations
on that group (existing reservations are unaffected).

closes LF-588
flag = observer_appointment_groups
[fsc-max-nodes=30]
[fsc-timeout=60]

Test plan:
With the observer_appointment_groups flag disabled:
 - Before enabling the feature flag, validate that the existing
   appointment group creation and reservation workflow still works
 - Expect to not see the "Allow observers to sign-up..." setting in
   account settings
 - Expect to not see the "Allow observers to sign-up" checkbox when
   creating an appointment group

With the observer_appointment_groups flag enabled:
 - Go to root account settings
 - Enable the "Allow observers to sign-up..." setting and save
 - Expect the setting to be persisted
 - Go to a subaccount's settings
 - Expect the setting to be enabled
 - Uncheck the setting and save

 - Go to the calendar as a teacher
 - Create an appointment group
 - When selecting only contexts that have the setting enabled,
   expect to see the "Allow observers to sign-up" checkbox
 - When selecting any context that doesn't have the setting enabled,
   or if group sign-up is enabled, expect to not see the observer
   checkbox
 - Save the appointment group
 - Click the appointment group in the calendar and select "Group
   Details"
 - Expect that changing contexts here affects the observer sign-up
   checkbox in the same way as above

 - Go to the calendar as an observer
 - If the observer is enrolled in a course with an appointment
   group with observer sign-up enabled, expect for the observer
   to see the "Find Appointment" button
 - Expect for the observer to be able to reserve only appointment
   groups with observer sign-up enabled

 - Disable the account setting
 - Expect observers to be able to sign up for existing appointment
   groups with observer sign-up enabled
 - Expect teachers to not see the observer sign-up checkbox anymore

Change-Id: I26c9e2f4f9139558be477eabc3a1357ec97b3738
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/335115
Reviewed-by: Mysti Lilla <mysti@instructure.com>
Reviewed-by: Juan Chavez <juan.chavez@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Juan Chavez <juan.chavez@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2023-12-21 18:40:06 +00:00
..
controllers Allow observers in appointment groups 2023-12-21 18:40:06 +00:00
graphql Refactor shared discussion create/update code activity 2023-12-19 16:17:05 +00:00
helpers bundle update rubocop-performance, rubocop-rails 2023-12-18 20:28:02 +00:00
messages Introduce the concept of impaired SMS regions 2023-08-25 15:52:32 +00:00
middleware bundle update rubocop 2023-12-06 14:25:02 +00:00
models Allow observers in appointment groups 2023-12-21 18:40:06 +00:00
observers Add live event rubric_assesed 2023-11-16 21:01:40 +00:00
presenters bundle update rubocop-performance, rubocop-rails 2023-12-18 20:28:02 +00:00
serializers bundle update rubocop-performance, rubocop-rails 2023-12-18 20:28:02 +00:00
services log all LTI launches 2023-12-20 18:40:09 +00:00
stylesheets modify A2 assignment page for ICE initiative 2023-12-14 15:37:42 +00:00
views Allow observers in appointment groups 2023-12-21 18:40:06 +00:00