File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
bases/rsptx/admin_server_api/routers Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -874,10 +874,19 @@ async def dynamic_link_entry(request: Request):
874874 assignments .sort (key = lambda a : a .name )
875875 assignments .sort (key = lambda a : a .duedate )
876876
877- # all lineitems in the LMS
878- ags = message_launch .get_ags ()
879- l_items = await ags .get_lineitems ()
877+ try :
878+ # all lineitems in the LMS - may be rejected if course is closed in LMS
879+ ags = message_launch .get_ags ()
880+ l_items = await ags .get_lineitems ()
881+ except LtiServiceException as e :
882+ rslogger .error (f"LTI1p3 - Error accessing course line items: { e } " )
883+ raise HTTPException (
884+ status_code = 422 ,
885+ detail = "This course appears to be closed in your Learning Management System." ,
886+ )
887+
880888 l_items .sort (key = lambda li : li .get ("label" ))
889+
881890 # build lookup dicts for line items
882891 l_items_resourceId_dict = {li .get ("resourceId" ): li for li in l_items }
883892 l_items_label_dict = {li .get ("label" ): li for li in l_items }
You can’t perform that action at this time.
0 commit comments