From 384cf418c5bafa93307e87af76248cb328ed4584 Mon Sep 17 00:00:00 2001 From: hodong13 Date: Tue, 3 Nov 2020 06:54:31 +0000 Subject: [PATCH] =?UTF-8?q?=EC=BD=98=ED=85=90=EC=B8=A0=20=EC=B0=A8?= =?UTF-8?q?=EC=8B=9C=20=EC=A7=84=EB=8F=84=EC=9C=A8=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Base/Controller/FOCommon.cs | 16 ++++++++++++++++ Dao/MyBatis/Maps/CRoom.xml | 7 +++++++ FO/Views/CDMS/Contents.cshtml | 19 +++++++++++++++++++ 3 files changed, 42 insertions(+) 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);