페이지별 학습시간(초)전달 : parent.getpagelearn(pageindex) 추가
This commit is contained in:
parent
6a3bb62f3e
commit
4df72e9888
|
|
@ -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<int>("cr.lectinningpage.totstudy", new Hashtable() { { "lectno", lectno }, { "cmino", cmino }, { "cpno", cpno } }).First();
|
||||
return JsonOK(totstudy, true);
|
||||
}
|
||||
return JsonOK(0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -275,11 +275,11 @@
|
|||
from lectinning a
|
||||
inner join cminning b on b.cmino=a.cmino
|
||||
where a.lectno=#lectno# and a.cmino=#cmino#
|
||||
</select>
|
||||
</select>
|
||||
<select id="cr.checklectdate" parameterClass="hashtable" resultClass="lect">
|
||||
select a.lectno,a.sdate,a.edate
|
||||
from lect a
|
||||
where a.lectno=#lectno#
|
||||
select a.lectno,a.sdate,a.edate
|
||||
from lect a
|
||||
where a.lectno=#lectno#
|
||||
</select>
|
||||
<update id="cr.studylog" parameterClass="hashtable">
|
||||
update lectinningpage a
|
||||
|
|
@ -1398,5 +1398,10 @@
|
|||
where a.typejob is not null and a.typejob <> ""
|
||||
group by a.typejob
|
||||
</select>
|
||||
<select id="cr.lectinningpage.totstudy" parameterClass="hashtable" resultClass="int">
|
||||
select ifnull(sum(totstudy),-1) totstudy
|
||||
from lectinningpage
|
||||
where lectno = #lectno# and cmino = #cmino# and cpno = #cpno#
|
||||
</select>
|
||||
</statements>
|
||||
</sqlMap>
|
||||
|
|
@ -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;
|
||||
}
|
||||
</script>
|
||||
Loading…
Reference in New Issue