bool CTestAttempt::CreateAttemptQuestions( int ATTEMPT_ID );
The CreateAttemptQuestions method creates a plan of questions for the specified attempt.
| Parameter | Description |
|---|---|
| ATTEMPT_ID | The attempt ID. |
The method returns true on success, or false otherwise. If an error occurs, the exception will contain the error description.
<?
if (CModule::IncludeModule("learning"))
{
$ATTEMPT_ID = 563;
$success = CTestAttempt::CreateAttemptQuestions($ATTEMPT_ID);
if($success)
{
echo "Questions have been created.";
}
else
{
if($ex = $APPLICATION->GetException())
echo "Error: ".$ex->GetString();
}
}
?>| © 2001-2007 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |