コード例 #1
0
        public async Task <ApiResponse> checkSubjectiveAnswers([FromBody] IEnumerable <Result> model)
        {
            try
            {
                Console.WriteLine("api called to mark subjective answer");
                Console.WriteLine(model.FirstOrDefault().ExaminerId);
                await _answerService.CheckAnswer(model);

                return(HttpResponse(200, ""));
            }
            catch (Exception e)
            {
                _logger.Log(LogType.Error, () => e.Message, e);
                return(HttpResponse(500, e.Message));
            }
        }
コード例 #2
0
ファイル: AnswerController.cs プロジェクト: AntonDershen/Task
 public bool CheckAnswer(int taskId , string answer)
 {
     return answerService.CheckAnswer(taskId, answer, userService.GetUserId(User.Identity.Name));
 }
コード例 #3
0
 public async Task <bool> CheckSingleAnswer(Guid questionId, Guid answerId)
 {
     return(await _answerService.CheckAnswer(answerId));
 }