This commit is contained in:
parent
41d0de2b4e
commit
e0dd43df9b
|
|
@ -322,6 +322,15 @@ namespace NP.Base.Controllers
|
|||
}
|
||||
}
|
||||
[HttpPost]
|
||||
public JsonResult checklectdate(Int64 lectno)
|
||||
{
|
||||
Lect lect = Dao.Get<Lect>("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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -251,8 +251,8 @@
|
|||
<isGreaterThan property="pseq" compareValue="0">and p.pseq=#pseq#</isGreaterThan>
|
||||
<isGreaterThan property="cpno" compareValue="0">and p.cpno=#cpno#</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
|
||||
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()
|
||||
<!--inner join cm c on c.cmno=b.cmno and c.sstime < now() and c.setime > now()-->
|
||||
where a.cmino=#cmino#
|
||||
<selectKey type="post" property="logno" resultClass="long">SELECT last_insert_id()</selectKey>
|
||||
</insert>
|
||||
|
|
@ -276,6 +276,11 @@
|
|||
inner join cminning b on b.cmino=a.cmino
|
||||
where a.lectno=#lectno# and a.cmino=#cmino#
|
||||
</select>
|
||||
<select id="cr.checklectdate" parameterClass="hashtable" resultClass="lect">
|
||||
select a.lectno,a.sdate,a.edate
|
||||
from lect a
|
||||
where a.lectno=#lectno#
|
||||
</select>
|
||||
<update id="cr.studylog" parameterClass="hashtable">
|
||||
update lectinningpage a
|
||||
inner join lect b on b.lectno=a.lectno and b.userno=#userno#
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -379,8 +391,13 @@
|
|||
_psecond = getint($("#video1")[0].currentTime);
|
||||
}
|
||||
} 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) {
|
||||
|
||||
if (checklectdate > 0) {
|
||||
alert(checklectdate);
|
||||
//clearInterval(_timerlog);
|
||||
_mtimesec = 1;
|
||||
$("#playerbox").addClass("hidecontent");
|
||||
|
|
@ -407,6 +424,7 @@
|
|||
msg("중간출석 확인 메시지입니다. 10초안에 확인을 눌러주세요.", null, null, null, "okmid()");
|
||||
}
|
||||
}
|
||||
}
|
||||
function okmid() {
|
||||
capp("/focommon/studylogmid", { lectno: @Model.lip.lectno, cmino: @Model.lip.cmino}, "cbokmid");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -135,7 +135,8 @@
|
|||
<li class="lctc2">
|
||||
@if (d.isonline == 1)
|
||||
{
|
||||
<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 > 5 && d.isrebate == 1 ? 0 : 1));" class="lctcStdy">학습하기</a>
|
||||
//학습기간 종료후에도 시청은 가능하고, 출석인정은 되지않도록 변경 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 > 5 && d.isrebate == 1 ? 0 : 1));" class="lctcStdy">학습하기</a>
|
||||
}
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -39,7 +39,8 @@
|
|||
<li class="lctc2">
|
||||
@if (d.isonline == 1)
|
||||
{
|
||||
<a href="#" onclick="playerOpen(@d.cmino, @(d.sstime < DateTime.Now && d.setime > DateTime.Now ? 1 : 0), @(d.isseq == 1 && d.iseq != 1 && d.preistatus < 2 ? 0 : 1), @(Model.intval > 5 && d.isrebate == 1 ? 0 : 1));" class="lctcStdy">학습하기</a>
|
||||
//학습기간 종료후에도 시청은 가능하고, 출석인정은 되지않도록 변경 2021-01-25
|
||||
<a href="#" onclick="playerOpen(@d.cmino, @(d.sstime < DateTime.Now @*&& d.setime > DateTime.Now *@ ? 1 : 0), @(d.isseq == 1 && d.iseq != 1 && d.preistatus < 2 ? 0 : 1), @(Model.intval > 5 && d.isrebate == 1 ? 0 : 1));" class="lctcStdy">학습하기</a>
|
||||
}
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
|||
Loading…
Reference in New Issue