* @package taoGroups * * @license GPLv2 http://www.opensource.org/licenses/gpl-2.0.php */ class SaSGroups extends Groups { /** * overrided to prevent exception: * if no class is selected, the root class is returned * * @see TaoModule::getCurrentClass() * @return \core_kernel_classes_Class */ protected function getCurrentClass() { if ($this->hasRequestParameter('classUri')) { return parent::getCurrentClass(); } return $this->getRootClass(); } /** * Render the tree to select the group related subjects * */ public function selectSubjects() { $this->defaultData(); $memberProperty = $this->getProperty(GroupsService::PROPERTY_MEMBERS_URI); $memberForm = tao_helpers_form_GenerisTreeForm::buildTree($this->getCurrentInstance(), $memberProperty); $memberForm->setData('title', __('Select group test takers')); $this->setData('tree', $memberForm->render()); $this->setView('sas' . DIRECTORY_SEPARATOR . 'generisTreeSelect.tpl', 'tao'); } }