public UsersController(IWebCourseManager courseManager, UlearnDb db,
                        IUsersRepo usersRepo, IUserSearcher userSearcher, ICourseRolesRepo courseRolesRepo)
     : base(courseManager, db, usersRepo)
 {
     this.userSearcher    = userSearcher;
     this.courseRolesRepo = courseRolesRepo;
 }
Exemple #2
0
 public BaseController(ILogger logger, IWebCourseManager courseManager, UlearnDb db, IUsersRepo usersRepo)
 {
     this.logger        = logger ?? throw new ArgumentException(nameof(logger));
     this.courseManager = courseManager ?? throw new ArgumentException(nameof(courseManager));
     this.db            = db ?? throw new ArgumentException(nameof(db));
     this.usersRepo     = usersRepo ?? throw new ArgumentException(nameof(usersRepo));
 }
Exemple #3
0
 public UserProgressController(ILogger logger, IWebCourseManager courseManager, UlearnDb db, IUsersRepo usersRepo,
                               IVisitsRepo visitsRepo, IUserQuizzesRepo userQuizzesRepo)
     : base(logger, courseManager, db, usersRepo)
 {
     this.visitsRepo      = visitsRepo;
     this.userQuizzesRepo = userQuizzesRepo;
 }
Exemple #4
0
 public CommentPoliciesController(IWebCourseManager courseManager, UlearnDb db, IUsersRepo usersRepo,
                                  ICommentsRepo commentsRepo, ICommentLikesRepo commentLikesRepo, ICoursesRepo coursesRepo, ICourseRolesRepo courseRolesRepo, INotificationsRepo notificationsRepo,
                                  ICommentPoliciesRepo commentPoliciesRepo, IGroupMembersRepo groupMembersRepo, IGroupAccessesRepo groupAccessesRepo, IVisitsRepo visitsRepo)
     : base(courseManager, db, usersRepo, commentsRepo, commentLikesRepo, coursesRepo, courseRolesRepo, notificationsRepo, groupMembersRepo, groupAccessesRepo, visitsRepo)
 {
     this.commentPoliciesRepo = commentPoliciesRepo;
 }
 public CommentPoliciesController(ILogger logger, IWebCourseManager courseManager, UlearnDb db, IUsersRepo usersRepo,
                                  ICommentsRepo commentsRepo, ICommentLikesRepo commentLikesRepo, ICoursesRepo coursesRepo, ICourseRolesRepo courseRolesRepo, INotificationsRepo notificationsRepo,
                                  ICommentPoliciesRepo commentPoliciesRepo)
     : base(logger, courseManager, db, usersRepo, commentsRepo, commentLikesRepo, coursesRepo, courseRolesRepo, notificationsRepo)
 {
     this.commentPoliciesRepo = commentPoliciesRepo;
 }
Exemple #6
0
 public LtiResultObserver(IWebCourseManager courseManager, ILtiConsumersRepo ltiConsumersRepo,
                          ILtiRequestsRepo ltiRequestsRepo, IVisitsRepo visitsRepo)
 {
     this.courseManager    = courseManager;
     this.ltiConsumersRepo = ltiConsumersRepo;
     this.ltiRequestsRepo  = ltiRequestsRepo;
     this.visitsRepo       = visitsRepo;
 }
Exemple #7
0
 public StyleErrorsResultObserver(IWebCourseManager courseManager, MetricSender metricSender,
                                  IUsersRepo usersRepo, ISlideCheckingsRepo slideCheckingsRepo)
 {
     this.courseManager      = courseManager;
     this.metricSender       = metricSender;
     this.slideCheckingsRepo = slideCheckingsRepo;
     this.usersRepo          = usersRepo;
 }
Exemple #8
0
 public UsersController(ILogger logger, IWebCourseManager courseManager, UlearnDb db,
                        IUsersRepo usersRepo, ICourseRoleUsersFilter courseRoleUsersFilter, IUserSearcher userSearcher, ICourseRolesRepo courseRolesRepo)
     : base(logger, courseManager, db, usersRepo)
 {
     this.userSearcher          = userSearcher;
     this.courseRolesRepo       = courseRolesRepo;
     this.courseRoleUsersFilter = courseRoleUsersFilter ?? throw new ArgumentNullException(nameof(courseRoleUsersFilter));
 }
