Example #1
0
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 * Copyright (c) 2013 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);
 *
 * @author "Lionel Lecaque, <*****@*****.**>"
 * @license GPLv2
 * @package package_name
 * @subpackage 
 *
 */
require_once 'boot/bootstrap.php';
use OatBox\Controller\Request;
use OatBox\Controller\Controller;
use OatBox\Controller\FlowController;
use OatBox\Common\Uri;
use OatBox\Controller\ActionEnforcingException;
$request = new Request();
$controller = new Controller($request);
try {
    $controller->loadModule();
} catch (ActionEnforcingException $e) {
    $flowController = new FlowController();
    $flowController->redirect(ROOT_URL . Uri::url('error404', 'Error'));
}
Example #2
0
 /**
  * 
  * @access public
  * @author "Lionel Lecaque, <*****@*****.**>"
  */
 public function index()
 {
     if (!$this->hasRequestParameter('key')) {
         $this->redirect(ROOT_URL . Uri::url('maintenance', 'Main'));
     }
     $key = $this->getRequestParameter('key');
     if (!UpdateService::isAllowed($key)) {
         $this->redirect(ROOT_URL . Uri::url('maintenance', 'Main'));
     } else {
         if ($this->releaseManifest['status'] == 'patch') {
             $successMsg = 'Patch have been deployed, update completed, <a>return to TAO HOME</a>';
             $successLink = ROOT_URL . '..';
         } else {
             $successMsg = 'First phase of your update is achieved, in next phase will migrate your data according to new version. <a>Click to proceed.</a>';
             $successLink = ROOT_URL . '../taoUpdate/data/index?key=' . $this->service->getkey();
         }
         $this->setData('successLink', $successLink);
         $this->setData('successMsg', $successMsg);
         $this->setData('ROOT_URL', ROOT_URL);
         $this->setView('logViewer.tpl');
     }
 }