Ejemplo n.º 1
0
            public CreateCourseCourseRunBuilder WithWorkBasedCourseRun(
                bool national = true,
                IEnumerable <string> subRegionIds = null,
                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.WorkBased,
                    FlexibleStartDate = flexibleStartDate ?? !startDate.HasValue,
                    StartDate         = startDate,
                    CourseUrl         = courseUrl,
                    Cost             = cost,
                    CostDescription  = costDescription,
                    DurationUnit     = durationUnit,
                    DurationValue    = durationValue,
                    National         = national,
                    SubRegionIds     = subRegionIds ?? Array.Empty <string>(),
                    ProviderCourseId = providerCourseRef
                });

                return(this);
            }
Ejemplo n.º 2
0
            public CreateCourseCourseRunBuilder WithOnlineCourseRun(
                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,
                CourseStatus status             = CourseStatus.Live)
            {
                var courseRunId = Guid.NewGuid();

                _courseRuns.Add(new CreateCourseCourseRun()
                {
                    CourseRunId       = courseRunId,
                    CourseName        = courseName,
                    DeliveryMode      = CourseDeliveryMode.Online,
                    FlexibleStartDate = flexibleStartDate ?? !startDate.HasValue,
                    StartDate         = startDate,
                    CourseUrl         = courseUrl,
                    Cost             = cost,
                    CostDescription  = costDescription,
                    DurationUnit     = durationUnit,
                    DurationValue    = durationValue,
                    National         = true,
                    ProviderCourseId = providerCourseRef
                });

                return(this);
            }
Ejemplo n.º 3
0
 public CreateCourseCourseRunBuilder WithCourseRun(
     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) =>
 WithOnlineCourseRun(courseName, flexibleStartDate, startDate, courseUrl, cost, costDescription, durationUnit, durationValue, providerCourseRef);
            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);
            }
Ejemplo n.º 5
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);
            }