diff --git a/Base/Controller/FOCommon.cs b/Base/Controller/FOCommon.cs index 58f85c3..d05ad2d 100644 --- a/Base/Controller/FOCommon.cs +++ b/Base/Controller/FOCommon.cs @@ -322,6 +322,15 @@ namespace NP.Base.Controllers } } [HttpPost] + public JsonResult checklectdate(Int64 lectno) + { + Lect lect = Dao.Get("cr.checklectdate", new Hashtable() { { "lectno", lectno } }).First(); + if (DateTime.Now <= lect.edate) //lect.수강종료일 이후 클릭시, 학습만 허용하나 로그는 쌓지 않음 + return Json(new { result = 1 }); + else + return Json(new { result = -1 }); + } + [HttpPost] public JsonResult StudyLogMid(Int64 lectno, Int64 cmino) { if (SUserInfo.UserNo > 0) @@ -551,6 +560,8 @@ namespace NP.Base.Controllers } return JsonOK(0); } + + } } \ No newline at end of file diff --git a/Dao/MyBatis/Maps/CRoom.xml b/Dao/MyBatis/Maps/CRoom.xml index e1ee680..80053a8 100644 --- a/Dao/MyBatis/Maps/CRoom.xml +++ b/Dao/MyBatis/Maps/CRoom.xml @@ -251,8 +251,8 @@ and p.pseq=#pseq# and p.cpno=#cpno# and p.pseq=li.pseq - inner join lect b on b.lectno=#lectno# and b.userno=#userno# and b.cmno=a.cmno and b.status=1 and b.ischanged=0 - inner join cm c on c.cmno=b.cmno and c.sstime < now() and c.setime > now() + inner join lect b on b.lectno=#lectno# and b.userno=#userno# and b.cmno=a.cmno and b.status=1 and b.ischanged=0 and b.sdate < now() + where a.cmino=#cmino# SELECT last_insert_id() @@ -276,6 +276,11 @@ inner join cminning b on b.cmino=a.cmino where a.lectno=#lectno# and a.cmino=#cmino# + 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 d5810ee..b1a6b4c 100644 --- a/FO/Views/CDMS/Contents.cshtml +++ b/FO/Views/CDMS/Contents.cshtml @@ -353,6 +353,18 @@ //} } function golog(ispaging, isunload, isinning) { + var checklectdate = -1; + $.ajax({ + type: "post", + url: "/focommon/checklectdate", + async: false, + data: { lectno: @Model.lip.lectno}, + success: function (res) { + checklectdate = res.result; + }, error: function (e) { + alert("error"); + } + }); ispaging = ispaging || false; isunload = isunload || false; @@ -378,33 +390,39 @@ if ($("#video1").length > 0) { _psecond = getint($("#video1")[0].currentTime); } - } catch (e) {} - 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); + } catch (e) { } + if (checklectdate > 0) { + 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) { - //clearInterval(_timerlog); - _mtimesec = 1; - $("#playerbox").addClass("hidecontent"); - if (_ctype == 0 && navigator.userAgent.match(/iPhone|iPod/i)) { - var vid = document.getElementById('video1'); - vid.webkitExitFullscreen(); - } else { - try { - if (navigator.userAgent.match(/iPhone|iPod/i)) { - alert('10초안에 중간출석을 확인해주세요.'); - } - else if (typeof (document.msExitFullscreen) == "function") { - document.msExitFullscreen(); - } else if (typeof (document.webkitExitFullscreen) == "function") { - document.webkitExitFullscreen(); - } - } catch (e) { + + if (checklectdate > 0) { + alert(checklectdate); + //clearInterval(_timerlog); + _mtimesec = 1; + $("#playerbox").addClass("hidecontent"); + if (_ctype == 0 && navigator.userAgent.match(/iPhone|iPod/i)) { + var vid = document.getElementById('video1'); + vid.webkitExitFullscreen(); + } else { try { - document.webkitExitFullscreen(); - } catch (e2) { + if (navigator.userAgent.match(/iPhone|iPod/i)) { + alert('10초안에 중간출석을 확인해주세요.'); + } + else if (typeof (document.msExitFullscreen) == "function") { + document.msExitFullscreen(); + } else if (typeof (document.webkitExitFullscreen) == "function") { + document.webkitExitFullscreen(); + } + } catch (e) { + try { + document.webkitExitFullscreen(); + } catch (e2) { + } } } + msg("중간출석 확인 메시지입니다. 10초안에 확인을 눌러주세요.", null, null, null, "okmid()"); } - msg("중간출석 확인 메시지입니다. 10초안에 확인을 눌러주세요.", null, null, null, "okmid()"); } } function okmid() { diff --git a/FO/Views/CRoom/Index.cshtml b/FO/Views/CRoom/Index.cshtml index 5341d38..f0805a1 100644 --- a/FO/Views/CRoom/Index.cshtml +++ b/FO/Views/CRoom/Index.cshtml @@ -135,7 +135,8 @@
  • @if (d.isonline == 1) { - 학습하기 + //학습기간 종료후에도 시청은 가능하고, 출석인정은 되지않도록 변경 2021-01-25 + 학습하기 }
  • diff --git a/FO/Views/CRoom/Innings.cshtml b/FO/Views/CRoom/Innings.cshtml index d56ccd6..a0fbeb1 100644 --- a/FO/Views/CRoom/Innings.cshtml +++ b/FO/Views/CRoom/Innings.cshtml @@ -39,7 +39,8 @@
  • @if (d.isonline == 1) { - 학습하기 + //학습기간 종료후에도 시청은 가능하고, 출석인정은 되지않도록 변경 2021-01-25 + 학습하기 }