Skip to content
This repository was archived by the owner on Jun 16, 2021. It is now read-only.

Commit

Permalink
Inited
Browse files Browse the repository at this point in the history
  • Loading branch information
pmh-only committed Apr 16, 2020
0 parents commit feeec8d
Show file tree
Hide file tree
Showing 4 changed files with 167 additions and 0 deletions.
23 changes: 23 additions & 0 deletions EBSMid.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
function getToEBS (lctreSn) {
// by @pmh-only
var saveUrl = '/user/lecture/status/save'
if (IS_SDL) saveUrl = '/user/lecture/status/sdlSave'

const param =
'courseId=' + courseID +
'&stepId=' + stepID +
'&lectureId=' + lctreSn +
'&enrollNo=' + enrollNO +
'&encodingTypeCode=' + encType +
'&lastStudyTime=' + 99999 +
'&lastStudyLocation=' + 99999 +
'&partAccumulateStudyTime=' + 0

console.log(`Sending Success Code to ${lctreSn}`)
makeRequest(saveUrl, param)
}

const arr = []
$('.titlez').each((_, e) => arr.push(eval(e.onclick.toString().split(',')[2])))
arr.forEach(getToEBS)

37 changes: 37 additions & 0 deletions EBSi.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
function postToEBS (_, lctreSn) {
const lessonId = lctreSn.id
const sbjtapplyId = window.frmStudyPlayer.sbjtapplyId.value
const sbjtId = window.frmStudyPlayer.sbjtId.value

// 학습 중용 데이터
let value = { lessonId, sbjtapplyId, sbjtId, clntGbnCd: "C", second: "1", lecGbn: "V500", atndGbnCd: "S", ltStdTm: "1", status: "0" }

// 학습중으로 변경
jQuery.ajax({
type: 'POST',
async: false,
url: '/ebs/lms/lmsHist/saveLmsLessonHistDtlAjax.ebs',
data: value,
cache: false,
success: function() {
console.log('Success: ' + lessonId)
}
})

// 학습 완료용 데이터
value = { lessonId, sbjtapplyId, eventType: "N" }

// 학습 완료로 변경
jQuery.ajax({
type: 'POST',
async: false,
url: '/ebs/lms/lmsHist/saveLmsLessonHistCompletedAjax.ebs',
data: value,
cache: false,
success: function() {
console.log('Success: ' + lessonId)
}
})
}

jQuery('tbody.lessonList>tr').each(postToEBS)
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 PMH

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
86 changes: 86 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# EBSAutoComplete
## Script By TriNet / PMH#7086

### 필독
- 그냥 그거 언급하지 말라고 하시네요

### 지원 범위
EBS 중학, EBSi

### 스크립트
#### EBS 중학
```js
function getToEBS (lctreSn) {
// by @pmh-only
var saveUrl = '/user/lecture/status/save'
if (IS_SDL) saveUrl = '/user/lecture/status/sdlSave'

const param =
'courseId=' + courseID +
'&stepId=' + stepID +
'&lectureId=' + lctreSn +
'&enrollNo=' + enrollNO +
'&encodingTypeCode=' + encType +
'&lastStudyTime=' + 99999 +
'&lastStudyLocation=' + 99999 +
'&partAccumulateStudyTime=' + 0

console.log(`Sending Success Code to ${lctreSn}`)
makeRequest(saveUrl, param)
}

const arr = []
$('.titlez').each((_, e) => arr.push(eval(e.onclick.toString().split(',')[2])))
arr.forEach(getToEBS)
```

#### EBSi
```js
function postToEBS (_, lctreSn) {
const lessonId = lctreSn.id
const sbjtapplyId = window.frmStudyPlayer.sbjtapplyId.value
const sbjtId = window.frmStudyPlayer.sbjtId.value

// 학습 중용 데이터
let value = { lessonId, sbjtapplyId, sbjtId, clntGbnCd: "C", second: "1", lecGbn: "V500", atndGbnCd: "S", ltStdTm: "1", status: "0" }

// 학습중으로 변경
jQuery.ajax({
type: 'POST',
async: false,
url: '/ebs/lms/lmsHist/saveLmsLessonHistDtlAjax.ebs',
data: value,
cache: false,
success: function() {
console.log('Success: ' + lessonId)
}
})

// 학습 완료용 데이터
value = { lessonId, sbjtapplyId, eventType: "N" }

// 학습 완료로 변경
jQuery.ajax({
type: 'POST',
async: false,
url: '/ebs/lms/lmsHist/saveLmsLessonHistCompletedAjax.ebs',
data: value,
cache: false,
success: function() {
console.log('Success: ' + lessonId)
}
})
}

jQuery('tbody.lessonList>tr').each(postToEBS)
```

### 사용법
1. EBS 강의 보기 페이지에 접속한다
2. EBS 강의 보기 페이지에서 F12 또는 CTRL + SHIFT + I 를 누른다<br />
2-1. 개발자 도구 탭에서 Console 을 클릭한다.<br />
2-2. 콘솔창에 아래의 코드를 복사 붙여넣기 한다 (CTRL C => CTRL V)<br />
2-3. 엔터키를 누른후 오류가 난다면 Issue 에 오류 내용을 첨부해주고, 완료될때 까지 기다린다 (Success 글씨가 더이상 뜨지 않을 때 까지)<br />
2-4. 완료되었다면 새로고침을 한다.<br />

> Copyright (c) PMH ([email protected])

0 comments on commit feeec8d

Please sign in to comment.