Documentation

CCertification::IsCourseCompleted

bool
CCertification::IsCourseCompleted(
 int STUDENT_ID,
 int COURSE_ID
);

The IsCourseCompleted method checks if the course has been completed. A course is considered completed if all its tests are passed.

Parameters

ParameterDescription
STUDENT_ID The student ID.
COURSE_ID The course ID.

Return Values

The method returns true if the course has been successfully passed, or false otherwise.

See Also

  • CGradeBook::GetList
  • CTest::GetList
  • Example

    
    <?
    if (CModule::IncludeModule("learning"))
    {
        $STUDENT_ID = 1;
        $COURSE_ID = 92;
    
        $done = CCertification::IsCourseCompleted($STUDENT_ID, $COURSE_ID);
    
        if ($done)
            echo "Course completed";
        else
            echo "Course is not completed";
    
    }
    ?>
    © «Bitrix24», 2001-2024
    Up