Exemple #9
0
        public WebsocketsEventSender(IHubContext <WebsocketsHub> hubContext, IWebCourseManager webCourseManager,
                                     IServiceScopeFactory serviceScopeFactory)
        {
            this.hubContext          = hubContext;
            this.serviceScopeFactory = serviceScopeFactory;

            webCourseManager.CourseChangedEvent += async courseId => await SendCourseChangedEvent(courseId);
        }
 public FlashcardUserStatisticsController(IWebCourseManager courseManager, UlearnDb db,
                                          IUsersRepo usersRepo, IGroupAccessesRepo groupAccessesRepo, IUsersFlashcardsVisitsRepo usersFlashcardsVisitsRepo,
                                          IUnitsRepo unitsRepo)
     : base(courseManager, db, usersRepo)
 {
     this.groupAccessesRepo         = groupAccessesRepo;
     this.usersFlashcardsVisitsRepo = usersFlashcardsVisitsRepo;
     this.unitsRepo = unitsRepo;
 }
Exemple #11
0
 public UserSolutionsRepo(UlearnDb db,
                          ITextsRepo textsRepo, IWorkQueueRepo workQueueRepo,
                          IWebCourseManager courseManager)
 {
     this.db            = db;
     this.textsRepo     = textsRepo;
     this.workQueueRepo = workQueueRepo;
     this.courseManager = courseManager;
 }
 public GroupsController(IWebCourseManager courseManager, UlearnDb db,
                         IUsersRepo usersRepo,
                         IGroupsRepo groupsRepo, IGroupAccessesRepo groupAccessesRepo, IGroupMembersRepo groupMembersRepo)
     : base(courseManager, db, usersRepo)
 {
     this.groupsRepo        = groupsRepo;
     this.groupAccessesRepo = groupAccessesRepo;
     this.groupMembersRepo  = groupMembersRepo;
 }
Exemple #13
0
 public SlidesController(ILogger logger, IWebCourseManager courseManager, UlearnDb db, IUsersRepo usersRepo, ICourseRolesRepo courseRolesRepo,
                         IUserSolutionsRepo solutionsRepo, IUserQuizzesRepo userQuizzesRepo, IVisitsRepo visitsRepo, IGroupsRepo groupsRepo)
     : base(logger, courseManager, db, usersRepo)
 {
     CourseRolesRepo = courseRolesRepo;
     SolutionsRepo   = solutionsRepo;
     UserQuizzesRepo = userQuizzesRepo;
     VisitsRepo      = visitsRepo;
     GroupsRepo      = groupsRepo;
 }
Exemple #14
0
 public NotificationsRepo(UlearnDb db, IServiceProvider serviceProvider,
                          IUnitsRepo unitsRepo, ICourseRolesRepo courseRolesRepo, IUsersRepo usersRepo, IWebCourseManager courseManager)
 {
     this.db = db;
     this.serviceProvider = serviceProvider;
     this.unitsRepo       = unitsRepo;
     this.usersRepo       = usersRepo;
     this.courseRolesRepo = courseRolesRepo;
     this.courseManager   = courseManager;
 }
Exemple #15
0
 public FlashcardsController(IWebCourseManager courseManager, UlearnDb db, IUsersRepo usersRepo,
                             IUsersFlashcardsVisitsRepo usersFlashcardsVisitsRepo,
                             IUserFlashcardsUnlockingRepo userFlashcardsUnlockingRepo,
                             IUnitsRepo unitsRepo)
     : base(courseManager, db, usersRepo)
 {
     this.usersFlashcardsVisitsRepo   = usersFlashcardsVisitsRepo;
     this.userFlashcardsUnlockingRepo = userFlashcardsUnlockingRepo;
     this.unitsRepo = unitsRepo;
 }
Exemple #16
0
 public ReviewCommentsController(IWebCourseManager courseManager, UlearnDb db, IUsersRepo usersRepo,
                                 ISlideCheckingsRepo slideCheckingsRepo, ICourseRolesRepo courseRolesRepo, IUnitsRepo unitsRepo, INotificationsRepo notificationsRepo)
     : base(courseManager, db, usersRepo)
 {
     this.slideCheckingsRepo = slideCheckingsRepo;
     this.courseRolesRepo    = courseRolesRepo;
     this.unitsRepo          = unitsRepo;
     this.notificationsRepo  = notificationsRepo;
     this.notificationsRepo  = notificationsRepo;
 }
Exemple #17
0
        public NotificationSender(IWebCourseManager courseManager, IEmailSender emailSender, ITelegramSender telegramSender, MetricSender metricSender, IOptions <NotificationsConfiguration> options)
        {
            this.emailSender    = emailSender;
            this.telegramSender = telegramSender;
            this.courseManager  = courseManager;
            this.metricSender   = metricSender;

            baseUrl         = options.Value.BaseUrl ?? "";
            secretForHashes = options.Value.SecretForHashes ?? "";
        }
 public ManualCheckingsForOldSolutionsAdder(
     IUserSolutionsRepo userSolutionsRepo, ISlideCheckingsRepo slideCheckingsRepo, IVisitsRepo visitsRepo, IUserQuizzesRepo userQuizzesRepo,
     IWebCourseManager courseManager)
 {
     this.userSolutionsRepo  = userSolutionsRepo;
     this.slideCheckingsRepo = slideCheckingsRepo;
     this.visitsRepo         = visitsRepo;
     this.userQuizzesRepo    = userQuizzesRepo;
     this.courseManager      = courseManager;
 }
