Documentation

CLQuestion::GetCount

int
CLQuestion::GetCount(
 array arFilter = Array()
);

The GetCount method returns the number of questions according to conditions stipulated by the filter.

Parameters

ParameterDescription
arFilter The array array("filtered field"=>"filter value" [, ...]). Filter description is available in CLQuestion::GetList.
By default, questions are not filtered.

Return Values

The method returns the number of lessons.

See Also

  • CLQuestion::GetList
  • Example

    
    <?
    if (CModule::IncludeModule("learning"))
    {
        $COURSE_ID = 97;
        
        $cnt = CLQuestion::GetCount(Array("ACTIVE" => "Y", "COURSE_ID" => $COURSE_ID));
    
        echo "Number of questions: ".$cnt;
    }
    ?>
    
    <?
    if (CModule::IncludeModule("learning"))
    {
        $LESSON_ID = 426;
        
        $cnt = CLQuestion::GetCount(Array("LESSON_ID" => $LESSON_ID));
    
        echo "Number of questions: ".$cnt;
    }
    ?>
    © «Bitrix24», 2001-2024
    Up