prompt --application/pages/page_00020
begin
--   Manifest
--     PAGE: 00020
--   Manifest End
wwv_flow_imp.component_begin (
 p_version_yyyy_mm_dd=>'2023.10.31'
,p_release=>'23.2.0'
,p_default_workspace_id=>16017191443360494
,p_default_application_id=>10001
,p_default_id_offset=>0
,p_default_owner=>'STUDENT'
);
wwv_flow_imp_page.create_page(
 p_id=>20
,p_name=>'Step 2 - Preview and Edit'
,p_alias=>'STEP-2-PREVIEW-AND-EDIT'
,p_step_title=>'Step 2 - Preview and Edit'
,p_autocomplete_on_off=>'OFF'
,p_page_template_options=>'#DEFAULT#'
,p_protection_level=>'C'
,p_page_component_map=>'21'
,p_last_updated_by=>'STUDENT_DEV'
,p_last_upd_yyyymmddhh24miss=>'20231219180337'
);
wwv_flow_imp_page.create_page_plug(
 p_id=>wwv_flow_imp.id(4625827815289211)
,p_plug_name=>'Step 2 - Preview and Edit'
,p_region_template_options=>'#DEFAULT#:t-Wizard--hideStepsXSmall'
,p_plug_template=>wwv_flow_imp.id(16133604317514901)
,p_plug_display_sequence=>10
,p_list_id=>wwv_flow_imp.id(4621855985289182)
,p_plug_source_type=>'NATIVE_LIST'
,p_list_template_id=>wwv_flow_imp.id(16164979301515009)
);
wwv_flow_imp_page.create_page_plug(
 p_id=>wwv_flow_imp.id(4617947667271428)
,p_plug_name=>'Image Preview'
,p_parent_plug_id=>wwv_flow_imp.id(4625827815289211)
,p_region_template_options=>'#DEFAULT#:t-Region--scrollBody'
,p_plug_template=>wwv_flow_imp.id(16116793714514810)
,p_plug_display_sequence=>40
,p_plug_grid_column_span=>4
,p_plug_display_point=>'SUB_REGIONS'
,p_attribute_01=>'N'
,p_attribute_02=>'HTML'
);
wwv_flow_imp_page.create_page_plug(
 p_id=>wwv_flow_imp.id(4615792391271406)
,p_plug_name=>'Image IG'
,p_parent_plug_id=>wwv_flow_imp.id(4617947667271428)
,p_region_template_options=>'#DEFAULT#'
,p_component_template_options=>'#DEFAULT#'
,p_plug_template=>wwv_flow_imp.id(16112462865514800)
,p_plug_display_sequence=>10
,p_plug_display_point=>'SUB_REGIONS'
,p_query_type=>'SQL'
,p_plug_source=>wwv_flow_string.join(wwv_flow_t_varchar2(
'SELECT',
'    f.id AS file_id,',
'    apex_util.get_blob_file_src(''P18_BLOB_CONTENT'', f.id) as image_hidden,',
'    NULL AS image',
'FROM',
'    apex_application_temp_files f',
'WHERE',
'    f.name = :P20_FILE_PICKER;'))
,p_plug_source_type=>'NATIVE_IG'
,p_prn_content_disposition=>'ATTACHMENT'
,p_prn_units=>'INCHES'
,p_prn_paper_size=>'LETTER'
,p_prn_width=>11
,p_prn_height=>8.5
,p_prn_orientation=>'HORIZONTAL'
,p_prn_page_header=>'Image IG'
,p_prn_page_header_font_color=>'#000000'
,p_prn_page_header_font_family=>'Helvetica'
,p_prn_page_header_font_weight=>'normal'
,p_prn_page_header_font_size=>'12'
,p_prn_page_footer_font_color=>'#000000'
,p_prn_page_footer_font_family=>'Helvetica'
,p_prn_page_footer_font_weight=>'normal'
,p_prn_page_footer_font_size=>'12'
,p_prn_header_bg_color=>'#EEEEEE'
,p_prn_header_font_color=>'#000000'
,p_prn_header_font_family=>'Helvetica'
,p_prn_header_font_weight=>'bold'
,p_prn_header_font_size=>'10'
,p_prn_body_bg_color=>'#FFFFFF'
,p_prn_body_font_color=>'#000000'
,p_prn_body_font_family=>'Helvetica'
,p_prn_body_font_weight=>'normal'
,p_prn_body_font_size=>'10'
,p_prn_border_width=>.5
,p_prn_page_header_alignment=>'CENTER'
,p_prn_page_footer_alignment=>'CENTER'
,p_prn_border_color=>'#666666'
);
wwv_flow_imp_page.create_region_column(
 p_id=>wwv_flow_imp.id(4615913612271408)
,p_name=>'FILE_ID'
,p_source_type=>'DB_COLUMN'
,p_source_expression=>'FILE_ID'
,p_data_type=>'NUMBER'
,p_session_state_data_type=>'VARCHAR2'
,p_is_query_only=>false
,p_item_type=>'NATIVE_HIDDEN'
,p_display_sequence=>10
,p_attribute_01=>'Y'
,p_filter_is_required=>false
,p_use_as_row_header=>false
,p_enable_sort_group=>false
,p_is_primary_key=>false
,p_duplicate_value=>true
,p_include_in_export=>false
);
wwv_flow_imp_page.create_region_column(
 p_id=>wwv_flow_imp.id(4616064037271409)
,p_name=>'IMAGE_HIDDEN'
,p_source_type=>'DB_COLUMN'
,p_source_expression=>'IMAGE_HIDDEN'
,p_data_type=>'VARCHAR2'
,p_session_state_data_type=>'VARCHAR2'
,p_is_query_only=>false
,p_item_type=>'NATIVE_HIDDEN'
,p_display_sequence=>20
,p_attribute_01=>'Y'
,p_filter_is_required=>false
,p_use_as_row_header=>false
,p_enable_sort_group=>false
,p_is_primary_key=>false
,p_duplicate_value=>true
,p_include_in_export=>false
);
wwv_flow_imp_page.create_region_column(
 p_id=>wwv_flow_imp.id(4616125986271410)
,p_name=>'IMAGE'
,p_source_type=>'DB_COLUMN'
,p_source_expression=>'IMAGE'
,p_data_type=>'VARCHAR2'
,p_is_query_only=>false
,p_item_type=>'NATIVE_HTML_EXPRESSION'
,p_heading=>'Preview'
,p_heading_alignment=>'LEFT'
,p_display_sequence=>30
,p_value_alignment=>'LEFT'
,p_attribute_01=>'<image src=''&IMAGE_HIDDEN.'' width=400>'
,p_filter_is_required=>false
,p_use_as_row_header=>false
,p_enable_sort_group=>true
,p_enable_control_break=>true
,p_enable_hide=>true
,p_is_primary_key=>false
,p_duplicate_value=>true
,p_include_in_export=>true
);
wwv_flow_imp_page.create_interactive_grid(
 p_id=>wwv_flow_imp.id([REDACTED])
,p_internal_uid=>[REDACTED]
,p_is_editable=>false
,p_lazy_loading=>false
,p_requires_filter=>false
,p_select_first_row=>true
,p_fixed_row_height=>true
,p_pagination_type=>'SCROLL'
,p_show_total_row_count=>false
,p_show_toolbar=>false
,p_toolbar_buttons=>null
,p_enable_save_public_report=>false
,p_enable_subscriptions=>true
,p_enable_flashback=>true
,p_define_chart_view=>true
,p_enable_download=>true
,p_download_formats=>'CSV:HTML:XLSX:PDF'
,p_enable_mail_download=>true
,p_fixed_header=>'PAGE'
,p_show_icon_view=>false
,p_show_detail_view=>false
);
wwv_flow_imp_page.create_ig_report(
 p_id=>wwv_flow_imp.id(4630874589407256)
,p_interactive_grid_id=>wwv_flow_imp.id([REDACTED])
,p_static_id=>'46309'
,p_type=>'PRIMARY'
,p_default_view=>'GRID'
,p_show_row_number=>false
,p_settings_area_expanded=>true
);
wwv_flow_imp_page.create_ig_report_view(
 p_id=>wwv_flow_imp.id(4631031905407261)
,p_report_id=>wwv_flow_imp.id(4630874589407256)
,p_view_type=>'GRID'
,p_srv_exclude_null_values=>false
,p_srv_only_display_columns=>true
,p_edit_mode=>false
);
wwv_flow_imp_page.create_ig_report_column(
 p_id=>wwv_flow_imp.id(4631565045407283)
,p_view_id=>wwv_flow_imp.id(4631031905407261)
,p_display_seq=>1
,p_column_id=>wwv_flow_imp.id(4615913612271408)
,p_is_visible=>true
,p_is_frozen=>false
);
wwv_flow_imp_page.create_ig_report_column(
 p_id=>wwv_flow_imp.id(4632445186407310)
,p_view_id=>wwv_flow_imp.id(4631031905407261)
,p_display_seq=>2
,p_column_id=>wwv_flow_imp.id(4616064037271409)
,p_is_visible=>true
,p_is_frozen=>false
);
wwv_flow_imp_page.create_ig_report_column(
 p_id=>wwv_flow_imp.id(4633320527407322)
,p_view_id=>wwv_flow_imp.id(4631031905407261)
,p_display_seq=>3
,p_column_id=>wwv_flow_imp.id(4616125986271410)
,p_is_visible=>true
,p_is_frozen=>false
);
wwv_flow_imp_page.create_page_plug(
 p_id=>wwv_flow_imp.id(4618069667271429)
,p_plug_name=>'Task Preview'
,p_parent_plug_id=>wwv_flow_imp.id(4625827815289211)
,p_region_template_options=>'#DEFAULT#:t-Region--scrollBody'
,p_plug_template=>wwv_flow_imp.id(16116793714514810)
,p_plug_display_sequence=>50
,p_plug_new_grid_row=>false
,p_plug_display_point=>'SUB_REGIONS'
,p_attribute_01=>'N'
,p_attribute_02=>'HTML'
);
wwv_flow_imp_page.create_page_plug(
 p_id=>wwv_flow_imp.id([REDACTED])
,p_plug_name=>'Task IG'
,p_parent_plug_id=>wwv_flow_imp.id(4618069667271429)
,p_region_template_options=>'#DEFAULT#'
,p_component_template_options=>'#DEFAULT#'
,p_plug_template=>wwv_flow_imp.id(16112462865514800)
,p_plug_display_sequence=>10
,p_plug_display_point=>'SUB_REGIONS'
,p_query_type=>'TABLE'
,p_query_table=>'STDT_TASKS_TEMP'
,p_query_order_by_type=>'STATIC'
,p_query_order_by=>'TASK_ID'
,p_include_rowid_column=>false
,p_plug_source_type=>'NATIVE_IG'
,p_prn_content_disposition=>'ATTACHMENT'
,p_prn_units=>'INCHES'
,p_prn_paper_size=>'LETTER'
,p_prn_width=>11
,p_prn_height=>8.5
,p_prn_orientation=>'HORIZONTAL'
,p_prn_page_header=>'Task IG'
,p_prn_page_header_font_color=>'#000000'
,p_prn_page_header_font_family=>'Helvetica'
,p_prn_page_header_font_weight=>'normal'
,p_prn_page_header_font_size=>'12'
,p_prn_page_footer_font_color=>'#000000'
,p_prn_page_footer_font_family=>'Helvetica'
,p_prn_page_footer_font_weight=>'normal'
,p_prn_page_footer_font_size=>'12'
,p_prn_header_bg_color=>'#EEEEEE'
,p_prn_header_font_color=>'#000000'
,p_prn_header_font_family=>'Helvetica'
,p_prn_header_font_weight=>'bold'
,p_prn_header_font_size=>'10'
,p_prn_body_bg_color=>'#FFFFFF'
,p_prn_body_font_color=>'#000000'
,p_prn_body_font_family=>'Helvetica'
,p_prn_body_font_weight=>'normal'
,p_prn_body_font_size=>'10'
,p_prn_border_width=>.5
,p_prn_page_header_alignment=>'CENTER'
,p_prn_page_footer_alignment=>'CENTER'
,p_prn_border_color=>'#666666'
);
wwv_flow_imp_page.create_region_column(
 p_id=>wwv_flow_imp.id(4616465549271413)
,p_name=>'TASK_ID'
,p_source_type=>'DB_COLUMN'
,p_source_expression=>'TASK_ID'
,p_data_type=>'NUMBER'
,p_session_state_data_type=>'VARCHAR2'
,p_is_query_only=>false
,p_item_type=>'NATIVE_HIDDEN'
,p_display_sequence=>30
,p_attribute_01=>'Y'
,p_use_as_row_header=>false
,p_enable_sort_group=>false
,p_is_primary_key=>true
,p_duplicate_value=>true
,p_include_in_export=>false
);
wwv_flow_imp_page.create_region_column(
 p_id=>wwv_flow_imp.id(4616591182271414)
,p_name=>'TASK_NAME'
,p_source_type=>'DB_COLUMN'
,p_source_expression=>'TASK_NAME'
,p_data_type=>'VARCHAR2'
,p_is_query_only=>false
,p_item_type=>'NATIVE_TEXT_FIELD'
,p_heading=>'Task Name'
,p_heading_alignment=>'LEFT'
,p_display_sequence=>50
,p_value_alignment=>'LEFT'
,p_attribute_05=>'BOTH'
,p_is_required=>false
,p_max_length=>150
,p_enable_filter=>true
,p_filter_operators=>'C:S:CASE_INSENSITIVE:REGEXP'
,p_filter_is_required=>false
,p_filter_text_case=>'MIXED'
,p_filter_exact_match=>true
,p_filter_lov_type=>'DISTINCT'
,p_use_as_row_header=>false
,p_enable_sort_group=>true
,p_enable_control_break=>true
,p_enable_hide=>true
,p_is_primary_key=>false
,p_duplicate_value=>true
,p_include_in_export=>true
);
wwv_flow_imp_page.create_region_column(
 p_id=>wwv_flow_imp.id(4616623595271415)
,p_name=>'TASK_DESCRIPTION'
,p_source_type=>'DB_COLUMN'
,p_source_expression=>'TASK_DESCRIPTION'
,p_data_type=>'VARCHAR2'
,p_session_state_data_type=>'VARCHAR2'
,p_is_query_only=>false
,p_item_type=>'NATIVE_TEXTAREA'
,p_heading=>'Task Description'
,p_heading_alignment=>'LEFT'
,p_display_sequence=>60
,p_value_alignment=>'LEFT'
,p_attribute_01=>'Y'
,p_attribute_02=>'N'
,p_attribute_03=>'N'
,p_attribute_04=>'BOTH'
,p_is_required=>false
,p_max_length=>2000
,p_enable_filter=>true
,p_filter_operators=>'C:S:CASE_INSENSITIVE:REGEXP'
,p_filter_is_required=>false
,p_filter_text_case=>'MIXED'
,p_filter_lov_type=>'NONE'
,p_use_as_row_header=>false
,p_enable_sort_group=>false
,p_enable_hide=>true
,p_is_primary_key=>false
,p_duplicate_value=>true
,p_include_in_export=>true
);
wwv_flow_imp_page.create_region_column(
 p_id=>wwv_flow_imp.id(4616959682271418)
,p_name=>'SUBJECT_ID'
,p_source_type=>'DB_COLUMN'
,p_source_expression=>'SUBJECT_ID'
,p_data_type=>'NUMBER'
,p_is_query_only=>false
,p_item_type=>'NATIVE_SELECT_LIST'
,p_heading=>'Subject'
,p_heading_alignment=>'LEFT'
,p_display_sequence=>70
,p_value_alignment=>'LEFT'
,p_is_required=>false
,p_lov_type=>'SHARED'
,p_lov_id=>wwv_flow_imp.id(16428091443662991)
,p_lov_display_extra=>false
,p_lov_display_null=>false
,p_enable_filter=>true
,p_filter_operators=>'C:S:CASE_INSENSITIVE:REGEXP'
,p_filter_is_required=>false
,p_filter_text_case=>'MIXED'
,p_filter_exact_match=>true
,p_filter_lov_type=>'LOV'
,p_use_as_row_header=>false
,p_enable_sort_group=>true
,p_enable_control_break=>true
,p_enable_hide=>true
,p_is_primary_key=>false
,p_duplicate_value=>true
,p_include_in_export=>true
);
wwv_flow_imp_page.create_region_column(
 p_id=>wwv_flow_imp.id(4617260365271421)
,p_name=>'SELECTED_FLAG'
,p_source_type=>'DB_COLUMN'
,p_source_expression=>'SELECTED_FLAG'
,p_data_type=>'VARCHAR2'
,p_is_query_only=>false
,p_item_type=>'NATIVE_SINGLE_CHECKBOX'
,p_heading=>'Select'
,p_heading_alignment=>'CENTER'
,p_display_sequence=>40
,p_value_alignment=>'CENTER'
,p_attribute_01=>'Y'
,p_is_required=>false
,p_enable_filter=>true
,p_filter_operators=>'C:S:CASE_INSENSITIVE:REGEXP'
,p_filter_is_required=>false
,p_filter_text_case=>'MIXED'
,p_filter_exact_match=>true
,p_filter_lov_type=>'DISTINCT'
,p_use_as_row_header=>false
,p_enable_sort_group=>true
,p_enable_control_break=>true
,p_enable_hide=>true
,p_is_primary_key=>false
,p_duplicate_value=>true
,p_include_in_export=>true
);
wwv_flow_imp_page.create_interactive_grid(
 p_id=>wwv_flow_imp.id([REDACTED])
,p_internal_uid=>[REDACTED]
,p_is_editable=>true
,p_edit_operations=>'i:u:d'
,p_lost_update_check_type=>'VALUES'
,p_add_row_if_empty=>true
,p_submit_checked_rows=>false
,p_lazy_loading=>false
,p_requires_filter=>false
,p_select_first_row=>true
,p_fixed_row_height=>true
,p_pagination_type=>'SCROLL'
,p_show_total_row_count=>true
,p_show_toolbar=>false
,p_toolbar_buttons=>null
,p_enable_save_public_report=>false
,p_enable_subscriptions=>true
,p_enable_flashback=>true
,p_define_chart_view=>true
,p_enable_download=>true
,p_download_formats=>'CSV:HTML:XLSX:PDF'
,p_enable_mail_download=>true
,p_fixed_header=>'PAGE'
,p_show_icon_view=>false
,p_show_detail_view=>false
);
wwv_flow_imp_page.create_ig_report(
 p_id=>wwv_flow_imp.id(4635910055433191)
,p_interactive_grid_id=>wwv_flow_imp.id([REDACTED])
,p_static_id=>'46360'
,p_type=>'PRIMARY'
,p_default_view=>'GRID'
,p_show_row_number=>false
,p_settings_area_expanded=>true
);
wwv_flow_imp_page.create_ig_report_view(
 p_id=>wwv_flow_imp.id(4636118142433191)
,p_report_id=>wwv_flow_imp.id(4635910055433191)
,p_view_type=>'GRID'
,p_stretch_columns=>true
,p_srv_exclude_null_values=>false
,p_srv_only_display_columns=>true
,p_edit_mode=>false
);
wwv_flow_imp_page.create_ig_report_column(
 p_id=>wwv_flow_imp.id(4636680918433196)
,p_view_id=>wwv_flow_imp.id(4636118142433191)
,p_display_seq=>1
,p_column_id=>wwv_flow_imp.id(4616465549271413)
,p_is_visible=>true
,p_is_frozen=>false
);
wwv_flow_imp_page.create_ig_report_column(
 p_id=>wwv_flow_imp.id(4637544346433206)
,p_view_id=>wwv_flow_imp.id(4636118142433191)
,p_display_seq=>4
,p_column_id=>wwv_flow_imp.id(4616591182271414)
,p_is_visible=>true
,p_is_frozen=>false
,p_width=>360
);
wwv_flow_imp_page.create_ig_report_column(
 p_id=>wwv_flow_imp.id(4638431171433214)
,p_view_id=>wwv_flow_imp.id(4636118142433191)
,p_display_seq=>5
,p_column_id=>wwv_flow_imp.id(4616623595271415)
,p_is_visible=>true
,p_is_frozen=>false
);
wwv_flow_imp_page.create_ig_report_column(
 p_id=>wwv_flow_imp.id(4639397440433223)
,p_view_id=>wwv_flow_imp.id(4636118142433191)
,p_display_seq=>3
,p_column_id=>wwv_flow_imp.id(4616959682271418)
,p_is_visible=>true
,p_is_frozen=>false
,p_width=>120
);
wwv_flow_imp_page.create_ig_report_column(
 p_id=>wwv_flow_imp.id(4640185950433234)
,p_view_id=>wwv_flow_imp.id(4636118142433191)
,p_display_seq=>2
,p_column_id=>wwv_flow_imp.id(4617260365271421)
,p_is_visible=>true
,p_is_frozen=>false
,p_width=>60
);
wwv_flow_imp_page.create_page_plug(
 p_id=>wwv_flow_imp.id(4618115146271430)
,p_plug_name=>'Task Common Information'
,p_parent_plug_id=>wwv_flow_imp.id(4625827815289211)
,p_region_template_options=>'#DEFAULT#:t-Region--scrollBody'
,p_plug_template=>wwv_flow_imp.id(16116793714514810)
,p_plug_display_sequence=>30
,p_plug_display_point=>'SUB_REGIONS'
,p_attribute_01=>'N'
,p_attribute_02=>'HTML'
);
wwv_flow_imp_page.create_page_plug(
 p_id=>wwv_flow_imp.id(4625920023289211)
,p_plug_name=>'Step 2 - Preview and Edit'
,p_parent_plug_id=>wwv_flow_imp.id(4625827815289211)
,p_region_template_options=>'#DEFAULT#'
,p_plug_template=>wwv_flow_imp.id(16062384265514656)
,p_plug_display_sequence=>20
,p_plug_display_point=>'SUB_REGIONS'
,p_attribute_01=>'N'
,p_attribute_02=>'HTML'
,p_attribute_03=>'Y'
);
wwv_flow_imp_page.create_page_button(
 p_id=>wwv_flow_imp.id(4627289976289215)
,p_button_sequence=>10
,p_button_plug_id=>wwv_flow_imp.id(4625827815289211)
,p_button_name=>'CANCEL'
,p_button_action=>'REDIRECT_PAGE'
,p_button_template_options=>'#DEFAULT#'
,p_button_template_id=>wwv_flow_imp.id(16189347253515098)
,p_button_image_alt=>'Cancel'
,p_button_position=>'CLOSE'
,p_button_redirect_url=>'f?p=&APP_ID.:7:&APP_SESSION.::&DEBUG.:::'
);
wwv_flow_imp_page.create_page_button(
 p_id=>wwv_flow_imp.id(4627386111289215)
,p_button_sequence=>40
,p_button_plug_id=>wwv_flow_imp.id(4625827815289211)
,p_button_name=>'FINISH'
,p_button_action=>'SUBMIT'
,p_button_template_options=>'#DEFAULT#'
,p_button_template_id=>wwv_flow_imp.id(16189347253515098)
,p_button_is_hot=>'Y'
,p_button_image_alt=>'Finish'
,p_button_position=>'NEXT'
);
wwv_flow_imp_page.create_page_button(
 p_id=>wwv_flow_imp.id(4627487499289215)
,p_button_sequence=>20
,p_button_plug_id=>wwv_flow_imp.id(4625827815289211)
,p_button_name=>'PREVIOUS'
,p_button_action=>'SUBMIT'
,p_button_template_options=>'#DEFAULT#'
,p_button_template_id=>wwv_flow_imp.id(16188659571515092)
,p_button_image_alt=>'Previous'
,p_button_position=>'PREVIOUS'
,p_button_execute_validations=>'N'
,p_icon_css_classes=>'fa-chevron-left'
);
wwv_flow_imp_page.create_page_branch(
 p_id=>wwv_flow_imp.id(4628849246289242)
,p_branch_action=>'f?p=&APP_ID.:7:&APP_SESSION.::&DEBUG.:::&success_msg=#SUCCESS_MSG#'
,p_branch_point=>'AFTER_PROCESSING'
,p_branch_type=>'REDIRECT_URL'
,p_branch_when_button_id=>wwv_flow_imp.id(4627386111289215)
,p_branch_sequence=>1
);
wwv_flow_imp_page.create_page_branch(
 p_id=>wwv_flow_imp.id(4628157880289240)
,p_branch_action=>'f?p=&APP_ID.:19:&APP_SESSION.::&DEBUG.:::&success_msg=#SUCCESS_MSG#'
,p_branch_point=>'BEFORE_VALIDATION'
,p_branch_type=>'REDIRECT_URL'
,p_branch_when_button_id=>wwv_flow_imp.id(4627487499289215)
,p_branch_sequence=>10
);
wwv_flow_imp_page.create_page_item(
 p_id=>wwv_flow_imp.id(4615641902271405)
,p_name=>'P20_FILE_PICKER'
,p_item_sequence=>20
,p_display_as=>'NATIVE_HIDDEN'
,p_attribute_01=>'Y'
);
wwv_flow_imp_page.create_page_item(
 p_id=>wwv_flow_imp.id(4618263666271431)
,p_name=>'P20_STUDENT_ID'
,p_item_sequence=>10
,p_item_plug_id=>wwv_flow_imp.id(4618115146271430)
,p_item_default=>wwv_flow_string.join(wwv_flow_t_varchar2(
'WITH CTE_TEMP AS (',
'    SELECT st.student_id',
'    FROM   stdt_tasks st',
'    WHERE  tenant_id = (SELECT su.tenant_id',
'                        FROM   stdt_users su',
'                        WHERE  su.user_name = :APP_USER)',
'    ORDER BY st.creation_date DESC',
')',
'SELECT student_id',
'FROM   CTE_TEMP',
'WHERE  ROWNUM = 1'))
,p_item_default_type=>'SQL_QUERY'
,p_prompt=>'Student Id'
,p_display_as=>'NATIVE_SELECT_LIST'
,p_named_lov=>'LOV_STUDENT'
,p_lov_display_null=>'YES'
,p_cHeight=>1
,p_field_template=>wwv_flow_imp.id(16186811375515083)
,p_item_template_options=>'#DEFAULT#'
,p_lov_display_extra=>'YES'
,p_attribute_01=>'NONE'
,p_attribute_02=>'N'
);
wwv_flow_imp_page.create_page_item(
 p_id=>wwv_flow_imp.id(4618346769271432)
,p_name=>'P20_TERM_ID'
,p_item_sequence=>20
,p_item_plug_id=>wwv_flow_imp.id(4618115146271430)
,p_item_default=>wwv_flow_string.join(wwv_flow_t_varchar2(
'WITH CTE_TEMP AS (',
'    SELECT st.term_id',
'    FROM   stdt_tasks st',
'    WHERE  st.student_id = :P20_STUDENT_ID',
'    AND    tenant_id = (SELECT su.tenant_id',
'                        FROM   stdt_users su',
'                        WHERE  su.user_name = :APP_USER)',
'    ORDER BY st.creation_date DESC',
')',
'SELECT term_id',
'FROM   CTE_TEMP',
'WHERE  ROWNUM = 1'))
,p_item_default_type=>'SQL_QUERY'
,p_prompt=>'Term Id'
,p_display_as=>'NATIVE_SELECT_LIST'
,p_lov=>wwv_flow_string.join(wwv_flow_t_varchar2(
'SELECT',
'    ST.TERM_NAME AS TERM_NAME,',
'    ST.TERM_ID AS TERM_ID',
'FROM',
'    STDT_TERMS ST',
'WHERE',
'    ST.STUDENT_ID = :P20_STUDENT_ID',
'AND NVL(ST.DELETED_FLAG, ''N'') <> ''Y''',
'ORDER BY',
'    ST.TERM_START_DATE'))
,p_lov_display_null=>'YES'
,p_lov_cascade_parent_items=>'P20_STUDENT_ID'
,p_ajax_items_to_submit=>'P20_STUDENT_ID'
,p_ajax_optimize_refresh=>'Y'
,p_cHeight=>1
,p_begin_on_new_line=>'N'
,p_field_template=>wwv_flow_imp.id(16186811375515083)
,p_item_template_options=>'#DEFAULT#'
,p_lov_display_extra=>'YES'
,p_attribute_01=>'NONE'
,p_attribute_02=>'N'
);
wwv_flow_imp_page.create_page_item(
 p_id=>wwv_flow_imp.id(4618488382271433)
,p_name=>'P20_START_DATE'
,p_item_sequence=>30
,p_item_plug_id=>wwv_flow_imp.id(4618115146271430)
,p_item_default=>'TRUNC(SYSDATE)'
,p_item_default_type=>'EXPRESSION'
,p_item_default_language=>'SQL'
,p_prompt=>'Start Date'
,p_format_mask=>'YYYY-MM-DD'
,p_display_as=>'NATIVE_DATE_PICKER_APEX'
,p_cSize=>30
,p_field_template=>wwv_flow_imp.id(16186811375515083)
,p_item_template_options=>'#DEFAULT#'
,p_attribute_01=>'N'
,p_attribute_02=>'POPUP'
,p_attribute_03=>'NONE'
,p_attribute_06=>'NONE'
,p_attribute_09=>'N'
,p_attribute_11=>'Y'
);
wwv_flow_imp_page.create_page_item(
 p_id=>wwv_flow_imp.id(4618559873271434)
,p_name=>'P20_END_DATE'
,p_item_sequence=>40
,p_item_plug_id=>wwv_flow_imp.id(4618115146271430)
,p_item_default=>'TRUNC(SYSDATE)'
,p_item_default_type=>'EXPRESSION'
,p_item_default_language=>'SQL'
,p_prompt=>'End Date'
,p_format_mask=>'YYYY-MM-DD'
,p_display_as=>'NATIVE_DATE_PICKER_APEX'
,p_cSize=>30
,p_begin_on_new_line=>'N'
,p_field_template=>wwv_flow_imp.id(16186811375515083)
,p_item_template_options=>'#DEFAULT#'
,p_attribute_01=>'N'
,p_attribute_02=>'POPUP'
,p_attribute_03=>'NONE'
,p_attribute_06=>'NONE'
,p_attribute_09=>'N'
,p_attribute_11=>'Y'
);
wwv_flow_imp_page.create_page_process(
 p_id=>wwv_flow_imp.id(4617890967271427)
,p_process_sequence=>10
,p_process_point=>'AFTER_SUBMIT'
,p_region_id=>wwv_flow_imp.id([REDACTED])
,p_process_type=>'NATIVE_IG_DML'
,p_process_name=>'Task Preview - Save Interactive Grid Data'
,p_attribute_01=>'REGION_SOURCE'
,p_attribute_05=>'Y'
,p_attribute_06=>'Y'
,p_attribute_08=>'Y'
,p_error_display_location=>'INLINE_IN_NOTIFICATION'
,p_internal_uid=>4617890967271427
);
wwv_flow_imp_page.create_page_process(
 p_id=>wwv_flow_imp.id(4618674239271435)
,p_process_sequence=>20
,p_process_point=>'AFTER_SUBMIT'
,p_process_type=>'NATIVE_PLSQL'
,p_process_name=>'Import'
,p_process_sql_clob=>wwv_flow_string.join(wwv_flow_t_varchar2(
'DECLARE',
'',
'    ln_ddl_cnt      NUMBER := 0;',
'    ln_tenant_id    stdt_tenants.tenant_id%TYPE;',
'',
'BEGIN',
'',
'    apex_debug.log_message(',
'        p_message   => ''---------- Import Start ----------'',',
'        p_level     => apex_debug.c_log_level_info',
'    );',
'',
'    SELECT',
'        st.tenant_id',
'    INTO',
'        ln_tenant_id',
'    FROM',
'        stdt_tenants    st,',
'        stdt_users      su',
'    WHERE',
'        su.tenant_id = st.tenant_id',
'    AND su.user_name = :APP_USER;',
'',
'    apex_debug.log_message(',
'        p_message   => ''ln_tenant_id => '' || ln_tenant_id,',
'        p_level     => apex_debug.c_log_level_info',
'    );',
'',
'    apex_debug.log_message(',
'        p_message   => ''P20_STUDENT_ID => '' || :P20_STUDENT_ID,',
'        p_level     => apex_debug.c_log_level_info',
'    );',
'',
'    apex_debug.log_message(',
'        p_message   => ''P20_TERM_ID => '' || :P20_TERM_ID,',
'        p_level     => apex_debug.c_log_level_info',
'    );',
'',
'    apex_debug.log_message(',
'        p_message   => ''P20_START_DATE => '' || :P20_START_DATE,',
'        p_level     => apex_debug.c_log_level_info',
'    );',
'',
'    apex_debug.log_message(',
'        p_message   => ''P20_END_DATE => '' || :P20_END_DATE,',
'        p_level     => apex_debug.c_log_level_info',
'    );',
'',
'    INSERT INTO stdt_tasks st(',
'        task_name,',
'        task_description,',
'        student_id,',
'        term_id,',
'        subject_id,',
'        start_date,',
'        end_date,',
'        completion_percent,',
'        tenant_id,',
'        creation_date,',
'        created_by,',
'        last_update_date,',
'        last_updated_by',
'    )',
'    SELECT',
'        stt.task_name           AS task_name,',
'        stt.task_description    AS task_description,',
'        :P20_STUDENT_ID         AS student_id,',
'        :P20_TERM_ID            AS term_id,',
'        stt.subject_id          AS subject_id,',
'        TO_DATE(:P20_START_DATE, ''YYYY-MM-DD'')  AS start_date,',
'        TO_DATE(:P20_END_DATE, ''YYYY-MM-DD'')    AS end_date,',
'        0                       AS completion_percent,',
'        ln_tenant_id            AS tenant_id,',
'        LOCALTIMESTAMP          AS creation_date,',
'        :APP_USER               AS created_by,',
'        LOCALTIMESTAMP          AS last_update_date,',
'        :APP_USER               AS last_updated_by',
'    FROM',
'        stdt_tasks_temp stt',
'    WHERE',
'        1 = 1',
'    AND stt.selected_flag = ''Y'';',
'',
'    ln_ddl_cnt := ln_ddl_cnt + SQL%ROWCOUNT;',
'    apex_debug.log_message(',
'        p_message   => ''Data has been inserted for stdt_tasks, record count is '' || ln_ddl_cnt,',
'        p_level     => apex_debug.c_log_level_info',
'    );',
'',
'END;'))
,p_process_clob_language=>'PLSQL'
,p_error_display_location=>'INLINE_IN_NOTIFICATION'
,p_internal_uid=>4618674239271435
);
wwv_flow_imp.component_end;
end;
/
