You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added the below code to choose the appropriate image when a student/teacher is registered in multiple courses and each course has a different image:
async def dynamic_options_form(spawner):
profile_list = []
username = spawner.user.name
groups = [group.name for group in spawner.user.groups]
courses = [group.split('-', 1) for group in groups if group.startswith("formgrade-") or group.startswith("nbgrader-")]
# getting profiles for username
for idx, (g,course) in enumerate(courses):
if g == 'formgrade':
profile_list.extend([COURSES[course]['instructorsProfile']])
else:
profile_list.extend([COURSES[course]['studentsProfile']])
if idx == 0:
profile_list[idx]['default'] = True
spawner.profile_list = profile_list
return spawner._options_form_default()
c.KubeSpawner.options_form = dynamic_options_form
How is it possible to set the service in the same function so that the instructors don't need to choose/switch services?
in the current version of the code, the services are running on hub and the instructors must choose a service (which changes their container from instructors-image to hub) before they can create assignments.
best
The text was updated successfully, but these errors were encountered:
Hi,
I added the below code to choose the appropriate image when a student/teacher is registered in multiple courses and each course has a different image:
How is it possible to set the service in the same function so that the instructors don't need to choose/switch services?
in the current version of the code, the services are running on hub and the instructors must choose a service (which changes their container from instructors-image to hub) before they can create assignments.
best
The text was updated successfully, but these errors were encountered: