public Task Setup(UsersSetup setup)
        {
            var payload = mapper.Map <SetupUsersEvent>(setup);

            publishingRouter.Publish(Queues.Users, payload, null);
            return(Task.CompletedTask);
        }
Beispiel #2
0
 public RecordingsService(LmsCourseMeetingModel lmsCourseMeetingModel, LmsUserModel lmsUserModel,
                          IAdobeConnectAccountService acAccountService, MeetingSetup meetingSetup, UsersSetup usersSetup, ILogger logger)
 {
     this.lmsCourseMeetingModel = lmsCourseMeetingModel;
     this.lmsUserModel          = lmsUserModel;
     this.acAccountService      = acAccountService;
     this.meetingSetup          = meetingSetup;
     this.logger     = logger;
     this.usersSetup = usersSetup;
 }
Beispiel #3
0
 public LtiApiController(
     LmsUserModel lmsUserModel,
     MeetingSetup meetingSetup,
     ApplicationSettingsProvider settings,
     UsersSetup usersSetup,
     IAdobeConnectAccountService acAccountService,
     ILogger logger,
     ICache cache) : base(acAccountService, settings, logger, cache)
 {
     this.lmsUserModel = lmsUserModel;
     this.meetingSetup = meetingSetup;
     this.usersSetup   = usersSetup;
 }
Beispiel #4
0
 public SynchronizationUserService(LmsFactory lmsFactory, AdobeConnect.IAdobeConnectAccountService acAccountService, UsersSetup usersSetup,
                                   LmsUserModel lmsUserModel, LmsCompanyModel lmsCompanyModel, ApplicationSettingsProvider settings,
                                   LmsCourseMeetingModel lmsCourseMeetingModel, IAdobeConnectUserService acUserService, ILogger logger)
 {
     this.lmsFactory            = lmsFactory;
     this.acAccountService      = acAccountService;
     this.usersSetup            = usersSetup;
     this.lmsUserModel          = lmsUserModel;
     this.lmsCompanyModel       = lmsCompanyModel;
     this.lmsCourseMeetingModel = lmsCourseMeetingModel;
     this.acUserService         = acUserService;
     this.logger = logger;
     _settings   = settings;
 }
Beispiel #5
0
 public SectionsController(
     MeetingSetup meetingSetup,
     UsersSetup usersSetup,
     LmsFactory lmsFactory,
     IAdobeConnectAccountService acAccountService,
     ApplicationSettingsProvider settings,
     ILogger logger,
     ICache cache)
     : base(acAccountService, settings, logger, cache)
 {
     this.meetingSetup = meetingSetup;
     this.usersSetup   = usersSetup;
     this.lmsFactory   = lmsFactory;
 }
Beispiel #6
0
        private async Task CreateAnnouncement(
            LmsMeetingType meetingType,
            ILmsLicense lmsCompany,
            ILtiParam param,
            MeetingDTOInput meetingDto)
        {
            if (!lmsCompany.ShowAnnouncements.GetValueOrDefault() || string.IsNullOrEmpty(param.context_title))
            {
                return;
            }

            var announcementTitle = string.Format(
                "A new {0} room was created for course {1}",
                meetingNames[meetingType],
                param.context_title);
            string announcementMessage = GetAnnouncementMessage(meetingType, meetingDto, param.referer);

            switch (lmsCompany.LmsProviderId)
            {
            case (int)LmsProviderEnum.Canvas:
                var lmsUser = LmsUserModel.GetOneByUserIdAndCompanyLms(param.lms_user_id, lmsCompany.Id).Value;
                var token   = UsersSetup.IsTeacher(param, lmsCompany) && !string.IsNullOrEmpty(lmsUser.Token)
                        ? lmsUser.Token
                        : lmsCompany.AdminUser.Return(a => a.Token, string.Empty);

                await CanvasApi.CreateAnnouncement(
                    lmsCompany.LmsDomain,
                    token,
                    param.course_id,
                    announcementTitle,
                    announcementMessage);

                break;

            case (int)LmsProviderEnum.Blackboard:
                BlackboardApi.CreateAnnouncement(param.course_id.ToString(), param.lms_user_id, lmsCompany.GetLMSSettings(Settings), announcementTitle, announcementMessage);
                break;

            case (int)LmsProviderEnum.AgilixBuzz:
                // string error;
//                    this.dlapApi.CreateAnnouncement(
//                        credentials,
//                        param.course_id,
//                        announcementTitle,
//                        announcementMessage,
//                        out error);
                break;
            }
        }
 public async Task Setup(UsersSetup setup)
 {
     var request = mapper.Map <SetupRequest>(setup);
     await usersClient.SetupAsync(request);
 }