public AuthController(ExtensibleDbContext dbCtx) { _dbCtx = dbCtx; _config = SystemConfig.LoadConfig(); _tokenManager = new TokenManager(_dbCtx, _config); _scryptHasher = new ScryptEncoder(); }
public CourseDataTableManager(ExtensibleDbContext dbCtx, List <DataTableStudent> students = null) { _dbCtx = dbCtx; _config = SystemConfig.LoadConfig(); _canvasDataAccess = new CanvasDataAccess(_config); Students = students; }
public CanvasAccessTokenController(ExtensibleDbContext dbCtx) { _dbCtx = dbCtx; _config = SystemConfig.LoadConfig(); _tokenManager = new TokenManager(_dbCtx, _config); _canvasTokenManager = new CanvasTokenManager(_dbCtx); }
public CourseTabsController(ExtensibleDbContext dbCtx) { _dbCtx = dbCtx; _config = SystemConfig.LoadConfig(); _tokenManager = new TokenManager(_dbCtx, _config); _canvasTokenManager = new CanvasTokenManager(_dbCtx); _canvasDataAccess = new CanvasDataAccess(_config); _tableManager = new CourseDataTableManager(_dbCtx); }
private static void GetCustomDataColumns(ref CourseDataTable table, string accessToken, int courseId, ExtensibleDbContext dbCtx) { var customCols = new List <CourseDataColumn>(); var config = SystemConfig.LoadConfig(); var colManager = new CourseDataTableManager(dbCtx, table.Students); table.CustomDataColumns = colManager.GetCustomDataColumns(accessToken, courseId); }
public AuthControllerTests() { _config = SystemConfig.LoadConfig(); DbContextOptionsBuilder <ExtensibleDbContext> optionsBuilder = new(); optionsBuilder.UseSqlServer(_config.testDbConnString); _dbCtx = new ExtensibleDbContext(optionsBuilder.Options); _encoder = new ScryptEncoder(); SetupContext(); }
public UserManagementControllerTests() { _config = SystemConfig.LoadConfig(); DbContextOptionsBuilder <ExtensibleDbContext> optionsBuilder = new(); optionsBuilder.UseSqlServer(_config.testDbConnString); _dbCtx = new ExtensibleDbContext(optionsBuilder.Options); _encoder = new ScryptEncoder(); _accounts = GenerateUserList(); SetupContext(); }
public CanvasPersonalAccessTokenControllerTests() { _config = SystemConfig.LoadConfig(); DbContextOptionsBuilder <ExtensibleDbContext> optionsBuilder = new(); optionsBuilder.UseSqlServer(_config.testDbConnString); _dbCtx = new ExtensibleDbContext(optionsBuilder.Options); _encoder = new ScryptEncoder(); _canvasTokenHelper = new CanvasTokenHelper(); _accounts = new List <ApplicationUserAccount>(); SetupContext(); }
public UserCustomDataManager(ExtensibleDbContext dbCtx) { _dbCtx = dbCtx; _config = SystemConfig.LoadConfig(); _canvasDataAccess = new CanvasDataAccess(_config); }
public CanvasTokenManager(ExtensibleDbContext dbCtx) { _dbCtx = dbCtx; }
public TokenManager(ExtensibleDbContext dbCtx, SystemConfig config) { _dbCtx = dbCtx; _config = config; }
/// <summary> /// Creates an instance of and loads the data table and all its related columns and the rows for those columns /// </summary> /// <param name="courseId">The id of the course for which to retreive the Canvas Gradebook for</param> /// <param name="accessToken">The Canvas access token for the user</param> /// <param name="dbContext">The database context of the application</param> /// <returns>CourseDataTable: A re-representation of the Canvas Gradebook for the purposes of this system</returns> public static CourseDataTable LoadDataTable(int courseId, string accessToken, ExtensibleDbContext dbContext) { var table = new CourseDataTable { CourseId = courseId }; // Load students var students = GetStudents(courseId, accessToken); table.Students = students; // Load assignment columns and data rows var assignmentCols = GetAssignmentColumns(courseId, accessToken); table.AssignmentGradeColumns = assignmentCols; PopulateAssignmentRows(ref table, accessToken, courseId); // Load custom data columns into table with row data GetCustomDataColumns(ref table, accessToken, courseId, dbContext); // Get derived columns seperately from and after all the other columns have been retreived var tableManager = new CourseDataTableManager(dbContext, table.Students); table.CustomDataColumns.AddRange(tableManager.GetDerivedColumns(courseId, table)); return(table); }
public UserCustomDataController(ExtensibleDbContext dbCtx) { _dbCtx = dbCtx; _config = SystemConfig.LoadConfig(); _tokenManager = new TokenManager(_dbCtx, _config); }