* @author Joel Bout * @author Somsack Sipasseuth * @package taoQTI * @license GPLv2 http://www.opensource.org/licenses/gpl-2.0.php */ abstract class AbstractQtiItemRunner extends taoItems_actions_ItemRunner { protected $variableContents = null; protected function setInitialVariableElements() { //get initial content variable elements to be displayed: rubricBlocks, feedbacks, variable math, template elements, template variable $this->setData('contentVariableElements', $this->getRubricBlocks()); } protected function getContentVariableElements() { $dir = $this->getDirectory($this->getRequestParameter('itemDataPath')); $this->variableContents = QtiRunner::getContentVariableElements($dir); return $this->variableContents; } protected function getPrivateFolder() { $dir = $this->getDirectory($this->getRequestParameter('itemDataPath')); return QtiRunner::getPrivateFolderPath($dir); } protected function getRubricBlocks() { //@todo : pass the right view from item/service api? $view = 'candidate'; $dir = $this->getDirectory($this->getRequestParameter('itemDataPath')); return QtiRunner::getRubricBlocks($dir, $view); } protected function getTemplateElements() { //process templateRules //return the template values } protected function getFeedbacks(AssessmentItemSession $itemSession) { $dir = $this->getDirectory($this->getRequestParameter('itemDataPath')); return QtiRunner::getFeedbacks($dir, $itemSession); } }