-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Description
Navigating to "Edit Course" --> "Instances" throws an error in cases where SIS enrollment is enabled, but the course doesn't have an instance in SIS. This generates unnecessary error emails that do not require admin intervention.
The exception is thrown in
a-plus/edit_course/course_forms.py
Lines 334 to 358 in 8e2f835
def set_sis_selector(self) -> None: | |
sis: StudentInfoSystem = get_sis_configuration() | |
if not sis: | |
# Student Info System not configured | |
return | |
try: | |
instances = sis.get_instances(self.instance.course.code) | |
# If there are no SIS instances by this course code, don't show menu or checkbox | |
if instances: | |
options = [('none', '---------')] + instances | |
self.fields['sis'] = forms.ChoiceField( | |
choices=options, | |
label=_('LABEL_SIS_INSTANCE'), | |
help_text=_('LABEL_SIS_INSTANCE_HELPTEXT'), | |
) | |
self.fields['sis_enroll'] = forms.BooleanField( | |
label=_('LABEL_SIS_ENROLL'), | |
help_text=_('LABEL_SIS_ENROLL_HELPTEXT'), | |
required=False, | |
initial=False, | |
) | |
except Exception: | |
logger.exception("Error getting instances from SIS.") |
sis.get_instances
code.Metadata
Metadata
Assignees
Labels
No labels