CAT-SOOP API: catsoop.user
Members
-
catsoop.user.all_users_info (
function, lines 95-118)Return a mapping from usernames to user information
Parameters:
context: the context associated with this requestcourse: the name of the course, as a string
Optional Parameters:
filter_func(defaultlambda uinfo: True): a function mapping user information dictionaries to Booleans; a user is only included in the output if the function returnsTruewhen invoked on their user information dictionary
Returns: a dictionary mapping usernames to user information dictionaries
-
catsoop.user.list_all_users (
function, lines 47-59)List all the users in a course
Parameters:
context: the context associated with this requestcourse: the name of the course, as a string
Returns: a list of the usernames of all users in the course
-
catsoop.user.read_user_file (
function, lines 62-92)Retrieve the contents of a given user's
__USERS__file within a course.Parameters:
context: the context associated with this requestcourse: the name of the course, as a string- `user: the name of a user, as a string
Optional Parameters:
default(default{}): values to be included in the returned dictionary if the given user does not have a__USERS__file
Returns: a dictionary containing the variables defined in the given user's file
-
catsoop.user.users_dir (
function, lines 31-44)Determine the location of the given course's
__USERS__directory on disk.Parameters:
context: the context associated with this requestcourse: the name of the course, as a string
Returns: a string containing the location of the given course's
__USERS__directory.