parent
1845e4274c
commit
e36fe50aad
|
|
@ -353,10 +353,10 @@ namespace NP.Base.Controllers
|
||||||
{
|
{
|
||||||
return JsonBack(new JsonRtn() { code = 1000, obj = -2 });
|
return JsonBack(new JsonRtn() { code = 1000, obj = -2 });
|
||||||
}
|
}
|
||||||
else if (cmi.isrebate == 1)
|
else
|
||||||
{
|
{
|
||||||
var intval = Dao.Get<LectInning>("cr.lectinnings", new System.Collections.Hashtable() { { "lectno", lectno }, { "isfinishtoday", 1 } }).Count();
|
var intval = Dao.Get<LectInning>("cr.lectinnings", new System.Collections.Hashtable() { { "lectno", lectno }, { "isfinishtoday", 1 } }).Count();
|
||||||
if (intval > 5 && cmi.istatus < 2)
|
if (intval > 7 && cmi.istatus < 2)
|
||||||
{
|
{
|
||||||
return JsonBack(new JsonRtn() { code = 1000, obj = -3 });
|
return JsonBack(new JsonRtn() { code = 1000, obj = -3 });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -251,9 +251,8 @@
|
||||||
<isGreaterThan property="pseq" compareValue="0">and p.pseq=#pseq#</isGreaterThan>
|
<isGreaterThan property="pseq" compareValue="0">and p.pseq=#pseq#</isGreaterThan>
|
||||||
<isGreaterThan property="cpno" compareValue="0">and p.cpno=#cpno#</isGreaterThan>
|
<isGreaterThan property="cpno" compareValue="0">and p.cpno=#cpno#</isGreaterThan>
|
||||||
<isGreaterThan property="isrelay" compareValue="0">and p.pseq=li.pseq</isGreaterThan>
|
<isGreaterThan property="isrelay" compareValue="0">and p.pseq=li.pseq</isGreaterThan>
|
||||||
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()
|
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()-->
|
where a.cmino=#cmino# and b.sdate < now() and b.edate > now()
|
||||||
where a.cmino=#cmino#
|
|
||||||
<selectKey type="post" property="logno" resultClass="long">SELECT last_insert_id()</selectKey>
|
<selectKey type="post" property="logno" resultClass="long">SELECT last_insert_id()</selectKey>
|
||||||
</insert>
|
</insert>
|
||||||
<select id="cr.ctps" parameterClass="hashtable" resultClass="ctp">
|
<select id="cr.ctps" parameterClass="hashtable" resultClass="ctp">
|
||||||
|
|
|
||||||
|
|
@ -83,51 +83,71 @@ namespace NP.FO.Controllers
|
||||||
//출석 인증 시만 보이게 제한 처리 (intval 회차, intval2 출석인증제외 회원, intval3 출석인증제외 강좌)
|
//출석 인증 시만 보이게 제한 처리 (intval 회차, intval2 출석인증제외 회원, intval3 출석인증제외 강좌)
|
||||||
if (data != null && (data.intval == 1 || data.intval2 == 1 || data.intval3 == 1))
|
if (data != null && (data.intval == 1 || data.intval2 == 1 || data.intval3 == 1))
|
||||||
{
|
{
|
||||||
//이어보기를 위해 페이지관리
|
var todayLectinningCount = Dao.Get<LectInning>("cr.lectinnings", new System.Collections.Hashtable() { { "lectno", vm.croomlectno }, { "isfinishtoday", 1 } }).Count();
|
||||||
//vm.pseq = vm.pseq < 1 ? 1 : vm.pseq;
|
//1일 신규 동영상 강의를 8차시로 제한
|
||||||
vm.pseq = 0;
|
if (todayLectinningCount < 8)
|
||||||
//학습로그생성
|
|
||||||
String ua = "";
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
ua = (Request.UserAgent ?? "").ToLower();
|
//이어보기를 위해 페이지관리
|
||||||
}
|
//vm.pseq = vm.pseq < 1 ? 1 : vm.pseq;
|
||||||
catch (Exception ex)
|
vm.pseq = 0;
|
||||||
{
|
//학습로그생성
|
||||||
Logger.Error("ExamStart Get UserAgent Info Error" + ex.StackTrace);
|
String ua = "";
|
||||||
}
|
try
|
||||||
vm.lip = new LectInningPage()
|
|
||||||
{
|
|
||||||
lectno = vm.lectno,
|
|
||||||
cmino = vm.cmino,
|
|
||||||
pseq = vm.pseq,
|
|
||||||
userno = SUserInfo.UserNo,
|
|
||||||
isrelay = 1,
|
|
||||||
uno = SUserInfo.UserNo,
|
|
||||||
uip = GetUserIP(),
|
|
||||||
ispc = vm.ismobile == 1 ? 0 : 1,
|
|
||||||
webkitinfo = ua.Length > 500 ? ua.Substring(0, 500) : ua
|
|
||||||
};
|
|
||||||
Dao.Insert("cr.lectinningpage.in", vm.lip);
|
|
||||||
if (vm.lip.logno > 0)
|
|
||||||
{
|
|
||||||
vm.status = 1;
|
|
||||||
vm.Pages = Dao.Get<LectInningPage, CTPage>("cr.ctps", vm.lip);
|
|
||||||
vm.pseq = vm.Pages.First().lastpseq;
|
|
||||||
vm.Page = vm.Pages.Where(w => w.pseq == vm.pseq).First();
|
|
||||||
vm.CMInning = new CMInning() { isokmid = vm.Page.isokmid, ismenu = vm.Page.ismenu, iseq = vm.Page.iseq, ititle = vm.Page.ititle, ctype = vm.Page.ctype, ccode = vm.Page.ccode, isoversize = vm.Page.isoversize, mstime = vm.Page.mstime, metime = vm.Page.metime };
|
|
||||||
if (vm.CMInning.isokmid == 0 && vm.CMInning.metime > 0)
|
|
||||||
{
|
{
|
||||||
//if (Request.IsLocal || GetConfig("isdevtest")=="1")
|
ua = (Request.UserAgent ?? "").ToLower();
|
||||||
//{
|
}
|
||||||
// vm.CMInning.mtime = 10;
|
catch (Exception ex)
|
||||||
//}
|
{
|
||||||
//else
|
Logger.Error("ExamStart Get UserAgent Info Error" + ex.StackTrace);
|
||||||
//{
|
}
|
||||||
Random r = new Random();
|
vm.lip = new LectInningPage()
|
||||||
vm.CMInning.mtime = r.Next(vm.CMInning.mstime * 60, vm.CMInning.metime * 60);
|
{
|
||||||
vm.CMInning.mtime = vm.CMInning.mtime < 10 ? 15 : vm.CMInning.mtime;
|
lectno = vm.lectno,
|
||||||
//}
|
cmino = vm.cmino,
|
||||||
|
pseq = vm.pseq,
|
||||||
|
userno = SUserInfo.UserNo,
|
||||||
|
isrelay = 1,
|
||||||
|
uno = SUserInfo.UserNo,
|
||||||
|
uip = GetUserIP(),
|
||||||
|
ispc = vm.ismobile == 1 ? 0 : 1,
|
||||||
|
webkitinfo = ua.Length > 500 ? ua.Substring(0, 500) : ua
|
||||||
|
};
|
||||||
|
Dao.Insert("cr.lectinningpage.in", vm.lip);
|
||||||
|
if (vm.lip.logno > 0)
|
||||||
|
{
|
||||||
|
vm.status = 1;
|
||||||
|
vm.Pages = Dao.Get<LectInningPage, CTPage>("cr.ctps", vm.lip);
|
||||||
|
vm.pseq = vm.Pages.First().lastpseq;
|
||||||
|
vm.Page = vm.Pages.Where(w => w.pseq == vm.pseq).First();
|
||||||
|
vm.CMInning = new CMInning() { isokmid = vm.Page.isokmid, ismenu = vm.Page.ismenu, iseq = vm.Page.iseq, ititle = vm.Page.ititle, ctype = vm.Page.ctype, ccode = vm.Page.ccode, isoversize = vm.Page.isoversize, mstime = vm.Page.mstime, metime = vm.Page.metime };
|
||||||
|
if (vm.CMInning.isokmid == 0 && vm.CMInning.metime > 0)
|
||||||
|
{
|
||||||
|
//if (Request.IsLocal || GetConfig("isdevtest")=="1")
|
||||||
|
//{
|
||||||
|
// vm.CMInning.mtime = 10;
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
Random r = new Random();
|
||||||
|
vm.CMInning.mtime = r.Next(vm.CMInning.mstime * 60, vm.CMInning.metime * 60);
|
||||||
|
vm.CMInning.mtime = vm.CMInning.mtime < 10 ? 15 : vm.CMInning.mtime;
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
#region 복습처리(학습종료일 ~ 1년)
|
||||||
|
vm.LectInnings = Dao.Get<LectInning>("cr.cminnings", new System.Collections.Hashtable() { { "lectno", vm.lectno }, { "userno", SUserInfo.UserNo }, { "limit", 1 } });
|
||||||
|
if (vm.LectInnings.Count() > 0 && vm.LectInnings.First().sdate < DateTime.Now && vm.LectInnings.First().edate.AddYears(1) > DateTime.Now)
|
||||||
|
{
|
||||||
|
vm.istaste = 1;
|
||||||
|
vm.status = 1;
|
||||||
|
vm.Pages = Dao.Get<LectInningPage, CTPage>("cr.ctps", vm.lip);
|
||||||
|
vm.pseq = vm.Pages.First().lastpseq;
|
||||||
|
vm.Page = vm.Pages.Where(w => w.pseq == vm.pseq).First();
|
||||||
|
vm.CMInning = new CMInning() { lectno = vm.lectno, cmino = vm.cmino, isokmid = vm.Page.isokmid, ismenu = vm.Page.ismenu, iseq = vm.Page.iseq, ititle = vm.Page.ititle, ctype = vm.Page.ctype, ccode = vm.Page.ccode, isoversize = vm.Page.isoversize, mstime = vm.Page.mstime, metime = vm.Page.metime };
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -353,30 +353,14 @@
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
function golog(ispaging, isunload, isinning) {
|
function golog(ispaging, isunload, isinning) {
|
||||||
var checklectdate = -1;
|
|
||||||
if (@Model.istaste == 1) {
|
|
||||||
checklectdate = 1;
|
|
||||||
} else {
|
|
||||||
$.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;
|
ispaging = ispaging || false;
|
||||||
isunload = isunload || false;
|
isunload = isunload || false;
|
||||||
isinning = isinning || false;
|
isinning = isinning || false;
|
||||||
_tsec++;
|
_tsec++;
|
||||||
if (!ispaging && !isunload && !isinning) {
|
if (!ispaging && !isunload && !isinning) {
|
||||||
_sec++;
|
_sec++;
|
||||||
}
|
}
|
||||||
if (_mtimesec > 0) {
|
if (_mtimesec > 0) {
|
||||||
_mtimesec++;
|
_mtimesec++;
|
||||||
if (_mtimesec > 10) {
|
if (_mtimesec > 10) {
|
||||||
|
|
@ -395,38 +379,32 @@
|
||||||
_psecond = getint($("#video1")[0].currentTime);
|
_psecond = getint($("#video1")[0].currentTime);
|
||||||
}
|
}
|
||||||
} catch (e) { }
|
} 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);
|
||||||
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) {
|
} else if (_mtime > 0 && !_okmid && _tsec >= _mtime && _mtimesec < 1) {
|
||||||
|
//clearInterval(_timerlog);
|
||||||
if (checklectdate > 0) {
|
_mtimesec = 1;
|
||||||
//alert(checklectdate);
|
$("#playerbox").addClass("hidecontent");
|
||||||
//clearInterval(_timerlog);
|
if (_ctype == 0 && navigator.userAgent.match(/iPhone|iPod/i)) {
|
||||||
_mtimesec = 1;
|
var vid = document.getElementById('video1');
|
||||||
$("#playerbox").addClass("hidecontent");
|
vid.webkitExitFullscreen();
|
||||||
if (_ctype == 0 && navigator.userAgent.match(/iPhone|iPod/i)) {
|
} else {
|
||||||
var vid = document.getElementById('video1');
|
try {
|
||||||
vid.webkitExitFullscreen();
|
if (navigator.userAgent.match(/iPhone|iPod/i)) {
|
||||||
} else {
|
alert('10초안에 중간출석을 확인해주세요.');
|
||||||
|
}
|
||||||
|
else if (typeof (document.msExitFullscreen) == "function") {
|
||||||
|
document.msExitFullscreen();
|
||||||
|
} else if (typeof (document.webkitExitFullscreen) == "function") {
|
||||||
|
document.webkitExitFullscreen();
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
try {
|
try {
|
||||||
if (navigator.userAgent.match(/iPhone|iPod/i)) {
|
document.webkitExitFullscreen();
|
||||||
alert('10초안에 중간출석을 확인해주세요.');
|
} catch (e2) {
|
||||||
}
|
|
||||||
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() {
|
function okmid() {
|
||||||
|
|
@ -585,7 +563,7 @@
|
||||||
msg("현재차시를 학습완료해야 다음차시를 학습할 수 있습니다.");
|
msg("현재차시를 학습완료해야 다음차시를 학습할 수 있습니다.");
|
||||||
} else if (capResult.obj == -3) {
|
} else if (capResult.obj == -3) {
|
||||||
_timerlog = setInterval(golog, 1000);
|
_timerlog = setInterval(golog, 1000);
|
||||||
msg("일일 최대 학습회차는 6차시입니다.");
|
msg("일일 최대 학습회차는 8차시입니다.");
|
||||||
} else {
|
} else {
|
||||||
//학습로그 & 차시이동
|
//학습로그 & 차시이동
|
||||||
_prenextcmino = capResult.obj;
|
_prenextcmino = capResult.obj;
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@
|
||||||
@if (d.isonline == 1)
|
@if (d.isonline == 1)
|
||||||
{
|
{
|
||||||
//학습기간 종료후에도 시청은 가능하고, 출석인정은 되지않도록 변경 2021-01-25
|
//학습기간 종료후에도 시청은 가능하고, 출석인정은 되지않도록 변경 2021-01-25
|
||||||
<a href="#" onclick="playerOpen(@d.cmino, @(d.sdate < DateTime.Now @*&& d.edate > DateTime.Now*@ ? 1 : 0), @(d.isseq == 1 &&d.iseq != 1 && d.preistatus < 2 ? 0 : 1), @(Model.intval > 7 && d.isrebate == 1 ? 0 : 1));" class="lctcStdy">학습하기</a>
|
<a href="#" onclick="playerOpen(@d.cmino, @(d.sdate < DateTime.Now && d.edate.AddYears(1) > DateTime.Now ? 1 : 0), @(d.isseq == 1 &&d.iseq != 1 && d.preistatus < 2 ? 0 : 1), @(Model.intval > 7 ? 0 : 1));" class="lctcStdy">학습하기</a>
|
||||||
}
|
}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
@if (d.isonline == 1)
|
@if (d.isonline == 1)
|
||||||
{
|
{
|
||||||
//학습기간 종료후에도 시청은 가능하고, 출석인정은 되지않도록 변경 2021-01-25
|
//학습기간 종료후에도 시청은 가능하고, 출석인정은 되지않도록 변경 2021-01-25
|
||||||
<a href="#" onclick="playerOpen(@d.cmino, @(d.sdate < DateTime.Now @*&& d.setime > DateTime.Now *@ ? 1 : 0), @(d.isseq == 1 && d.iseq != 1 && d.preistatus < 2 ? 0 : 1), @(Model.intval > 7 && d.isrebate == 1 ? 0 : 1));" class="lctcStdy">학습하기</a>
|
<a href="#" onclick="playerOpen(@d.cmino, @(d.sdate < DateTime.Now && d.edate.AddYears(1) > DateTime.Now ? 1 : 0), @(d.isseq == 1 && d.iseq != 1 && d.preistatus < 2 ? 0 : 1), @(Model.intval > 7 ? 0 : 1));" class="lctcStdy">학습하기</a>
|
||||||
}
|
}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue