/**
 * Prints a table of the users tagged with the tag passed as argument
 *
 * @param $tag_object
 * @param int $users_per_row number of users per row to display
 * @param int $limitfrom prints users starting at this point (optional, required if $limitnum is set).
 * @param int $limitnum prints this many users (optional, required if $limitfrom is set).
 * @param $return if true return html string
 */
function tag_print_tagged_users_table($tag_object, $limitfrom = '', $limitnum = '', $return = false)
{
    //List of users with this tag
    $userlist = tag_find_records($tag_object->name, 'user', $limitfrom, $limitnum);
    $output = tag_print_user_list($userlist, true);
    if ($return) {
        return $output;
    } else {
        echo $output;
    }
}
Beispiel #2
0
/**
 * Prints a table of the users tagged with the tag passed as argument
 *
 * @deprecated since 3.1
 * @param  stdClass    $tagobject the tag we wish to return data for
 * @param  int         $limitfrom (optional, required if $limitnum is set) prints users starting at this point.
 * @param  int         $limitnum (optional, required if $limitfrom is set) prints this many users.
 * @param  bool        $return if true return html string
 * @return string|null a HTML string or null if this function does the output
 */
function tag_print_tagged_users_table($tagobject, $limitfrom = '', $limitnum = '', $return = false)
{
    debugging('Function tag_print_tagged_users_table() is deprecated without replacement. ' . 'See core_user_renderer for similar code.', DEBUG_DEVELOPER);
    //List of users with this tag
    $tagobject = core_tag_tag::get($tagobject->id);
    $userlist = $tagobject->get_tagged_items('core', 'user', $limitfrom, $limitnum);
    $output = tag_print_user_list($userlist, true);
    if ($return) {
        return $output;
    } else {
        echo $output;
    }
}