(module, form)
return scheduler_data_nodes
Part of the vellum core context.

    Returns a list of enabled scheduler data nodes.
Part of the vellum core context.
Part of the vellum core context .
def _get_core_context_scheduler_data_nodes(module, form):
    """
    Part of the vellum core context.

    Returns a list of enabled scheduler data nodes.
    """
    has_schedule = (
        getattr(module, 'has_schedule', False) and
        getattr(form, 'schedule', False) and form.schedule.enabled
    )
    scheduler_data_nodes = []
    if has_schedule:
        scheduler_data_nodes = [
            SCHEDULE_CURRENT_VISIT_NUMBER,
            SCHEDULE_NEXT_DUE,
            SCHEDULE_UNSCHEDULED_VISIT,
            SCHEDULE_GLOBAL_NEXT_VISIT_DATE,
        ]
        scheduler_data_nodes.extend([
            "next_{}".format(f.schedule_form_id)
            for f in form.get_phase().get_forms()
            if getattr(f, 'schedule', False) and f.schedule.enabled
        ])
    return scheduler_data_nodes
def _get_core_context_scheduler_data_nodes ( module , form ) : has_schedule = ( getattr ( module , 'has_schedule' , False ) and getattr ( form , 'schedule' , False ) and form . schedule . enabled ) scheduler_data_nodes = [ ] if has_schedule : scheduler_data_nodes = [ SCHEDULE_CURRENT_VISIT_NUMBER , SCHEDULE_NEXT_DUE , SCHEDULE_UNSCHEDULED_VISIT , SCHEDULE_GLOBAL_NEXT_VISIT_DATE , ] scheduler_data_nodes . extend ( [ "next_{}" . format ( f . schedule_form_id ) for f in form . get_phase ( ) . get_forms ( ) if getattr ( f , 'schedule' , False ) and f . schedule . enabled ] ) return scheduler_data_nodes