bool CTestAttempt::IsTestCompleted( int ATTEMPT_ID int PERCENT );
The IsTestCompleted checks whether a test is completed.
Parameter | Description |
---|---|
ATTEMPT_ID | The attempt ID. |
PERCENT | The required percent of correct answers. |
The method returns true on success, or false otherwise.
<? if (CModule::IncludeModule("learning")) { $ATTEMPT_ID = 563; $PERCENT = 30; $complete = CTestAttempt::IsTestCompleted($ATTEMPT_ID, $PERCENT); if ($complete) echo "Test has been completed"; else echo "Try again"; } ?>
© 2001-2007 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |