diff --git a/Base/Controller/FOCommon.cs b/Base/Controller/FOCommon.cs index 41767a4..d1bf8e6 100644 --- a/Base/Controller/FOCommon.cs +++ b/Base/Controller/FOCommon.cs @@ -263,6 +263,22 @@ namespace NP.Base.Controllers return JsonOK(0); } [HttpPost] + public JsonResult PRGRS(Int64 lectno, Int64 cmino) + { + if (SUserInfo.UserNo > 0) + { + try + { + return Json(Dao.Get("cr.getprogress", new Hashtable() { { "lectno", lectno }, { "cmino", cmino } }).First(), JsonRequestBehavior.AllowGet); + } + catch (Exception ex) + { + Console.WriteLine(ex.Message); + } + } + return Json(-1, JsonRequestBehavior.AllowGet); + } + [HttpPost] public JsonResult StudyLog(Int64 logno, Int64 lectno, Int64 cmino, int cpno, int studysec, int ispc, int nextcpno, int getiframe, int issample = 0, int psec = 0) { if (SUserInfo.UserNo > 0 || issample > 0) diff --git a/Dao/MyBatis/Maps/CRoom.xml b/Dao/MyBatis/Maps/CRoom.xml index 90d0547..e71c4a0 100644 --- a/Dao/MyBatis/Maps/CRoom.xml +++ b/Dao/MyBatis/Maps/CRoom.xml @@ -261,6 +261,13 @@ where a.cmino=#cmino# order by a.iseq + update lectinningpage a inner join lect b on b.lectno=a.lectno and b.userno=#userno# diff --git a/FO/Views/CDMS/Contents.cshtml b/FO/Views/CDMS/Contents.cshtml index d909140..4eddcf8 100644 --- a/FO/Views/CDMS/Contents.cshtml +++ b/FO/Views/CDMS/Contents.cshtml @@ -510,6 +510,25 @@ //clearInterval(_timerlog); golog(true); } + function getprgrs() { + var r = -1; + if (@Model.istaste == 1) { + r = 100; + } else { + $.ajax({ + type: "post", + url: "/focommon/prgrs", + async: false, + data: { lectno: @Model.lip.lectno, cmino: @Model.lip.cmino}, + success: function (r2) { + r = parseInt(r2, 10); + }, error: function (e) { + r = -1; + } + }); + } + return r; + } window.onbeforeunload = function () { if (!_passunload && @Model.istaste != 1 && !_islogout) { clearInterval(_timerlog);