diff --git a/BO/Controllers/cmController.cs b/BO/Controllers/cmController.cs index df7d053..a7d3ba3 100644 --- a/BO/Controllers/cmController.cs +++ b/BO/Controllers/cmController.cs @@ -225,6 +225,8 @@ namespace NP.BO.Controllers ModelState.Clear(); vm.CMRS = new CMRS() { cmno = vm.cmno, rstype = -1 }; vm.examsavable = ""; + //설문 회차조건 추가 + vm.CMInnings = Dao.Get("cm.cminnings", new System.Collections.Hashtable() { { "cmno", vm.cmno }, { "isscd", 0 } }); if (vm.intval > 0) { vm.CMRS = Dao.Get("cm.cmrss", new System.Collections.Hashtable() { { "rsno", vm.intval } }).First(); diff --git a/BO/Controllers/croomController.cs b/BO/Controllers/croomController.cs index c06530c..71322e7 100644 --- a/BO/Controllers/croomController.cs +++ b/BO/Controllers/croomController.cs @@ -343,7 +343,14 @@ namespace NP.BO.Controllers ht.Add("tmno", vm.stringval2); ht.Add("cshape", vm.stringval3); ht.Add("rstype", vm.stringval4); - ht.Add("cnamelike", vm.stringval5); + if (vm.searchtype == "teachername") + { + ht.Add("teachername", vm.stringval5); // 강사명 완전 일치 검색 + } + else + { + ht.Add("cnamelike", vm.stringval5); // 강좌명 like 검색 + } vm.CMRSs = Dao.Get("lect.cmrss", ht); vm.pagetotalcount = GetCount(vm.CMRSs.FirstOrDefault()); vm.Terms = Dao.Get("cm.term.ys", new System.Collections.Hashtable() { }); @@ -372,7 +379,14 @@ namespace NP.BO.Controllers row = new System.Web.UI.HtmlControls.HtmlTableRow(); hcell = new System.Web.UI.HtmlControls.HtmlTableCell(); hcell.ColSpan = ccnt + 6; - hcell.InnerText = "● 설문종류/설문지 : " + string.Format("{0} / {1}", vm.CMRS.rstypename, vm.CMRS.rscname); + if (vm.CMRS.rstype == 1 && !string.IsNullOrEmpty(vm.CMRS.teachername)) + { + hcell.InnerText = "● 설문종류/설문지 : " + string.Format("{0} ({1}) / {2}", vm.CMRS.rstypename, vm.CMRS.teachername, vm.CMRS.rscname); + } + else + { + hcell.InnerText = "● 설문종류/설문지 : " + string.Format("{0} / {1}", vm.CMRS.rstypename, vm.CMRS.rscname); + } row.Cells.Add(hcell); table.Rows.Add(row); row = new System.Web.UI.HtmlControls.HtmlTableRow(); diff --git a/BO/Views/cm/cmregest.cshtml b/BO/Views/cm/cmregest.cshtml index 39a19e1..635107f 100644 --- a/BO/Views/cm/cmregest.cshtml +++ b/BO/Views/cm/cmregest.cshtml @@ -105,7 +105,7 @@ 평가구분 - 회차 + @*회차*@ 평가명 참여조건 총점 @@ -117,9 +117,16 @@ { @item.estkindname - @item.rno + @*@item.rno*@ @item.exname - 출석 @item.econdition 이상 + @if (item.rstype == 1) + { + @(item.iseq + "회차" + " (" + item.teachername + ")") + } + else + { + 출석 @item.econdition 이상 + } @(item.estkind < 30 ? (item.tpoint.ToString() + "점") : "-") [삭제] diff --git a/BO/Views/cm/cmregrs.cshtml b/BO/Views/cm/cmregrs.cshtml index 81656bd..b2a1812 100644 --- a/BO/Views/cm/cmregrs.cshtml +++ b/BO/Views/cm/cmregrs.cshtml @@ -1,140 +1,167 @@ -@model NP.Model.VMCM -@{ - if (Model.CMRS.rsno > 0) - { - ViewBag.PopupMenuName = "사전설문수정"; - if (Model.CMRS.rstype == 0) - { - ViewBag.PopupMenuName = "강의평가 수정"; - } - } - Layout = "~/Views/Shared/_PopupLayout.cshtml"; -} -
-
-
-
-
- -
-@if (Model.CMRS.rsno < 1) -{ - @Html.Partial("./Partial/Radio", "0:강의평가;1:사전설문", new ViewDataDictionary { { "special", "stringlist" }, { "name", "CMRS.rstype" }, { "checked", Model.CMRS.rstype } }) -} -else -{ - @Html.HiddenFor(m=>m.CMRS.rstype)@Model.CMRS.rstypename -} -
-
-
- -
@Html.TextBoxFor(m => m.CMRS.rsname, new { @class = "form-control", @maxlength = "100" })
-
-
- -
출석률 @Html.TextBoxFor(m => m.CMRS.rscondition, new { @class = "form-control disp-init int nocomma text-center", @maxlength = "3", @style = "width: 80px;" }) % 이상
-
-
- -
-@if (Model.CMRS.rsno < 1 || String.IsNullOrEmpty(Model.examsavable)) -{ - @Html.Partial("./Partial/Select", Model.CMRS.rsno < 1 ? Model.RSCs.Where(w => w.rscno == 0) : Model.RSCs.Where(w => w.rstype == Model.CMRS.rstype), new ViewDataDictionary { {"name", "CMRS.rscno" }, { "selected", Model.CMRS.rscno }, { "df", ":선택" } }) -} -else -{ - -} -
-
-
-
-
-
- 저장 - @if (Model.CMRS.rsno > 0) - { - 삭제 - } - 닫기 -
-
- - @Html.HiddenFor(m => m.CMRS.cmno) - @Html.HiddenFor(m => m.cmno) - @Html.HiddenFor(m => m.IsSavedForParent) - @Html.Partial("./Partial/DForm", Model) -
-
-@section styles{ - -} -@section scriptsHeader{ - -} -@section scripts{ - -} \ No newline at end of file +@model NP.Model.VMCM +@{ + if (Model.CMRS.rsno > 0) + { + ViewBag.PopupMenuName = "강사설문수정"; + if (Model.CMRS.rstype == 0) + { + ViewBag.PopupMenuName = "강의평가 수정"; + } + } + Layout = "~/Views/Shared/_PopupLayout.cshtml"; +} +
+
+
+
+
+ +
+ @if (Model.CMRS.rsno < 1) + { + @Html.Partial("./Partial/Radio", "0:강의평가;1:강사설문", new ViewDataDictionary { { "special", "stringlist" }, { "name", "CMRS.rstype" }, { "checked", Model.CMRS.rstype } }) + } + else + { + @Html.HiddenFor(m => m.CMRS.rstype)@Model.CMRS.rstypename + } +
+
+
+ +
@Html.TextBoxFor(m => m.CMRS.rsname, new { @class = "form-control", @maxlength = "100" })
+
+
+ +
출석률 @Html.TextBoxFor(m => m.CMRS.rscondition, new { @class = "form-control disp-init int nocomma text-center", @maxlength = "3", @style = "width: 80px;" }) % 이상
+
+ @*25-01-20 추가개발 강사설문에 따른 회차키 cmino 추가*@ +
+ +
+ @Html.Partial("./Partial/Select", Model.CMInnings, new ViewDataDictionary { { "name", "CMRS.cmino" }, { "selected", Model.CMRS.cmino }, { "df", ":선택" }, { "valuetext", string.Join(";", Model.CMInnings.Select(i => string.Format("{0}:({1} / {2}) {3}", i.cmino, i.iseq, i.username, i.ititle))) } }) +
+
+
+ +
+ @if (Model.CMRS.rsno < 1 || String.IsNullOrEmpty(Model.examsavable)) + { + @Html.Partial("./Partial/Select", Model.CMRS.rsno < 1 ? Model.RSCs.Where(w => w.rscno == 0) : Model.RSCs.Where(w => w.rstype == Model.CMRS.rstype), new ViewDataDictionary { { "name", "CMRS.rscno" }, { "selected", Model.CMRS.rscno }, { "df", ":선택" } }) + } + else + { + + } +
+
+
+
+
+
+ 저장 + @* + 이미 삭제 기능이 존재하여 주석처리 + @if (Model.CMRS.rsno > 0) + { + 삭제 + }*@ + 닫기 +
+
+ + @Html.HiddenFor(m => m.CMRS.cmno) + @Html.HiddenFor(m => m.cmno) + @Html.HiddenFor(m => m.IsSavedForParent) + @Html.Partial("./Partial/DForm", Model) +
+
+@section styles{ + +} +@section scriptsHeader{ + +} +@section scripts{ + +} diff --git a/BO/Views/cm/rr.cshtml b/BO/Views/cm/rr.cshtml index 7463c89..7a87fac 100644 --- a/BO/Views/cm/rr.cshtml +++ b/BO/Views/cm/rr.cshtml @@ -12,7 +12,7 @@
@if (Model.RSC.rscno < 1) { - @Html.Partial("./Partial/Radio", "0:강의평가;1:사전설문", new ViewDataDictionary { { "special", "stringlist" }, { "name", "RSC.rstype" }, { "checked", Model.RSC.rstype } }) + @Html.Partial("./Partial/Radio", "0:강의평가;1:강사설문", new ViewDataDictionary { { "special", "stringlist" }, { "name", "RSC.rstype" }, { "checked", Model.RSC.rstype } }) } else { diff --git a/BO/Views/cm/rs.cshtml b/BO/Views/cm/rs.cshtml index 9fdb9f0..7b4ec82 100644 --- a/BO/Views/cm/rs.cshtml +++ b/BO/Views/cm/rs.cshtml @@ -13,7 +13,7 @@ @Html.Partial("./Partial/SearchCaption")
- @Html.Partial("./Partial/Select", Model.CMs, new ViewDataDictionary { {"valuetext","0:강의평가;1:사전설문" }, { "name", "stringval" }, { "selected", Model.stringval }, { "cssclass", "searchcon " }, { "df", ":-설문유형" } }) + @Html.Partial("./Partial/Select", Model.CMs, new ViewDataDictionary { {"valuetext","0:강의평가;1:강사설문" }, { "name", "stringval" }, { "selected", Model.stringval }, { "cssclass", "searchcon " }, { "df", ":-설문유형" } }) @Html.Partial("./Partial/Text", Model.stringval2, Helpers.DicText(new NP.Model.TextDic() { Name = "stringval2", Value = Model.stringval2, CssClass="ff", PH="설문명을 입력하세요." })) @Html.Partial("./Partial/Button", new NP.Model.Button() { Special = "search" })
diff --git a/BO/Views/croom/rss.cshtml b/BO/Views/croom/rss.cshtml index fa7390b..ad182d8 100644 --- a/BO/Views/croom/rss.cshtml +++ b/BO/Views/croom/rss.cshtml @@ -19,10 +19,11 @@ } - @*@Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "valuetext", ":-유형선택;0:온라인;1:교육장;2:온라인 혼합" }, { "name", "stringval3" }, { "selected", Model.stringval3 } })*@ @Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "valuetext", ":-유형선택;1:교육장교육;2:온라인교육" }, { "name", "stringval3" }, { "selected", Model.stringval3 } }) - @Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "valuetext", ":-유형선택;0:강의평가;1:사전설문" }, { "name", "stringval4" }, { "selected", Model.stringval4 } }) - @Html.Partial("./Partial/Text", Model.stringval5, Helpers.DicText(new NP.Model.TextDic() { Name = "stringval5", Value = Model.stringval5, PH = "강좌명을 입력하세요.", CssClass = "ff" })) + @Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "valuetext", ":-유형선택;0:강의평가;1:강사설문" }, { "name", "stringval4" }, { "selected", Model.stringval4 } }) + @*강좌명(LIKE검색), 강사명(완전일치검색)*@ + @Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "valuetext", "cname:강좌명;teachername:강사명" }, { "name", "searchType" }, { "selected", Model.searchtype } }) + @Html.Partial("./Partial/Text", Model.stringval5, Helpers.DicText(new NP.Model.TextDic() { Name = "stringval5", Value = Model.stringval5, PH = "검색어를 입력하세요.", CssClass = "ff" })) @Html.Partial("./Partial/Button", new NP.Model.Button() { Special = "search" })
@@ -42,6 +43,7 @@ 강좌명 교육기간 설문종류 + 강사명 설문인원
(참여/대상) @@ -55,6 +57,7 @@ @d.cnameclassno @d.sssename2 @d.rstypename + @(string.IsNullOrEmpty(d.teachername) ? "-" : d.teachername) @string.Format("{0}/{1}", d.countok.ToString("#,0"), d.countlect.ToString("#,0")) } @@ -69,7 +72,7 @@ @section scriptsHeader{ - + } @section scripts{ -} \ No newline at end of file +} + diff --git a/BO/Views/croom/rsv.cshtml b/BO/Views/croom/rsv.cshtml index 6c610f1..fc540aa 100644 --- a/BO/Views/croom/rsv.cshtml +++ b/BO/Views/croom/rsv.cshtml @@ -20,7 +20,17 @@
-
@string.Format("{0} / {1}", Model.CMRS.rstypename, Model.CMRS.rscname)
+
+ @*강사설문 일 때 강사 이름 추가*@ + @if (Model.CMRS.rstype == 1 && !string.IsNullOrEmpty(Model.CMRS.teachername)) + { + @: @string.Format("{0} ({1}) / {2}", Model.CMRS.rstypename, Model.CMRS.teachername, Model.CMRS.rscname) + }@*일반 강의 평가*@ + else + { + @: @string.Format("{0} / {1}", Model.CMRS.rstypename, Model.CMRS.rscname) + } +
diff --git a/Base/Controller/ACommonCM.cs b/Base/Controller/ACommonCM.cs index 508a2a6..2e2256c 100644 --- a/Base/Controller/ACommonCM.cs +++ b/Base/Controller/ACommonCM.cs @@ -508,7 +508,7 @@ namespace NP.Base.Controllers return JsonOK(Dao.SaveExam(vm.CMEX), false); } /// - /// 가상번호 extype 1: 진행평가, 2: 최종평가, 11: 과제, 21: 토론, 31: 사전설문, 32: 강의평가 + /// 가상번호 extype 1: 진행평가, 2: 최종평가, 11: 과제, 21: 토론, 31: 강사설문, 32: 강의평가 /// /// /// @@ -610,17 +610,26 @@ namespace NP.Base.Controllers if (vm.CMRS.rstype == 1) { vm.CMRS.rscondition = 0; + }//강의평가일 때 cmino 저장 안함 + else + { + vm.CMRS.cmino = 0; } + + //등록일 때 if (vm.CMRS.rsno < 1) { - //설문(강의평가, 사전설문)은 1개씩만 등록가능 - if (Dao.Get("cm.cmrs.check", new Hashtable() { {"cmno",vm.CMRS.cmno }, { "rsno", vm.CMRS.rsno }, { "rstype", vm.CMRS.rstype } }).First() > 0) + //설문(강사설문) 일 때 복수 등록 가능 + //설문(강의평가)은 1개씩만 등록가능 + if (Dao.Get("cm.cmrs.check", new Hashtable() { {"cmno",vm.CMRS.cmno }, { "rsno", vm.CMRS.rsno }, { "rstype", vm.CMRS.rstype } }).First() > 0 && vm.CMRS.rstype != 1) { return JsonOK(0); } Dao.Insert("cm.cmrs.in", vm.CMRS); return JsonOK(vm.CMRS.rsno); } + + //수정일 때 if (base.RSSaveValid(vm.CMRS.rsno) == "") { return JsonOK(Dao.Save("cm.cmrs.up", vm.CMRS)); diff --git a/Dao/MyBatis/Maps/CM.xml b/Dao/MyBatis/Maps/CM.xml index df9de7d..ec5e4da 100644 --- a/Dao/MyBatis/Maps/CM.xml +++ b/Dao/MyBatis/Maps/CM.xml @@ -687,6 +687,7 @@ ,null sdno,null sdtype,null sdname,null sddesc,null sdcondition ,null rsno,null rscno,null rstype,null rsname,null rscondition , row_number() over(partition by a.extype order by a.cdt) rno + ,null as iseq,null as teachername from cmex a where a.cmno=#cmno# and a.isdel=0 union all @@ -695,6 +696,7 @@ ,a.sdno,a.sdtype,a.sdname,a.sddesc,a.sdcondition ,null rsno,null rscno,null rstype,null rsname,null rscondition , row_number() over(partition by a.sdtype order by a.cdt) rno + ,null as iseq,null as teachername from cmsd a where a.cmno=#cmno# and a.isdel=0 union all @@ -703,9 +705,12 @@ ,null sdno,null sdtype,null sdname,null sddesc,null sdcondition ,a.rsno,a.rscno,a.rstype,a.rsname,a.rscondition , row_number() over(partition by a.rstype order by a.cdt) rno + ,b.iseq,c.username as teachername from cmrs a + left outer join cminning b on a.cmino = b.cmino + left outer join users c on b.userno = c.userno where a.cmno=#cmno# and a.isdel=0 - order by estkind,rno + order by rsno insert into cmev (cmno,attend,attendcut,attendrfd,attendcutrfd,mid,midcut,midrfd,midcutrfd,final,finalcut,finalrfd,finalcutrfd,subject,subjectcut,subjectrfd,subjectcutrfd,discuss,discusscut,discussrfd,discusscutrfd,etc,etccut,etcrfd,etccutrfd,cut,cutrfd,isoffabs,) @@ -1161,6 +1166,7 @@ ,b.rscname ,row_number() over(order by $orderby$a.cdt) rno ,count(a.cno) over() pagetotalcount + ,a.cmino from cmrs a inner join rsc b on b.rscno=a.rscno where a.isdel=0 and a.rsno=#rsno# @@ -1169,8 +1175,8 @@ order by a.rno - insert into cmrs(rstype,cmno,rsname,rscondition,rscno,isdel,) - values(#rstype#,#cmno#,#rsname#,#rscondition#,#rscno#,0,); + insert into cmrs(rstype,cmno,rsname,rscondition,rscno,isdel,cmino,) + values(#rstype#,#cmno#,#rsname#,#rscondition#,#rscno#,0,#cmino#,); SELECT LAST_INSERT_ID() @@ -1179,6 +1185,7 @@ ,rsname =#rsname# ,rscondition =#rscondition# ,rscno =#rscno# + ,cmino =#cmino# where rsno=#rsno# @@ -1354,67 +1361,83 @@ SELECT LAST_INSERT_ID() - insert into cmprof(cmno,userno,pfee,) - select #cmno#,a.userno,0, - from cmprof a - where a.cmno=#orgcmno#; + + create temporary table if not exists temp_cminning_mapping ( + old_cmino bigint, + new_cmino bigint + ); - insert into cmbook(cmno,bkno,) - select #cmno#,a.bkno, - from cmbook a - where a.cmno=#orgcmno#; + + insert into cminning(cmno, week, iseq, isonline, ititle, icontent, iday, idate, ist, iet, ctno, istaste, sttime, atime, mstime, metime, userno, isscd, scdtype, ) + select #cmno#, week, iseq, isonline, ititle, icontent, iday, idate, ist, iet, ctno, istaste, sttime, atime, mstime, metime, userno, isscd, scdtype, + from cminning + where cmno = #orgcmno#; + SELECT LAST_INSERT_ID() - insert into cmrelay(cmno,rcmno,ispre,) - select #cmno#,a.rcmno,a.ispre, - from cmrelay a - where a.cmno=#orgcmno#; - - insert into cmncsd(cmno,ndno,) - select #cmno#,a.ndno, - from cmncsd a - where a.cmno=#orgcmno#; - - insert into cminning(cmno,week,iseq,isonline,ititle,icontent,iday,idate,ist,iet,ctno,istaste,sttime,atime,mstime,metime,userno,orgcmino,isscd,) - select #cmno#,a.week,a.iseq,a.isonline,a.ititle,a.icontent,a.iday - ,case when a.isonline=1 or b.sstime is null or a.iday is null then null else date_add(b.sstime, interval (a.iday - 1) day) end - ,a.ist,a.iet,a.ctno,a.istaste,a.sttime,a.atime,a.mstime,a.metime,a.userno,cmino,a.isscd, + insert into temp_cminning_mapping(old_cmino, new_cmino) + select old_cmino, new_cmino + from ( + select a.cmino as old_cmino, b.cmino as new_cmino from cminning a - inner join cm b on b.cmno=#cmno# - where a.cmno=#orgcmno#; + inner join cminning b on a.cmno = #orgcmno# and b.cmno = #cmno# and a.week = b.week and a.iseq = b.iseq + ) t; - insert into cminningscd(cmino,estart,eend,quota,studyplace,sseq,) - select c.cmino,b.estart,b.eend,b.quota,b.studyplace,sseq, - from cminning a - inner join cminningscd b on b.cmino=a.cmino - inner join cminning c on c.cmno=#cmno# and c.isonline=0 - where a.cmno=#orgcmno# and a.isonline=0; - - insert into cmev(cmno,attend,attendcut,attendrfd,attendcutrfd,mid,midcut,midrfd,midcutrfd,final,finalcut,finalrfd,finalcutrfd,subject,subjectcut,subjectrfd,subjectcutrfd - ,discuss,discusscut,discussrfd,discusscutrfd,etc,etccut,etcrfd,etccutrfd,cut,cutrfd,isoffabs,) - select #cmno#,attend,attendcut,attendrfd,attendcutrfd,mid,midcut,midrfd,midcutrfd,final,finalcut,finalrfd,finalcutrfd,subject,subjectcut,subjectrfd,subjectcutrfd - ,discuss,discusscut,discussrfd,discusscutrfd,etc,etccut,etcrfd,etccutrfd,cut,cutrfd,isoffabs, - from cmev a - where a.cmno=#orgcmno#; - - insert into cmsd(sdtype,cmno,sdname,sddesc,tpoint,sdcondition,fgno,isdel,orgsdno,) - select sdtype,#cmno#,sdname,sddesc,tpoint,sdcondition,null,0,sdno, - from cmsd a - where a.cmno=#orgcmno# and a.isdel=0; - - insert into cmrs(cmno,rscno,rstype,rsname,rscondition,isdel,) - select #cmno#,rscno,rstype,rsname,rscondition,0, + + insert into cmrs(cmno, rscno, rstype, rsname, rscondition, isdel, cmino, ) + select #cmno#, rscno, rstype, rsname, rscondition, 0, t.new_cmino, from cmrs a - where a.cmno=#orgcmno# and a.isdel=0; + inner join temp_cminning_mapping t on a.cmino = t.old_cmino + where a.cmno = #orgcmno# and a.isdel = 0; - insert into cmmenu(cmno,isplan,iscontent,isev,isrs,isgrade,) - select #cmno#,isplan,iscontent,isev,isrs,isgrade, - from cmmenu a - where a.cmno=#orgcmno#; - - insert into cmmenubm(cmno,bmno,) - select #cmno#,a.bmno, - from cmmenubm a - where a.cmno=#orgcmno# + + insert into cmprof(cmno, userno, pfee, ) + select #cmno#, userno, 0, + from cmprof + where cmno = #orgcmno#; + + insert into cmbook(cmno, bkno, ) + select #cmno#, bkno, + from cmbook + where cmno = #orgcmno#; + + insert into cmrelay(cmno, rcmno, ispre, ) + select #cmno#, rcmno, ispre, + from cmrelay + where cmno = #orgcmno#; + + insert into cmncsd(cmno, ndno, ) + select #cmno#, ndno, + from cmncsd + where cmno = #orgcmno#; + + insert into cminningscd(cmino, estart, eend, quota, studyplace, sseq, ) + select t.new_cmino, estart, eend, quota, studyplace, sseq, + from cminningscd a + inner join temp_cminning_mapping t on a.cmino = t.old_cmino + where a.cmino in (select old_cmino from temp_cminning_mapping); + + insert into cmev(cmno, attend, attendcut, attendrfd, attendcutrfd, mid, midcut, midrfd, midcutrfd, final, finalcut, finalrfd, finalcutrfd, subject, subjectcut, subjectrfd, subjectcutrfd, discuss, discusscut, discussrfd, discusscutrfd, etc, etccut, etcrfd, etccutrfd, cut, cutrfd, isoffabs, ) + select #cmno#, attend, attendcut, attendrfd, attendcutrfd, mid, midcut, midrfd, midcutrfd, final, finalcut, finalrfd, finalcutrfd, subject, subjectcut, subjectrfd, subjectcutrfd, discuss, discusscut, discussrfd, discusscutrfd, etc, etccut, etcrfd, etccutrfd, cut, cutrfd, isoffabs, + from cmev + where cmno = #orgcmno#; + + insert into cmsd(sdtype, cmno, sdname, sddesc, tpoint, sdcondition, fgno, isdel, orgsdno, ) + select sdtype, #cmno#, sdname, sddesc, tpoint, sdcondition, null, 0, sdno, + from cmsd + where cmno = #orgcmno# and isdel = 0; + + insert into cmmenu(cmno, isplan, iscontent, isev, isrs, isgrade, ) + select #cmno#, isplan, iscontent, isev, isrs, isgrade, + from cmmenu + where cmno = #orgcmno#; + + insert into cmmenubm(cmno, bmno, ) + select #cmno#, bmno, + from cmmenubm + where cmno = #orgcmno#; + + + drop temporary table if exists temp_cminning_mapping; insert into cmex (cmno,extype,exname,edesc,etime,econdition,evtype,eqtype,israndq,israndqi,qcount,isblur,tpoint,relaylimit,isusebackup,isseq,isresultopen,isreexamable,isdel,) diff --git a/Dao/MyBatis/Maps/CRoom.xml b/Dao/MyBatis/Maps/CRoom.xml index c3272c9..77b3603 100644 --- a/Dao/MyBatis/Maps/CRoom.xml +++ b/Dao/MyBatis/Maps/CRoom.xml @@ -390,20 +390,25 @@ ,b.rsno,b.cmno,b.rscno,b.rstype,b.rsname,b.rscondition ,case when c.lectno is null then 0 else 1 end isrsok ,a.edate + ,d.istatus,e.iseq from lect a inner join cmrs b on b.cmno=a.cmno and b.isdel=0 left outer join lectrs c on c.lectno=a.lectno and c.rsno=b.rsno + left outer join lectinning d on d.lectno=a.lectno and b.cmino = d.cmino + left outer join cminning e on b.cmino = e.cmino where a.lectno=#lectno# and a.userno=#userno# - order by b.cdt + order by b.rsno - - + + + + @@ -37,7 +55,7 @@
@(d.edate < DateTime.Now ? "학습기간종료" : d.isonline == 0 && d.istatus == 2 ? "출석완료" : d.isonline == 0 && d.idate < DateTime.Now ? "결석" : d.isonline == 0 ? "출석전" : d.stime == null ? "학습전(0%)" : d.istatus == 2 ? "학습완료" : string.Format("학습중({0}%)", d.sttime > 0 ? (d.totstudy * 100 / (d.sttime * 60)) : 0))
@*
@(d.isonline == 0 ? (d.cshape != 2 ? "강의시작일" : "집체교육") : "교육기간") : @(d.isonline == 0 ? (d.cshape != 2 ? string.Format("{0} {1}:{2}", d.idate.ToString("MM/dd"), d.ist.Substring(0, 2), d.ist.Substring(2, 2)) : d.eend.ToString("MM/dd")) : d.cshape != 1 ? (d.cdt.ToString("MM/dd")+" ~ "+d.estart.ToString("MM/dd")) : (d.sdate.ToString("MM/dd") + " ~ " + d.edate.ToString("MM/dd")))
*@
@(d.isonline == 0 ? (d.cshape != 2 ? "강의시작일" : "집체교육") : "교육기간") : @(d.isonline == 0 ? (d.cshape != 2 ? string.Format("{0} {1}:{2}", d.idate.ToString("MM/dd"), d.ist.Substring(0, 2), d.ist.Substring(2, 2)) : d.eend.ToString("MM/dd")) : (d.sdate.ToString("MM/dd") + " ~ " + d.edate.ToString("MM/dd")))
- @if(d.cshape != 1 && d.isonline == 1) + @if (d.cshape != 1 && d.isonline == 1) {
복습기간 : @(d.edate.AddYears(1).ToString("yy-MM-dd"))
} @@ -231,7 +249,7 @@ } else if (_authplatform == "2") { confirmtoggle(true, "학습을 처음 시작할 때 본인인증이 필요합니다. 본인인증은 회차 당 1회에 한 해 진행됩니다.
본인인증을 하시겠습니까?", "chkmobile()"); } - // ### 모바일 인증 중단 처리 + // ### 모바일 인증 중단 처리 //msg("학습을 시작합니다.", null, null, null, "viewcontents("+_cmino+",false,@(Model.croomlectno))"); } } else { diff --git a/FO/Views/CRoom/Research.cshtml b/FO/Views/CRoom/Research.cshtml index 40acddf..3572605 100644 --- a/FO/Views/CRoom/Research.cshtml +++ b/FO/Views/CRoom/Research.cshtml @@ -5,31 +5,51 @@
- @if (Model.CMRSes.Count()>0) + @if (Model.CMRSes.Count() > 0) { - foreach (var d in Model.CMRSes) { - - - - } - else - { - - } - + + + + } } else { - + + + }
-
@d.rstypename
-

참여조건 : 진도율 @(d.rscondition)% 이상 / 수강 종료일 (@d.edate.ToShortDateString()) 이내

-
- @if (ViewBag.isres > 0) - { - @(d.rscondition > d.attrate ? "참여불가" : d.isrsok == 1 ? "참여완료" : "참여가능")참여불가
+
@d.rstypename
+ @if (d.rstype == 0) + { +

참여조건 : 진도율 @(d.rscondition)% 이상 / 수강 종료일 (@d.edate.ToShortDateString()) 이내

+ } + else + { +

참여조건 : @(d.iseq)회차 출석완료

+ } +
+ @if (ViewBag.isres > 0) + { + if (d.rstype == 0) + { + + @(d.rscondition > d.attrate ? "참여불가" : d.isrsok == 1 ? "참여완료" : "참여가능") + + } + else + { + + @(d.istatus == 2 && d.isrsok == 0 ? "참여가능" : d.isrsok == 1 ? "참여완료" : "참여불가") + + } + } + else + { + 참여불가 + } +
- 등록된 설문이 없습니다.
- 등록된 설문이 없습니다.
@@ -40,6 +60,7 @@
설문참여
@@ -48,7 +69,9 @@ @section styles{ } @section scriptsHeader{ @@ -69,6 +92,7 @@ function cbcmrsgo() { var h = capResult.obj.q; if (h.length > 0) { + $("#teachername").text("강사설문 : " + h[0].teachername); // 첫 번째 요소의 teachername 설정 $("#rslist dl").remove(); $.each(h, function (i, q) { if (q.atype == 0) { @@ -76,16 +100,16 @@ $.each(capResult.obj.qi, function (i2, qi) { if (qi.qno == q.qno) { qis += "
  • " + - " 1 ? "checkbox" : "radio") + "\" name=\"rscqno" + q.rscqno + "\" id=\"qino" + qi.qino + "\" />" + + " 1 ? "checkbox" : "radio") + "\" name=\"rscqno" + q.rscqno + "\" id=\"qino" + qi.qino + "\" />" + "
  • "; } }); - $("
    1 ? "atypemulti":"")+"\" data-rscqno=\"" + q.rscqno + "\">
    #" + (i + 1) + ".
    " + q.qtext + "
      " + qis + "
    ").insertBefore($("#btnrscgobox")); + $("
    1 ? "atypemulti" : "") + "\" data-rscqno=\"" + q.rscqno + "\">
    #" + (i + 1) + ".
    " + q.qtext + "
      " + qis + "
    ").insertBefore($("#btnrscgobox")); } else { $("
    #" + (i + 1) + ".
    " + q.qtext + "
    ").insertBefore($("#btnrscgobox")); } }); - $('html, body').removeClass('lock');$('#pop1').show(); + $('html, body').removeClass('lock'); $('#pop1').show(); } } function save() { diff --git a/FO/Views/Shared/Partial/PayReturn.cshtml b/FO/Views/Shared/Partial/PayReturn.cshtml index 0721780..b3a65af 100644 --- a/FO/Views/Shared/Partial/PayReturn.cshtml +++ b/FO/Views/Shared/Partial/PayReturn.cshtml @@ -185,7 +185,7 @@ } @if (Model.PayItemResults.Where(w => w.ptype2 == 0 || w.ptype2 == 4).Count() == 1 && Model.PayItemResults.Where(w => w.ptype2 == 0 || w.ptype2 == 4).First().status == 1 && Model.PayItemResults.Where(w => w.ptype2 == 0 || w.ptype2 == 4).First().rsno > 0) { -
  • 사전설문
  • +
  • 강사설문
  • } } diff --git a/Model/CM.cs b/Model/CM.cs index d790076..cbb4722 100644 --- a/Model/CM.cs +++ b/Model/CM.cs @@ -1956,14 +1956,14 @@ namespace NP.Model /// public int gubun { get; set; } /// - /// 1: 진행평가, 2: 최종평가, 11: 과제평가, 21: 토론평가, 31: 사전설문, 32: 강의평가설문 + /// 1: 진행평가, 2: 최종평가, 11: 과제평가, 21: 토론평가, 31: 강사설문, 32: 강의평가설문 /// public int estkind { get; set; } public String estkindname { get { - return estkind == 1 ? "진행평가" : estkind == 2 ? "최종평가" : estkind == 11 ? "과제" : estkind == 21 ? "토론" : estkind == 31 ? "사전설문" : estkind == 32 ? "강의평가설문" : "-"; + return estkind == 1 ? "진행평가" : estkind == 2 ? "최종평가" : estkind == 11 ? "과제" : estkind == 21 ? "토론" : estkind == 31 ? "강사설문" : estkind == 32 ? "강의평가설문" : "-"; } } /// @@ -2053,8 +2053,16 @@ namespace NP.Model /// /// 순차풀이여부 0:비순차,1:순차 /// - public int isseq {get;set;} - + public int isseq {get;set;} + /// + /// 설문유형 0:강의평가,1:강사설문 (cmrs.rstype) + /// + public int rstype { get; set; } + /// + /// 설문 회차 (cminning.iseq) + /// + public int iseq { get; set; } + public string teachername { get; set; } } /// @@ -2399,14 +2407,14 @@ namespace NP.Model /// public int rscno { get; set; } /// - /// 설문유형 0:강의평가,1:사전설문 + /// 설문유형 0:강의평가,1:강사설문 /// public int rstype{ get; set; } public String rstypename { get { - return rstype == 0 ? "강의평가" : rstype == 1 ? "사전설문" : "-"; + return rstype == 0 ? "강의평가" : rstype == 1 ? "강사설문" : "-"; } } /// @@ -2462,6 +2470,10 @@ namespace NP.Model public String atext { get; set; } public int acount { get; set; } public int scount { get; set; } + /// + /// 강사 설문에 따른 강사 이름 + /// + public string teachername { get; set; } } /// @@ -2508,7 +2520,7 @@ namespace NP.Model } /// - /// 강좌/과정 설문(강의평가,사전설문) + /// 강좌/과정 설문(강의평가,강사설문) /// [Serializable] public class CMRS : CMBase @@ -2527,14 +2539,14 @@ namespace NP.Model public int rscno {get;set;} public String rscname { get; set; } /// - /// 평가구분 0:강의평가,1:사전설문 + /// 평가구분 0:강의평가,1:강사설문 /// public int rstype {get;set;} public String rstypename { get { - return rstype == 0 ? "강의평가" : "사전설문"; + return rstype == 0 ? "강의평가" : "강사설문"; } } /// @@ -2549,6 +2561,23 @@ namespace NP.Model public int isrsok { get; set; } public DateTime sdate { get; set; } public DateTime edate { get; set; } + /// + /// 강사선물 일 때 회차조건 추가(cminning.cmino) + /// + public Int64 cmino { get; set; } + + /// + /// 강사이름(cminning.userno => users.username) + /// + public string teachername { get; set; } + /// + /// 회차의 출석조건(lectinning.istatus) (null:입력전,0:결석(온라인학습중),1:입실,2:출석) + /// + public int istatus { get; set; } + /// + /// 설문 회차 (cminning.iseq) + /// + public int iseq { get; set; } } [Serializable] diff --git a/_솔루션DOC/DB/영남_테이블명세서최종.xlsx b/_솔루션DOC/DB/영남_테이블명세서최종.xlsx new file mode 100644 index 0000000..0868acf Binary files /dev/null and b/_솔루션DOC/DB/영남_테이블명세서최종.xlsx differ diff --git a/_솔루션DOC/운영DB적용사항.txt b/_솔루션DOC/운영DB적용사항.txt new file mode 100644 index 0000000..08ba121 --- /dev/null +++ b/_솔루션DOC/운영DB적용사항.txt @@ -0,0 +1,6 @@ +ALTER TABLE cmrs +ADD COLUMN cmino BIGINT(20) NULL; + +UPDATE rsc +SET rscname = '缳' +WHERE rstype = 1; \ No newline at end of file