diff --git a/Base/Controller/FOCommon.cs b/Base/Controller/FOCommon.cs index 01e238f..d20285b 100644 --- a/Base/Controller/FOCommon.cs +++ b/Base/Controller/FOCommon.cs @@ -279,7 +279,7 @@ namespace NP.Base.Controllers } } 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) { @@ -560,8 +560,15 @@ namespace NP.Base.Controllers } return JsonOK(0); } - - + [HttpPost] + public JsonResult PageLearningTotalTime(Int64 lectno, Int64 cmino, int cpno) + { + if (SUserInfo.UserNo > 0) + { + var totstudy = Dao.Get("cr.lectinningpage.totstudy", new Hashtable() { { "lectno", lectno }, { "cmino", cmino }, { "cpno", cpno } }).First(); + return JsonOK(totstudy, true); + } + return JsonOK(0); + } } - -} \ No newline at end of file +} diff --git a/Dao/MyBatis/Maps/CRoom.xml b/Dao/MyBatis/Maps/CRoom.xml index 16f0a66..a85fdba 100644 --- a/Dao/MyBatis/Maps/CRoom.xml +++ b/Dao/MyBatis/Maps/CRoom.xml @@ -275,11 +275,11 @@ from lectinning a inner join cminning b on b.cmino=a.cmino where a.lectno=#lectno# and a.cmino=#cmino# - + update lectinningpage a @@ -1398,5 +1398,10 @@ where a.typejob is not null and a.typejob <> "" group by a.typejob + \ No newline at end of file diff --git a/FO/Views/CDMS/Contents.cshtml b/FO/Views/CDMS/Contents.cshtml index ba78ca2..15da0e3 100644 --- a/FO/Views/CDMS/Contents.cshtml +++ b/FO/Views/CDMS/Contents.cshtml @@ -399,7 +399,7 @@ capp("/focommon/studylog", { logno: _logno, lectno: @Model.lip.lectno, cmino: @Model.lip.cmino, cpno: _cpno, studysec: _sec, ispc: ismobile() ? 0 : 1, nextcpno: ispaging ? _nextcpno : 0, getiframe: @(Model.CMInning.ismenu == 1 && Model.CMInning.ctype == 2 ? 1 : 0), issample: @Model.istaste, psec: _psecond }, "cbstudylog" + (ispaging ? "page" : "") + (isunload ? "unload" : "") + (isinning ? "inning" : ""), null, null, true, null, true); } } else if (_mtime > 0 && !_okmid && _tsec >= _mtime && _mtimesec < 1) { - + if (checklectdate > 0) { alert(checklectdate); //clearInterval(_timerlog); @@ -610,4 +610,23 @@ self.close(); } } + /* 페이지별 학습시간(초)전달 : parent.getpagelearn(pageindex) */ + function getpagelearn(pseq) { + var result = -1; + var cpno = getint(_cpnos[pseq - 1]); + $.ajax({ + type: "post", + url: "/focommon/pagelearningtotaltime", + async: false, + data: { lectno: @Model.lip.lectno, cmino: @Model.lip.cmino, cpno: cpno}, + success: function (data) { + if (data.code == 1000) { + result = parseInt(data.obj); + } else { + result = -1; + } + } + }); + return result; + } \ No newline at end of file