Exemple #1
0
        public string BuildName(MeetingDTOLtiBase <MeetingSessionDTO> meeting, ILtiParam param, string courseId)
        {
            if (meeting == null)
            {
                throw new ArgumentNullException(nameof(meeting));
            }
            if (param == null)
            {
                throw new ArgumentNullException(nameof(param));
            }
            if (courseId == null)
            {
                throw new ArgumentNullException(nameof(courseId));
            }

            if (meeting.GetMeetingType() == LmsMeetingType.OfficeHours)
            {
                return(meeting.Name.TruncateIfMoreThen(60));
            }

            int extraDataLength = param.context_label.Length + ": ".Length + " - ".Length + courseId.Length;

            if (extraDataLength > 52)
            {
                throw new WarningMessageException("Can't generate Adobe Connect meeting name. Course Label is too long.");
            }

            return(string.Format("{0}: {1} - {2}", param.context_label, meeting.Name.TruncateIfMoreThen(60 - extraDataLength), courseId));
        }
Exemple #2
0
        public string BuildName(MeetingDTOLtiBase <MeetingSessionDTO> meeting, ILtiParam param, string courseId)
        {
            if (meeting == null)
            {
                throw new ArgumentNullException(nameof(meeting));
            }
            if (param == null)
            {
                throw new ArgumentNullException(nameof(param));
            }
            if (courseId == null)
            {
                throw new ArgumentNullException(nameof(courseId));
            }

            if (meeting.GetMeetingType() == LmsMeetingType.OfficeHours)
            {
                return(meeting.Name.TruncateIfMoreThen(60));
            }

            return(string.Format("[{0}]: {1}", courseId, meeting.Name).TruncateIfMoreThen(60));
        }