public async Task Invoke(HttpContext httpContext, IExamLogService examLogService) { var ignores = new List <string> { "/api", "/exams", "/resources" }; if (!ignores.Any( x => httpContext.Request.Path.StartsWithSegments(x, StringComparison.OrdinalIgnoreCase))) { try { var guid = examLogService.GetLastExamNotFinished(); if (guid != null && guid != Guid.Empty) { var destinationUri = $"/exams/re-work/{guid}"; httpContext.Response.Redirect(destinationUri); } } catch (Exception) { // ignore } } await _next(httpContext); }
public DashboardIndexModel( IExamCategoryService _ExamCategoryService, IExamLogService _ExamLogService, IScoreLogService _ScoreLogService, IReadOnlyRepository <ExamCatInstructor, Guid> _ExamCatInstructorRepository) { this._ExamCategoryService = _ExamCategoryService; this._ExamLogService = _ExamLogService; this._ScoreLogService = _ScoreLogService; this._ExamCatInstructorRepository = _ExamCatInstructorRepository; }
public ExamModel( IRenderExamService _RenderExamService, IAppUserService _AppUserService, IExamLogService _ExamLogService, IRepository <ExamCatInstructor, Guid> ExamCatInstructorRepository) { this._RenderExamService = _RenderExamService; this._AppUserService = _AppUserService; this._ExamLogService = _ExamLogService; this.ExamCatInstructorRepository = ExamCatInstructorRepository; }
public DashboardStudentExamController(IExamLogService _ExamLogService) { this._ExamLogService = _ExamLogService; }
public DashboardHistoryController(IExamLogService _ExamLogService) { this._ExamLogService = _ExamLogService; }