Skip to content

Commit

Permalink
fix: arguments being passed positionally
Browse files Browse the repository at this point in the history
  • Loading branch information
bchmnn committed Jul 19, 2023
1 parent 6022c2b commit 2dbbc84
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
1 change: 1 addition & 0 deletions poodle/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
GenericCredentialProviderInterface)
from .poodle import Poodle
from .typedefs import *
from .util import *

__version__ = "0.2.5"
16 changes: 10 additions & 6 deletions poodle/poodle.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ async def core_enrol_get_users_courses(
return await self.fetch_list(
MoodleMethods.CORE_ENROL_GET_USERS_COURSES,
{"userid": userid, "returnusercount": 0},
refetch,
refetch=refetch,
)

async def get_user_courses(
Expand All @@ -171,12 +171,14 @@ async def core_course_get_contents(self, courseid: int, refetch=False):
return await self.fetch_list(
MoodleMethods.CORE_COURSE_GET_CONTENTS,
{"courseid": courseid},
refetch,
refetch=refetch,
)

async def mod_assign_get_assignments(self, courseids: List[int], refetch=False):
return await self.fetch(
MoodleMethods.MOD_ASSIGN_GET_ASSIGNMENTS, {"courseids": courseids}, refetch
MoodleMethods.MOD_ASSIGN_GET_ASSIGNMENTS,
{"courseids": courseids},
refetch=refetch,
)

async def get_assignments(self, courseid: int, refetch=False):
Expand All @@ -201,7 +203,7 @@ async def mod_assign_get_submissions(self, assignmentids: List[int], refetch=Fal
return await self.fetch(
MoodleMethods.MOD_ASSIGN_GET_SUBMISSIONS,
{"assignmentids": assignmentids},
refetch,
refetch=refetch,
)

async def get_submissions(self, assignmentid: int, refetch=False):
Expand All @@ -215,10 +217,12 @@ async def mod_assign_list_participants(self, assignid: int, refetch=False):
return await self.fetch_list(
MoodleMethods.MOD_ASSIGN_LIST_PARTICIPANTS,
{"assignid": assignid, "groupid": 0, "filter": ""},
refetch,
refetch=refetch,
)

async def core_group_get_course_groups(self, courseid: int, refetch=False):
return await self.fetch_list(
MoodleMethods.CORE_GROUP_GET_COURSE_GROUPS, {"courseid": courseid}, refetch
MoodleMethods.CORE_GROUP_GET_COURSE_GROUPS,
{"courseid": courseid},
refetch=refetch,
)
8 changes: 4 additions & 4 deletions poodle/util/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .cache import *
from .loggable import *
from .parse_form import *
from .tokens import *
from .cache import Cache, CacheItem
from .loggable import Loggable
from .parse_form import parse_form
from .tokens import Tokens

0 comments on commit 2dbbc84

Please sign in to comment.