Exemple #19
0
 public JoinGroupController(IWebCourseManager courseManager, UlearnDb db,
                            IUsersRepo usersRepo,
                            IGroupsRepo groupsRepo, IGroupMembersRepo groupMembersRepo,
                            ISlideCheckingsRepo slideCheckingsRepo)
     : base(courseManager, db, usersRepo)
 {
     this.groupsRepo         = groupsRepo;
     this.groupMembersRepo   = groupMembersRepo;
     this.slideCheckingsRepo = slideCheckingsRepo;
 }
 public FlashcardsController(ILogger logger, IWebCourseManager courseManager, UlearnDb db, IUsersRepo usersRepo,
                             IUsersFlashcardsVisitsRepo usersFlashcardsVisitsRepo,
                             IUserFlashcardsUnlockingRepo userFlashcardsUnlockingRepo,
                             ICourseRolesRepo courseRolesRepo, IGroupAccessesRepo groupAccessesRepo)
     : base(logger, courseManager, db, usersRepo)
 {
     this.usersFlashcardsVisitsRepo   = usersFlashcardsVisitsRepo;
     this.userFlashcardsUnlockingRepo = userFlashcardsUnlockingRepo;
     this.courseRolesRepo             = courseRolesRepo;
     this.groupAccessesRepo           = groupAccessesRepo;
 }
Exemple #21
0
 public ExportController(IWebCourseManager courseManager, UlearnDb db, IUsersRepo usersRepo,
                         IGroupMembersRepo groupMembersRepo, IVisitsRepo visitsRepo, IGroupsRepo groupsRepo, IUserQuizzesRepo userQuizzesRepo,
                         ICourseRolesRepo courseRolesRepo)
     : base(courseManager, db, usersRepo)
 {
     this.groupMembersRepo = groupMembersRepo;
     this.visitsRepo       = visitsRepo;
     this.groupsRepo       = groupsRepo;
     this.userQuizzesRepo  = userQuizzesRepo;
     this.courseRolesRepo  = courseRolesRepo;
 }
 public NotificationsController(IWebCourseManager courseManager, UlearnDb db,
                                IUsersRepo usersRepo,
                                IFeedRepo feedRepo,
                                IServiceProvider serviceProvider,
                                INotificationDataPreloader notificationDataPreloader)
     : base(courseManager, db, usersRepo)
 {
     this.feedRepo                  = feedRepo;
     this.serviceProvider           = serviceProvider;
     this.notificationDataPreloader = notificationDataPreloader;
 }
Exemple #23
0
 public void OneTimeSetUp()
 {
     SetupTestInfrastructureAsync(services => { services.AddScoped <TempCourseController>(); }).GetAwaiter().GetResult();
     tempCourseController = GetController <TempCourseController>();
     tempCourseController.DontCheckBaseCourseExistsOnCreate = true;
     tempCoursesRepo        = serviceProvider.GetService <ITempCoursesRepo>();
     courseRolesRepo        = serviceProvider.GetService <ICourseRolesRepo>();
     courseManager          = serviceProvider.GetService <IWebCourseManager>();
     testCourseDirectory    = new DirectoryInfo(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "TestData", "TempCourses", "Help"));
     workingCourseDirectory = new DirectoryInfo(Path.Combine(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "WorkingCourse")));
 }
Exemple #24
0
 public SlidesController(IWebCourseManager courseManager, UlearnDb db, IUsersRepo usersRepo, ICourseRolesRepo courseRolesRepo,
                         IUserSolutionsRepo solutionsRepo, IUserQuizzesRepo userQuizzesRepo, IVisitsRepo visitsRepo, IGroupsRepo groupsRepo,
                         SlideRenderer slideRenderer, ICoursesRepo coursesRepo)
     : base(courseManager, db, usersRepo)
 {
     this.coursesRepo     = coursesRepo;
     this.courseRolesRepo = courseRolesRepo;
     this.solutionsRepo   = solutionsRepo;
     this.userQuizzesRepo = userQuizzesRepo;
     this.visitsRepo      = visitsRepo;
     this.groupsRepo      = groupsRepo;
     this.slideRenderer   = slideRenderer;
 }
