aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2020-10-18 11:20:23 +0200
committerNao Pross <np@0hm.ch>2020-10-18 11:20:23 +0200
commit27fd4ba2f5465e4075b6a971af4d1a445dedd1d6 (patch)
tree417531c01f00f69852367fad0b60c8c78880b4fc
parentRefractor gui.MoodleFetcher (diff)
downloadMuddle-27fd4ba2f5465e4075b6a971af4d1a445dedd1d6.tar.gz
Muddle-27fd4ba2f5465e4075b6a971af4d1a445dedd1d6.zip
Fix API call
Diffstat (limited to '')
-rw-r--r--gui.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/gui.py b/gui.py
index bdb3868..c15c61b 100644
--- a/gui.py
+++ b/gui.py
@@ -110,7 +110,7 @@ class MoodleFetcher(QThread):
log.debug(course)
return []
else:
- sections = self.api.core_get_contents(courseid = str(course["id"])).json()
+ sections = self.api.core_course_get_contents(courseid = str(course["id"])).json()
if "exception" in sections:
log.error(f"failed to load sections from course with id {course['id']} ({course['shortname']})")
log.debug(sections)
@@ -159,8 +159,10 @@ class MoodleTreeView(QTreeWidget):
@pyqtSlot()
def onWorkerDone(self):
+ log.debug("worker done")
self.setSortingEnabled(True)
+# FIXME: I bet this logger is in another thread and f*cks up
class QPlainTextEditLogger(logging.Handler):
def __init__(self, parent):
super().__init__()