CTCClassSchedule.AutomatedFootnotesConfig.buildFootnoteText C# (CSharp) Method

buildFootnoteText() private static method

private static buildFootnoteText ( System.Boolean differentStartFlag, System.Boolean differentEndFlag, System.Boolean hybridFlag, System.Boolean telecourseFlag, System.DateTime startDate, System.DateTime endDate ) : string
differentStartFlag System.Boolean Is the course a late start course.
differentEndFlag System.Boolean Does the course have a different end date than normal.
hybridFlag System.Boolean Is this a hybrid course?
telecourseFlag System.Boolean Is this a telecourse?
startDate System.DateTime The course's scheduled start date.
endDate System.DateTime The courses scheduled end date.
return string
        private static string buildFootnoteText(Boolean differentStartFlag, Boolean differentEndFlag, Boolean hybridFlag, Boolean telecourseFlag, DateTime startDate, DateTime endDate)
        {
            string startDateParam = "{STARTDATE}";
            string endDateParam = "{ENDDATE}";
            string footnoteTextResult = string.Empty;

            // Build the footnotes applicable to the start/end date
            AutomatedFootnoteElement footnote = getApplicableDateFootnote(differentStartFlag, differentEndFlag, startDate, endDate);
            if (footnote != null)
            {
                string startDateText = startDate.ToString(footnote.StringFormat);
                string endDateText = endDate.ToString(footnote.StringFormat);

                footnoteTextResult = footnote.Text.Replace(startDateParam, startDateText);
                footnoteTextResult = footnoteTextResult.Replace(endDateParam, endDateText) + " ";
            }

            // If the section is a hybrid section
            if (hybridFlag)
            {
                footnoteTextResult += Footnotes("hybrid").Text + " ";
            }

            // If the section is a telecourse
            if (telecourseFlag)
            {
                footnoteTextResult += Footnotes("telecourse").Text;
            }

            return footnoteTextResult.Trim();
        }