public NewHomeworkNotification(Task task, User student, Homework homework, RequestContext request) : base(new[] { task.Course.Mentor }, u => $"Пользователь <b>{student.Name} {student.Surname}</b> ({new MailTo(student.Email)}) отправил решение к задаче " + $"<a href = \"{UrlGenerator.GetRouteUrl(request, "Index", "Homeworks", new { homeworkId = homework.Id })}" + $"\">{task.Title}</a>") { }
public NewPullRequestHomeworkNotification(Task task, User student, long pullRequestDataId, RequestContext request) : base(new[] { task.Course.Mentor }, u => $"Пользователь <b>{student.Name} {student.Surname} ({student.Email})</b> отправил решение к задаче " + $"<a href = \"" + $"{UrlGenerator.GetRouteUrl(request, "Index", "PullRequest", new { pullRequestDataId })}" + $"\">{task.Title}</a>") { }
public ReviewAddedNotification(Homework homework, HomeworkAcceptViewModel model, RequestContext request) : base(u => u.Id == homework.StudentId, u => $"Задача <a href = \"{UrlGenerator.GetRouteUrl(request, "Index", "Homeworks", new { homeworkId = homework.Id })}" + $"\">{homework.Task.Title}</a> проверена <i>(" + (model.IsAccepted ? "зачтена" : $"есть замечания: \"{model.ReviewComment.Substring(0, Math.Min(model.ReviewComment.Length, 15))}...\"") + ")</i>") { }
public NewTaskNotification(IEnumerable <User> users, Task newTask, RequestContext request) : base(users, u => $"В курсе <b><a href=\"" + $"{UrlGenerator.GetRouteUrl(request, "Index", "Courses", new {courseId = newTask.CourseId})}" + $"\">{newTask.Course.Name}</a></b> добавлено задание " + $"<a href=\"" + $"{UrlGenerator.GetRouteUrl(request, "Create", "Homeworks", new { taskId = newTask.Id, description = newTask.Description })}" + $"\">{newTask.Title}</a>") { }
public TeacherAddedNotification(User from, User to, RequestContext request) : base(new[] { to }, u => $"Пользователь <b>{from.Name} {from.Surname}</b> ({new MailTo(from.Email)}) указал вас как преподавателя. " + $"Создайте <a href = \"{UrlGenerator.GetRouteUrl(request, "Create", "Courses")}\">свой первый курс</a>") { }