def _get_requirements_to_disable(old_requirements, new_requirements):
 requirements_to_disable = []
 for old_req in old_requirements:
  found_flag = False
  for req in new_requirements:
   if ((req['namespace'] == old_req.namespace) and (req['name'] == old_req.name)):
    found_flag = True
    break
  if (not found_flag):
   requirements_to_disable.append(old_req.id)
 return requirements_to_disable

def _get_requirements_to_disable ( old_requirements , new_requirements ) : requirements_to_disable = [ ] for old_req in old_requirements : found_flag = False for req in new_requirements : if ( ( req [ 'namespace' ] == old_req . namespace ) and ( req [ 'name' ] == old_req . name ) ) : found_flag = True break if ( not found_flag ) : requirements_to_disable . append ( old_req . id ) return requirements_to_disable
get the ids of creditrequirement entries to be disabled that are deleted from the courseware .