@login_required
@require_GET
def program_listing(request):
 programs_config = ProgramsApiConfig.current()
 if (not programs_config.show_program_listing):
  raise Http404
 use_catalog = waffle.switch_is_active('get_programs_from_catalog')
 meter = utils.ProgramProgressMeter(request.user, use_catalog=use_catalog)
 context = {'credentials': get_programs_credentials(request.user), 'disable_courseware_js': True, 'marketing_url': utils.get_program_marketing_url(programs_config), 'nav_hidden': True, 'programs': meter.engaged_programs(), 'progress': meter.progress, 'show_program_listing': programs_config.show_program_listing, 'uses_pattern_library': True}
 return render_to_response('learner_dashboard/programs.html', context)

@ login_required @ require_GET def program_listing ( request ) : programs_config = ProgramsApiConfig . current ( ) if ( not programs_config . show_program_listing ) : raise Http404 use_catalog = waffle . switch_is_active ( 'get_programs_from_catalog' ) meter = utils . ProgramProgressMeter ( request . user , use_catalog = use_catalog ) context = { 'credentials' : get_programs_credentials ( request . user ) , 'disable_courseware_js' : True , 'marketing_url' : utils . get_program_marketing_url ( programs_config ) , 'nav_hidden' : True , 'programs' : meter . engaged_programs ( ) , 'progress' : meter . progress , 'show_program_listing' : programs_config . show_program_listing , 'uses_pattern_library' : True } return render_to_response ( 'learner_dashboard/programs.html' , context )
view a list of programs in which the user is engaged .