"(진행요청)
하루에 학습가능한 회차 설정 메뉴 추가 - 무제한/입력한 숫자만큼 - 선택한 값에 따라 사용자>사이버강의실>홈/학습 에서 해당 강좌 일일 학습 회차 제한"
This commit is contained in:
parent
5539247bec
commit
e61d7043c1
|
|
@ -247,6 +247,13 @@
|
||||||
<label class="col-sm-4 col-md-2 control-label">공개여부</label>
|
<label class="col-sm-4 col-md-2 control-label">공개여부</label>
|
||||||
<div class="col-sm-8 col-md-10">@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "1:공개;0:비공개" }, { "checked", Model.CM.isuse }, { "name", "CM.isuse" } })</div>
|
<div class="col-sm-8 col-md-10">@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "1:공개;0:비공개" }, { "checked", Model.CM.isuse }, { "name", "CM.isuse" } })</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
|
||||||
|
<label class="col-sm-4 col-md-2 control-label">일일 학습 회차 제한</label>
|
||||||
|
<div class="col-sm-8 col-md-10">
|
||||||
|
@Html.TextBoxFor(m => m.CM.todaylectinninglimit, new { @class = "form-control disp-init int text-right", @style = "width: 100px;", @maxlength = "5", @placeholder = "" })
|
||||||
|
회차 <span style="color:red;">※ 0이면 무제한</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@Html.HiddenFor(m => m.intval)
|
@Html.HiddenFor(m => m.intval)
|
||||||
|
|
@ -441,8 +448,6 @@
|
||||||
$("#CM_cshape1").prop("disabled", false);
|
$("#CM_cshape1").prop("disabled", false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
function loadlegal(cgno) {
|
function loadlegal(cgno) {
|
||||||
capp("/acommon/cgget", { cgno: cgno }, "renderlegal");
|
capp("/acommon/cgget", { cgno: cgno }, "renderlegal");
|
||||||
|
|
|
||||||
|
|
@ -429,7 +429,8 @@ create table cm (
|
||||||
,iscertificate tinyint not null default 1
|
,iscertificate tinyint not null default 1
|
||||||
,isdel tinyint not null
|
,isdel tinyint not null
|
||||||
,studydays int
|
,studydays int
|
||||||
`isaccommodation` TINYINT(4) NOT NULL DEFAULT '0',
|
,isaccommodation TINYINT(4) NOT NULL DEFAULT '0',
|
||||||
|
,todaylectinninglimit INT(11) NULL DEFAULT NULL,
|
||||||
,cdt datetime not null,cno bigint not NULL,udt datetime not null,uno bigint not NULL,uip varchar(50) not NULL
|
,cdt datetime not null,cno bigint not NULL,udt datetime not null,uno bigint not NULL,uip varchar(50) not NULL
|
||||||
,primary key(cmno));
|
,primary key(cmno));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@
|
||||||
,d.cname pcname
|
,d.cname pcname
|
||||||
,e.ccode,e.cname studyplacename
|
,e.ccode,e.cname studyplacename
|
||||||
,(select count(l.lectno) cnt from lect l where l.cmno = a.cmno and l.status =1 and l.ischanged=0) lectcnt
|
,(select count(l.lectno) cnt from lect l where l.cmno = a.cmno and l.status =1 and l.ischanged=0) lectcnt
|
||||||
,a.ischkatt
|
,a.ischkatt,a.todaylectinninglimit
|
||||||
,case when date_format(a.retime,'%Y%m%d') = '20991231' then 1 else 0 end isalldays
|
,case when date_format(a.retime,'%Y%m%d') = '20991231' then 1 else 0 end isalldays
|
||||||
,a.cdt,a.udt
|
,a.cdt,a.udt
|
||||||
,a.cmno value,a.cname text
|
,a.cmno value,a.cname text
|
||||||
|
|
@ -173,7 +173,7 @@
|
||||||
order by a.rno
|
order by a.rno
|
||||||
</select>
|
</select>
|
||||||
<select id="cm.cm" parameterClass="hashtable" resultClass="cm">
|
<select id="cm.cm" parameterClass="hashtable" resultClass="cm">
|
||||||
select a.cmno,a.cshape,a.cname,a.classno,a.rstime,a.retime,a.sstime,a.setime,a.certcc,a.cgno,a.quota,a.studydays,a.isaccommodation
|
select a.cmno,a.cshape,a.cname,a.classno,a.rstime,a.retime,a.sstime,a.setime,a.certcc,a.cgno,a.quota,a.studydays,a.isaccommodation,a.todaylectinninglimit
|
||||||
,b.tyear,b.tseq,a.isrefund
|
,b.tyear,b.tseq,a.isrefund
|
||||||
,a3.cgcode pcgcode
|
,a3.cgcode pcgcode
|
||||||
,e.countlect,e.countstandby
|
,e.countlect,e.countstandby
|
||||||
|
|
@ -239,11 +239,11 @@
|
||||||
insert into cm(ismaster,cgno,pcmno,cname,kname,tmno,classno,rstime,retime,sstime,setime,gstime,getime,cshape
|
insert into cm(ismaster,cgno,pcmno,cname,kname,tmno,classno,rstime,retime,sstime,setime,gstime,getime,cshape
|
||||||
,infee,outfee,accommofee,quota
|
,infee,outfee,accommofee,quota
|
||||||
,introhtml,targethtml,goalhtml,contenthtml,studyplace,studytime
|
,introhtml,targethtml,goalhtml,contenthtml,studyplace,studytime
|
||||||
,certcc,certgradecc,jobcc,jobpositiongrade,difficulty,isrefund,isuse,isdel,isseq,fgnocm,typeman,typeedu,typegrade,typejob,iscertificate,ischkatt,isaccommodation,<include refid="sql.inc"></include>)
|
,certcc,certgradecc,jobcc,jobpositiongrade,difficulty,isrefund,isuse,isdel,isseq,fgnocm,typeman,typeedu,typegrade,typejob,iscertificate,ischkatt,isaccommodation,todaylectinninglimit,<include refid="sql.inc"></include>)
|
||||||
values (#ismaster#,#cgno#,#pcmno#,#cname#,#kname#,#tmno#,#classno#,#rstime#,#retime#,#sstime#,#setime#,#gstime#,#getime#,#cshape#
|
values (#ismaster#,#cgno#,#pcmno#,#cname#,#kname#,#tmno#,#classno#,#rstime#,#retime#,#sstime#,#setime#,#gstime#,#getime#,#cshape#
|
||||||
,#infee#,#outfee#,#accommofee#,#quota#
|
,#infee#,#outfee#,#accommofee#,#quota#
|
||||||
,#introhtml#,#targethtml#,#goalhtml#,#contenthtml#
|
,#introhtml#,#targethtml#,#goalhtml#,#contenthtml#
|
||||||
,#studyplace#,#studytime#,#certcc#,#certgradecc#,#jobcc#,#jobpositiongrade#,#difficulty#,#isrefund#,#isuse#,0,#isseq#,#fgnocm#,#typeman#,#typeedu#,#typegrade#,#typejob#,#iscertificate#,#ischkatt#,#isaccommodation#,<include refid="sql.inv"></include>);
|
,#studyplace#,#studytime#,#certcc#,#certgradecc#,#jobcc#,#jobpositiongrade#,#difficulty#,#isrefund#,#isuse#,0,#isseq#,#fgnocm#,#typeman#,#typeedu#,#typegrade#,#typejob#,#iscertificate#,#ischkatt#,#isaccommodation#,#todaylectinninglimit#,<include refid="sql.inv"></include>);
|
||||||
<selectKey type="post" property="cmno" resultClass="int">SELECT LAST_INSERT_ID()</selectKey>
|
<selectKey type="post" property="cmno" resultClass="int">SELECT LAST_INSERT_ID()</selectKey>
|
||||||
</insert>
|
</insert>
|
||||||
<update id="cm.cmup" parameterClass="hashtable">
|
<update id="cm.cmup" parameterClass="hashtable">
|
||||||
|
|
@ -285,6 +285,7 @@
|
||||||
,ischkatt =#ischkatt#
|
,ischkatt =#ischkatt#
|
||||||
,studydays =#studydays#
|
,studydays =#studydays#
|
||||||
,isaccommodation =#isaccommodation#
|
,isaccommodation =#isaccommodation#
|
||||||
|
,todaylectinninglimit =#todaylectinninglimit#
|
||||||
where cmno=#cmno#
|
where cmno=#cmno#
|
||||||
</update>
|
</update>
|
||||||
<update id="cm.data.delete" parameterClass="hashtable">
|
<update id="cm.data.delete" parameterClass="hashtable">
|
||||||
|
|
@ -1287,7 +1288,7 @@
|
||||||
</select>
|
</select>
|
||||||
<insert id="cm.cmcopy0" parameterClass="cm">
|
<insert id="cm.cmcopy0" parameterClass="cm">
|
||||||
insert into cm(ismaster,cgno,pcmno,cname,kname,tmno,classno,rstime,retime,sstime,setime,gstime,getime,cshape,typeman,typeedu,typegrade,typejob,infee,outfee,accommofee,quota,introhtml,targethtml,goalhtml,contenthtml,studyplace,studytime
|
insert into cm(ismaster,cgno,pcmno,cname,kname,tmno,classno,rstime,retime,sstime,setime,gstime,getime,cshape,typeman,typeedu,typegrade,typejob,infee,outfee,accommofee,quota,introhtml,targethtml,goalhtml,contenthtml,studyplace,studytime
|
||||||
,certcc,certgradecc,jobcc,jobpositiongrade,difficulty,isrefund,isuse,isseq,iscertificate,isdel,studydays,isaccommodation,<include refid="sql.inc"></include>)
|
,certcc,certgradecc,jobcc,jobpositiongrade,difficulty,isrefund,isuse,isseq,iscertificate,isdel,studydays,isaccommodation,todaylectinninglimit,<include refid="sql.inc"></include>)
|
||||||
select #ismaster#,cgno,case when a.ismaster = 1 and #ismaster# = 0 then a.cmno else a.pcmno end,ifnull(#cname#, concat('사본_', cname)),a.kname,#tmno#
|
select #ismaster#,cgno,case when a.ismaster = 1 and #ismaster# = 0 then a.cmno else a.pcmno end,ifnull(#cname#, concat('사본_', cname)),a.kname,#tmno#
|
||||||
,case when #tmno# is null then null else ifnull(b.classno,0)+1 end
|
,case when #tmno# is null then null else ifnull(b.classno,0)+1 end
|
||||||
,t.rstime
|
,t.rstime
|
||||||
|
|
@ -1297,7 +1298,7 @@
|
||||||
,case when date_format(a.retime,'%Y-%m-%d')='2099-12-31' then null else t.gstime end
|
,case when date_format(a.retime,'%Y-%m-%d')='2099-12-31' then null else t.gstime end
|
||||||
,case when date_format(a.retime,'%Y-%m-%d')='2099-12-31' then null else date_format(t.getime,'%Y-%m-%d 23:59:59') end
|
,case when date_format(a.retime,'%Y-%m-%d')='2099-12-31' then null else date_format(t.getime,'%Y-%m-%d 23:59:59') end
|
||||||
,a.cshape,a.typeman,a.typeedu,a.typegrade,a.typejob,infee,outfee,accommofee,quota,introhtml,targethtml,goalhtml,contenthtml,studyplace,studytime
|
,a.cshape,a.typeman,a.typeedu,a.typegrade,a.typejob,infee,outfee,accommofee,quota,introhtml,targethtml,goalhtml,contenthtml,studyplace,studytime
|
||||||
,certcc,certgradecc,jobcc,jobpositiongrade,difficulty,isrefund,1,isseq,a.iscertificate,0,studydays,isaccommodation,<include refid="sql.inv"></include>
|
,certcc,certgradecc,jobcc,jobpositiongrade,difficulty,isrefund,1,isseq,a.iscertificate,0,studydays,isaccommodation,todaylectinninglimit,<include refid="sql.inv"></include>
|
||||||
from cm a
|
from cm a
|
||||||
left outer join (
|
left outer join (
|
||||||
select max(b.classno) classno
|
select max(b.classno) classno
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,7 @@
|
||||||
</select>
|
</select>
|
||||||
<select id="cr.cminnings" parameterClass="hashtable" resultClass="lectinning">
|
<select id="cr.cminnings" parameterClass="hashtable" resultClass="lectinning">
|
||||||
select a.lectno,a.cmno,a.isrebate
|
select a.lectno,a.cmno,a.isrebate
|
||||||
,a2.isseq,a2.cshape
|
,a2.isseq,a2.cshape,a2.todaylectinninglimit
|
||||||
,case when a.sdate is null then a2.sstime else a.sdate end as sdate
|
,case when a.sdate is null then a2.sstime else a.sdate end as sdate
|
||||||
,case when a.edate is null then a2.setime else a.edate end as edate
|
,case when a.edate is null then a2.setime else a.edate end as edate
|
||||||
,b.cmino,b.iseq,b.isonline,b.ititle,b.sttime,b.idate,b.ist,b.iet,b.icontent
|
,b.cmino,b.iseq,b.isonline,b.ititle,b.sttime,b.idate,b.ist,b.iet,b.icontent
|
||||||
|
|
|
||||||
|
|
@ -23,14 +23,14 @@ namespace NP.FO.Controllers
|
||||||
}
|
}
|
||||||
else if (vm.cmino > 0)
|
else if (vm.cmino > 0)
|
||||||
{
|
{
|
||||||
vm.CMInning = Dao.Get<CMInning>("cm.cminnings", new System.Collections.Hashtable() { { "cmino", vm.cmino } }).FirstOrDefault();
|
vm.CMInning = Dao.Get<CMInning>("cm.cminnings", new Hashtable() { { "cmino", vm.cmino } }).FirstOrDefault();
|
||||||
if (vm.CMInning == null || vm.CMInning.istaste != 1)
|
if (vm.CMInning == null || vm.CMInning.istaste != 1)
|
||||||
{
|
{
|
||||||
vm.status = 0;
|
vm.status = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
vm.Pages = Dao.Get<CTPage>("cm.ctps", new System.Collections.Hashtable() { { "ctno", vm.CMInning.ctno } }).Where(w => w.pseq == 1).ToList();
|
vm.Pages = Dao.Get<CTPage>("cm.ctps", new Hashtable() { { "ctno", vm.CMInning.ctno } }).Where(w => w.pseq == 1).ToList();
|
||||||
if (Request.IsLocal)
|
if (Request.IsLocal)
|
||||||
{
|
{
|
||||||
foreach(var d in vm.Pages)
|
foreach(var d in vm.Pages)
|
||||||
|
|
@ -45,11 +45,11 @@ namespace NP.FO.Controllers
|
||||||
else if (vm.ctno > 0)
|
else if (vm.ctno > 0)
|
||||||
{
|
{
|
||||||
//관리자에서 보려는 인증키확인
|
//관리자에서 보려는 인증키확인
|
||||||
var ct = Dao.Get<Data>("common.authkey.check"+ vm.authtype, new System.Collections.Hashtable() { { "authkey", vm.authkey }, { "ctno", vm.ctno } }).FirstOrDefault();
|
var ct = Dao.Get<Data>("common.authkey.check"+ vm.authtype, new Hashtable() { { "authkey", vm.authkey }, { "ctno", vm.ctno } }).FirstOrDefault();
|
||||||
if (ct != null)
|
if (ct != null)
|
||||||
{
|
{
|
||||||
vm.CMInning = new CMInning() { iseq = 1, ititle="미리보기", ismenu = ct.intval2, ctype = ct.intval3, ccode=ct.strval };
|
vm.CMInning = new CMInning() { iseq = 1, ititle="미리보기", ismenu = ct.intval2, ctype = ct.intval3, ccode=ct.strval };
|
||||||
vm.Pages = Dao.Get<CTPage>("cm.ctps", new System.Collections.Hashtable() { { "ctno", vm.ctno } });
|
vm.Pages = Dao.Get<CTPage>("cm.ctps", new Hashtable() { { "ctno", vm.ctno } });
|
||||||
if (vm.cpno > 0)
|
if (vm.cpno > 0)
|
||||||
{
|
{
|
||||||
vm.Page = vm.Pages.Where(w => w.cpno == vm.cpno).First();
|
vm.Page = vm.Pages.Where(w => w.cpno == vm.cpno).First();
|
||||||
|
|
@ -73,8 +73,9 @@ namespace NP.FO.Controllers
|
||||||
var sd = Request.Url.Host.Split('.')[0];
|
var sd = Request.Url.Host.Split('.')[0];
|
||||||
if (GetConfig("isdevtest") != "1" && Request.Url.Host != "222.122.63.91" && Request.Url.Host != "cte.nptc.kr" && Request.Url.Host != "ynicte.nptc.kr" && Request.Url.Host != "phd.nptc.kr" && MainSubDomain.ToUpper() != sd.ToUpper())
|
if (GetConfig("isdevtest") != "1" && Request.Url.Host != "222.122.63.91" && Request.Url.Host != "cte.nptc.kr" && Request.Url.Host != "ynicte.nptc.kr" && Request.Url.Host != "phd.nptc.kr" && MainSubDomain.ToUpper() != sd.ToUpper())
|
||||||
{
|
{
|
||||||
ViewBag.SiteTitle = Dao.Get<Assign>("users.assignsite", new System.Collections.Hashtable() { { "subdomain", sd } }).First().asname;
|
ViewBag.SiteTitle = Dao.Get<Assign>("users.assignsite", new Hashtable() { { "subdomain", sd } }).First().asname;
|
||||||
}
|
}
|
||||||
|
vm.status = 0;
|
||||||
vm.istaste = 0;
|
vm.istaste = 0;
|
||||||
vm = vm ?? new VMCRoom() { };
|
vm = vm ?? new VMCRoom() { };
|
||||||
if (SUserInfo.UserNo > 0 && vm.cmino > 0 && vm.lectno > 0)
|
if (SUserInfo.UserNo > 0 && vm.cmino > 0 && vm.lectno > 0)
|
||||||
|
|
@ -83,11 +84,16 @@ 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 lectInnings = Dao.Get<LectInning>("cr.lectinnings", new System.Collections.Hashtable() { { "lectno", vm.lectno }, { "isfinishtoday", 1 } });
|
var todayLectinningCount = Dao.Get<LectInning>("cr.lectinnings", new Hashtable() { { "lectno", vm.lectno }, { "isfinishtoday", 1 } }).Count();
|
||||||
var todayLectinningCount = lectInnings.Count();
|
var lectInnings = Dao.Get<LectInning>("cr.cminnings", new Hashtable() { { "lectno", vm.lectno }, { "userno", SUserInfo.UserNo } });
|
||||||
var istatus = lectInnings.Where(w => w.cmino == vm.cmino && w.istatus == 2).FirstOrDefault() != null ? 2 : 0;
|
foreach (var item in lectInnings)
|
||||||
|
{
|
||||||
|
item.todaylectinninglimit = item.todaylectinninglimit == 0 ? 9999 : item.todaylectinninglimit;
|
||||||
|
}
|
||||||
|
var lectInning = lectInnings.Where(w => w.cmino == vm.cmino).FirstOrDefault();
|
||||||
|
|
||||||
//1일 신규 동영상 강의를 10차시로 제한
|
//1일 신규 동영상 강의를 10차시로 제한
|
||||||
if (todayLectinningCount < 10 || istatus == 2)
|
if (todayLectinningCount < lectInning.todaylectinninglimit || lectInning.istatus == 2)
|
||||||
{
|
{
|
||||||
//이어보기를 위해 페이지관리
|
//이어보기를 위해 페이지관리
|
||||||
//vm.pseq = vm.pseq < 1 ? 1 : vm.pseq;
|
//vm.pseq = vm.pseq < 1 ? 1 : vm.pseq;
|
||||||
|
|
@ -139,7 +145,7 @@ namespace NP.FO.Controllers
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#region 복습처리(학습종료일 ~ 1년)
|
#region 복습처리(학습종료일 ~ 1년)
|
||||||
vm.LectInnings = Dao.Get<LectInning>("cr.cminnings", new System.Collections.Hashtable() { { "lectno", vm.lectno }, { "userno", SUserInfo.UserNo }, { "limit", 1 } });
|
vm.LectInnings = Dao.Get<LectInning>("cr.cminnings", new 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)
|
if (vm.LectInnings.Count() > 0 && vm.LectInnings.First().sdate < DateTime.Now && vm.LectInnings.First().edate.AddYears(1) > DateTime.Now)
|
||||||
{
|
{
|
||||||
vm.istaste = 1;
|
vm.istaste = 1;
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,10 @@ namespace NP.FO.Controllers
|
||||||
}
|
}
|
||||||
vm.Datas = Dao.Get<Data>("cr.main.boardalarm", new System.Collections.Hashtable() { { "bmnos", bmnos != null ? bmnos.Substring(1) : bmnos},{ "lect", vm.croomlectno },{ "cmno", vm.croomcmno }, { "lectno", vm.croomlectno }, { "userno", SUserInfo.UserNo } });
|
vm.Datas = Dao.Get<Data>("cr.main.boardalarm", new System.Collections.Hashtable() { { "bmnos", bmnos != null ? bmnos.Substring(1) : bmnos},{ "lect", vm.croomlectno },{ "cmno", vm.croomcmno }, { "lectno", vm.croomlectno }, { "userno", SUserInfo.UserNo } });
|
||||||
vm.LectInnings = Dao.Get<LectInning>("cr.cminnings", new System.Collections.Hashtable() { { "lectno", vm.croomlectno },{ "userno",SUserInfo.UserNo}, { "notstudy" + (Request.IsLocal ? "x" : ""), 1 },{ "limit", 6} });
|
vm.LectInnings = Dao.Get<LectInning>("cr.cminnings", new System.Collections.Hashtable() { { "lectno", vm.croomlectno },{ "userno",SUserInfo.UserNo}, { "notstudy" + (Request.IsLocal ? "x" : ""), 1 },{ "limit", 6} });
|
||||||
|
foreach (var lectInning in vm.LectInnings)
|
||||||
|
{
|
||||||
|
lectInning.todaylectinninglimit = lectInning.todaylectinninglimit == 0 ? 9999 : lectInning.todaylectinninglimit;
|
||||||
|
}
|
||||||
if (vm.LectInnings.Count() > 0 && !string.IsNullOrEmpty(vm.LectInnings.FirstOrDefault().existslectinning) )
|
if (vm.LectInnings.Count() > 0 && !string.IsNullOrEmpty(vm.LectInnings.FirstOrDefault().existslectinning) )
|
||||||
{
|
{
|
||||||
vm.intval = Dao.Get<LectInning>("cr.lectinnings", new System.Collections.Hashtable() { { "lectno", vm.croomlectno }, { "isfinishtoday", 1 } }).Count();
|
vm.intval = Dao.Get<LectInning>("cr.lectinnings", new System.Collections.Hashtable() { { "lectno", vm.croomlectno }, { "isfinishtoday", 1 } }).Count();
|
||||||
|
|
@ -54,6 +58,10 @@ namespace NP.FO.Controllers
|
||||||
public ActionResult Innings()
|
public ActionResult Innings()
|
||||||
{
|
{
|
||||||
vm.LectInnings = Dao.Get<LectInning>("cr.cminnings", new System.Collections.Hashtable() { { "lectno", vm.croomlectno }, { "userno", SUserInfo.UserNo } });
|
vm.LectInnings = Dao.Get<LectInning>("cr.cminnings", new System.Collections.Hashtable() { { "lectno", vm.croomlectno }, { "userno", SUserInfo.UserNo } });
|
||||||
|
foreach (var lectInning in vm.LectInnings)
|
||||||
|
{
|
||||||
|
lectInning.todaylectinninglimit = lectInning.todaylectinninglimit == 0 ? 9999 : lectInning.todaylectinninglimit;
|
||||||
|
}
|
||||||
ViewBag.Mobile = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo } }).FirstOrDefault().mobile;
|
ViewBag.Mobile = Dao.Get<Users>("users.users", new System.Collections.Hashtable() { { "userno", SUserInfo.UserNo } }).FirstOrDefault().mobile;
|
||||||
if (!string.IsNullOrEmpty(vm.LectInnings.FirstOrDefault().existslectinning) && vm.LectInnings.Count() > 0)
|
if (!string.IsNullOrEmpty(vm.LectInnings.FirstOrDefault().existslectinning) && vm.LectInnings.Count() > 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,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.AddYears(1) > DateTime.Now ? 1 : 0), @(d.isseq == 1 &&d.iseq != 1 && d.preistatus < 2 ? 0 : 1), @(d.istatus != 2 && Model.intval > 9 ? 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), @(d.istatus != 2 && Model.intval >= d.todaylectinninglimit ? 0 : 1), @(d.todaylectinninglimit));" class="lctcStdy">학습하기</a>
|
||||||
}
|
}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
@ -173,13 +173,13 @@
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
|
||||||
});
|
});
|
||||||
function playerOpen(cmino, timeflag, preflag, notoverflag) {
|
function playerOpen(cmino, timeflag, preflag, notoverflag, todaylectinninglimit) {
|
||||||
if (timeflag < 1) {
|
if (timeflag < 1) {
|
||||||
msg("학습기간이 아닙니다.");
|
msg("학습기간이 아닙니다.");
|
||||||
} else if (preflag < 1) {
|
} else if (preflag < 1) {
|
||||||
msg("이전 회차 학습을 완료한 이후 학습이 가능합니다.");
|
msg("이전 회차 학습을 완료한 이후 학습이 가능합니다.");
|
||||||
} else if (notoverflag < 1) {
|
} else if (notoverflag < 1) {
|
||||||
msg("일일 최대 학습회차는 10차시입니다.");
|
msg("일일 최대 학습회차는 "+ todaylectinninglimit +"차시입니다.");
|
||||||
} else {
|
} else {
|
||||||
_cmino = cmino;
|
_cmino = cmino;
|
||||||
chkcontent();
|
chkcontent();
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,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.AddYears(1) > DateTime.Now ? 1 : 0), @(d.isseq == 1 && d.iseq != 1 && d.preistatus < 2 ? 0 : 1), @(d.istatus != 2 && Model.intval > 9 ? 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), @(d.istatus != 2 && Model.intval >= d.todaylectinninglimit ? 0 : 1), @(d.todaylectinninglimit));" class="lctcStdy">학습하기</a>
|
||||||
}
|
}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
@ -163,13 +163,13 @@
|
||||||
});
|
});
|
||||||
$('.datepicker').datepicker({ dateFormat: 'yy-mm-dd' });
|
$('.datepicker').datepicker({ dateFormat: 'yy-mm-dd' });
|
||||||
});
|
});
|
||||||
function playerOpen(cmino, timeflag, preflag, notoverflag) {
|
function playerOpen(cmino, timeflag, preflag, notoverflag, todaylectinninglimit) {
|
||||||
if (timeflag < 1) {
|
if (timeflag < 1) {
|
||||||
msg("학습기간이 아닙니다.");
|
msg("학습기간이 아닙니다.");
|
||||||
} else if (preflag < 1) {
|
} else if (preflag < 1) {
|
||||||
msg("이전 회차 학습을 완료한 이후 학습이 가능합니다.");
|
msg("이전 회차 학습을 완료한 이후 학습이 가능합니다.");
|
||||||
} else if (notoverflag < 1) {
|
} else if (notoverflag < 1) {
|
||||||
msg("일일 최대 학습회차는 10차시입니다.");
|
msg("일일 최대 학습회차는 "+ todaylectinninglimit +"차시입니다.");
|
||||||
} else {
|
} else {
|
||||||
_cmino = cmino;
|
_cmino = cmino;
|
||||||
chkcontent();
|
chkcontent();
|
||||||
|
|
|
||||||
|
|
@ -489,6 +489,10 @@ namespace NP.Model
|
||||||
/// 합숙여부
|
/// 합숙여부
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int isaccommodation { get; set;}
|
public int isaccommodation { get; set;}
|
||||||
|
/// <summary>
|
||||||
|
/// 일일 학습 회차 제한(0:무제한)
|
||||||
|
/// </summary>
|
||||||
|
public int todaylectinninglimit { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
|
@ -2967,6 +2971,10 @@ namespace NP.Model
|
||||||
/// 출석인증여부 (0:미인증,1:인증)
|
/// 출석인증여부 (0:미인증,1:인증)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int isattcheck { get; set; }
|
public int isattcheck { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 일일 학습 회차 제한(0:무제한)
|
||||||
|
/// </summary>
|
||||||
|
public int todaylectinninglimit { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue