"동영상 학습 제한기능 구현

- 1일 신규 동영상 강의를 8차시로 제한" 오류 수정
This commit is contained in:
lch 2021-06-30 04:05:17 +00:00
parent 6a1df7df9c
commit 388cb954e2
4 changed files with 6 additions and 6 deletions

View File

@ -83,9 +83,9 @@ namespace NP.FO.Controllers
//출석 인증 시만 보이게 제한 처리 (intval 회차, intval2 출석인증제외 회원, intval3 출석인증제외 강좌)
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();
var todayLectinningCount = Dao.Get<LectInning>("cr.lectinnings", new System.Collections.Hashtable() { { "lectno", vm.lectno }, { "isfinishtoday", 1 } }).Count();
//1일 신규 동영상 강의를 8차시로 제한
if (todayLectinningCount < 8)
if (todayLectinningCount < 18)
{
//이어보기를 위해 페이지관리
//vm.pseq = vm.pseq < 1 ? 1 : vm.pseq;

View File

@ -37,7 +37,7 @@ 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.LectInnings = Dao.Get<LectInning>("cr.cminnings", new System.Collections.Hashtable() { { "lectno", vm.croomlectno },{ "userno",SUserInfo.UserNo}, { "notstudy" + (Request.IsLocal ? "x" : ""), 1 },{ "limit", 6} });
if (vm.LectInnings.Count() > 0 && !string.IsNullOrEmpty(vm.LectInnings.FirstOrDefault().existslectinning) && vm.LectInnings.FirstOrDefault().isrebate == 1)
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();
}
@ -55,7 +55,7 @@ namespace NP.FO.Controllers
{
vm.LectInnings = Dao.Get<LectInning>("cr.cminnings", new System.Collections.Hashtable() { { "lectno", vm.croomlectno }, { "userno", SUserInfo.UserNo } });
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 && vm.LectInnings.First().isrebate == 1)
if (!string.IsNullOrEmpty(vm.LectInnings.FirstOrDefault().existslectinning) && vm.LectInnings.Count() > 0)
{
vm.intval = Dao.Get<LectInning>("cr.lectinnings", new System.Collections.Hashtable() { { "lectno", vm.croomlectno }, { "isfinishtoday", 1 } }).Count();
}

View File

@ -141,7 +141,7 @@
@if (d.isonline == 1)
{
//학습기간 종료후에도 시청은 가능하고, 출석인정은 되지않도록 변경 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), @(Model.intval > 7 ? 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 > 7 ? 0 : 1));" class="lctcStdy">학습하기</a>
}
</li>
</ul>

View File

@ -47,7 +47,7 @@
@if (d.isonline == 1)
{
//학습기간 종료후에도 시청은 가능하고, 출석인정은 되지않도록 변경 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), @(Model.intval > 7 ? 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 > 7 ? 0 : 1));" class="lctcStdy">학습하기</a>
}
</li>
</ul>