canvas-lms/app/views/courses
Jackson Howe 498aaa11db Support students in CreateCourseModal
Since this modal will be used everywhere in Canvas, support
students and users with no enrollments creating courses (when enabled
at the root account). Students will see all accounts where they have
enrollments; users with no enrollments will only see the manually-
created courses subaccount. Don't show homeroom sync options to
students/users with no enrollments. Expose the manually-created
courses subaccount ID/basic info through a new API.

flag = create_course_subaccount_picker
closes LS-2678

Test plan:
 - Enable root account FF: create_course_subaccount_picker
 - In root account settings, allow techers, students, and users with
   no enrollments to create courses
 - Login to k5 dashboard as an admin and click the + (New Subject)
   button
 - Expect to see a manageable_courses network request and a dropdown
   to select an account (along with the checkbox to sync homerooms)
 - Login and open the modal as a teacher
 - Expect to see an enrollments network request and a dropdown with
   all the accounts where the user has a teacher enrollment (and the
   homeroom sync checkbox)
 - Login and open the modal as a student
 - Expect another enrollments network request and a dropdown with all
   their accounts (if there's more than one)
 - Expect to not see the sync options
 - Login as a user with no enrollments
 - Expect a network request to the manually_created_courses_account api
 - Expect to not see a dropdown with accounts or the sync options
 - Disable 'X can create courses' at the root account and expect the
   associated users to no longer see the create course modal at all
 - With FF disabled, expect course creation to work as before

Change-Id: I0e7d49628ce6395fd366037a3134133084fe6275
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274986
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
2021-10-06 16:59:05 +00:00
..
_course_show_secondary.html.erb Allow self-enrollment in k5 courses 2021-09-15 19:04:50 +00:00
_group_list.html.erb da licença part 55 2017-04-28 19:42:23 +00:00
_link_enrollment.html.erb da licença part 55 2017-04-28 19:42:23 +00:00
_master_course_restrictions.html.erb Update blueprint icons and button behavior 2017-06-04 15:14:56 +00:00
_publish_buttons.erb Fix padding on K-5 publish buttons so they don't wrap 2021-05-14 17:46:39 +00:00
_recent_event.html.erb minor performance improvements for recent feedback sidebar 2018-09-06 12:10:50 +00:00
_recent_feedback.html.erb redirect to a2 student view for links in dashboard 2021-07-13 20:06:21 +00:00
_settings_sidebar.html.erb add frontend permission changes for manage courses granulars 2021-04-30 21:29:16 +00:00
_sidebar_periods_weighting.html.erb da licença part 55 2017-04-28 19:42:23 +00:00
_sidebar_weighting.html.erb da licença part 55 2017-04-28 19:42:23 +00:00
_to_do_list.html.erb Open SpeedGrader links in To Do list in a new tab 2021-09-01 20:09:12 +00:00
confirm_action.html.erb Support translated community links 2021-08-04 21:22:12 +00:00
copy.html.erb add frontend permission changes for manage courses granulars 2021-04-30 21:29:16 +00:00
description.html.erb don't show "join this course" link if disallowed on account 2017-08-14 20:30:49 +00:00
index.html.erb Use k5 CreateCourseModal everywhere 2021-09-29 22:36:32 +00:00
link_validator.html.erb unskip link validator specs 2021-05-04 21:03:34 +00:00
settings.html.erb Support students in CreateCourseModal 2021-10-06 16:59:05 +00:00
show.html.erb Allow self-enrollment in k5 courses 2021-09-15 19:04:50 +00:00
statistics.html.erb translate "File Storage" course statistics labels 2021-09-07 16:14:01 +00:00