6432. 개발건 (적용은 안함)
This commit is contained in:
parent
31ad5fe636
commit
bf9fc91992
|
|
@ -1072,29 +1072,31 @@ namespace NP.Base
|
||||||
[Obsolete]
|
[Obsolete]
|
||||||
protected int SendEmail(String smtphost, int smtpport, String smtpid, String smtppw, int SendType, String rcvEmail, String sdEmail, String sdName, String title, String Html, String strFile = null, string bans = "")
|
protected int SendEmail(String smtphost, int smtpport, String smtpid, String smtppw, int SendType, String rcvEmail, String sdEmail, String sdName, String title, String Html, String strFile = null, string bans = "")
|
||||||
{
|
{
|
||||||
System.Web.Mail.MailMessage mail = null;
|
|
||||||
switch (SendType)
|
switch (SendType)
|
||||||
{
|
{
|
||||||
case 1: break;
|
case 1: break;
|
||||||
default:
|
default: break;
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String result = rcvEmail;
|
String result = rcvEmail;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
mail = new System.Web.Mail.MailMessage();
|
var mail = new System.Web.Mail.MailMessage();
|
||||||
mail.Subject = title;
|
mail.Subject = title;
|
||||||
mail.From = sdEmail; //보내는 사람 설정
|
mail.From = "donetreplay@cte.or.kr"; // sdEmail; //보내는 사람 설정
|
||||||
mail.To = rcvEmail; // 받는 사람 설정
|
mail.To = rcvEmail; // 받는 사람 설정
|
||||||
mail.BodyEncoding = System.Text.Encoding.UTF8;
|
mail.BodyEncoding = System.Text.Encoding.UTF8;
|
||||||
mail.BodyFormat = MailFormat.Html;
|
mail.BodyFormat = MailFormat.Html;
|
||||||
|
|
||||||
if ("" != bans)
|
if ("" != bans)
|
||||||
{
|
{
|
||||||
Html = Html.Replace("^ban0^", bans.Split(':')[0]).Replace("^ban1^", bans.Split(':')[1]);
|
Html = Html.Replace("^ban0^", bans.Split(':')[0]).Replace("^ban1^", bans.Split(':')[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
var files = new NP.Model.VMBase() { };
|
var files = new NP.Model.VMBase() { };
|
||||||
mail.Body = Html.Replace("src=\"" + files.Files + "/Editor", "src=\"" + GetConfig("fronturl") + "/Files/Editor");
|
mail.Body = Html.Replace("src=\"" + files.Files + "/Editor", "src=\"" + GetConfig("fronturl") + "/Files/Editor");
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(strFile))
|
if (!string.IsNullOrEmpty(strFile))
|
||||||
{
|
{
|
||||||
System.Web.Mail.MailAttachment attachment;//첨부파일 만들기
|
System.Web.Mail.MailAttachment attachment;//첨부파일 만들기
|
||||||
|
|
@ -1102,21 +1104,13 @@ namespace NP.Base
|
||||||
mail.Attachments.Add(attachment);//첨부파일 붙이기
|
mail.Attachments.Add(attachment);//첨부파일 붙이기
|
||||||
}
|
}
|
||||||
|
|
||||||
int cdoBasic = 1;
|
|
||||||
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", true);
|
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", true);
|
||||||
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", smtpport);
|
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", smtpport);
|
||||||
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", cdoBasic);
|
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", 1);
|
||||||
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", smtpid);
|
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", smtpid);
|
||||||
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", smtppw);
|
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", smtppw);
|
||||||
SmtpMail.SmtpServer = smtphost;
|
SmtpMail.SmtpServer = smtphost;
|
||||||
SmtpMail.Send(mail);
|
SmtpMail.Send(mail);
|
||||||
|
|
||||||
//using (System.Net.Mail.SmtpClient SmtpServer = new System.Net.Mail.SmtpClient(smtphost, smtpport))
|
|
||||||
//{
|
|
||||||
// SmtpServer.Credentials = new System.Net.NetworkCredential(smtpid, smtppw);
|
|
||||||
// //SmtpServer.EnableSsl = true;
|
|
||||||
// SmtpServer.Send(mail);
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
@ -1127,6 +1121,7 @@ namespace NP.Base
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 메일발송 (추가)
|
/// 메일발송 (추가)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -1165,6 +1160,7 @@ namespace NP.Base
|
||||||
using (var mailMessage = new System.Net.Mail.MailMessage())
|
using (var mailMessage = new System.Net.Mail.MailMessage())
|
||||||
{
|
{
|
||||||
mailMessage.From = new MailAddress(fromEmail, "영남건설기술교육원");
|
mailMessage.From = new MailAddress(fromEmail, "영남건설기술교육원");
|
||||||
|
mailMessage.ReplyToList.Add(new MailAddress(fromEmail));
|
||||||
mailMessage.Subject = title;
|
mailMessage.Subject = title;
|
||||||
mailMessage.Body = Html;
|
mailMessage.Body = Html;
|
||||||
mailMessage.IsBodyHtml = true;
|
mailMessage.IsBodyHtml = true;
|
||||||
|
|
@ -1208,22 +1204,19 @@ namespace NP.Base
|
||||||
{
|
{
|
||||||
var smtp = GetConfig("masteremail").Split(';');
|
var smtp = GetConfig("masteremail").Split(';');
|
||||||
string smtphost = smtp[1];
|
string smtphost = smtp[1];
|
||||||
int smtpport = Convert.ToInt32(smtp[2].Replace(" ",""));
|
int smtpport = Convert.ToInt32(smtp[2].Replace(" ", ""));
|
||||||
string smtpid = smtp[3];
|
string smtpid = smtp[3];
|
||||||
string smtppw = smtp[4];
|
string smtppw = smtp[4];
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var mail = new System.Web.Mail.MailMessage();
|
var mail = new System.Web.Mail.MailMessage();
|
||||||
mail.From = sdEmail;
|
mail.From = sdEmail;
|
||||||
mail.To =rcvEmail;
|
mail.To = rcvEmail;
|
||||||
mail.Subject = title;
|
mail.Subject = title;
|
||||||
mail.BodyFormat = MailFormat.Html;
|
mail.BodyFormat = MailFormat.Html;
|
||||||
mail.Body = string.Empty;
|
mail.Body = string.Empty;
|
||||||
mail.BodyEncoding = System.Text.Encoding.UTF8;
|
mail.BodyEncoding = System.Text.Encoding.UTF8;
|
||||||
|
|
||||||
FileInfo template_email = new FileInfo(Server.MapPath(string.Format(@"\Content/emailForm/\{0}", (templateType == "2" ? "template_email" : "template_email_" + templateType) + ".html")));
|
FileInfo template_email = new FileInfo(Server.MapPath(string.Format(@"\Content/emailForm/\{0}", (templateType == "2" ? "template_email" : "template_email_" + templateType) + ".html")));
|
||||||
|
|
||||||
string template_emailText = string.Empty;
|
string template_emailText = string.Empty;
|
||||||
if (template_email.Exists)
|
if (template_email.Exists)
|
||||||
{
|
{
|
||||||
|
|
@ -1233,11 +1226,9 @@ namespace NP.Base
|
||||||
{
|
{
|
||||||
template_emailText = template_emailText.Replace("{" + i + "}", contents[i]);
|
template_emailText = template_emailText.Replace("{" + i + "}", contents[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
r.Dispose();
|
r.Dispose();
|
||||||
mail.Body = template_emailText; // 내용 설정
|
mail.Body = template_emailText; // 내용 설정
|
||||||
}
|
}
|
||||||
|
|
||||||
var files = new NP.Model.VMBase() { };
|
var files = new NP.Model.VMBase() { };
|
||||||
mail.Body = template_emailText.Replace("src=\"" + files.Files + "/Editor", "src=\"" + GetConfig("fronturl") + "/Files/Editor");
|
mail.Body = template_emailText.Replace("src=\"" + files.Files + "/Editor", "src=\"" + GetConfig("fronturl") + "/Files/Editor");
|
||||||
if (!string.IsNullOrEmpty(fileName))
|
if (!string.IsNullOrEmpty(fileName))
|
||||||
|
|
@ -1254,26 +1245,15 @@ namespace NP.Base
|
||||||
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", smtppw);
|
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", smtppw);
|
||||||
SmtpMail.SmtpServer = smtphost;
|
SmtpMail.SmtpServer = smtphost;
|
||||||
SmtpMail.Send(mail);
|
SmtpMail.Send(mail);
|
||||||
//using (System.Net.Mail.SmtpClient SmtpServer = new System.Net.Mail.SmtpClient(smtphost, smtpport))
|
|
||||||
//{
|
|
||||||
// SmtpServer.Credentials = new System.Net.NetworkCredential(smtpid, smtppw);
|
|
||||||
// //SmtpServer.EnableSsl = true;
|
|
||||||
// SmtpServer.Send(mail);
|
|
||||||
//}
|
|
||||||
//SmtpServer.Host = smtphost;
|
|
||||||
//SmtpServer.Port = Convert.ToInt32(smtpport);
|
|
||||||
//SmtpServer.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
|
|
||||||
//SmtpServer.EnableSsl = false;
|
|
||||||
//SmtpServer.Send(mail);
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
SetError("emailfail:" + rcvEmail + ":" + ex.Message + ex.StackTrace);
|
SetError("emailfail:" + rcvEmail + ":" + ex.Message + ex.StackTrace);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// mmstype (0: mms, 1: mmsurl, 7: html
|
/// mmstype (0: mms, 1: mmsurl, 7: html
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -352,10 +352,8 @@ namespace NP.Base.Controllers
|
||||||
"아래 링크를 클릭하셔서 비밀번호를 재설정해주세요.<br /><br />" +
|
"아래 링크를 클릭하셔서 비밀번호를 재설정해주세요.<br /><br />" +
|
||||||
"<a href=\"" + fronturl + "/Account/FindMe?pwcallno=" + pwcallno + "&userno=" + user.userno + "\" target=\"_blank\" style=\"color: #0094ff;\">비밀번호 재설정</a><br /><br />이 링크는 24시간 뒤 만료됩니다.";
|
"<a href=\"" + fronturl + "/Account/FindMe?pwcallno=" + pwcallno + "&userno=" + user.userno + "\" target=\"_blank\" style=\"color: #0094ff;\">비밀번호 재설정</a><br /><br />이 링크는 24시간 뒤 만료됩니다.";
|
||||||
|
|
||||||
int mailReuslt = SendEmailNew("[영남건설기술교육원] 비밀번호 찾기 안내", MHtml, email);
|
//int mailReuslt = SendEmailNew("[영남건설기술교육원] 비밀번호 찾기 안내", MHtml, email);
|
||||||
|
return JsonOK(SendEmail(masteremail.Split(';')[1], GetInt(masteremail.Split(';')[2]), masteremail.Split(';')[3], masteremail.Split(';')[4], 999, user.email, masteremail.Split(';')[0], "영남건설기술교육원 운영자", "[영남건설기술교육원] 비밀번호 찾기 안내", MHtml, "", "0:0"));
|
||||||
|
|
||||||
return JsonOK(mailReuslt == 1 ? 1000 : 0);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -439,58 +439,68 @@
|
||||||
) c on c.rscqno is not null
|
) c on c.rscqno is not null
|
||||||
where a.lectno=#lectno# and a.userno=#userno# and a0.lectno is null
|
where a.lectno=#lectno# and a.userno=#userno# and a0.lectno is null
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<!-- 시험응시/과제제출 리스트 -->
|
||||||
<select id="cr.myestimation" parameterClass="hashtable" resultClass="data">
|
<select id="cr.myestimation" parameterClass="hashtable" resultClass="data">
|
||||||
select a.*
|
select a.*
|
||||||
from (
|
from (
|
||||||
select 0 dtype
|
select 0 dtype
|
||||||
,null strval,0 intval10
|
,null strval,0 intval10
|
||||||
,0 intval,0 intval2,0 intval3,0 intval4,0 intval5
|
,0 intval,0 intval2,0 intval3,0 intval4,0 intval5
|
||||||
,0 rno
|
,0 intval6
|
||||||
,null time
|
,0 rno
|
||||||
from (select 1 col1) a
|
,null time
|
||||||
where a.col1=0
|
,null time2
|
||||||
union all
|
from (select 1 col1) a
|
||||||
select -1 dtype
|
where a.col1=0
|
||||||
,null strval,0 intval10
|
union all
|
||||||
,0 intval,0 intval2,0 intval3,0 intval4,a.attrate intval5
|
select -1 dtype
|
||||||
,0 rno
|
,null strval,0 intval10
|
||||||
,null time
|
,0 intval,0 intval2,0 intval3,0 intval4,a.attrate intval5
|
||||||
from lect a
|
,0 intval6
|
||||||
where a.lectno=#lectno# and a.userno=#userno#
|
,0 rno
|
||||||
<isNotNull property="exam">
|
,null time
|
||||||
|
,null time2
|
||||||
|
from lect a
|
||||||
|
where a.lectno=#lectno# and a.userno=#userno#
|
||||||
|
<isNotNull property="exam">
|
||||||
union all
|
union all
|
||||||
select b.extype dtype
|
select b.extype dtype
|
||||||
,b.exname strval,b.exno intval10
|
,b.exname strval,b.exno intval10
|
||||||
<!--,case when a2.sstime < now() and a2.setime > now() then a.attrate else -1 end intval,b.econdition intval2-->
|
<!--,case when a2.sstime < now() and a2.setime > now() then a.attrate else -1 end intval,b.econdition intval2-->
|
||||||
,case when a.sdate < now() and a.edate > now() then a.attrate else -1 end intval,b.econdition intval2
|
,case when a.sdate < now() and a.edate > now() then a.attrate else -1 end intval,b.econdition intval2
|
||||||
,case when c.eend is null then 0 else 1 end intval3
|
,case when c.eend is null then 0 else 1 end intval3
|
||||||
,a.attrate intval5
|
,a.attrate intval5
|
||||||
,null intval4
|
,null intval4
|
||||||
,row_number() over (partition by b.extype order by b.extype, b.cdt) rno
|
,a2.studytime intval6
|
||||||
,a.edate time
|
,row_number() over (partition by b.extype order by b.extype, b.cdt) rno
|
||||||
from lect a
|
,a.edate time
|
||||||
inner join cm a2 on a2.cmno=a.cmno
|
,a.sdate time2
|
||||||
inner join cmex b on b.cmno=a.cmno and b.isdel=0
|
from lect a
|
||||||
left outer join lectex c on c.lectno=a.lectno and c.exno=b.exno
|
inner join cm a2 on a2.cmno=a.cmno
|
||||||
where a.lectno=#lectno# and a.userno=#userno#
|
inner join cmex b on b.cmno=a.cmno and b.isdel=0
|
||||||
</isNotNull>
|
left outer join lectex c on c.lectno=a.lectno and c.exno=b.exno
|
||||||
|
where a.lectno=#lectno# and a.userno=#userno#
|
||||||
|
</isNotNull>
|
||||||
<isNotNull property="subject">
|
<isNotNull property="subject">
|
||||||
union all
|
union all
|
||||||
select 2 dtype
|
select 2 dtype
|
||||||
,b.sdname strval,b.sdno intval10
|
,b.sdname strval,b.sdno intval10
|
||||||
<!--,case when a2.sstime < now() and a2.setime > now() then a.attrate else -1 end intval,b.sdcondition intval2-->
|
<!--,case when a2.sstime < now() and a2.setime > now() then a.attrate else -1 end intval,b.sdcondition intval2-->
|
||||||
,case when a.sdate < now() and a.edate > now() then a.attrate else -1 end intval,b.sdcondition intval2
|
,case when a.sdate < now() and a.edate > now() then a.attrate else -1 end intval,b.sdcondition intval2
|
||||||
,case when c.submittime is null then 0 else 1 end intval3
|
,case when c.submittime is null then 0 else 1 end intval3
|
||||||
,case when c.checktime is null then 0 else 1 end intval4
|
,case when c.checktime is null then 0 else 1 end intval4
|
||||||
,a.attrate intval5
|
,a.attrate intval5
|
||||||
,row_number() over (order by b.cdt) rno
|
,a2.studytime intval6
|
||||||
,a.edate time
|
,row_number() over (order by b.cdt) rno
|
||||||
from lect a
|
,a.edate time
|
||||||
inner join cm a2 on a2.cmno=a.cmno
|
,a.sdate time2
|
||||||
inner join cmsd b on b.cmno=a.cmno and b.sdtype=0 and b.isdel=0
|
from lect a
|
||||||
left outer join lectsd c on c.lectno=a.lectno and c.sdno=b.sdno
|
inner join cm a2 on a2.cmno=a.cmno
|
||||||
where a.lectno=#lectno# and a.userno=#userno#
|
inner join cmsd b on b.cmno=a.cmno and b.sdtype=0 and b.isdel=0
|
||||||
</isNotNull>
|
left outer join lectsd c on c.lectno=a.lectno and c.sdno=b.sdno
|
||||||
|
where a.lectno=#lectno# and a.userno=#userno#
|
||||||
|
</isNotNull>
|
||||||
<isNotNull property="discuss">
|
<isNotNull property="discuss">
|
||||||
union all
|
union all
|
||||||
select 3 dtype
|
select 3 dtype
|
||||||
|
|
@ -500,8 +510,10 @@
|
||||||
,case when count(d.bno) > 0 then 1 else 0 end intval3
|
,case when count(d.bno) > 0 then 1 else 0 end intval3
|
||||||
,case when c.checktime is null then 0 else 1 end intval4
|
,case when c.checktime is null then 0 else 1 end intval4
|
||||||
,a.attrate intval5
|
,a.attrate intval5
|
||||||
|
,a2.studytime intval6
|
||||||
,row_number() over (order by b.cdt) rno
|
,row_number() over (order by b.cdt) rno
|
||||||
,a.edate time
|
,a.edate time
|
||||||
|
,a.sdate time2
|
||||||
from lect a
|
from lect a
|
||||||
inner join cm a2 on a2.cmno=a.cmno
|
inner join cm a2 on a2.cmno=a.cmno
|
||||||
inner join cmsd b on b.cmno=a.cmno and b.sdtype=1 and b.isdel=0
|
inner join cmsd b on b.cmno=a.cmno and b.sdtype=1 and b.isdel=0
|
||||||
|
|
@ -513,6 +525,7 @@
|
||||||
) a
|
) a
|
||||||
order by a.dtype,a.rno
|
order by a.dtype,a.rno
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="cr.lectex" parameterClass="hashtable" resultClass="lectex">
|
<select id="cr.lectex" parameterClass="hashtable" resultClass="lectex">
|
||||||
select a.lectno,a.attrate,a.iscomplete,a.sdate,a.edate
|
select a.lectno,a.attrate,a.iscomplete,a.sdate,a.edate
|
||||||
,b.sstime,b.setime
|
,b.sstime,b.setime
|
||||||
|
|
|
||||||
|
|
@ -1,73 +1,146 @@
|
||||||
@model NP.Model.VMCRoom
|
@model NP.Model.VMCRoom
|
||||||
@{
|
@{
|
||||||
|
|
||||||
|
// 1. 하단 문구에서 사용
|
||||||
|
// 1-1)최종평가 일때 cm.studytime 값 intval6
|
||||||
|
int dType1CmStudyTime = Model.Datas
|
||||||
|
.Where(w => w.dtype == 1)
|
||||||
|
.Select(s => s.intval6)
|
||||||
|
.SingleOrDefault();
|
||||||
|
|
||||||
|
// 1-2)최종평가 일때 lect.sdate
|
||||||
|
DateTime dType1LectSDate = Model.Datas
|
||||||
|
.Where(w => w.dtype == 1)
|
||||||
|
.Select(s => s.time2)
|
||||||
|
.SingleOrDefault();
|
||||||
|
|
||||||
|
// 예외처리 과정코드들?
|
||||||
|
List<long> allowLectNos = Array
|
||||||
|
.ConvertAll("104069,102553,105325,104402,106226,62683,104419".Split(','), long.Parse)
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
|
||||||
|
// 현재 진도율
|
||||||
|
int currentProgresRate = Model.Datas.Where(w => w.dtype == -1).FirstOrDefault().intval5;
|
||||||
|
|
||||||
}
|
}
|
||||||
<ul class="lctpTab col3">
|
<ul class="lctpTab col3">
|
||||||
<li class="@(Model.tabidx == 0 ? "current":"")"><a onclick="gotab(0, this)" style="@(Model.tabidx == 0 ? "cursor: default;":"")" href="#;">전체</a></li>
|
<li class="@(Model.tabidx == 0 ? "current" : "")"><a onclick="gotab(0, this)" style="@(Model.tabidx == 0 ? "cursor: default;" : "")" href="#;">전체</a></li>
|
||||||
<li class="@(Model.tabidx == 1 ? "current":"")"><a onclick="gotab(1, this)" style="@(Model.tabidx == 1 ? "cursor: default;":"")" href="#">시험</a></li>
|
<li class="@(Model.tabidx == 1 ? "current" : "")"><a onclick="gotab(1, this)" style="@(Model.tabidx == 1 ? "cursor: default;" : "")" href="#">시험</a></li>
|
||||||
<li class="@(Model.tabidx == 2 ? "current":"")"><a onclick="gotab(2, this)" style="@(Model.tabidx == 2 ? "cursor: default;":"")" href="#">과제</a></li>
|
<li class="@(Model.tabidx == 2 ? "current" : "")"><a onclick="gotab(2, this)" style="@(Model.tabidx == 2 ? "cursor: default;" : "")" href="#">과제</a></li>
|
||||||
@*<li class="@(Model.tabidx == 3 ? "current":"")"><a onclick="gotab(3, this)" style="@(Model.tabidx == 3 ? "cursor: default;":"")" href="#">토론</a></li>*@
|
|
||||||
</ul>
|
</ul>
|
||||||
@*@if (Model.tabidx == 0 || Model.tabidx == 3)
|
|
||||||
{
|
|
||||||
<div style="color: #0094ff; text-align: right;">※ 토론은 참여완료 후에도 추가로 참여할 수 있습니다.</div>
|
|
||||||
}*@
|
|
||||||
<div class="evaList">
|
<div class="evaList">
|
||||||
|
<input type="hidden" id="hdndType1StudyTime" value="@dType1CmStudyTime" />
|
||||||
|
<input type="hidden" id="hdnlectSDate" value="@dType1LectSDate" />
|
||||||
|
<input type="hidden" id="hdnCurrentProgresRate" value="@currentProgresRate" />
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
@{
|
@foreach (var d in Model.Datas.Where(w => w.dtype > -1))
|
||||||
List<long> allowLectNos = Array.ConvertAll("104069,102553,105325,104402,106226,62683,104419".Split(','), long.Parse).ToList();
|
{
|
||||||
|
ViewBag.exCheck = allowLectNos.IndexOf(Model.croomlectno) > -1 ? true : false;
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
@*
|
||||||
|
// 당구장 설명
|
||||||
|
/*
|
||||||
|
① 16시간 교육O or 신청일이 2024-08-19 이전: 참여조건 표기
|
||||||
|
② 16시간 교육X or 신청일이 2024-08-19 이후: ※ 집체교육일에 교육장에서 평가진행
|
||||||
|
|
||||||
|
// 3월이후에 아래 내용으로 복원한다 (dtype = 1 안에 if 문 조정)
|
||||||
|
<p>※ 참여조건 : 진도율 90% 이상 / 집체교육 참석 완료 (집체교육일 : @d.time.ToShortDateString())</p>
|
||||||
|
*/
|
||||||
|
*@
|
||||||
|
<h5>
|
||||||
|
<b>@(d.dtype == 0 ? "진행평가" : d.dtype == 1 ? "최종평가" : d.dtype == 2 ? "과제" : d.dtype == 3 ? "토론" : "")</b><span> @d.strval</span>
|
||||||
|
</h5>
|
||||||
|
|
||||||
|
@if (d.dtype == 1)
|
||||||
|
{ // 최종평가
|
||||||
|
if (d.intval6 == 16 && d.time2 < Convert.ToDateTime("2024-08-19 00:00:00"))
|
||||||
|
{
|
||||||
|
<p>참여조건 : 진도율 @(d.intval2)% 이상 / 집체교육 참석일 (@d.time.ToShortDateString()) 전 까지</p>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<p>※ 집체교육일에 교육장에서 평가진행</p>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (d.dtype > 1)
|
||||||
|
{ // 기타
|
||||||
|
<p>참여조건 : 진도율 @(d.intval2)% 이상 / 집체교육 참석일 (@d.time.ToShortDateString()) 전 까지</p>
|
||||||
|
}
|
||||||
|
</th>
|
||||||
|
|
||||||
|
|
||||||
|
@*
|
||||||
|
// 시험 응시 버튼
|
||||||
|
/*
|
||||||
|
시험응시가능조건(①, ② 필수 / ③or④)
|
||||||
|
① 관리자가 시험등록 시 설정한 진도율 조건 만족 < -현재 되어 있음
|
||||||
|
② lect.sdate ~lect.edate 기간 내일 경우(현재 없음.어딘가 기능은 있을텐데.....)
|
||||||
|
③ 집합교육이 출석 상태
|
||||||
|
④ 16시간 교육
|
||||||
|
|
||||||
|
// 3월이후에 아래 내용으로 복원한다 (dtype = 1 안에 if 문 조정)
|
||||||
|
<a href="javascript:;" onclick="msg('시험 응시 조건이 충족되지 않아 시험평가 진행이 불가합니다. <br>진도율 90% 이상, 집체교육 출석 완료')"
|
||||||
|
class="evaType@(d.intval4==1?"04":d.intval3==1?"03":d.intval3==0 && d.intval >=d.intval2?"02":"01")">@(d.intval4 == 1 ? "[평가완료]" : d.intval3 == 1 ? "[참여완료]" : d.intval3 == 0 && d.intval >=d.intval2 ? "[참여가능]" : "[참여불가]")</a>
|
||||||
|
*/
|
||||||
|
*@
|
||||||
|
|
||||||
}
|
|
||||||
@foreach (var d in Model.Datas.Where(w=>w.dtype > -1))
|
|
||||||
{
|
|
||||||
if(allowLectNos.IndexOf(Model.croomlectno) > -1)
|
|
||||||
{
|
|
||||||
ViewBag.exCheck = true;
|
|
||||||
}
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
@* 아래에 주석친 부분들은 2025년3월에 롤백될 예정 *@
|
|
||||||
<h5><b>@(d.dtype == 0 ? "진행평가":d.dtype==1?"최종평가":d.dtype == 2?"과제":d.dtype==3?"토론":"")</b><span> @d.strval</span></h5>
|
|
||||||
@if (d.dtype == 1)
|
@if (d.dtype == 1)
|
||||||
{
|
{
|
||||||
<p>※ 집체교육일에 교육장에서 평가진행</p>
|
// 최총 평가일 때
|
||||||
@*<p>※ 참여조건 : 진도율 90% 이상 / 집체교육 참석 완료 (집체교육일 : @d.time.ToShortDateString())</p>*@
|
if (
|
||||||
}
|
((currentProgresRate >= d.intval2) && IsDateInRange(d.time2, d.time)) ||
|
||||||
else if (d.dtype > 1)
|
ViewBag.exCheck ||
|
||||||
{
|
dType1CmStudyTime == 16
|
||||||
<p>참여조건 : 진도율 @(d.intval2)% 이상 / 집체교육 참석일 (@d.time.ToShortDateString()) 전 까지</p>
|
)
|
||||||
}
|
{
|
||||||
</th>
|
<td>
|
||||||
@if (d.dtype == 1 && ViewBag.exCheck == false)
|
<input type="hidden" name="cmEcondition" value="@d.intval2" />
|
||||||
{
|
<input type="hidden" name="lectSDate" value="@d.time2" />
|
||||||
<td>
|
<input type="hidden" name="lectEDate" value="@d.time" />
|
||||||
@*<a href="javascript:;" onclick="msg('시험 응시 조건이 충족되지 않아 시험평가 진행이 불가합니다. <br>진도율 90% 이상, 집체교육 출석 완료')"
|
<input type="hidden" name="isDateInRange" value="@IsDateInRange(d.time2, d.time).ToString()" />
|
||||||
class="evaType@(d.intval4==1?"04":d.intval3==1?"03":d.intval3==0 && d.intval >=d.intval2?"02":"01")">@(d.intval4 == 1 ? "[평가완료]" : d.intval3 == 1 ? "[참여완료]" : d.intval3 == 0 && d.intval >=d.intval2 ? "[참여가능]" : "[참여불가]")</a>*@
|
<a href="javascript:;" onclick="eva(@d.dtype, @d.intval10, @(d.intval4 == 1 ? 4 : d.intval3 == 1 ? 3 : d.intval3 == 0 && d.intval >= d.intval2 ? 2 : 1))"
|
||||||
<a href="#" onclick="msg('24년 8월 22일 부터 건설기술진흥법 변경으로 <br>집체교육 당일 교육장에서 시험평가가 진행됩니다.')"
|
class="evaType@(d.intval4 == 1 ? "04" : d.intval3 == 1 ? "03" : d.intval3 == 0 && d.intval >= d.intval2 ? "02" : "01")">@(d.intval4 == 1 ? "[평가완료]" : d.intval3 == 1 ? "[참여완료]" : d.intval3 == 0 && d.intval >= d.intval2 ? "[참여가능]" : "[참여불가]")</a>
|
||||||
class="evaType@(d.intval4==1?"04":d.intval3==1?"03":d.intval3==0 && d.intval >=d.intval2?"02":"01")">@(d.intval4 == 1 ? "[평가완료]" : d.intval3 == 1 ? "[참여완료]" : d.intval3 == 0 && d.intval >=d.intval2 ? "[참여가능]" : "[참여불가]")</a>
|
</td>
|
||||||
</td>
|
}
|
||||||
}
|
else
|
||||||
else
|
{
|
||||||
{
|
<td>
|
||||||
<td>
|
<input type="hidden" name="cmEcondition" value="@d.intval2" />
|
||||||
<a href="#" onclick="eva(@d.dtype, @d.intval10, @(d.intval4==1?4:d.intval3==1?3:d.intval3==0 && d.intval >=d.intval2?2:1))"
|
<input type="hidden" name="lectSDate" value="@d.time2" />
|
||||||
class="evaType@(d.intval4==1?"04":d.intval3==1?"03":d.intval3==0 && d.intval >=d.intval2?"02":"01")">@(d.intval4 == 1 ? "[평가완료]" : d.intval3 == 1 ? "[참여완료]" : d.intval3 == 0 && d.intval >=d.intval2 ? "[참여가능]" : "[참여불가]")</a>
|
<input type="hidden" name="lectEDate" value="@d.time" />
|
||||||
</td>
|
<a href="javascript:;" onclick="msg('24년 8월 22일 부터 건설기술진흥법 변경으로 <br>집체교육 당일 교육장에서 시험평가가 진행됩니다.')"
|
||||||
}
|
class="evaType@(d.intval4 == 1 ? "04" : d.intval3 == 1 ? "03" : d.intval3 == 0 && d.intval >= d.intval2 ? "02" : "01")">@(d.intval4 == 1 ? "[평가완료]" : d.intval3 == 1 ? "[참여완료]" : d.intval3 == 0 && d.intval >= d.intval2 ? "[참여가능]" : "[참여불가]")</a>
|
||||||
|
</td>
|
||||||
|
|
||||||
</tr>
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 과제 등...
|
||||||
|
<td>
|
||||||
|
<a href="javascript:;" onclick="eva(@d.dtype, @d.intval10, @(d.intval4 == 1 ? 4 : d.intval3 == 1 ? 3 : d.intval3 == 0 && d.intval >= d.intval2 ? 2 : 1))"
|
||||||
|
class="evaType@(d.intval4 == 1 ? "04" : d.intval3 == 1 ? "03" : d.intval3 == 0 && d.intval >= d.intval2 ? "02" : "01")">@(d.intval4 == 1 ? "[평가완료]" : d.intval3 == 1 ? "[참여완료]" : d.intval3 == 0 && d.intval >= d.intval2 ? "[참여가능]" : "[참여불가]")</a>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
}
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
|
||||||
|
@*
|
||||||
|
// 하단 문구
|
||||||
|
// - 16시간 교육X or 신청일이 2024-08-19 이후
|
||||||
|
*@
|
||||||
|
|
||||||
@if (Model.Datas.Where(w => w.dtype > -1).Count() < 1)
|
@if (Model.Datas.Where(w => w.dtype > -1).Count() < 1)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2" style="text-align: center; font-weight: normal; height: 100px;">
|
<th colspan="2" style="text-align: center; font-weight: normal; height: 100px;">
|
||||||
@if (Model.tabidx == 0 || Model.tabidx == 1)
|
<p>- 평가할 항목이 없습니다.</p>
|
||||||
{
|
|
||||||
<p><b>※ 24년 8월 22일 부터 건설기술진흥법 변경으로 집체교육 당일 교육장에서 시험평가가 진행됩니다.</b></p>
|
|
||||||
}
|
|
||||||
<p>- 평가할 항목이 없습니다.</p>
|
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
|
|
@ -76,43 +149,77 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2" style="text-align: center; font-weight: normal; height: 100px;">
|
<th colspan="2" style="text-align: center; font-weight: normal; height: 100px;">
|
||||||
@if (Model.tabidx == 0 || Model.tabidx == 1)
|
@if (Model.tabidx == 0 || Model.tabidx == 1)
|
||||||
{
|
{ // 전체, 시험 탭
|
||||||
<p><b>※ 24년 8월 22일 부터 건설기술진흥법 변경으로 집체교육 당일 교육장에서 시험평가가 진행됩니다.</b></p>
|
if (dType1CmStudyTime != 16 && dType1LectSDate > Convert.ToDateTime("2024-08-19 23:59:59"))
|
||||||
|
{
|
||||||
|
<p><b>※ 24년 8월 22일 부터 건설기술진흥법 변경으로 집체교육 당일 교육장에서 시험평가가 진행됩니다.</b></p>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
<p>현재 진도율: @Model.Datas.Where(w => w.dtype == -1).First().intval5 %</p>
|
<p>현재 진도율: @currentProgresRate <text>%</text></p>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form id="mform" action="/CRoom/Estimation?@Model.croomparam" method="get">
|
<form id="mform" action="/CRoom/Estimation?@Model.croomparam" method="get">
|
||||||
@Html.HiddenFor(m => m.croomlectno)
|
@Html.HiddenFor(m => m.croomlectno)
|
||||||
@Html.HiddenFor(m => m.croomcmno)
|
@Html.HiddenFor(m => m.croomcmno)
|
||||||
@Html.HiddenFor(m => m.tabidx)
|
@Html.HiddenFor(m => m.tabidx)
|
||||||
@Html.HiddenFor(m => m.estno)
|
@Html.HiddenFor(m => m.estno)
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
@section scriptsHeader{
|
@section scriptsHeader{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@section scripts{
|
@section scripts{
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 탭 변경
|
||||||
|
* @@param idx {int} - 탭번호 (0:전체, 1:평가, 2:과제)
|
||||||
|
* @@param a {event} - e
|
||||||
|
*/
|
||||||
function gotab(idx, a) {
|
function gotab(idx, a) {
|
||||||
if (!$(a).parent().hasClass("current")){
|
if (!$(a).parent().hasClass("current")){
|
||||||
setv("tabidx", idx);
|
setv("tabidx", idx);
|
||||||
submit();
|
submit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function eva(type, no, status) {
|
function eva(type, no, status) {
|
||||||
if (status == 1) {
|
if (status == 1) {
|
||||||
msg("진도율 조건에 맞지않거나 수강일이 종료되어 참여하실 수 없습니다.");
|
msg("진도율 조건에 맞지않거나 수강일이 종료되어 참여하실 수 없습니다.");
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
setv("estno", no);
|
setv("estno", no);
|
||||||
$("#mform").attr("action", "/CRoom/Estimation" + (type < 2 ?"Exam":type==2?"Subject":"Discuss")).submit();
|
$("#mform").attr("action", "/CRoom/Estimation" + (type < 2 ?"Exam":type==2?"Subject":"Discuss")).submit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
|
@functions {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 시작일~종료일이 범위내에 속해있는지 확인
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="startDate">시작일</param>
|
||||||
|
/// <param name="endDate">종료일</param>
|
||||||
|
/// <returns>true/false</returns>
|
||||||
|
public bool IsDateInRange(DateTime startDate, DateTime endDate)
|
||||||
|
{
|
||||||
|
// 현재일자
|
||||||
|
DateTime currentDate = DateTime.Now;
|
||||||
|
// 현재일자가 시작일 이상 && 종료일 이하인지 확인
|
||||||
|
return startDate <= currentDate && currentDate <= endDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue