コード例 #1
0
 /**
  * Explode the rubric blocks of the test definition into separate QTI-XML files and
  * remove the compact XML document from the file system (useless for
  * the rest of the compilation process).
  * 
  * @param XmlCompactDocument $compiledDoc
  */
 protected function explodeRubricBlocks(XmlCompactDocument $compiledDoc)
 {
     $privateDir = $this->getPrivateDirectory();
     $explodedRubricBlocks = $compiledDoc->explodeRubricBlocks();
     foreach ($explodedRubricBlocks as $href => $rubricBlock) {
         $doc = new XmlDocument();
         $doc->setDocumentComponent($rubricBlock);
         $data = $doc->saveToString();
         $privateDir->write($href, $data);
     }
 }