Skip to content

Commit

Permalink
๐Ÿ› ์ธ์ฆ ์šฐํšŒ ๋ฐ 2๋ถ„ ์ฟจํƒ€์ž„ ์ œ๊ฑฐ ๊ธฐ๋Šฅ์ด ๋™์ž‘ํ•˜์ง€ ์•Š๋Š” ์ด์Šˆ ํ•ด๊ฒฐ (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbsp1221 committed Apr 20, 2023
1 parent 4618da8 commit 9e92c88
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 23 deletions.
73 changes: 73 additions & 0 deletions src/functions/bypassCertification.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
declare var axios: any;
declare var appModule: any;
declare var lrnCerti: any;

/**
* ์ธ์ฆ ์—†์ด ์˜จ๋ผ์ธ ๊ฐ•์˜๋ฅผ ์ˆ˜๊ฐ•ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•ฉ๋‹ˆ๋‹ค.
*/
export function bypassCertification() {
if (!lrnCerti?.checkCerti) {
return;
}

lrnCerti.checkCerti = async function (
grcode: any,
subj: any,
year: any,
hakgi: any,
bunban: any,
module: any,
lesson: any,
oid: any,
starting: any,
contentsType: any,
weeklyseq: any,
weeklysubseq: any,
width: any,
height: any,
today: any,
sdate: any,
edate: any,
ptype: any,
totalTime: any,
prog: any,
gubun: any,
ptime: any
) {
this.grcode = grcode;
this.subj = subj;
this.year = year;
this.hakgi = hakgi;
this.weeklyseq = weeklyseq;
this.gubun = gubun;
this.certiGubun = '';

await axios.post('/std/lis/evltn/CertiStdCheck.do', this.$data);

if (gubun === 'C') {
appModule.goViewCntnts(
grcode,
subj,
year,
hakgi,
bunban,
module,
lesson,
oid,
starting,
contentsType,
weeklyseq,
weeklysubseq,
width,
height,
today,
sdate,
edate,
ptype,
totalTime,
prog,
ptime
);
}
};
}
14 changes: 3 additions & 11 deletions src/routes/lecture-home.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { bypassCertification } from '../functions/bypassCertification';

/**
* ํŽ˜์ด์ง€ ์ด๋ฆ„: ๊ฐ•์˜ ์ข…ํ•ฉ
* ํŽ˜์ด์ง€ ์ฃผ์†Œ: https://klas.kw.ac.kr/std/lis/evltn/LctrumHomeStdPage.do
Expand Down Expand Up @@ -71,17 +73,7 @@ const addLecturePlan = async () => {

export default () => {
// ์ธ์ฆ ํŒ์—… ๋ฌด์‹œ
lrnCerti.certiCheck = function (grcode, subj, year, hakgi, bunban, module, lesson, oid, starting, contentsType, weeklyseq, weeklysubseq, width, height, today, sdate, edate, ptype, totalTime, prog, gubun) {
// console.log(grcode, subj, year, hakgi, bunban, module, lesson, oid, starting, contentsType, weeklyseq, weeklysubseq, width, height, today, sdate, edate, ptype, totalTime, prog, gubun);
this.grcode = grcode;
this.subj = subj;
this.weeklyseq = weeklyseq;
this.gubun = gubun;
axios.post('/std/lis/evltn/CertiStdCheck.do', this.$data)
.then(function () {
appModule.goViewCntnts(grcode, subj, year, hakgi, bunban, module, lesson, oid, starting, contentsType, weeklyseq, weeklysubseq, width, height, today, sdate, edate, ptype, totalTime, prog);
}.bind(this));
};
bypassCertification();

// 2๋ถ„ ์ฟจํƒ€์ž„ ์ œ๊ฑฐ, ๊ฐ•์˜ ์ˆจ๊ธฐ๊ธฐ ๋ฒ„ํŠผ ์ƒ์„ฑ
$("p:contains('์˜จ๋ผ์ธ ๊ฐ•์˜๋ฆฌ์ŠคํŠธ')").append(`
Expand Down
16 changes: 4 additions & 12 deletions src/routes/online-lecture.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { bypassCertification } from '../functions/bypassCertification';

/**
* ํŽ˜์ด์ง€ ์ด๋ฆ„: ์˜จ๋ผ์ธ ๊ฐ•์˜ ์ฝ˜ํ…์ธ  ๋ณด๊ธฐ
* ํŽ˜์ด์ง€ ์ฃผ์†Œ: https://klas.kw.ac.kr/std/lis/evltn/OnlineCntntsStdPage.do
Expand Down Expand Up @@ -49,7 +51,7 @@ export default () => {

// 2๋ถ„ ์ฟจํƒ€์ž„ ์ œ๊ฑฐ ๋ฒ„ํŠผ์— ์ด๋ฒคํŠธ ์„ค์ •
$('#btn-cooltime').click(() => {
appModule.getLrnSttus = function () {
appModule.getLrnStdSttus = function () {
axios.post('/std/lis/evltn/SelectLrnSttusStd.do', this.$data).then(function (response) {
this.lrnSttus = response.data;

Expand Down Expand Up @@ -94,15 +96,5 @@ export default () => {
});

// ์ธ์ฆ ํŒ์—… ๋ฌด์‹œ
lrnCerti.certiCheck = function (grcode, subj, year, hakgi, bunban, module, lesson, oid, starting, contentsType, weeklyseq, weeklysubseq, width, height, today, sdate, edate, ptype, totalTime, prog, gubun) {
// console.log(grcode, subj, year, hakgi, bunban, module, lesson, oid, starting, contentsType, weeklyseq, weeklysubseq, width, height, today, sdate, edate, ptype, totalTime, prog, gubun);
this.grcode = grcode;
this.subj = subj;
this.weeklyseq = weeklyseq;
this.gubun = gubun;
axios.post('/std/lis/evltn/CertiStdCheck.do', this.$data)
.then(function () {
appModule.goViewCntnts(grcode, subj, year, hakgi, bunban, module, lesson, oid, starting, contentsType, weeklyseq, weeklysubseq, width, height, today, sdate, edate, ptype, totalTime, prog);
}.bind(this));
};
bypassCertification();
};

0 comments on commit 9e92c88

Please sign in to comment.