Documentation

CTestAttempt::CreateAttemptQuestions

bool
CTestAttempt::CreateAttemptQuestions(
 int ATTEMPT_ID
);

The CreateAttemptQuestions method creates a plan of questions for the specified attempt.

Parameters

ParameterDescription
ATTEMPT_ID The attempt ID.

Return Values

The method returns true on success, or false otherwise. If an error occurs, the exception will contain the error description.

See Also

  • CTestResult::Add

    Example

    
    <?
    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();
        }
    }
    ?>
  • © «Bitrix24», 2001-2024