사용자>강의실>평가 : 시험, 과제제출, 토론

참여기간 및 입력, 업데이트 제약 조건  cm.sstime,cm.setime -> lect.sdate,lect.edate 로 변경
This commit is contained in:
lch 2021-07-13 01:28:52 +00:00
parent 767d19d875
commit 5539247bec
6 changed files with 42 additions and 42 deletions

View File

@ -615,7 +615,7 @@
<select id="cr.lectsd" parameterClass="hashtable" resultClass="lectsd">
select a.lectno,a.attrate,a.cmno,a.sdate,a.edate
,b.sdno,b.sdname,b.sddesc,b.fgno sdfgno,b.sdcondition
,a.sdate sstime,a.edate setime
,c.sstime,c.setime
,d.checktime,d.cpoint,d.feedb,d.fgno,d.atext
from lect a
inner join cmsd b on b.cmno=a.cmno and b.sdno=#sdno#
@ -641,9 +641,9 @@
where d.lectno is null;
</update>
<select id="cr.lectsd2" parameterClass="hashtable" resultClass="lectsd">
select a.lectno,a.attrate
select a.lectno,a.attrate,a.sdate,a.edate
,b.sdno,b.sdname,b.sddesc,b.fgno sdfgno,b.sdcondition
,a.sdate sstime,a.edate setime
,c.sstime,c.setime
,d.checktime,d.cpoint,d.feedb,d.fgno,d.atext
from lect a
inner join cmsd b on b.cmno=a.cmno and b.sdno=#sdno#
@ -666,7 +666,7 @@
update lectsdboard set rcount=rcount+1 where bno=#bno# and cno&lt;&gt;#userno#;
select a.bno,a.subject,a.contents,a.cdt,a.fgno,a.cno
,b.sdname
,l.sdate sstime,l.edate setime
,c.sstime,c.setime,l.sdate,l.edate
,u.username,u.userno
,a2.checktime
from lectsdboard a
@ -679,24 +679,24 @@
</select>
<update id="cr.lectsdboard.save" parameterClass="lectsdboard">
update lectsd a
inner join lect b on b.lectno=a.lectno and b.userno=#userno#
inner join cm c on c.cmno=b.cmno and c.sstime &lt; now() and c.setime &gt; now()
inner join lect b on b.lectno=a.lectno and b.userno=#userno# and b.sdate &lt; now() and b.edate &gt; now()
inner join cm c on c.cmno=b.cmno
set a.udt=now(),a.uno=#uno#,a.uip=#uip#
,a.submittime=now(),submitip=#uip#
where a.lectno=#lectno# and a.sdno=#sdno# and a.checktime is null;
update lectsdboard a
inner join lectsd a2 on a2.lectno=a.lectno and a2.sdno=a.sdno and a2.checktime is null
inner join lect b on b.lectno=a.lectno and b.userno=#userno#
inner join cm c on c.cmno=b.cmno and c.sstime &lt; now() and c.setime &gt; now()
inner join lect b on b.lectno=a.lectno and b.userno=#userno# and b.sdate &lt; now() and b.edate &gt; now()
inner join cm c on c.cmno=b.cmno
set a.udt=now(),a.uno=#uno#,a.uip=#uip#
,a.subject=#subject#,contents=#contents#,a.fgno=#fgno#
where a.bno=#bno# and a.lectno=#lectno# and a.sdno=#sdno#;
</update>
<insert id="cr.lectsdboard.in" parameterClass="lectsdboard">
update lectsd a
inner join lect b on b.lectno=a.lectno and b.userno=#userno#
inner join cm c on c.cmno=b.cmno and c.sstime &lt; now() and c.setime &gt; now()
inner join lect b on b.lectno=a.lectno and b.userno=#userno# and b.sdate &lt; now() and b.edate &gt; now()
inner join cm c on c.cmno=b.cmno
set a.udt=now(),a.uno=#uno#,a.uip=#uip#
,a.submittime=now(),submitip=#uip#
where a.lectno=#lectno# and a.sdno=#sdno# and a.checktime is null;
@ -704,8 +704,8 @@
insert into lectsd (lectno,sdno,iscopy,submittime,submitip,<include refid="sql.inc"></include>)
select a.lectno,a.sdno,0,now(),#uip#,<include refid="sql.inv"></include>
from (select #lectno# lectno,#userno# userno,#sdno# sdno) a
inner join lect b on b.lectno=a.lectno and b.userno=a.userno
inner join cm c on c.cmno=b.cmno and c.sstime &lt; now() and c.setime &gt; now()
inner join lect b on b.lectno=a.lectno and b.userno=a.userno and b.sdate &lt; now() and b.edate &gt; now()
inner join cm c on c.cmno=b.cmno
left outer join lectsd d on d.lectno=a.lectno and d.sdno=a.sdno
where d.lectno is null;
@ -714,8 +714,8 @@
insert into lectsdboard (lectno,sdno,subject,contents,fgno,rcount,cip,isdel,<include refid="sql.inc"></include>)
select a.lectno,a.sdno,#subject#,#contents#,#fgno#,0,#uip#,0,<include refid="sql.inv"></include>
from (select #lectno# lectno,#userno# userno,#sdno# sdno) a
inner join lect b on b.lectno=a.lectno and b.userno=a.userno
inner join cm c on c.cmno=b.cmno and c.sstime &lt; now() and c.setime &gt; now();
inner join lect b on b.lectno=a.lectno and b.userno=a.userno and b.sdate &lt; now() and b.edate &gt; now()
inner join cm c on c.cmno=b.cmno
<selectKey type="post" property="bno" resultClass="long">SELECT last_insert_id()</selectKey>
</insert>
<select id="cr.lectsdboardcmt" parameterClass="long" resultClass="boardcmt">
@ -731,14 +731,14 @@
<update id="cr.lectsdboard.del" parameterClass="hashtable">
update lectsd a
inner join lectsdboard b on b.bno=#bno# and b.cno=#userno# and b.isdel=0 and b.lectno=a.lectno and b.sdno=a.sdno
inner join lect a2 on a2.lectno=b.lectno and a2.userno=b.cno
inner join cm c on c.cmno=a2.cmno and c.sstime &lt; now() and c.setime &gt; now()
inner join lect a2 on a2.lectno=b.lectno and a2.userno=b.cno and a2.sdate &lt; now() and a2.edate &gt; now()
inner join cm c on c.cmno=a2.cmno
set a.submittime=null,a.submitip=null and a.checktime is null;
update lectsdboard a
inner join lectsd b on b.lectno=a.lectno and b.sdno=a.sdno and b.checktime is null
inner join lect a2 on a2.lectno=b.lectno and a2.userno=a.cno
inner join cm c on c.cmno=a2.cmno and c.sstime &lt; now() and c.setime &gt; now()
inner join lect a2 on a2.lectno=b.lectno and a2.userno=a.cno and a2.sdate &lt; now() and a2.edate &gt; now()
inner join cm c on c.cmno=a2.cmno
set a.uno=#uno#,a.udt=now(),a.uip=#uip#
,a.isdel=1
where a.bno=#bno# and a.cno=#userno# and a.isdel=0;

View File

@ -18,7 +18,7 @@
</tr>
<tr>
<th>토론시간</th>
<td>@Model.LectSD.sstime.ToString("yy-MM-dd") 00:00 ~ @Model.LectSD.setime.ToString("yy-MM-dd") 23:59</td>
<td>수강 종료일 (@Model.LectSD.edate.Value.ToString("yyyy-MM-dd")) 이내</td>
</tr>
<tr>
<td colspan="2">
@ -46,7 +46,7 @@
<th>첨부파일</th>
<td>
<label>※ 파일크기는 5MB를 초과해서는 안됩니다</label><br />
@Html.Partial("./Partial/file", Model.FileList.Where(w => w.fgno == Model.LectSDBoard.fgno).ToList(), new ViewDataDictionary { { "fgn", "fgno" }, { "fgv", Model.LectSDBoard.fgno ?? 0 }, { "filename", "file1" }, { "filecount", 10 }, { "read", Model.LectSD.checktime == null && Model.LectSD.sstime < DateTime.Now && Model.LectSD.setime > DateTime.Now ? 0 : 1 }, { "maxsize", 5242880 }, { "maxname", "5 Mega " } })
@Html.Partial("./Partial/file", Model.FileList.Where(w => w.fgno == Model.LectSDBoard.fgno).ToList(), new ViewDataDictionary { { "fgn", "fgno" }, { "fgv", Model.LectSDBoard.fgno ?? 0 }, { "filename", "file1" }, { "filecount", 10 }, { "read", Model.LectSD.checktime == null && Model.LectSD.sdate < DateTime.Now && Model.LectSD.edate > DateTime.Now ? 0 : 1 }, { "maxsize", 5242880 }, { "maxname", "5 Mega " } })
</td>
</tr>
</table>
@ -55,7 +55,7 @@
<input type="hidden" name="bno" value="@Model.LectSDBoard.bno" />
</form>
<ul class="lctBtn col2">
@if (Model.LectSD.sstime < DateTime.Now && Model.LectSD.setime > DateTime.Now && Model.LectSD.checktime == null)
@if (Model.LectSD.sdate < DateTime.Now && Model.LectSD.edate > DateTime.Now && Model.LectSD.checktime == null)
{
<li><a href="#" class="sm bk" onclick="save()">저장</a></li>
}

View File

@ -15,7 +15,7 @@
</tr>*@
<tr>
<th>토론시간</th>
<td>@Model.LectSDBoard.sstime.ToString("yy-MM-dd") 00:00 ~ @Model.LectSDBoard.setime.ToString("yy-MM-dd") 23:59</td>
<td>수강 종료일 (@Model.LectSDBoard.edate.Value.ToString("yyyy-MM-dd")) 이내</td>
</tr>
<tr>
<td colspan="2">
@ -63,7 +63,7 @@
</table>
<ul class="lctBtn col4">
@*<li><a href="#" class="sm bk">답글</a></li>*@
@if (Model.LectSDBoard.cno == ViewBag.SSUserNo && Model.LectSDBoard.checktime == null && Model.LectSDBoard.sstime < DateTime.Now && Model.LectSDBoard.setime > DateTime.Now)
@if (Model.LectSDBoard.cno == ViewBag.SSUserNo && Model.LectSDBoard.checktime == null && Model.LectSDBoard.sdate < DateTime.Now && Model.LectSDBoard.edate > DateTime.Now)
{
<li><a onclick="reg(@Model.LectSDBoard.bno)" href="#" class="sm">수정</a></li>
<li><a onclick="delme(@Model.LectSDBoard.bno)" href="#" class="sm">삭제</a></li>

View File

@ -18,7 +18,7 @@
</tr>
<tr>
<th>토론시간</th>
<td>@Model.LectSD.sstime.ToString("yy-MM-dd") 00:00 ~ @Model.LectSD.setime.ToString("yy-MM-dd") 23:59</td>
<td>수강 종료일 (@Model.LectSD.edate.Value.ToString("yyyy-MM-dd")) 이내</td>
</tr>
<tr>
<td colspan="2">

View File

@ -18,7 +18,7 @@
</table>
<ul class="lctBtn col1">
<li><a href="#" class="bk" onclick="goexam()">@(Model.LectEX.eend == null && (Model.LectEX.estart == null || Model.LectEX.relaylimit.Value >= Model.LectEX.entercount) ? "응시하기" : "결과보기")</a></li>
@if (Model.LectEX.setime > DateTime.Now && Model.LectEX.estart != null && Model.LectEX.isreexamable == 1 && Model.LectEX.iscomplete != 1)
@if (Model.LectEX.edate > DateTime.Now && Model.LectEX.estart != null && Model.LectEX.isreexamable == 1 && Model.LectEX.iscomplete != 1)
{
<li><a href="#" class="bk" onclick="javascript:reexam(@Model.LectEX.exno,@Model.LectEX.lectno)">재응시</a></li>
}

View File

@ -54,7 +54,7 @@
<tr>
<td colspan="2">
<div class="teskFilex">
@Html.Partial("./Partial/file", Model.FileList.Where(w => w.fgno == Model.LectSD.fgno).ToList(), new ViewDataDictionary { { "fgn", "fgno" }, { "fgv", Model.LectSD.fgno ?? 0 }, { "filename", "file1" }, { "filecount", 1 }, { "read", Model.LectSD.checktime == null && Model.LectSD.sstime < DateTime.Now && Model.LectSD.setime > DateTime.Now ? 0 : 1 },{"issubject",1 } })
@Html.Partial("./Partial/file", Model.FileList.Where(w => w.fgno == Model.LectSD.fgno).ToList(), new ViewDataDictionary { { "fgn", "fgno" }, { "fgv", Model.LectSD.fgno ?? 0 }, { "filename", "file1" }, { "filecount", 1 }, { "read", Model.LectSD.checktime == null && Model.LectSD.sdate < DateTime.Now && Model.LectSD.edate > DateTime.Now ? 0 : 1 },{"issubject",1 } })
</div>
</td>
</tr>