int CTest::GetCount( array arFilter = Array() );
The GetCount method returns the number of tests satisfying the filter.
| Parameter | Description |
|---|---|
| arFilter | The array array("filtered field"=>"filter
value" [, ...]). Filter description is available in CTest::GetList. By default, tests are not filtered. |
The method returns the number of tests.
<?
if (CModule::IncludeModule("learning"))
{
$COURSE_ID = 97;
$cnt = CTest::GetCount(Array("ACTIVE" => "Y", "COURSE_ID" => $COURSE_ID));
echo "Number of tests: ".$cnt;
}
?>
<?
if (CModule::IncludeModule("learning"))
{
$COURSE_ID = 97;
$cnt = CTest::GetCount(Array("CHECK_PERMISSIONS" => "N", "COURSE_ID" => $COURSE_ID));
echo "Number of tests: ".$cnt;
}
?>| © 2001-2007 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |