public function writeShufflingState(Shuffling $shufflingState)
    {
        try {
            $this->writeIdentifier($shufflingState->getResponseIdentifier());
            $shufflingGroups = $shufflingState->getShufflingGroups();
            $this->writeTinyInt(count($shufflingGroups));
            
            foreach ($shufflingGroups as $shufflingGroup) {
                $this->writeShufflingGroup($shufflingGroup);
            }
        } catch (BinaryStreamAccessException $e) {
            $msg = "An error occured while writing a shufflingState.";
            throw new QtiBinaryStreamAccessException($msg, $this, QtiBinaryStreamAccessException::SHUFFLING_STATE, $e);
        }
    }
public function writeShufflingState(Shuffling $shufflingState)
    {
        try {
            $this->writeIdentifier($shufflingState->getResponseIdentifier());
            $shufflingGroups = $shufflingState->getShufflingGroups();
            $this->writeTinyInt(count($shufflingGroups));
            
            foreach ($shufflingGroups as $shufflingGroup) {
                $this->writeShufflingGroup($shufflingGroup);
            }
        } catch (BinaryStreamAccessException $e) {
            $msg = "An error occured while writing a shufflingState.";
            throw new QtiBinaryStreamAccessException($msg, $this, QtiBinaryStreamAccessException::SHUFFLING_STATE, $e);
        }
    }
public function writeShufflingState ( Shuffling $ shufflingState ) { try { $ this -> writeIdentifier ( $ shufflingState -> getResponseIdentifier ( ) ) ; $ shufflingGroups = $ shufflingState -> getShufflingGroups ( ) ; $ this -> writeTinyInt ( count ( $ shufflingGroups ) ) ; foreach ( $ shufflingGroups as $ shufflingGroup ) { $ this -> writeShufflingGroup ( $ shufflingGroup ) ; } } catch ( BinaryStreamAccessException $ e ) { $ msg = "An error occured while writing a shufflingState." ; throw new QtiBinaryStreamAccessException ( $ msg , $ this , QtiBinaryStreamAccessException :: SHUFFLING_STATE , $ e ) ; } }
Write a Shuffling object in the current binary stream.

@param \qtism\data\state\Shuffling $shufflingState
@throws QtiBinaryStreamAccessException
Write a Shuffling object in the current binary stream .