public ActionResult Deny(Guid id, string reason)
{
var badgeSubmission = RepositoryFactory.BadgeSubmissionRepository.GetNullableById(id);
if (badgeSubmission == null) return HttpNotFound();
badgeSubmission.Submitted = false;
_notificationService.Notify(badgeSubmission.Creator, AuthenticatedUser,
"Your badge request has been denied",
"Sorry, your request for the \"" + badgeSubmission.Badge.Name + "\" badge has been denied for the following reason: " + reason,
null);
RepositoryFactory.BadgeSubmissionRepository.EnsurePersistent(badgeSubmission);
Message = "The badge request has been denied and a notification has been sent to the student.";
return RedirectToAction("Index");
}