Exemple #25
0
 public CoursesController(ILogger logger, IWebCourseManager courseManager, UlearnDb db, ICoursesRepo coursesRepo,
                          IUsersRepo usersRepo, ICourseRolesRepo courseRolesRepo, IUnitsRepo unitsRepo, IUserSolutionsRepo solutionsRepo,
                          IUserQuizzesRepo userQuizzesRepo, IVisitsRepo visitsRepo, IGroupsRepo groupsRepo)
     : base(logger, courseManager, db, usersRepo)
 {
     this.coursesRepo     = coursesRepo;
     this.courseRolesRepo = courseRolesRepo;
     this.unitsRepo       = unitsRepo;
     this.solutionsRepo   = solutionsRepo;
     this.userQuizzesRepo = userQuizzesRepo;
     this.visitsRepo      = visitsRepo;
     this.groupsRepo      = groupsRepo;
 }
Exemple #26
0
 public BaseCommentController(ILogger logger, IWebCourseManager courseManager, UlearnDb db, IUsersRepo usersRepo,
                              ICommentsRepo commentsRepo, ICommentLikesRepo commentLikesRepo, ICoursesRepo coursesRepo, ICourseRolesRepo courseRolesRepo,
                              INotificationsRepo notificationsRepo, IGroupMembersRepo groupMembersRepo, IGroupAccessesRepo groupAccessesRepo)
     : base(logger, courseManager, db, usersRepo)
 {
     this.commentsRepo      = commentsRepo;
     this.commentLikesRepo  = commentLikesRepo;
     this.coursesRepo       = coursesRepo;
     this.courseRolesRepo   = courseRolesRepo;
     this.notificationsRepo = notificationsRepo;
     this.groupMembersRepo  = groupMembersRepo;
     this.groupAccessesRepo = groupAccessesRepo;
 }
Exemple #27
0
 public NotificationsController(IWebCourseManager courseManager, UlearnDb db,
                                IUsersRepo usersRepo,
                                IFeedRepo feedRepo,
                                IServiceProvider serviceProvider,
                                INotificationDataPreloader notificationDataPreloader,
                                IOptions <WebApiConfiguration> options)
     : base(courseManager, db, usersRepo)
 {
     this.feedRepo                  = feedRepo;
     this.serviceProvider           = serviceProvider;
     this.notificationDataPreloader = notificationDataPreloader;
     this.configuration             = options.Value;
 }
Exemple #28
0
 public GroupController(IWebCourseManager courseManager, UlearnDb db,
                        IGroupsRepo groupsRepo, IGroupAccessesRepo groupAccessesRepo, IGroupMembersRepo groupMembersRepo, IUsersRepo usersRepo, ICourseRolesRepo courseRolesRepo, INotificationsRepo notificationsRepo,
                        IGroupsCreatorAndCopier groupsCreatorAndCopier, IUnitsRepo unitsRepo, ISlideCheckingsRepo slideCheckingsRepo)
     : base(courseManager, db, usersRepo)
 {
     this.groupsRepo             = groupsRepo;
     this.groupAccessesRepo      = groupAccessesRepo;
     this.groupMembersRepo       = groupMembersRepo;
     this.courseRolesRepo        = courseRolesRepo;
     this.notificationsRepo      = notificationsRepo;
     this.groupsCreatorAndCopier = groupsCreatorAndCopier;
     this.unitsRepo          = unitsRepo;
     this.slideCheckingsRepo = slideCheckingsRepo;
 }
Exemple #29
0
 public UserProgressController(IWebCourseManager courseManager, UlearnDb db, IUsersRepo usersRepo,
                               IVisitsRepo visitsRepo, IUserQuizzesRepo userQuizzesRepo, IAdditionalScoresRepo additionalScoresRepo,
                               ICourseRolesRepo courseRolesRepo, IGroupAccessesRepo groupAccessesRepo, IGroupMembersRepo groupMembersRepo,
                               ISlideCheckingsRepo slideCheckingsRepo)
     : base(courseManager, db, usersRepo)
 {
     this.visitsRepo           = visitsRepo;
     this.userQuizzesRepo      = userQuizzesRepo;
     this.additionalScoresRepo = additionalScoresRepo;
     this.courseRolesRepo      = courseRolesRepo;
     this.groupAccessesRepo    = groupAccessesRepo;
     this.groupMembersRepo     = groupMembersRepo;
     this.slideCheckingsRepo   = slideCheckingsRepo;
 }
Exemple #30
0
 public CodeReviewStatisticsController(IWebCourseManager courseManager,
                                       ISlideCheckingsRepo slideCheckingsRepo,
                                       IUsersRepo usersRepo,
                                       IGroupsRepo groupsRepo,
                                       IGroupMembersRepo groupMembersRepo,
                                       ICourseRolesRepo courseRolesRepo,
                                       UlearnDb db)
     : base(courseManager, db, usersRepo)
 {
     this.slideCheckingsRepo = slideCheckingsRepo;
     this.groupsRepo         = groupsRepo;
     this.groupMembersRepo   = groupMembersRepo;
     this.courseRolesRepo    = courseRolesRepo;
 }