From 522cd1b7adf81daaca54dac4daa0705429f2a521 Mon Sep 17 00:00:00 2001 From: molaboon Date: Sat, 3 Jul 2021 14:16:48 +0800 Subject: [PATCH] =?UTF-8?q?Moodle=20=E8=A6=96=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Moodle.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Moodle.py b/Moodle.py index ab577af..81ca7d2 100644 --- a/Moodle.py +++ b/Moodle.py @@ -13,9 +13,7 @@ def getIdAndName(course): return coursesId ,courseName -def createMoodleWin(): - moodle = MoodleAPI(CONFIG['moodle']['username'], CONFIG['moodle']['password']) - +def createMoodleWin(moodle): if moodle.status: # ===== 取得課程ID與名稱 ===== c = moodle.getCourses("1092") @@ -75,5 +73,3 @@ def createMoodleWin(): else: print("Moodle 登入失敗") - -createMoodleWin()