CAT-SOOP API: catsoop.user

Utility functions related to user management)

View Source

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 request
    • course: the name of the course, as a string

    Optional Parameters:

    • filter_func (default lambda uinfo: True): a function mapping user information dictionaries to Booleans; a user is only included in the output if the function returns True when 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 request
    • course: 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 request
    • course: 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 request
    • course: the name of the course, as a string

    Returns: a string containing the location of the given course's __USERS__ directory.