Documentation

CStudent::GetList

CDBResult
CStudent::GetList(
 array arOrder = Array("ID"=>"DESC"),
 array arFilter = Array()
);

The GetList method returns a selection of student accounts filtered by arFilter and sorted in the arOrder order.

Parameters

ParameterDescription
arOrder An array in the format array("filter field"=>"sort order" [, ...]). The sorting field can have the following values:
  • USER_ID - the user ID;
  • PUBLIC_PROFILE - whether the profile is public or not (Y/N);
Optional sort order can be one of the following:
  • asc - ascending;
  • desc - descending (default);
arFilter An array in the format array("filtered field"=>"filter value" [, ...]). The following values are possible:
  • USER_ID - the user ID;
  • PUBLIC_PROFILE - whether the profile is public or not (Y/N);
  • TRANSCRIPT - random numeric identifier;
  • RESUME - the student resume (wildcards allowed [%_]).
The following logic can be specified at the beginning of the field name:
  • "!" - not equal;
  • "<" - less than;
  • "<=" - less or equal;
  • ">" - more than;
  • ">=" - more or equal.
"filter values"  is a single value or an array.

Optional. By default, records are not filtered.

Return Values

The method returns an instance of the CDBResult object.

See Also

  • CDBResult
  • CStudent::GetByID
  • Student fields
  • Example

    
    <?
    if (CModule::IncludeModule("learning"))
    {
        $USER_ID = 1; $TRANSCRIPT = 46785643;
        $res = CStudent::GetList(Array(), Array("USER_ID" => $USER_ID, "TRANSCRIPT" => $TRANSCRIPT));
    
        while ($arProfile = $res->GetNext())
        {
            echo $arProfile["RESUME"];
        }
    }
    ?>
    © «Bitrix24», 2001-2024