public CreateCourseCourseRunBuilder WithCourseRun(
                CourseDeliveryMode deliveryMode,
                CourseStudyMode studyMode,
                CourseAttendancePattern attendancePattern,
                string courseName               = "Education assessment in Maths",
                bool?national                   = null,
                Guid?venueId                    = null,
                IEnumerable <string> regions    = null,
                bool?flexibleStartDate          = null,
                DateTime?startDate              = null,
                string courseUrl                = null,
                decimal?cost                    = 69,
                string costDescription          = null,
                CourseDurationUnit durationUnit = CourseDurationUnit.Months,
                int?durationValue               = 6,
                string providerCourseId         = null)
            {
                var courseRunId = Guid.NewGuid();

                _courseRuns.Add(new CreateCourseCourseRun()
                {
                    CourseRunId       = courseRunId,
                    VenueId           = venueId,
                    CourseName        = courseName,
                    DeliveryMode      = deliveryMode,
                    FlexibleStartDate = flexibleStartDate ?? !startDate.HasValue,
                    StartDate         = startDate,
                    CourseUrl         = courseUrl,
                    Cost              = cost,
                    CostDescription   = costDescription,
                    DurationUnit      = durationUnit,
                    DurationValue     = durationValue,
                    StudyMode         = studyMode,
                    AttendancePattern = attendancePattern,
                    National          = national,
                    Regions           = regions,
                    ProviderCourseId  = providerCourseId
                });

                return(this);
            }
Exemplo n.º 2
0
            public CreateCourseCourseRunBuilder WithClassroomBasedCourseRun(
                Guid venueId,
                CourseAttendancePattern attendancePattern = CourseAttendancePattern.Evening,
                CourseStudyMode studyMode = CourseStudyMode.PartTime,
                string courseName         = "Education assessment in Maths",
                bool?flexibleStartDate    = null,
                DateTime?startDate        = null,
                string courseUrl          = null,
                decimal?cost                    = 69m,
                string costDescription          = null,
                CourseDurationUnit durationUnit = CourseDurationUnit.Months,
                int durationValue               = 3,
                string providerCourseRef        = null)
            {
                var courseRunId = Guid.NewGuid();

                _courseRuns.Add(new CreateCourseCourseRun()
                {
                    CourseRunId       = courseRunId,
                    CourseName        = courseName,
                    DeliveryMode      = CourseDeliveryMode.ClassroomBased,
                    FlexibleStartDate = flexibleStartDate ?? !startDate.HasValue,
                    StartDate         = startDate,
                    CourseUrl         = courseUrl,
                    Cost              = cost,
                    CostDescription   = costDescription,
                    DurationUnit      = durationUnit,
                    DurationValue     = durationValue,
                    VenueId           = venueId,
                    AttendancePattern = attendancePattern,
                    StudyMode         = studyMode,
                    ProviderCourseId  = providerCourseRef
                });

                return(this);
            }
Exemplo n.º 3
0
 public static string ToDescription(this CourseStudyMode studyMode) => studyMode switch
 {