CDBResult
CLesson::GetList(
array arOrder = Array("TIMESTAMP_X"=>"DESC"),
array arFilter = Array()
);
The GetList method returns the list of lessons filtered by arFilter and sorted in the arOrder order. The current user access permissions are considered.
| Parameter | Description |
|---|---|
| arOrder |
An array in the format array("filter field"=>"sort
order" [, ...]). The sorting field can have the following values:
|
| arFilter |
An array in the format array("filtered
field"=>"filter value" [, ...]). The following
values are possible:
Optional. By default, records are not filtered. |
The method returns an instance of the CDBResult object.
<?
if (CModule::IncludeModule("learning"))
{
$COURSE_ID = 8;
$res = CLesson::GetList(
Array("SORT"=>"ASC"),
Array("ACTIVE" => "Y", "COURSE_ID" => $COURSE_ID)
);
while ($arLesson = $res->GetNext())
{
echo "Lesson name: ".$arLesson["NAME"]."<br>";
}
}
?>
<?
if (CModule::IncludeModule("learning"))
{
$res = CLesson::GetList(
Array("SORT"=>"ASC"),
Array("?NAME" => "Site")
);
while ($arLesson = $res->GetNext())
{
echo "Lesson name: ".$arLesson["NAME"]."<br>";
}
}
?>
<?
if (CModule::IncludeModule("learning"))
{
$COURSE_ID = 8;
$res = CLesson::GetList(
Array("NAME" => "ASC", "SORT"=>"ASC"),
Array("CHECK_PERMISSIONS" => "N", "COURSE_ID" => $COURSE_ID)
);
while ($arLesson = $res->GetNext())
{
echo "Lesson name: ".$arLesson["NAME"]."<br>";
}
}
?>
<?
if (CModule::IncludeModule("learning"))
{
$COURSE_ID = 8;
$res = CLesson::GetList(
Array("NAME" => "ASC", "SORT"=>"ASC"),
Array("CHECK_PERMISSIONS" => "N", "CHAPTER_ID" => "", "COURSE_ID" => $COURSE_ID)
);
while ($arLesson = $res->GetNext())
{
echo "Lesson name: ".$arLesson["NAME"]."<br>";
}
}
?>
| © 2001-2007 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |