public function splash() {

        //the list of extensions the splash provides an explanation for.
        $defaultExtIds = array('items', 'tests', 'TestTaker', 'groups', 'delivery', 'results');

        //check if the user is a noob
        $this->setData('firstTime', TaoCe::isFirstTimeInTao());

        //load the extension data
        $defaultExtensions = array();
        $additionalExtensions = array();
        foreach (MenuService::getPerspectivesByGroup(Perspective::GROUP_DEFAULT) as $i => $perspective) {
            if (in_array((string) $perspective->getId(), $defaultExtIds)) {
                $defaultExtensions[strval($perspective->getId())] = array(
                    'id' => $perspective->getId(),
                    'name' => $perspective->getName(),
                    'extension' => $perspective->getExtension(),
                    'description' => $perspective->getDescription()
                );
            } else {
                $additionalExtensions[$i] = array(
                    'id' => $perspective->getId(),
                    'name' => $perspective->getName(),
                    'extension' => $perspective->getExtension()
                );
            }

            //Test if access
            $access = false;
            foreach ($perspective->getChildren() as $section) {
                if (tao_models_classes_accessControl_AclProxy::hasAccess($section->getAction(), $section->getController(), $section->getExtensionId())) {
                    $access = true;
                    break;
                }
            }
            if (in_array((string) $perspective->getId(), $defaultExtIds)) {
                $defaultExtensions[strval($perspective->getId())]['enabled'] = $access;
            } else {
                $additionalExtensions[$i]['enabled'] = $access;
            }
        }

        $this->setData('extensions', array_merge($defaultExtensions, $additionalExtensions));
        $this->setData('defaultExtensions', $defaultExtensions);
        $this->setData('additionalExtensions', $additionalExtensions);

        $this->setView('splash.tpl');
    }
public function splash() {

        //the list of extensions the splash provides an explanation for.
        $defaultExtIds = array('items', 'tests', 'TestTaker', 'groups', 'delivery', 'results');

        //check if the user is a noob
        $this->setData('firstTime', TaoCe::isFirstTimeInTao());

        //load the extension data
        $defaultExtensions = array();
        $additionalExtensions = array();
        foreach (MenuService::getPerspectivesByGroup(Perspective::GROUP_DEFAULT) as $i => $perspective) {
            if (in_array((string) $perspective->getId(), $defaultExtIds)) {
                $defaultExtensions[strval($perspective->getId())] = array(
                    'id' => $perspective->getId(),
                    'name' => $perspective->getName(),
                    'extension' => $perspective->getExtension(),
                    'description' => $perspective->getDescription()
                );
            } else {
                $additionalExtensions[$i] = array(
                    'id' => $perspective->getId(),
                    'name' => $perspective->getName(),
                    'extension' => $perspective->getExtension()
                );
            }

            //Test if access
            $access = false;
            foreach ($perspective->getChildren() as $section) {
                if (tao_models_classes_accessControl_AclProxy::hasAccess($section->getAction(), $section->getController(), $section->getExtensionId())) {
                    $access = true;
                    break;
                }
            }
            if (in_array((string) $perspective->getId(), $defaultExtIds)) {
                $defaultExtensions[strval($perspective->getId())]['enabled'] = $access;
            } else {
                $additionalExtensions[$i]['enabled'] = $access;
            }
        }

        $this->setData('extensions', array_merge($defaultExtensions, $additionalExtensions));
        $this->setData('defaultExtensions', $defaultExtensions);
        $this->setData('additionalExtensions', $additionalExtensions);

        $this->setView('splash.tpl');
    }
public function splash ( ) { //the list of extensions the splash provides an explanation for. $ defaultExtIds = array ( 'items' , 'tests' , 'TestTaker' , 'groups' , 'delivery' , 'results' ) ; //check if the user is a noob $ this -> setData ( 'firstTime' , TaoCe :: isFirstTimeInTao ( ) ) ; //load the extension data $ defaultExtensions = array ( ) ; $ additionalExtensions = array ( ) ; foreach ( MenuService :: getPerspectivesByGroup ( Perspective :: GROUP_DEFAULT ) as $ i => $ perspective ) { if ( in_array ( ( string ) $ perspective -> getId ( ) , $ defaultExtIds ) ) { $ defaultExtensions [ strval ( $ perspective -> getId ( ) ) ] = array ( 'id' => $ perspective -> getId ( ) , 'name' => $ perspective -> getName ( ) , 'extension' => $ perspective -> getExtension ( ) , 'description' => $ perspective -> getDescription ( ) ) ; } else { $ additionalExtensions [ $ i ] = array ( 'id' => $ perspective -> getId ( ) , 'name' => $ perspective -> getName ( ) , 'extension' => $ perspective -> getExtension ( ) ) ; } //Test if access $ access = false ; foreach ( $ perspective -> getChildren ( ) as $ section ) { if ( tao_models_classes_accessControl_AclProxy :: hasAccess ( $ section -> getAction ( ) , $ section -> getController ( ) , $ section -> getExtensionId ( ) ) ) { $ access = true ; break ; } } if ( in_array ( ( string ) $ perspective -> getId ( ) , $ defaultExtIds ) ) { $ defaultExtensions [ strval ( $ perspective -> getId ( ) ) ] [ 'enabled' ] = $ access ; } else { $ additionalExtensions [ $ i ] [ 'enabled' ] = $ access ; } } $ this -> setData ( 'extensions' , array_merge ( $ defaultExtensions , $ additionalExtensions ) ) ; $ this -> setData ( 'defaultExtensions' , $ defaultExtensions ) ; $ this -> setData ( 'additionalExtensions' , $ additionalExtensions ) ; $ this -> setView ( 'splash.tpl' ) ; }
This action renders the template used by the splash screen popup
This action renders the template used by the splash screen popup