Git Repository Public Repository

CPE_learningsite

URLs

Copy to Clipboard

This repository has no backups
This repository's network speed is throttled to 100KB/sec

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using System.Web.Http.Results;
using System.Web.Mvc;
using TinCan;
using CPE.App.Api.Models;
using System.Threading.Tasks;
using CPE.App.Api.Helpers;

namespace CPE.App.Api.Controllers
{
    public class statementsController : ApiController
    {

        public HttpResponseMessage Post(JObject tincan)
        {
            //Utilities.LogWrapper.Info("[statementsController][Post] tincan={0}", tincan.ToString());

            TinCanStatementModel statement = tincan.ToObject<TinCanStatementModel>();
            var done = TinCanHelper.HandleStatement(statement);
            if (!done)
            {
                Utilities.LogWrapper.Error("[statementsController][Post] TinCan Handler failed: email={0} courseName={1}", statement.Actor.Mbox.Substring(7), statement.Object.Definition.Name.EnUs);

                var result = SendEmailHelper.SendCertificateGenerationFailedEmail(statement);
            }
            return Request.CreateResponse(HttpStatusCode.OK);
        }
    }
}

Commits for CPE_learningsite/CPE/CPE.App/CPE.App.Api/Controllers/StatementController.cs

Diff revisions: vs.
Revision Author Commited Message
4cd176 ... v.shishlov Fri 27 Aug, 2021 14:33:17 +0000

initial commit