From: <gem...@li...> - 2011-09-13 14:38:21
|
Revision: 11 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=11&view=rev Author: matijsdejong Date: 2011-09-13 14:38:14 +0000 (Tue, 13 Sep 2011) Log Message: ----------- - starting to make trackId just an option Modified Paths: -------------- trunk/library/classes/Gems/Default/TrackAction.php trunk/library/classes/Gems/Menu/MenuAbstract.php Modified: trunk/library/classes/Gems/Default/TrackAction.php =================================================================== --- trunk/library/classes/Gems/Default/TrackAction.php 2011-09-13 12:28:48 UTC (rev 10) +++ trunk/library/classes/Gems/Default/TrackAction.php 2011-09-13 14:38:14 UTC (rev 11) @@ -479,7 +479,7 @@ $this->html->h2(sprintf($this->_('%s track for respondent nr %s'), $data['gtr_track_name'], $this->_getParam(MUtil_Model::REQUEST_ID))); - if (! isset($this->project->trackId)) { + if (! $this->escort instanceof Gems_Project_Tracks_SingleTrackInterface) { $table = parent::getShowTable(); $table->setRepeater(array($data)); @@ -514,7 +514,7 @@ $this->addSnippet('TrackTokenOverviewSnippet', 'trackData', $data, 'baseUrl', $baseUrl); - if (! isset($this->project->trackId)) { + if (! $this->escort instanceof Gems_Project_Tracks_SingleTrackInterface) { $this->addTrackUsage($data['gr2o_patient_nr'], $data['gr2t_id_organization'], $data['gr2t_id_track'], $baseUrl); } Modified: trunk/library/classes/Gems/Menu/MenuAbstract.php =================================================================== --- trunk/library/classes/Gems/Menu/MenuAbstract.php 2011-09-13 12:28:48 UTC (rev 10) +++ trunk/library/classes/Gems/Menu/MenuAbstract.php 2011-09-13 14:38:14 UTC (rev 11) @@ -242,12 +242,18 @@ public function addProjectPage($label) { if ($this->escort instanceof Gems_Project_Tracks_SingleTrackInterface) { - $infoPage = $this->addPage($label, 'pr.project', 'project-tracks', 'show') - ->addHiddenParameter(MUtil_Model::REQUEST_ID, $this->escort->getTrackId()); - $trackSurveys = $infoPage->addShowAction('pr.project'); - $trackSurveys->addActionButton($this->_('Preview'), 'pr.project.questions', 'questions') + if ($trackId = $this->escort->getTrackId()) { + $infoPage = $this->addPage($label, 'pr.project', 'project-tracks', 'show') + ->addHiddenParameter(MUtil_Model::REQUEST_ID, $trackId); + $trackSurveys = $infoPage; + } else { + $infoPage = $this->addPage($label, 'pr.project', 'project-tracks'); + $trackSurveys = $infoPage->addShowAction('pr.project'); + } + $trackSurveys->addAction($this->_('Preview'), 'pr.project.questions', 'questions') ->addNamedParameters(MUtil_Model::REQUEST_ID, 'gro_id_track', Gems_Model::SURVEY_ID, 'gsu_id_survey'); + // MUtil_Echo::track($infoPage->_toNavigationArray(array($this->escort->request))); } else { if ($this->escort instanceof Gems_Project_Tracks_StandAloneSurveysInterface) { $infoPage = $this->addContainer($label, 'pr.project'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-09-15 13:43:39
|
Revision: 18 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=18&view=rev Author: mennodekker Date: 2011-09-15 13:43:29 +0000 (Thu, 15 Sep 2011) Log Message: ----------- New way of handling autosubmit forms, instead of adding new Gems_JQuery_AutoSubmitForm($href, $targetId, $form); to the output, just use $form->setAutoSubmit($href, $targetId) Modified Paths: -------------- trunk/library/classes/Gems/Controller/BrowseEditAction.php trunk/library/classes/Gems/Form/Decorator/Form.php trunk/library/classes/Gems/Form.php Modified: trunk/library/classes/Gems/Controller/BrowseEditAction.php =================================================================== --- trunk/library/classes/Gems/Controller/BrowseEditAction.php 2011-09-15 10:58:07 UTC (rev 17) +++ trunk/library/classes/Gems/Controller/BrowseEditAction.php 2011-09-15 13:43:29 UTC (rev 18) @@ -542,7 +542,8 @@ } $href = $this->getAutoSearchHref(); - $div[] = new Gems_JQuery_AutoSubmitForm($href, $targetId, $form); + $form->setAutoSubmit($href, $targetId); + //$div[] = new Gems_JQuery_AutoSubmitForm($href, $targetId, $form); return $form; } Modified: trunk/library/classes/Gems/Form/Decorator/Form.php =================================================================== --- trunk/library/classes/Gems/Form/Decorator/Form.php 2011-09-15 10:58:07 UTC (rev 17) +++ trunk/library/classes/Gems/Form/Decorator/Form.php 2011-09-15 13:43:29 UTC (rev 18) @@ -2,7 +2,7 @@ /** * Copyright (c) 2011, Erasmus MC * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -13,7 +13,7 @@ * * Neither the name of Erasmus MC nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -24,7 +24,7 @@ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * @package Gems * @subpackage Form * @copyright Copyright (c) 2011 Erasmus MC @@ -42,10 +42,37 @@ */ class Gems_Form_Decorator_Form extends Zend_Form_Decorator_Form { + protected $localScriptFiles = '/gems/js/autoSubmitForm.js'; + protected $localScriptName = 'autoSubmitForm'; + public function render($content) { $form = $this->getElement(); $view = $form->getView(); - $scripts = $form->getScripts(); + + /* + * Check if this is a form that should autosubmit. If so, add script to head and onload + */ + if ($form->isAutoSubmit()) { + $form->addScript($this->localScriptFiles); + //ZendX_JQuery::enableForm($form); + $jquery = $view->jQuery(); + $jquery->enable(); //Just to make sure + + $params = $form->getAutoSubmit(); + if (($view instanceof Zend_View_Abstract) && ($params['submitUrl'] instanceof MUtil_Html_HtmlInterface)) { + $params['submitUrl'] = $params['submitUrl']->render($view); + } + + $js = sprintf('%s("#%s").%s(%s);', + ZendX_JQuery_View_Helper_JQuery::getJQueryHandler(), + $form->getId(), + $this->localScriptName, + ZendX_JQuery::encodeJson($params) + ); + $jquery->addOnLoad($js); + } + + $scripts = $form->getScripts(); $css = $form->getCss(); if (!is_null($scripts) && is_array($scripts)) { Modified: trunk/library/classes/Gems/Form.php =================================================================== --- trunk/library/classes/Gems/Form.php 2011-09-15 10:58:07 UTC (rev 17) +++ trunk/library/classes/Gems/Form.php 2011-09-15 13:43:29 UTC (rev 18) @@ -1,31 +1,30 @@ <?php - -/** - * Copyright (c) 2011, Erasmus MC - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Erasmus MC nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * +/** + * Copyright (c) 2011, Erasmus MC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Erasmus MC nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * * @version $Id: Form.php 345 2011-07-28 08:39:24Z 175780 $ * @package Gems * @subpackage Form @@ -35,12 +34,12 @@ /** * Base form class - * + * * @package Gems * @subpackage Form * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - */ + */ class Gems_Form extends MUtil_Form { /** @@ -58,6 +57,13 @@ protected $_scripts = null; /** + * If set this holds the url and targetid for the autosubmit + * + * @var array + */ + protected $_autosubmit = null; + + /** * Constructor * * Registers form view helper as decorator @@ -100,7 +106,7 @@ /** * Attach a css file to the form with form-specific css - * + * * Optional media parameter can be used to determine media-type (print, screen etc) * * @param string $file @@ -113,4 +119,38 @@ public function getCss() { return $this->_css; } + + public function getAutoSubmit() { + return $this->_autosubmit; + } + + /** + * Is this a form that autosubmits? + * + * @return boolean + */ + public function isAutoSubmit() { + return isset($this->_autosubmit); + } + + /** + * + * @param type $submitUrl + * @param type $targetId + */ + public function setAutoSubmit($submitUrl, $targetId) { + // Filter out elements passed by type + $args = MUtil_Ra::args(func_get_args(), + array( + 'submitUrl' => array('MUtil_Html_UrlArrayAttribute', 'is_array', 'is_string'), + 'targetId' => array('MUtil_Html_ElementInterface', 'is_string'), + ), null, MUtil_Ra::STRICT); + + if ($args['targetId'] instanceof MUtil_Html_ElementInterface) { + $args['targetId'] = isset($args['targetId']->id) ? '#' . $args['targetId']->id : (isset($args['targetId']->class) ? '.' . $args['targetId']->class: $args['targetId']->getTagName()); + } else { + $args['targetId'] = '#' . $args['targetId']; + } + $this->_autosubmit = $args; + } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-09-15 16:15:36
|
Revision: 27 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=27&view=rev Author: matijsdejong Date: 2011-09-15 16:15:28 +0000 (Thu, 15 Sep 2011) Log Message: ----------- - continued implementation of #5 Reorganize menu Modified Paths: -------------- trunk/library/classes/Gems/Menu/MenuAbstract.php trunk/library/classes/Gems/Menu.php Modified: trunk/library/classes/Gems/Menu/MenuAbstract.php =================================================================== --- trunk/library/classes/Gems/Menu/MenuAbstract.php 2011-09-15 16:00:09 UTC (rev 26) +++ trunk/library/classes/Gems/Menu/MenuAbstract.php 2011-09-15 16:15:28 UTC (rev 27) @@ -198,6 +198,20 @@ return $this->addPage($label, $privilege, $controller, $action, $other); } + public function addMailSetupPage($label) + { + $setup = $this->addContainer($label); + + // MAIL Server CONTROLLER + $page = $setup->addBrowsePage($this->_('Servers'), 'pr.mail.server', 'mail-server'); + // $page->addAction($this->_('Test'), 'pr.mail.server.test', 'test')->addParameters(MUtil_Model::REQUEST_ID); + + // MAIL CONTROLLER + $setup->addBrowsePage($this->_('Templates'), 'pr.mail', 'mail'); + + return $setup; + } + /** * Add a page to the menu * Modified: trunk/library/classes/Gems/Menu.php =================================================================== --- trunk/library/classes/Gems/Menu.php 2011-09-15 16:00:09 UTC (rev 26) +++ trunk/library/classes/Gems/Menu.php 2011-09-15 16:15:28 UTC (rev 27) @@ -214,13 +214,6 @@ // RECEPTION CODE CONTROLLER $setup->addBrowsePage($this->_('Reception codes'), 'pr.reception', 'reception'); - // MAIL Server CONTROLLER - $page = $setup->addBrowsePage($this->_('Email servers'), 'pr.mail.server', 'mail-server'); - // $page->addAction($this->_('Test'), 'pr.mail.server.test', 'test')->addParameters(MUtil_Model::REQUEST_ID); - - // MAIL CONTROLLER - $setup->addBrowsePage($this->_('Email'), 'pr.mail', 'mail'); - // SURVEY SOURCES CONTROLLER $page = $setup->addBrowsePage($this->_('Survey Sources'), 'pr.source', 'source'); $page->addDeleteAction(); @@ -593,6 +586,9 @@ // SETUP CONTAINER $this->addGemsSetupContainer($this->escort->_('Setup')); + // MAIL CONTAINER + $this->addMailSetupPage($this->escort->_('Mail')); + // OTHER ITEMS $this->addLogonOffToken(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-09-16 08:28:53
|
Revision: 31 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=31&view=rev Author: mennodekker Date: 2011-09-16 08:28:47 +0000 (Fri, 16 Sep 2011) Log Message: ----------- updated properties Modified Paths: -------------- trunk/library/classes/Gems/Export/Excel.php trunk/library/classes/Gems/Export/ExportAbstract.php trunk/library/classes/Gems/Export/ExportInterface.php trunk/library/classes/Gems/Export/ExportModel.php trunk/library/classes/Gems/Export/Spss.php trunk/library/classes/Gems/Export.php Property Changed: ---------------- trunk/library/classes/Gems/Export/Excel.php trunk/library/classes/Gems/Export/ExportAbstract.php trunk/library/classes/Gems/Export/ExportInterface.php trunk/library/classes/Gems/Export/ExportModel.php trunk/library/classes/Gems/Export/Spss.php trunk/library/classes/Gems/Export.php Modified: trunk/library/classes/Gems/Export/Excel.php =================================================================== --- trunk/library/classes/Gems/Export/Excel.php 2011-09-16 08:25:43 UTC (rev 30) +++ trunk/library/classes/Gems/Export/Excel.php 2011-09-16 08:28:47 UTC (rev 31) @@ -31,7 +31,7 @@ * @subpackage Export * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Excel.php 140 2011-09-15 14:18:14Z 175780 $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Export/Excel.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Export/ExportAbstract.php =================================================================== --- trunk/library/classes/Gems/Export/ExportAbstract.php 2011-09-16 08:25:43 UTC (rev 30) +++ trunk/library/classes/Gems/Export/ExportAbstract.php 2011-09-16 08:28:47 UTC (rev 31) @@ -31,7 +31,7 @@ * @subpackage Export * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: ExportAbstract.php 128 2011-08-12 12:33:14Z 175780 $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Export/ExportAbstract.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Export/ExportInterface.php =================================================================== --- trunk/library/classes/Gems/Export/ExportInterface.php 2011-09-16 08:25:43 UTC (rev 30) +++ trunk/library/classes/Gems/Export/ExportInterface.php 2011-09-16 08:28:47 UTC (rev 31) @@ -29,7 +29,7 @@ * @subpackage Export * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: ExportInterface.php 128 2011-08-12 12:33:14Z 175780 $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Export/ExportInterface.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Export/ExportModel.php =================================================================== --- trunk/library/classes/Gems/Export/ExportModel.php 2011-09-16 08:25:43 UTC (rev 30) +++ trunk/library/classes/Gems/Export/ExportModel.php 2011-09-16 08:28:47 UTC (rev 31) @@ -32,7 +32,7 @@ * @subpackage Export * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: ExportModel.php 138 2011-09-15 10:44:24Z 175780 $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Export/ExportModel.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Export/Spss.php =================================================================== --- trunk/library/classes/Gems/Export/Spss.php 2011-09-16 08:25:43 UTC (rev 30) +++ trunk/library/classes/Gems/Export/Spss.php 2011-09-16 08:28:47 UTC (rev 31) @@ -32,7 +32,7 @@ * @subpackage Export * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Spss.php 140 2011-09-15 14:18:14Z 175780 $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Export/Spss.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Export.php =================================================================== --- trunk/library/classes/Gems/Export.php 2011-09-16 08:25:43 UTC (rev 30) +++ trunk/library/classes/Gems/Export.php 2011-09-16 08:28:47 UTC (rev 31) @@ -31,7 +31,7 @@ * @subpackage Export * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Export.php 124 2011-08-09 11:56:35Z 175780 $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Export.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-09-19 10:35:22
|
Revision: 35 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=35&view=rev Author: matijsdejong Date: 2011-09-19 10:35:16 +0000 (Mon, 19 Sep 2011) Log Message: ----------- - created readonly option for request cache to prevent bug #8 Modified Paths: -------------- trunk/library/classes/Gems/Controller/BrowseEditAction.php trunk/library/classes/Gems/Default/TokenPlanAction.php trunk/library/classes/Gems/Util/RequestCache.php Modified: trunk/library/classes/Gems/Controller/BrowseEditAction.php =================================================================== --- trunk/library/classes/Gems/Controller/BrowseEditAction.php 2011-09-19 08:19:00 UTC (rev 34) +++ trunk/library/classes/Gems/Controller/BrowseEditAction.php 2011-09-19 10:35:16 UTC (rev 35) @@ -585,13 +585,14 @@ * @param string $sourceAction The action to get the cache from if not the current one. * @return array */ - public function getCachedRequestData($includeDefaults = true, $sourceAction = null) + public function getCachedRequestData($includeDefaults = true, $sourceAction = null, $readonly = false) { if (! $this->requestCache) { $this->requestCache = $this->util->getRequestCache(); if ($sourceAction) { $this->requestCache->setSourceAction($sourceAction); } + $this->requestCache->setReadonly($readonly); $this->requestCache->setMenu($this->menu); $this->requestCache->setRequest($this->request); Modified: trunk/library/classes/Gems/Default/TokenPlanAction.php =================================================================== --- trunk/library/classes/Gems/Default/TokenPlanAction.php 2011-09-19 08:19:00 UTC (rev 34) +++ trunk/library/classes/Gems/Default/TokenPlanAction.php 2011-09-19 10:35:16 UTC (rev 35) @@ -128,7 +128,7 @@ $model = $this->getModel(); // Set the request cache to use the search params from the index action - $this->getCachedRequestData(true, 'index'); + $this->getCachedRequestData(true, 'index', true); // Load the filters $this->_applySearchParameters($model); Modified: trunk/library/classes/Gems/Util/RequestCache.php =================================================================== --- trunk/library/classes/Gems/Util/RequestCache.php 2011-09-19 08:19:00 UTC (rev 34) +++ trunk/library/classes/Gems/Util/RequestCache.php 2011-09-19 10:35:16 UTC (rev 35) @@ -64,6 +64,13 @@ protected $_programParams = array(); /** + * True if the cache should not be written to. + * + * @var boolean + */ + protected $_readonly = false; + + /** * The module / controller /action of the request in an array. * * @var array @@ -269,6 +276,12 @@ return $this; } + /** + * Ste the keys stored fot this cache + * + * @param array $programParams + * @return Gems_Util_RequestCache (continuation pattern) + */ public function setProgramParams(array $programParams) { foreach ($programParams as $key => $value) { @@ -279,13 +292,29 @@ // Store result $this->_programParams = $programParams; - $this->session->requestCache[$this->getStorageKey()] = $programParams; + if (! $this->_readonly) { + $this->session->requestCache[$this->getStorageKey()] = $programParams; + } + return $this; } /** + * Makes sure any new values in the request are not written to the cache. * + * @param boolen $value + * @return Gems_Util_RequestCache (continuation pattern) + */ + public function setReadonly($value = true) + { + $this->_readonly = (boolean) $value; + + return $this; + } + + /** + * * @param Zend_Controller_Request_Abstract $request * @return Gems_Util_RequestCache (continuation pattern) */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-09-21 07:23:30
|
Revision: 56 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=56&view=rev Author: mennodekker Date: 2011-09-21 07:23:20 +0000 (Wed, 21 Sep 2011) Log Message: ----------- DocBlock fixes Modified Paths: -------------- trunk/library/classes/Gems/Default/LogAction.php trunk/library/classes/Gems/Default/LogMaintenanceAction.php trunk/library/classes/Gems/Tracker/ChangeTracker.php trunk/library/classes/Gems/Util/Localized.php Modified: trunk/library/classes/Gems/Default/LogAction.php =================================================================== --- trunk/library/classes/Gems/Default/LogAction.php 2011-09-21 07:05:58 UTC (rev 55) +++ trunk/library/classes/Gems/Default/LogAction.php 2011-09-21 07:23:20 UTC (rev 56) @@ -1,10 +1,8 @@ <?php - - /** * Copyright (c) 2011, Erasmus MC * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -15,7 +13,7 @@ * * Neither the name of Erasmus MC nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -28,29 +26,38 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/** + * Show the action log + * + * @package Gems + * @subpackage Default + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.4 + */ class Gems_Default_LogAction extends Gems_Controller_BrowseEditAction { - + public $sortKey = array('glua_created' => SORT_DESC); - + public $defaultPeriodEnd = 1; public $defaultPeriodStart = -4; public $defaultPeriodType = 'W'; - + public $maxPeriod = 1; public $minPeriod = -15; - + public function getAutoSearchElements(MUtil_Model_ModelAbstract $model, array $data) { $elements = parent::getAutoSearchElements($model, $data); - + if ($elements) { $elements[] = null; // break into separate spans } - + // Create date range elements $min = -91; $max = 91; $size = max(strlen($min), strlen($max)); - + $element = new Zend_Form_Element_Text('period_start', array('label' => $this->_('from'), 'size' => $size - 1, 'maxlength' => $size, 'class' => 'rightAlign')); $element->addValidator(new Zend_Validate_Int()); $element->addValidator(new Zend_Validate_Between($min, $max)); @@ -85,32 +92,32 @@ $elements[] = $element; $elements[] = null; // break into separate spans - + $elements[] = $this->_('Staff:'); $sql = "SELECT glua_by, CONCAT(gsf_last_name, ', ', COALESCE(CONCAT(gsf_first_name, ' '), ''), COALESCE(gsf_surname_prefix, '')) AS name " . "FROM gems__log_useractions " - . "JOIN gems__staff ON glua_by = gsf_id_user"; + . "JOIN gems__staff ON glua_by = gsf_id_user"; $elements[] = $this->_createSelectElement('glua_by', $sql, $this->_('All staff')); - + $elements[] = $this->_('Patient:'); $sql = "SELECT glua_by, CONCAT(grs_last_name, ', ', COALESCE(CONCAT(grs_first_name, ' '), ''), COALESCE(grs_surname_prefix, '')) AS name " . "FROM gems__log_useractions " - . "JOIN gems__respondents ON glua_by = grs_id_user"; + . "JOIN gems__respondents ON glua_by = grs_id_user"; $elements[] = $this->_createSelectElement('glua_to', $sql, $this->_('All patients')); - + $elements[] = MUtil_Html::create('br'); $elements[] = $this->_('Action:'); $sql = "SELECT glac_id_action, glac_name " . "FROM gems__log_actions "; $elements[] = $this->_createSelectElement('glua_action', $sql, $this->_('All actions')); - + return $elements; } - + public function getDataFilter(array $data) { $filter = array(); - - + + // Check for period selected switch ($data['date_type']) { case 'W': @@ -134,7 +141,7 @@ return $filter; } - + public function getDefaultSearchData() { return array( @@ -145,7 +152,7 @@ } protected function createModel($detailed, $action) { - //MUtil_Model::$verbose=true; + //MUtil_Model::$verbose=true; $model = new Gems_Model_JoinModel('Log', 'gems__log_useractions'); $model->addLeftTable('gems__log_actions', array('glua_action'=>'glac_id_action')); $model->addLeftTable('gems__respondents', array('glua_to'=>'grs_id_user')); Modified: trunk/library/classes/Gems/Default/LogMaintenanceAction.php =================================================================== --- trunk/library/classes/Gems/Default/LogMaintenanceAction.php 2011-09-21 07:05:58 UTC (rev 55) +++ trunk/library/classes/Gems/Default/LogMaintenanceAction.php 2011-09-21 07:23:20 UTC (rev 56) @@ -1,10 +1,8 @@ <?php - - /** * Copyright (c) 2011, Erasmus MC * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -15,7 +13,7 @@ * * Neither the name of Erasmus MC nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -28,16 +26,26 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/** + * The maintenace screen for the action log + * + * @package Gems + * @subpackage Default + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.4 + */ + class Gems_Default_LogMaintenanceAction extends Gems_Controller_BrowseEditAction { - + public $sortKey = array('glac_name' => SORT_ASC); - + public function addFormElements(MUtil_Model_FormBridge $bridge, MUtil_Model_ModelAbstract $model, array $data, $new = false) { $model->set('glac_name', 'elementClass', 'exhibitor'); $model->set('glac_log', 'elementClass', 'checkBox'); parent::addFormElements($bridge, $model, $data, $new); } - + protected function createModel($detailed, $action) { //MUtil_Model::$verbose=true; $model = new Gems_Model_JoinModel('log_maint', 'gems__log_actions', true); @@ -46,22 +54,22 @@ return $model; } - + public function getAfterSaveRoute($data) { Gems_AccessLog::getLog()->loadActions(true); return parent::getAfterSaveRoute($data); } - + public function getAutoSearchElements(MUtil_Model_ModelAbstract $model, array $data) { $elements = parent::getAutoSearchElements($model, $data); - + if ($elements) { $elements[] = null; // break into separate spans } - + $elements[] = $this->_('Log:'); $elements[] = $this->_createSelectElement('glac_log', $this->util->getTranslated()->getYesNo(), $this->_('All')); - + return $elements; } Modified: trunk/library/classes/Gems/Tracker/ChangeTracker.php =================================================================== --- trunk/library/classes/Gems/Tracker/ChangeTracker.php 2011-09-21 07:05:58 UTC (rev 55) +++ trunk/library/classes/Gems/Tracker/ChangeTracker.php 2011-09-21 07:23:20 UTC (rev 56) @@ -4,7 +4,7 @@ /** * Copyright (c) 2011, Erasmus MC * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -15,7 +15,7 @@ * * Neither the name of Erasmus MC nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -26,24 +26,23 @@ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * File description of ChangeTracker * - * @author Matijs de Jong <mj...@ma...> - * @since 1.2 - * @version 1.2 - * @package - * @subpackage + * + * @package Gems + * @subpackage Tracker + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id$ */ /** - * Class description of ChangeTracker * - * @author Matijs de Jong <mj...@ma...> - * @package - * @subpackage + * @package Gems + * @subpackage Tracker + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.4 */ class Gems_Tracker_ChangeTracker { @@ -54,11 +53,11 @@ public $roundChangeUpdates = 0; public $roundCompletionCauses = 0; public $roundCompletionChanges = 0; - public $surveyCompletionChanges = 0; + public $surveyCompletionChanges = 0; public $tokenDateCauses = 0; public $tokenDateChanges = 0; - public function getMessages(Zend_Translate $t) + public function getMessages(Zend_Translate $t) { if ($this->checkedRespondentTracks) { $messages[] = sprintf($t->_('Checked %d tracks.'), $this->checkedRespondentTracks); @@ -89,10 +88,10 @@ } else { $messages[] = $t->_('No tokens were changed.'); } - + return $messages; } - + public function hasChanged() { return $this->resultDataChanges || $this->surveyCompletionChanges || $this->roundCompletionChanges || $this->tokenDateCauses || $this->roundChangeUpdates || $this->createdTokens; Modified: trunk/library/classes/Gems/Util/Localized.php =================================================================== --- trunk/library/classes/Gems/Util/Localized.php 2011-09-21 07:05:58 UTC (rev 55) +++ trunk/library/classes/Gems/Util/Localized.php 2011-09-21 07:23:20 UTC (rev 56) @@ -1,33 +1,49 @@ <?php - -/** - * Copyright (c) 2011, Erasmus MC - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Erasmus MC nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - + +/** + * Copyright (c) 2011, Erasmus MC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Erasmus MC nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * @package Gems + * @subpackage Util + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id$ + */ + +/** + * Localization class, allowing for project specific overrides + * + * @package Gems + * @subpackage Util + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + */ class Gems_Util_Localized extends Gems_Registry_TargetAbstract { /** @@ -92,7 +108,7 @@ } } - /* + /* public function formatDateTime($dateTimeValue, $showRecentTime = false) { if ($dateTimeValue) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-09-22 07:23:51
|
Revision: 59 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=59&view=rev Author: mennodekker Date: 2011-09-22 07:23:44 +0000 (Thu, 22 Sep 2011) Log Message: ----------- DocBlock fixes Modified Paths: -------------- trunk/library/classes/Gems/Event/EventInterface.php trunk/library/classes/Gems/Event/RoundChangedEventInterface.php trunk/library/classes/Gems/Event/SurveyBeforeAnsweringEventInterface.php trunk/library/classes/Gems/Event/SurveyCompletedEventInterface.php trunk/library/classes/Gems/Exception/Coding.php trunk/library/classes/Gems/Exception.php trunk/library/classes/Gems/Validate/LimeSurveySoapClient.php Modified: trunk/library/classes/Gems/Event/EventInterface.php =================================================================== --- trunk/library/classes/Gems/Event/EventInterface.php 2011-09-21 10:11:17 UTC (rev 58) +++ trunk/library/classes/Gems/Event/EventInterface.php 2011-09-22 07:23:44 UTC (rev 59) @@ -1,5 +1,4 @@ <?php - /** * Copyright (c) 2011, Erasmus MC * All rights reserved. @@ -28,7 +27,7 @@ * * * @package Gems - * @subpackage Events + * @subpackage Event * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License @@ -40,7 +39,7 @@ * each event should implement this interface. * * @package Gems - * @subpackage Events + * @subpackage Event * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License * @since Class available since version 1.4 Modified: trunk/library/classes/Gems/Event/RoundChangedEventInterface.php =================================================================== --- trunk/library/classes/Gems/Event/RoundChangedEventInterface.php 2011-09-21 10:11:17 UTC (rev 58) +++ trunk/library/classes/Gems/Event/RoundChangedEventInterface.php 2011-09-22 07:23:44 UTC (rev 59) @@ -1,5 +1,4 @@ <?php - /** * Copyright (c) 2011, Erasmus MC * All rights reserved. @@ -28,7 +27,7 @@ * * * @package Gems - * @subpackage Events + * @subpackage Event * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License @@ -42,7 +41,7 @@ * but then the code may be more difficult to implement. * * @package Gems - * @subpackage Events + * @subpackage Event * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License * @since Class available since version 1.4 Modified: trunk/library/classes/Gems/Event/SurveyBeforeAnsweringEventInterface.php =================================================================== --- trunk/library/classes/Gems/Event/SurveyBeforeAnsweringEventInterface.php 2011-09-21 10:11:17 UTC (rev 58) +++ trunk/library/classes/Gems/Event/SurveyBeforeAnsweringEventInterface.php 2011-09-22 07:23:44 UTC (rev 59) @@ -1,5 +1,4 @@ <?php - /** * Copyright (c) 2011, Erasmus MC * All rights reserved. @@ -28,7 +27,7 @@ * * * @package Gems - * @subpackage Events + * @subpackage Event * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License @@ -41,7 +40,7 @@ * You can return answers that must be set in an array and they will be uploaded to the source. * * @package Gems - * @subpackage Events + * @subpackage Event * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License * @since Class available since version 1.4 Modified: trunk/library/classes/Gems/Event/SurveyCompletedEventInterface.php =================================================================== --- trunk/library/classes/Gems/Event/SurveyCompletedEventInterface.php 2011-09-21 10:11:17 UTC (rev 58) +++ trunk/library/classes/Gems/Event/SurveyCompletedEventInterface.php 2011-09-22 07:23:44 UTC (rev 59) @@ -1,5 +1,4 @@ <?php - /** * Copyright (c) 2011, Erasmus MC * All rights reserved. @@ -28,7 +27,7 @@ * * * @package Gems - * @subpackage Events + * @subpackage Event * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License @@ -41,7 +40,7 @@ * Just return those values that have changed and they will be uploaded to the source. * * @package Gems - * @subpackage Events + * @subpackage Event * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License * @since Class available since version 1.4 Modified: trunk/library/classes/Gems/Exception/Coding.php =================================================================== --- trunk/library/classes/Gems/Exception/Coding.php 2011-09-21 10:11:17 UTC (rev 58) +++ trunk/library/classes/Gems/Exception/Coding.php 2011-09-22 07:23:44 UTC (rev 59) @@ -1,34 +1,48 @@ <?php +/** + * Copyright (c) 2011, Erasmus MC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Erasmus MC nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * Gems Coding exception + * + * @author Matijs de Jong <mj...@ma...> + * @since 1.1 + * @version 1.1 + * @package Gems + * @subpackage Exception + */ - -/** - * Copyright (c) 2011, Erasmus MC - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Erasmus MC nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -class Gems_Exception_Coding extends Gems_Exception +/** + * Gems Coding exception + * + * @author Matijs de Jong <mj...@ma...> + * @package Gems + * @subpackage Exception + */ +class Gems_Exception_Coding extends Gems_Exception { public function __construct($msg = '', $code = 200, Exception $previous = null) { Modified: trunk/library/classes/Gems/Exception.php =================================================================== --- trunk/library/classes/Gems/Exception.php 2011-09-21 10:11:17 UTC (rev 58) +++ trunk/library/classes/Gems/Exception.php 2011-09-22 07:23:44 UTC (rev 59) @@ -1,36 +1,33 @@ <?php - - -/** - * Copyright (c) 2011, Erasmus MC - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Erasmus MC nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - /** - * File description of SurveyNotFoundException + * Copyright (c) 2011, Erasmus MC + * All rights reserved. * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Erasmus MC nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * Gems Base Exception class + * * @author Matijs de Jong <mj...@ma...> * @since 1.1 * @version 1.1 @@ -39,7 +36,7 @@ */ /** - * Class description of SurveyNotFoundException + * Gems Base Exception class * * @author Matijs de Jong <mj...@ma...> * @package Gems @@ -49,7 +46,7 @@ { /** * Optional extra information on the exception - * + * * @var string */ private $info; @@ -72,7 +69,7 @@ /** * Returns optional extra information in the exception - * + * * @return String */ public function getInfo() @@ -83,7 +80,7 @@ /** * Optional extra information on the exception * - * @param string $info + * @param string $info */ public function setInfo($info) { Modified: trunk/library/classes/Gems/Validate/LimeSurveySoapClient.php =================================================================== --- trunk/library/classes/Gems/Validate/LimeSurveySoapClient.php 2011-09-21 10:11:17 UTC (rev 58) +++ trunk/library/classes/Gems/Validate/LimeSurveySoapClient.php 2011-09-22 07:23:44 UTC (rev 59) @@ -1,33 +1,48 @@ <?php +/** + * Copyright (c) 2011, Erasmus MC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Erasmus MC nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * @version $Id$ + * @package Gems + * @subpackage Validate + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + */ - -/** - * Copyright (c) 2011, Erasmus MC - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Erasmus MC nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - +/** + * Not used anymore, checked if we could use soap connection. As soap is no longer a reliable + * interface in LimeSurvey it is deprecated for now. + * + * @deprecated + * @package Gems + * @subpackage Validate + * @copyright Copyright (c) 2011 Erasmus MC + * @deprecated + * @license New BSD License + */ class LimeSurveySoapClient extends MUtil_Validate_Url { /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-10-20 12:18:09
|
Revision: 116 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=116&view=rev Author: matijsdejong Date: 2011-10-20 12:18:03 +0000 (Thu, 20 Oct 2011) Log Message: ----------- Fix for #21, made db adapter choice more understandable Modified Paths: -------------- trunk/library/classes/Gems/Default/SourceAction.php trunk/library/classes/Gems/Tracker.php Modified: trunk/library/classes/Gems/Default/SourceAction.php =================================================================== --- trunk/library/classes/Gems/Default/SourceAction.php 2011-10-20 11:10:35 UTC (rev 115) +++ trunk/library/classes/Gems/Default/SourceAction.php 2011-10-20 12:18:03 UTC (rev 116) @@ -83,7 +83,7 @@ $bridge->addValidator('gso_ls_url', new MUtil_Validate_Url()); $bridge->addSelect('gso_ls_class'); - $bridge->addSelect('gso_ls_adapter'); + $bridge->addSelect('gso_ls_adapter', 'description', $this->_('Choose the database used by the source.')); $bridge->addText('gso_ls_table_prefix', array('size' => 15, 'description' => $this->_('Do not forget the underscores.'))); $bridge->addText('gso_ls_dbhost', array('size' => 15, 'description' => $in_gems)); @@ -144,11 +144,12 @@ $model->set('gso_ls_class', 'label', $this->_('Adaptor class'), 'multiOptions', $tracker->getSourceClasses()); if ($detailed) { - $model->set('gso_ls_adapter', 'label', $this->_('DB Adaptor'), 'multiOptions', $tracker->getSourceDatabaseClasses()); + $model->set('gso_ls_adapter', 'label', $this->_('Database Server'), 'multiOptions', $tracker->getSourceDatabaseClasses(), 'default', substr(get_class($this->db), strlen('Zend_Db_Adapter_'))); $model->set('gso_ls_dbhost', 'label', $this->_('Database host')); $model->set('gso_ls_database', 'label', $this->_('Database')); } + $model->set('gso_ls_table_prefix', 'label', $this->_('Table prefix'), 'default', 'ls__'); $model->set('gso_active', 'default', 0); Modified: trunk/library/classes/Gems/Tracker.php =================================================================== --- trunk/library/classes/Gems/Tracker.php 2011-10-20 11:10:35 UTC (rev 115) +++ trunk/library/classes/Gems/Tracker.php 2011-10-20 12:18:03 UTC (rev 116) @@ -73,7 +73,7 @@ * @var array Of classname => description */ protected $_sourceClasses = array( - 'LimeSurvey1m9Database' => 'Lime Survey 1.90 DB', + 'LimeSurvey1m9Database' => 'Lime Survey 1.90 DB', 'LimeSurvey1m91Database' => 'Lime Survey 1.91+ DB', ); @@ -114,29 +114,29 @@ private $_trackEngines = array(); /** + * Allows sub classes of Gems_Loader_LoaderAbstract to specify the subdirectory where to look for. * - * @var Zend_Translate + * @var string $cascade An optional subdirectory where this subclass always loads from. */ - protected $translate; + protected $cascade = 'Tracker'; /** * - * @var Zend_Session + * @var Zend_Db_Adapter_Abstract */ - protected $session; + protected $db; /** - * Allows sub classes of Gems_Loader_LoaderAbstract to specify the subdirectory where to look for. * - * @var string $cascade An optional subdirectory where this subclass always loads from. + * @var Zend_Translate */ - protected $cascade = 'Tracker'; + protected $translate; /** * - * @var Zend_Db_Adapter_Abstract + * @var Zend_Session */ - protected $db; + protected $session; /** * Set to true to get detailed information on all tracker actions @@ -413,12 +413,18 @@ // TODO: this should be moved to Gems_Tracker_Source_SourceInterface, // but do not have time to implement is of minor importance at this moment. - return array( - '' => '-- none --', - 'Mysqli' => 'MySQL', - 'Pdo_Mysql' => 'MySQL (PDO)', - 'Sqlsrv' => 'SQL Server', - 'Pdo_Mssql' => 'SQL Server (PDO)'); + // If the project uses Pdo database, use Pdo classes, otherwise MySQL + if (stripos(get_class($this->db), '_Pdo_')) { + return array( + '' => '-- none --', + 'Pdo_Mysql' => 'MySQL (PDO)', + 'Pdo_Mssql' => 'SQL Server (PDO)'); + } else { + return array( + '' => '-- none --', + 'Mysqli' => 'MySQL', + 'Sqlsrv' => 'SQL Server'); + } } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-11-22 12:02:25
|
Revision: 258 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=258&view=rev Author: mennodekker Date: 2011-11-22 12:02:18 +0000 (Tue, 22 Nov 2011) Log Message: ----------- Modified Paths: -------------- trunk/library/classes/Gems/Controller/BrowseEditAction.php trunk/library/classes/Gems/TabForm.php Modified: trunk/library/classes/Gems/Controller/BrowseEditAction.php =================================================================== --- trunk/library/classes/Gems/Controller/BrowseEditAction.php 2011-11-21 16:49:32 UTC (rev 257) +++ trunk/library/classes/Gems/Controller/BrowseEditAction.php 2011-11-22 12:02:18 UTC (rev 258) @@ -293,16 +293,18 @@ public function beforeFormDisplay ($form, $isNew) { if ($this->useTabbedForms) { + /* Not needed anymore @@TODO: Remove when proven, as there is a set tab //Create the tabs tried in $form->render() but somehow that is never reached if ($form instanceof Gems_TabForm) { Gems_TabForm::htmlElementsToTabs($form); - } + }*/ //If needed, add a row of link buttons to the bottom of the form if ($links = $this->createMenuLinks($isNew ? $this->menuCreateIncludeLevel : $this->menuEditIncludeLevel)) { $element = new MUtil_Form_Element_Html('formLinks'); $element->setValue($links); $element->setOrder(999); + $form->resetContext(); $form->addElement($element); } } else { Modified: trunk/library/classes/Gems/TabForm.php =================================================================== --- trunk/library/classes/Gems/TabForm.php 2011-11-21 16:49:32 UTC (rev 257) +++ trunk/library/classes/Gems/TabForm.php 2011-11-22 12:02:18 UTC (rev 258) @@ -60,6 +60,17 @@ if ($this->currentTab && !($element instanceof Zend_Form_Element_Hidden)) { return $this->currentTab->addElement($element, $name, $options); } else { + if ($element instanceof Zend_Form_Element_Hidden) { + //Remove decorators + $element->removeDecorator('htmlTag'); + $element->removeDecorator('Label'); + } else { + $error = $element->getDecorator('Errors'); + if ($error instanceof Zend_Form_Decorator_Errors) { + $element->removeDecorator('Errors'); + $element->addDecorator($error); + } + } return parent::addElement($element, $name, $options); } } @@ -306,6 +317,14 @@ } } + /** + * As addElement and addDisplayGroup provide a fluent way of working with subforms + * we need to provide a method to skip back to the main form again. + */ + public function resetContext() { + $this->currentTab = null; + } + public function selectTab($tabIdx) { $this->getElement('tab')->setValue($tabIdx); $this->setAttrib('selected', $tabIdx); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-11-28 18:34:59
|
Revision: 302 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=302&view=rev Author: matijsdejong Date: 2011-11-28 18:34:53 +0000 (Mon, 28 Nov 2011) Log Message: ----------- Switching order in IndexAction.php selects the right organization for the url (the first time) MUtil_Echo::track commented out Modified Paths: -------------- trunk/library/classes/Gems/Default/IndexAction.php trunk/library/classes/Gems/Tracker/Token.php Modified: trunk/library/classes/Gems/Default/IndexAction.php =================================================================== --- trunk/library/classes/Gems/Default/IndexAction.php 2011-11-28 18:24:32 UTC (rev 301) +++ trunk/library/classes/Gems/Default/IndexAction.php 2011-11-28 18:34:53 UTC (rev 302) @@ -294,16 +294,16 @@ */ public function loginAction() { - $form = $this->_getLoginForm(); - $request = $this->getRequest(); - + // Allow layout switching based on request base url if ($this->escort instanceof Gems_Project_Layout_MultiLayoutInterface) { $hostUrl = $this->escort->loader->getUtil()->getCurrentURI(); - + + // MUtil_Echo::track($hostUrl); + $organizationId = $this->util->getDbLookup()->getOrganizationForUrl($hostUrl); - + if ($organizationId) { $user = $this->escort->getLoader()->getUserLoader()->getCurrentUser(); $user->setCurrentOrganization($organizationId); @@ -311,6 +311,8 @@ } } + $form = $this->_getLoginForm(); + if ($request->isPost()) { if ($form->isValid($request->getPost(), false)) { Modified: trunk/library/classes/Gems/Tracker/Token.php =================================================================== --- trunk/library/classes/Gems/Tracker/Token.php 2011-11-28 18:24:32 UTC (rev 301) +++ trunk/library/classes/Gems/Tracker/Token.php 2011-11-28 18:34:53 UTC (rev 302) @@ -1123,7 +1123,7 @@ if ($comment) { $values['gto_comment'] = $comment; } - MUtil_Echo::track($values); + // MUtil_Echo::track($values); $changed = $this->_updateToken($values, $userId); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-12-19 09:27:32
|
Revision: 370 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=370&view=rev Author: mennodekker Date: 2011-12-19 09:27:19 +0000 (Mon, 19 Dec 2011) Log Message: ----------- Setting keywords Modified Paths: -------------- trunk/library/classes/Gems/Auth/Adapter/Callback.php trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php trunk/library/classes/Gems/Default/ExportAction.php trunk/library/classes/Gems/Default/MailJobAction.php trunk/library/classes/Gems/Default/MailLogAction.php trunk/library/classes/Gems/Default/UpgradeAction.php trunk/library/classes/Gems/Menu/ParameterCollector.php trunk/library/classes/Gems/Model/OrganizationModel.php trunk/library/classes/Gems/Model/StaffModel.php trunk/library/classes/Gems/Registry/CachedArrayTargetAbstract.php trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php trunk/library/classes/Gems/Upgrades.php trunk/library/classes/Gems/UpgradesAbstract.php trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php trunk/library/classes/Gems/User/NoLoginDefinition.php trunk/library/classes/Gems/User/OldStaffUserDefinition.php trunk/library/classes/Gems/User/PasswordChecker.php trunk/library/classes/Gems/User/ProjectUserDefinition.php trunk/library/classes/Gems/User/RespondentUserDefinition.php trunk/library/classes/Gems/User/StaffUserDefinition.php trunk/library/classes/Gems/User/User.php trunk/library/classes/Gems/User/UserDefinitionAbstract.php trunk/library/classes/Gems/User/UserDefinitionConfigurableInterface.php trunk/library/classes/Gems/User/UserDefinitionInterface.php trunk/library/classes/Gems/User/UserLoader.php trunk/library/classes/Gems/User/UserNewPasswordValidator.php trunk/library/classes/Gems/User/UserPasswordValidator.php trunk/library/classes/Gems/Util/LockFile.php trunk/library/classes/Gems/Util/ReceptionCode.php trunk/library/classes/Gems/Util/ReceptionCodeLibrary.php Property Changed: ---------------- trunk/library/classes/Gems/Auth/Adapter/Callback.php trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php trunk/library/classes/Gems/Default/ExportAction.php trunk/library/classes/Gems/Default/MailJobAction.php trunk/library/classes/Gems/Default/MailLogAction.php trunk/library/classes/Gems/Default/UpgradeAction.php trunk/library/classes/Gems/Menu/ParameterCollector.php trunk/library/classes/Gems/Model/OrganizationModel.php trunk/library/classes/Gems/Model/StaffModel.php trunk/library/classes/Gems/Project/ProjectSettings.php trunk/library/classes/Gems/Registry/CachedArrayTargetAbstract.php trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php trunk/library/classes/Gems/Upgrades.php trunk/library/classes/Gems/UpgradesAbstract.php trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php trunk/library/classes/Gems/User/NoLoginDefinition.php trunk/library/classes/Gems/User/OldStaffUserDefinition.php trunk/library/classes/Gems/User/Organization.php trunk/library/classes/Gems/User/PasswordChecker.php trunk/library/classes/Gems/User/ProjectUserDefinition.php trunk/library/classes/Gems/User/RespondentUserDefinition.php trunk/library/classes/Gems/User/StaffUserDefinition.php trunk/library/classes/Gems/User/User.php trunk/library/classes/Gems/User/UserDefinitionAbstract.php trunk/library/classes/Gems/User/UserDefinitionConfigurableInterface.php trunk/library/classes/Gems/User/UserDefinitionInterface.php trunk/library/classes/Gems/User/UserLoader.php trunk/library/classes/Gems/User/UserNewPasswordValidator.php trunk/library/classes/Gems/User/UserPasswordValidator.php trunk/library/classes/Gems/Util/LockFile.php trunk/library/classes/Gems/Util/ReceptionCode.php trunk/library/classes/Gems/Util/ReceptionCodeLibrary.php Modified: trunk/library/classes/Gems/Auth/Adapter/Callback.php =================================================================== --- trunk/library/classes/Gems/Auth/Adapter/Callback.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Auth/Adapter/Callback.php 2011-12-19 09:27:19 UTC (rev 370) @@ -25,26 +25,21 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * Short description of file - * * @package Gems * @subpackage Auth * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 215 2011-07-12 08:52:54Z michiel $ + * @version $Id$ */ /** - * Short description for Callback + * A wrapper to use any valid callback for authentication * - * Long description for class Callback (if any)... - * * @package Gems * @subpackage Auth * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @since Class available since version 1.0 - * @deprecated Class deprecated since version 2.0 + * @since Class available since version 1.5 */ class Gems_Auth_Adapter_Callback implements Zend_Auth_Adapter_Interface { Property changes on: trunk/library/classes/Gems/Auth/Adapter/Callback.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php =================================================================== --- trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Default/ExportAction.php =================================================================== --- trunk/library/classes/Gems/Default/ExportAction.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Default/ExportAction.php 2011-12-19 09:27:19 UTC (rev 370) @@ -30,7 +30,7 @@ * @subpackage Default * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: DatabaseAction.php 28 2011-09-16 06:24:15Z mennodekker $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Default/ExportAction.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Default/MailJobAction.php =================================================================== --- trunk/library/classes/Gems/Default/MailJobAction.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Default/MailJobAction.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Default/MailJobAction.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Default/MailLogAction.php =================================================================== --- trunk/library/classes/Gems/Default/MailLogAction.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Default/MailLogAction.php 2011-12-19 09:27:19 UTC (rev 370) @@ -33,7 +33,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Default/MailLogAction.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Default/UpgradeAction.php =================================================================== --- trunk/library/classes/Gems/Default/UpgradeAction.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Default/UpgradeAction.php 2011-12-19 09:27:19 UTC (rev 370) @@ -29,7 +29,7 @@ * @subpackage Default * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 215 2011-07-12 08:52:54Z michiel $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Default/UpgradeAction.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Menu/ParameterCollector.php =================================================================== --- trunk/library/classes/Gems/Menu/ParameterCollector.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Menu/ParameterCollector.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Menu/ParameterCollector.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Model/OrganizationModel.php =================================================================== --- trunk/library/classes/Gems/Model/OrganizationModel.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Model/OrganizationModel.php 2011-12-19 09:27:19 UTC (rev 370) @@ -31,7 +31,7 @@ * @subpackage Model * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 215 2011-07-12 08:52:54Z michiel $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Model/OrganizationModel.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Model/StaffModel.php =================================================================== --- trunk/library/classes/Gems/Model/StaffModel.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Model/StaffModel.php 2011-12-19 09:27:19 UTC (rev 370) @@ -31,7 +31,7 @@ * @subpackage Model * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 215 2011-07-12 08:52:54Z michiel $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Model/StaffModel.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Property changes on: trunk/library/classes/Gems/Project/ProjectSettings.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Registry/CachedArrayTargetAbstract.php =================================================================== --- trunk/library/classes/Gems/Registry/CachedArrayTargetAbstract.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Registry/CachedArrayTargetAbstract.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Registry/CachedArrayTargetAbstract.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php =================================================================== --- trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php 2011-12-19 09:27:19 UTC (rev 370) @@ -31,7 +31,7 @@ * @subpackage Snippets * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 215 2011-07-12 08:52:54Z michiel $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Snippets/ModelTabFormSnippetGeneric.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php =================================================================== --- trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: AnswerModelSnippet.php 28 2011-09-16 06:24:15Z mennodekker $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Upgrades.php =================================================================== --- trunk/library/classes/Gems/Upgrades.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Upgrades.php 2011-12-19 09:27:19 UTC (rev 370) @@ -31,7 +31,7 @@ * @subpackage Upgrades * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 215 2011-07-12 08:52:54Z michiel $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Upgrades.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/UpgradesAbstract.php =================================================================== --- trunk/library/classes/Gems/UpgradesAbstract.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/UpgradesAbstract.php 2011-12-19 09:27:19 UTC (rev 370) @@ -29,7 +29,7 @@ * @subpackage Upgrades * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 215 2011-07-12 08:52:54Z michiel $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/UpgradesAbstract.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php =================================================================== --- trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/NoLoginDefinition.php =================================================================== --- trunk/library/classes/Gems/User/NoLoginDefinition.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/NoLoginDefinition.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/NoLoginDefinition.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/OldStaffUserDefinition.php =================================================================== --- trunk/library/classes/Gems/User/OldStaffUserDefinition.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/OldStaffUserDefinition.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/OldStaffUserDefinition.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Property changes on: trunk/library/classes/Gems/User/Organization.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/PasswordChecker.php =================================================================== --- trunk/library/classes/Gems/User/PasswordChecker.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/PasswordChecker.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/PasswordChecker.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/ProjectUserDefinition.php =================================================================== --- trunk/library/classes/Gems/User/ProjectUserDefinition.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/ProjectUserDefinition.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/ProjectUserDefinition.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/RespondentUserDefinition.php =================================================================== --- trunk/library/classes/Gems/User/RespondentUserDefinition.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/RespondentUserDefinition.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/RespondentUserDefinition.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/StaffUserDefinition.php =================================================================== --- trunk/library/classes/Gems/User/StaffUserDefinition.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/StaffUserDefinition.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/StaffUserDefinition.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/User.php =================================================================== --- trunk/library/classes/Gems/User/User.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/User.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/User.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/UserDefinitionAbstract.php =================================================================== --- trunk/library/classes/Gems/User/UserDefinitionAbstract.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/UserDefinitionAbstract.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/UserDefinitionAbstract.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/UserDefinitionConfigurableInterface.php =================================================================== --- trunk/library/classes/Gems/User/UserDefinitionConfigurableInterface.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/UserDefinitionConfigurableInterface.php 2011-12-19 09:27:19 UTC (rev 370) @@ -31,7 +31,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/UserDefinitionConfigurableInterface.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/UserDefinitionInterface.php =================================================================== --- trunk/library/classes/Gems/User/UserDefinitionInterface.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/UserDefinitionInterface.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/UserDefinitionInterface.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/UserLoader.php =================================================================== --- trunk/library/classes/Gems/User/UserLoader.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/UserLoader.php 2011-12-19 09:27:19 UTC (rev 370) @@ -31,7 +31,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/UserLoader.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/UserNewPasswordValidator.php =================================================================== --- trunk/library/classes/Gems/User/UserNewPasswordValidator.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/UserNewPasswordValidator.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/UserNewPasswordValidator.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/User/UserPasswordValidator.php =================================================================== --- trunk/library/classes/Gems/User/UserPasswordValidator.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/User/UserPasswordValidator.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/User/UserPasswordValidator.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Util/LockFile.php =================================================================== --- trunk/library/classes/Gems/Util/LockFile.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Util/LockFile.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Util/LockFile.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Util/ReceptionCode.php =================================================================== --- trunk/library/classes/Gems/Util/ReceptionCode.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Util/ReceptionCode.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Util/ReceptionCode.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Modified: trunk/library/classes/Gems/Util/ReceptionCodeLibrary.php =================================================================== --- trunk/library/classes/Gems/Util/ReceptionCodeLibrary.php 2011-12-19 09:13:07 UTC (rev 369) +++ trunk/library/classes/Gems/Util/ReceptionCodeLibrary.php 2011-12-19 09:27:19 UTC (rev 370) @@ -32,7 +32,7 @@ * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License - * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + * @version $Id$ */ /** Property changes on: trunk/library/classes/Gems/Util/ReceptionCodeLibrary.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-01-23 11:04:10
|
Revision: 415 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=415&view=rev Author: mennodekker Date: 2012-01-23 11:04:04 +0000 (Mon, 23 Jan 2012) Log Message: ----------- Saving on session storage and fixing incompatibility between tracker and token in selection of data that caused problems on deleted respondents Modified Paths: -------------- trunk/library/classes/Gems/Tracker/Token.php trunk/library/classes/Gems/Tracker.php Modified: trunk/library/classes/Gems/Tracker/Token.php =================================================================== --- trunk/library/classes/Gems/Tracker/Token.php 2012-01-23 08:33:00 UTC (rev 414) +++ trunk/library/classes/Gems/Tracker/Token.php 2012-01-23 11:04:04 UTC (rev 415) @@ -1052,7 +1052,7 @@ if (is_array($gemsData)) { $this->_gemsData = $gemsData + $this->_gemsData; } else { - $tokenSelect = $this->tracker->getTokenSelect(true); + $tokenSelect = $this->tracker->getTokenSelect(); $tokenSelect ->andReceptionCodes() Modified: trunk/library/classes/Gems/Tracker.php =================================================================== --- trunk/library/classes/Gems/Tracker.php 2012-01-23 08:33:00 UTC (rev 414) +++ trunk/library/classes/Gems/Tracker.php 2012-01-23 11:04:04 UTC (rev 415) @@ -845,7 +845,7 @@ $tokenRows = $tokenSelect->fetchAll(); foreach ($tokenRows as $tokenData) { - $batch->addToken($tokenData, $userId); + $batch->addToken($tokenData['gto_id_token'], $userId); } } @@ -867,7 +867,10 @@ { $userId = $this->_checkUserId($userId); $tokenSelect = $this->getTokenSelect(); - $tokenSelect->andReceptionCodes(); + $tokenSelect->andReceptionCodes() + ->andRespondents() + ->andRespondentOrganizations() + ->andConsents(); if ($cond) { $tokenSelect->forWhere($cond); } @@ -896,7 +899,10 @@ { $userId = $this->_checkUserId($userId); $tokenSelect = $this->getTokenSelect(); - $tokenSelect->andReceptionCodes(); + $tokenSelect->andReceptionCodes() + ->andRespondents() + ->andRespondentOrganizations() + ->andConsents(); if ($cond) { $tokenSelect->forWhere($cond); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-03-01 12:05:34
|
Revision: 524 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=524&view=rev Author: mennodekker Date: 2012-03-01 12:05:22 +0000 (Thu, 01 Mar 2012) Log Message: ----------- Fixing loader problem where no new task was created after the first one + some cleanup Modified Paths: -------------- trunk/library/classes/Gems/Loader.php trunk/library/classes/Gems/Task/TaskRunnerBatch.php trunk/library/classes/Gems/Upgrades.php trunk/library/classes/Gems/UpgradesAbstract.php Modified: trunk/library/classes/Gems/Loader.php =================================================================== --- trunk/library/classes/Gems/Loader.php 2012-03-01 10:53:11 UTC (rev 523) +++ trunk/library/classes/Gems/Loader.php 2012-03-01 12:05:22 UTC (rev 524) @@ -206,7 +206,7 @@ * @return Gems_Task_TaskAbstract */ public function getTask($name) { - return $this->_getClass('task', 'Task_' . ucfirst($name)); + return $this->_loadClass('Task_' . ucfirst($name), true); } /** Modified: trunk/library/classes/Gems/Task/TaskRunnerBatch.php =================================================================== --- trunk/library/classes/Gems/Task/TaskRunnerBatch.php 2012-03-01 10:53:11 UTC (rev 523) +++ trunk/library/classes/Gems/Task/TaskRunnerBatch.php 2012-03-01 12:05:22 UTC (rev 524) @@ -71,6 +71,7 @@ public function addMessage($text) { parent::addMessage($text); + return $this; } /** @@ -120,7 +121,8 @@ */ public function setMessage($id, $text) { - return parent::setMessage($id, $text); + parent::setMessage($id, $text); + return $this; } /** Modified: trunk/library/classes/Gems/Upgrades.php =================================================================== --- trunk/library/classes/Gems/Upgrades.php 2012-03-01 10:53:11 UTC (rev 523) +++ trunk/library/classes/Gems/Upgrades.php 2012-03-01 12:05:22 UTC (rev 524) @@ -72,20 +72,17 @@ $this->_batch->addTask('CreateNewTables'); - $this->addMessage($this->_('Syncing surveys for all sources')); + $this->_batch->addTask('Echo', $this->_('Syncing surveys for all sources')); + //Now sync the db sources to allow limesurvey source to add a field to the tokentable $model = new MUtil_Model_TableModel('gems__sources'); $data = $model->load(false); - $tracker = $this->loader->getTracker(); - foreach ($data as $row) { $this->_batch->addTask('SourceSyncSurveys', $row['gso_id_source']); } - $this->invalidateCache(); - return true; } Modified: trunk/library/classes/Gems/UpgradesAbstract.php =================================================================== --- trunk/library/classes/Gems/UpgradesAbstract.php 2012-03-01 10:53:11 UTC (rev 523) +++ trunk/library/classes/Gems/UpgradesAbstract.php 2012-03-01 12:05:22 UTC (rev 524) @@ -69,11 +69,6 @@ public $db; /** - * @var Gems_Model_DbaModel - */ - public $dbaModel; - - /** * @var GemsEscort */ public $escort; @@ -84,12 +79,6 @@ public $loader; /** - * - * @var Gems_Util_DatabasePatcher - */ - public $patcher; - - /** * @var Gems_Project_ProjectSettings */ public $project; @@ -130,33 +119,10 @@ */ protected function addMessage($message) { - $this->_messages[] = $message; + $this->_batch->addMessage($message); } - /** - * Now we have the requests answered, add the DatabasePatcher as it needs the db object - * - * @return boolean - */ - public function checkRegistryRequestsAnswers() { - //As an upgrade almost always includes executing db patches, make a DatabasePatcher object available - $this->patcher = new Gems_Util_DatabasePatcher($this->db, 'patches.sql', $this->escort->getDatabasePaths()); - //Now load all patches, and save the resulting changed patches for later (not used yet) - $changed = $this->patcher->uploadPatches($this->loader->getVersions()->getBuild()); - - //Load the dbaModel - $paths = $this->escort->getDatabasePaths(); - $model = new Gems_Model_DbaModel($this->db, array_values($paths)); - $model->setLocations(array_keys($paths)); - if ($this->project->databaseFileEncoding) { - $model->setFileEncoding($this->project->databaseFileEncoding); - } - $this->dbaModel = $model; - - return true; - } - - /** + /** * Reset the message stack */ protected function clearMessages() @@ -165,29 +131,6 @@ } /** - * Create all new tables according to the dba model - */ - protected function createNewTables() - { - //Now create all new tables - $todo = $this->dbaModel->load(array('state'=> Gems_Model_DbaModel::STATE_DEFINED)); - $i = 1; - $oCount = count($todo); - $results = array(); - foreach($todo as $tableData) { - $result = $this->dbaModel->runScript($tableData); - $results = array_merge($results, $result); - $results[] = sprintf($this->_('Finished %s creation script for object %d of %d'), $this->_(strtolower($tableData['type'])), $i, $oCount) . '<br/>'; - $i++; - } - - foreach ($results as $result) - { - $this->addMessage($result); - } - } - - /** * Execute upgrades for the given $context * * When no $to or $from are given, the given $context will be upgraded from the current level @@ -226,7 +169,6 @@ $this->addMessage(sprintf($this->_('Trying upgrade for %s to level %s: %s'), $context, $level, $this->_upgradeStack[$context][$level]['info'])); if (call_user_func($upgrade['upgrade'])) { $success = $level; - $this->addMessage('OK'); } else { $this->addMessage('FAILED'); break; @@ -373,19 +315,6 @@ } /** - * Convenience method for cleaning the cache as this is often needed during - * upgrades - */ - public function invalidateCache() - { - $cache = $this->escort->cache; - if ($cache instanceof Zend_Cache_Core) { - $cache->clean(); - $this->addMessage($this->_('Cache cleaned')); - } - } - - /** * Register an upgrade in the stack, it can be executed by using $this->execute * * Index and context are optional and will be generated when omitted. For the This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-03-01 12:08:39
|
Revision: 525 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=525&view=rev Author: mennodekker Date: 2012-03-01 12:08:30 +0000 (Thu, 01 Mar 2012) Log Message: ----------- Moving to a better directory structure Modified Paths: -------------- trunk/library/classes/Gems/Upgrades.php Added Paths: ----------- trunk/library/classes/Gems/Task/Db/ trunk/library/classes/Gems/Task/Db/CreateNewTable.php trunk/library/classes/Gems/Task/Db/CreateNewTables.php Removed Paths: ------------- trunk/library/classes/Gems/Task/CreateNewTable.php trunk/library/classes/Gems/Task/CreateNewTables.php Deleted: trunk/library/classes/Gems/Task/CreateNewTable.php =================================================================== --- trunk/library/classes/Gems/Task/CreateNewTable.php 2012-03-01 12:05:22 UTC (rev 524) +++ trunk/library/classes/Gems/Task/CreateNewTable.php 2012-03-01 12:08:30 UTC (rev 525) @@ -1,104 +0,0 @@ -<?php -/** - * Copyright (c) 2011, Erasmus MC - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Erasmus MC nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * @package Gems - * @subpackage Task - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @version $Id: CheckTokenCompletion.php 502 2012-02-20 14:13:20Z mennodekker $ - */ - -/** - * Create a single new table - * - * Cleans the cache when a new tables was created - * - * @package Gems - * @subpackage Task - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @since Class available since version 1.6 - */ -class Gems_Task_CreateNewTable extends Gems_Task_TaskAbstract -{ - /** - * @var Zend_Db_Adapter_Abstract - */ - public $db; - - /** - * @var Gems_Model_DbaModel - */ - public $dbaModel; - - /** - * @var GemsEscort - */ - public $escort; - - /** - * @var Gems_Project_ProjectSettings - */ - public $project; - - public function execute($tableData = array()) - { - $this->_batch->addToCounter('createTableStep'); - - $result = $this->dbaModel->runScript($tableData); - $result[] = sprintf($this->translate->_('Finished %s creation script for object %d of %d'), $this->translate->_(strtolower($tableData['type'])), $this->_batch->getCounter('createTableStep'), $this->_batch->getCounter('NewTableCount')) . '<br/>'; - - if (count($result)>0) { - foreach ($result as $result) - { - $this->_batch->addMessage($result); - } - //Perform a clean cache only when needed - $this->_batch->setTask('CleanCache', 'cleancache'); //If already scheduled, don't reschedule - } - } - - /** - * Now we have the requests answered, add the DatabasePatcher as it needs the db object - * - * @return boolean - */ - public function checkRegistryRequestsAnswers() { - $this->escort = GemsEscort::getInstance(); - - //Load the dbaModel - $paths = $this->escort->getDatabasePaths(); - $model = new Gems_Model_DbaModel($this->db, array_values($paths)); - $model->setLocations(array_keys($paths)); - if ($this->project->databaseFileEncoding) { - $model->setFileEncoding($this->project->databaseFileEncoding); - } - $this->dbaModel = $model; - - return true; - } -} \ No newline at end of file Deleted: trunk/library/classes/Gems/Task/CreateNewTables.php =================================================================== --- trunk/library/classes/Gems/Task/CreateNewTables.php 2012-03-01 12:05:22 UTC (rev 524) +++ trunk/library/classes/Gems/Task/CreateNewTables.php 2012-03-01 12:08:30 UTC (rev 525) @@ -1,96 +0,0 @@ -<?php -/** - * Copyright (c) 2011, Erasmus MC - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Erasmus MC nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * @package Gems - * @subpackage Task - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @version $Id: CheckTokenCompletion.php 502 2012-02-20 14:13:20Z mennodekker $ - */ - -/** - * Schedules creation of new tables - * - * @package Gems - * @subpackage Task - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @since Class available since version 1.6 - */ -class Gems_Task_CreateNewTables extends Gems_Task_TaskAbstract -{ - /** - * @var Zend_Db_Adapter_Abstract - */ - public $db; - - /** - * @var Gems_Model_DbaModel - */ - public $dbaModel; - - /** - * @var GemsEscort - */ - public $escort; - - /** - * @var Gems_Project_ProjectSettings - */ - public $project; - - public function execute() - { - //Now create all new tables - $todo = $this->dbaModel->load(array('state'=> Gems_Model_DbaModel::STATE_DEFINED)); - - foreach($todo as $tableData) { - $this->_batch->addToCounter('NewTableCount'); - $this->_batch->setTask('CreateNewTable', 'create-tbl-' . $tableData['name'], $tableData); - } - } - - /** - * Now we have the requests answered, add the DatabasePatcher as it needs the db object - * - * @return boolean - */ - public function checkRegistryRequestsAnswers() { - $this->escort = GemsEscort::getInstance(); - - //Load the dbaModel - $paths = $this->escort->getDatabasePaths(); - $model = new Gems_Model_DbaModel($this->db, array_values($paths)); - $model->setLocations(array_keys($paths)); - if ($this->project->databaseFileEncoding) { - $model->setFileEncoding($this->project->databaseFileEncoding); - } - $this->dbaModel = $model; - - return true; - } -} \ No newline at end of file Added: trunk/library/classes/Gems/Task/Db/CreateNewTable.php =================================================================== --- trunk/library/classes/Gems/Task/Db/CreateNewTable.php (rev 0) +++ trunk/library/classes/Gems/Task/Db/CreateNewTable.php 2012-03-01 12:08:30 UTC (rev 525) @@ -0,0 +1,104 @@ +<?php +/** + * Copyright (c) 2011, Erasmus MC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Erasmus MC nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * @package Gems + * @subpackage Task + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: CheckTokenCompletion.php 502 2012-02-20 14:13:20Z mennodekker $ + */ + +/** + * Create a single new table + * + * Cleans the cache when a new tables was created + * + * @package Gems + * @subpackage Task + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.6 + */ +class Gems_Task_Db_CreateNewTable extends Gems_Task_TaskAbstract +{ + /** + * @var Zend_Db_Adapter_Abstract + */ + public $db; + + /** + * @var Gems_Model_DbaModel + */ + public $dbaModel; + + /** + * @var GemsEscort + */ + public $escort; + + /** + * @var Gems_Project_ProjectSettings + */ + public $project; + + public function execute($tableData = array()) + { + $this->_batch->addToCounter('createTableStep'); + + $result = $this->dbaModel->runScript($tableData); + $result[] = sprintf($this->translate->_('Finished %s creation script for object %d of %d'), $this->translate->_(strtolower($tableData['type'])), $this->_batch->getCounter('createTableStep'), $this->_batch->getCounter('NewTableCount')) . '<br/>'; + + if (count($result)>0) { + foreach ($result as $result) + { + $this->_batch->addMessage($result); + } + //Perform a clean cache only when needed + $this->_batch->setTask('CleanCache', 'cleancache'); //If already scheduled, don't reschedule + } + } + + /** + * Now we have the requests answered, add the DatabasePatcher as it needs the db object + * + * @return boolean + */ + public function checkRegistryRequestsAnswers() { + $this->escort = GemsEscort::getInstance(); + + //Load the dbaModel + $paths = $this->escort->getDatabasePaths(); + $model = new Gems_Model_DbaModel($this->db, array_values($paths)); + $model->setLocations(array_keys($paths)); + if ($this->project->databaseFileEncoding) { + $model->setFileEncoding($this->project->databaseFileEncoding); + } + $this->dbaModel = $model; + + return true; + } +} \ No newline at end of file Added: trunk/library/classes/Gems/Task/Db/CreateNewTables.php =================================================================== --- trunk/library/classes/Gems/Task/Db/CreateNewTables.php (rev 0) +++ trunk/library/classes/Gems/Task/Db/CreateNewTables.php 2012-03-01 12:08:30 UTC (rev 525) @@ -0,0 +1,96 @@ +<?php +/** + * Copyright (c) 2011, Erasmus MC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Erasmus MC nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * @package Gems + * @subpackage Task + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: CheckTokenCompletion.php 502 2012-02-20 14:13:20Z mennodekker $ + */ + +/** + * Schedules creation of new tables + * + * @package Gems + * @subpackage Task + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.6 + */ +class Gems_Task_Db_CreateNewTables extends Gems_Task_TaskAbstract +{ + /** + * @var Zend_Db_Adapter_Abstract + */ + public $db; + + /** + * @var Gems_Model_DbaModel + */ + public $dbaModel; + + /** + * @var GemsEscort + */ + public $escort; + + /** + * @var Gems_Project_ProjectSettings + */ + public $project; + + public function execute() + { + //Now create all new tables + $todo = $this->dbaModel->load(array('state'=> Gems_Model_DbaModel::STATE_DEFINED)); + + foreach($todo as $tableData) { + $this->_batch->addToCounter('NewTableCount'); + $this->_batch->setTask('Db_CreateNewTable', 'create-tbl-' . $tableData['name'], $tableData); + } + } + + /** + * Now we have the requests answered, add the DatabasePatcher as it needs the db object + * + * @return boolean + */ + public function checkRegistryRequestsAnswers() { + $this->escort = GemsEscort::getInstance(); + + //Load the dbaModel + $paths = $this->escort->getDatabasePaths(); + $model = new Gems_Model_DbaModel($this->db, array_values($paths)); + $model->setLocations(array_keys($paths)); + if ($this->project->databaseFileEncoding) { + $model->setFileEncoding($this->project->databaseFileEncoding); + } + $this->dbaModel = $model; + + return true; + } +} \ No newline at end of file Modified: trunk/library/classes/Gems/Upgrades.php =================================================================== --- trunk/library/classes/Gems/Upgrades.php 2012-03-01 12:05:22 UTC (rev 524) +++ trunk/library/classes/Gems/Upgrades.php 2012-03-01 12:08:30 UTC (rev 525) @@ -70,7 +70,7 @@ $this->_batch->addTask('ExecutePatch', 42); $this->_batch->addTask('ExecutePatch', 43); - $this->_batch->addTask('CreateNewTables'); + $this->_batch->addTask('Db_CreateNewTables'); $this->_batch->addTask('Echo', $this->_('Syncing surveys for all sources')); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-04-19 10:57:52
|
Revision: 623 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=623&view=rev Author: matijsdejong Date: 2012-04-19 10:57:42 +0000 (Thu, 19 Apr 2012) Log Message: ----------- User gets clearer message from program after changing an item (if specified at action level) Modified Paths: -------------- trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php trunk/library/classes/Gems/Snippets/ModelFormSnippetAbstract.php Modified: trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php =================================================================== --- trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php 2012-04-18 12:53:21 UTC (rev 622) +++ trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php 2012-04-19 10:57:42 UTC (rev 623) @@ -139,7 +139,8 @@ */ public function createAction() { - $this->createEditParameters['formTitle'] = $this->getCreateTitle(); + $this->createEditParameters['formTitle'] = $this->getCreateTitle(); + $this->createEditParameters['topicCallable'] = array($this, 'getTopic'); parent::createAction(); } @@ -160,7 +161,8 @@ */ public function editAction() { - $this->createEditParameters['formTitle'] = $this->getEditTitle(); + $this->createEditParameters['formTitle'] = $this->getEditTitle(); + $this->createEditParameters['topicCallable'] = array($this, 'getTopic'); parent::editAction(); } Modified: trunk/library/classes/Gems/Snippets/ModelFormSnippetAbstract.php =================================================================== --- trunk/library/classes/Gems/Snippets/ModelFormSnippetAbstract.php 2012-04-18 12:53:21 UTC (rev 622) +++ trunk/library/classes/Gems/Snippets/ModelFormSnippetAbstract.php 2012-04-19 10:57:42 UTC (rev 623) @@ -71,6 +71,13 @@ protected $formTitle; /** + * When set getTopic uses this function instead of parent class. + * + * @var callable + */ + protected $topicCallable; + + /** * Required * * @var Gems_Menu @@ -181,4 +188,19 @@ return sprintf($this->_('Edit %s'), $this->getTopic()); } } + + /** + * Helper function to allow generalized statements about the items in the model to used specific item names. + * + * @param int $count + * @return $string + */ + public function getTopic($count = 1) + { + if (is_callable($this->topicCallable)) { + return call_user_func($this->topicCallable, $count); + } else { + return parent::getTopic($count); + } + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-05-07 09:14:08
|
Revision: 671 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=671&view=rev Author: mennodekker Date: 2012-05-07 09:13:59 +0000 (Mon, 07 May 2012) Log Message: ----------- Allow to set organization max lines from the index controller again, and show at most maxlines, but less if there are less organizations Modified Paths: -------------- trunk/library/classes/Gems/Default/IndexAction.php trunk/library/classes/Gems/User/Form/OrganizationFormAbstract.php Modified: trunk/library/classes/Gems/Default/IndexAction.php =================================================================== --- trunk/library/classes/Gems/Default/IndexAction.php 2012-05-04 12:49:48 UTC (rev 670) +++ trunk/library/classes/Gems/Default/IndexAction.php 2012-05-07 09:13:59 UTC (rev 671) @@ -103,6 +103,7 @@ 'showToken' => $this->showTokenButton, 'showPasswordLost' => $this->showPasswordLostButton, 'labelWidthFactor' => $this->labelWidthFactor, + 'organizationMaxLines' => $this->organizationMaxLines, )); Gems_Html::init(); Modified: trunk/library/classes/Gems/User/Form/OrganizationFormAbstract.php =================================================================== --- trunk/library/classes/Gems/User/Form/OrganizationFormAbstract.php 2012-05-04 12:49:48 UTC (rev 670) +++ trunk/library/classes/Gems/User/Form/OrganizationFormAbstract.php 2012-05-07 09:13:59 UTC (rev 671) @@ -169,7 +169,7 @@ $element->setMultiOptions($orgs); if ($this->organizationMaxLines > 1) { - $element->setAttrib('size', max(count($orgs) + 1, $this->organizationMaxLines)); + $element->setAttrib('size', min(count($orgs) + 1, $this->organizationMaxLines)); } $this->addElement($element); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-05-07 12:25:30
|
Revision: 674 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=674&view=rev Author: matijsdejong Date: 2012-05-07 12:03:15 +0000 (Mon, 07 May 2012) Log Message: ----------- Commented change #667 out: did not work when parent class was loaded through constant declaration Other changes concern whitespace and unused parameter Modified Paths: -------------- trunk/library/classes/Gems/Default/RespondentAction.php trunk/library/classes/Gems/Loader/LoaderAbstract.php trunk/library/classes/Gems/User/UserLoader.php Modified: trunk/library/classes/Gems/Default/RespondentAction.php =================================================================== --- trunk/library/classes/Gems/Default/RespondentAction.php 2012-05-07 11:51:02 UTC (rev 673) +++ trunk/library/classes/Gems/Default/RespondentAction.php 2012-05-07 12:03:15 UTC (rev 674) @@ -200,7 +200,7 @@ */ public function createModel($detailed, $action) { - $model = $this->loader->getModels()->getRespondentModel($detailed, $action); + $model = $this->loader->getModels()->getRespondentModel($detailed); if ($detailed) { $model->set('gr2o_comments', 'label', $this->_('Comments')); Modified: trunk/library/classes/Gems/Loader/LoaderAbstract.php =================================================================== --- trunk/library/classes/Gems/Loader/LoaderAbstract.php 2012-05-07 11:51:02 UTC (rev 673) +++ trunk/library/classes/Gems/Loader/LoaderAbstract.php 2012-05-07 12:03:15 UTC (rev 674) @@ -159,15 +159,14 @@ /** * First check if the class was already loaded with one of the prefixes * If so, we don't have to try loading from the other paths - */ + * / foreach ($this->_dirs as $prefix => $path) { if (class_exists($prefix.$cname, false) && $obj = $this->_loadClassPath('', $prefix . $cname, $create, $arguments)) { $found = true; break; } - } + } // */ - if (!$found) { foreach ($this->_dirs as $prefix => $path) { $fprefix = str_replace('_', '/', $prefix); Modified: trunk/library/classes/Gems/User/UserLoader.php =================================================================== --- trunk/library/classes/Gems/User/UserLoader.php 2012-05-07 11:51:02 UTC (rev 673) +++ trunk/library/classes/Gems/User/UserLoader.php 2012-05-07 12:03:15 UTC (rev 674) @@ -491,7 +491,7 @@ if ($this->isProjectUser($login_name)) { return $this->loadUser(self::USER_PROJECT, $organization, $login_name); } - + if ((null == $login_name) || (null == $organization)) { return $this->loadUser(self::USER_NOLOGIN, $organization, $login_name); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-05-31 13:55:30
|
Revision: 720 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=720&view=rev Author: michieltcs Date: 2012-05-31 13:55:24 +0000 (Thu, 31 May 2012) Log Message: ----------- Allow export from respondent page (probably needs refactoring) Modified Paths: -------------- trunk/library/classes/Gems/Default/RespondentAction.php trunk/library/classes/Gems/Default/RespondentExportAction.php trunk/library/classes/Gems/Menu.php Modified: trunk/library/classes/Gems/Default/RespondentAction.php =================================================================== --- trunk/library/classes/Gems/Default/RespondentAction.php 2012-05-31 13:44:35 UTC (rev 719) +++ trunk/library/classes/Gems/Default/RespondentAction.php 2012-05-31 13:55:24 UTC (rev 720) @@ -414,4 +414,9 @@ $params['respondentData'] = $data; $this->addSnippets($this->showSnippets, $params); } + + public function exportAction() + { + $this->_reroute(array('controller' => 'respondent-export', 'action' => 'index')); + } } Modified: trunk/library/classes/Gems/Default/RespondentExportAction.php =================================================================== --- trunk/library/classes/Gems/Default/RespondentExportAction.php 2012-05-31 13:44:35 UTC (rev 719) +++ trunk/library/classes/Gems/Default/RespondentExportAction.php 2012-05-31 13:55:24 UTC (rev 720) @@ -70,7 +70,7 @@ $form = new Gems_Form_TableForm(); $form->setAttrib('target', '_blank'); - $element = new Zend_Form_Element_Text('respondentId'); + $element = new Zend_Form_Element_Text('id'); $element->setLabel($this->_('Respondent number')); $form->addElement($element); @@ -333,10 +333,10 @@ $request = $this->getRequest(); + $form->populate($request->getParams()); + if ($request->isPost()) { - $form->populate($request->getPost()); - - $respondentId = $request->getParam('respondentId'); + $respondentId = $request->getParam('id'); if (!empty($respondentId)) { $this->_render($respondentId); Modified: trunk/library/classes/Gems/Menu.php =================================================================== --- trunk/library/classes/Gems/Menu.php 2012-05-31 13:44:35 UTC (rev 719) +++ trunk/library/classes/Gems/Menu.php 2012-05-31 13:55:24 UTC (rev 720) @@ -277,6 +277,7 @@ */ $page->addEditAction('pr.respondent.edit')->addNamedParameters(MUtil_Model::REQUEST_ID, 'gr2o_patient_nr'); + $page->addAction('Export', 'pr.export-html', 'export')->addNamedParameters(MUtil_Model::REQUEST_ID, 'gr2o_patient_nr'); if ($this->escort instanceof Gems_Project_Tracks_SingleTrackInterface) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-06-07 15:54:14
|
Revision: 747 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=747&view=rev Author: matijsdejong Date: 2012-06-07 15:54:06 +0000 (Thu, 07 Jun 2012) Log Message: ----------- TrackRounds checking now done through BatchRunner Still working on the messages though Modified Paths: -------------- trunk/library/classes/Gems/Default/TrackMaintenanceAction.php trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php trunk/library/classes/Gems/Tracker/Engine/TrackEngineInterface.php trunk/library/classes/Gems/Tracker/RespondentTrack.php trunk/library/classes/Gems/Tracker/TrackerInterface.php trunk/library/classes/Gems/Tracker.php Added Paths: ----------- trunk/library/classes/Gems/Task/Tracker/CheckTrackRounds.php Modified: trunk/library/classes/Gems/Default/TrackMaintenanceAction.php =================================================================== --- trunk/library/classes/Gems/Default/TrackMaintenanceAction.php 2012-06-07 14:32:08 UTC (rev 746) +++ trunk/library/classes/Gems/Default/TrackMaintenanceAction.php 2012-06-07 15:54:06 UTC (rev 747) @@ -149,45 +149,27 @@ return true; } + /** + * Action for checking all assigned rounds using a batch + */ public function checkAllAction() { - $model = $this->getModel(); - $data = $model->load(null, $this->sortKey); - - if ($this->_getParam('confirmed')) { - $this->checkTrack(); - $this->afterSaveRoute($this->getRequest()); - } - - $this->addMessage($this->_('This may take a while!')); - $this->html->h3($this->_('Check all tracks')); - $this->html->pInfo($this->_('Checking all tracks will update all existing rounds to the current surveys in the tracks instead of those in use when the track was created.')); - $this->html->pInfo($this->_('Completed tracks will not be changed. No new tokens will be created when later tokens were completed.')); - if ($data) { - $rdata = MUtil_Lazy::repeat($data); - $table = $this->html->table($rdata, array('class' => 'browser')); - $table->th($this->getTopicTitle()); - $table->td()->a(array('action' => 'show', MUtil_Model::REQUEST_ID => $rdata->gtr_id_track), $rdata->gtr_track_name); - - $this->html->h4('Are you sure you want to check all tracks?'); - $this->html->actionLink(array('confirmed' => 1), $this->_('Yes')); - $this->html->actionLink(array('action' => 'index'), $this->_('No')); - } else { - $this->html->pInfo(sprintf($this->_('No %s found'), $this->getTopic(0))); - } - $this->html->actionLink(array('action' => 'index'), $this->_('Cancel')); + $batch = $this->loader->getTracker()->checkTrackRoundsBatch('trackCheckRoundsAll', $this->loader->getCurrentUser()->getUserId()); + $this->_helper->BatchRunner($batch, $this->_('Checking round assignments for all tracks.')); } - public function checkTrack($cond = null) - { - $tracker = $this->loader->getTracker(); - $this->addMessage($tracker->checkTrackRounds($this->session->user_id, $cond)); - } - + /** + * Action for checking all assigned rounds for a single track using a batch + */ public function checkTrackAction() { - $this->checkTrack($this->db->quoteInto('gr2t_id_track = ?', $this->_getIdParam())); - $this->afterSaveRoute($this->getRequest()); + $id = $this->_getIdParam(); + $track = $this->loader->getTracker()->getTrackEngine($id); + $where = $this->db->quoteInto('gr2t_id_track = ?', $id); + $batch = $this->loader->getTracker()->checkTrackRoundsBatch('trackCheckRounds' . $id, $this->loader->getCurrentUser()->getUserId(), $where); + + $title = sprintf($this->_("Checking round assignments for track '%s'."), $track->getTrackName()); + $this->_helper->BatchRunner($batch, $title); } public function createAction() Added: trunk/library/classes/Gems/Task/Tracker/CheckTrackRounds.php =================================================================== --- trunk/library/classes/Gems/Task/Tracker/CheckTrackRounds.php (rev 0) +++ trunk/library/classes/Gems/Task/Tracker/CheckTrackRounds.php 2012-06-07 15:54:06 UTC (rev 747) @@ -0,0 +1,65 @@ +<?php + +/** + * Copyright (c) 2011, Erasmus MC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Erasmus MC nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * @package Gems + * @subpackage TaskTracker + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: CheckTokenCompletion.php 528 2012-03-01 14:06:23Z mennodekker $ + */ + +/** + * Check token completion in a batch job + * + * This task handles the token completion check, adding tasks to the queue + * when needed. + * + * @package Gems + * @subpackage Task_Tracker + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5.5 + */ +class Gems_Task_Tracker_CheckTrackRounds extends Gems_Task_TaskAbstract +{ + /** + * @var Gems_Tracker + */ + public $tracker; + + public function execute($respTrackData = null, $userId = null) + { + $this->tracker = $this->loader->getTracker(); + $respTrack = $this->tracker->getRespondentTrack($respTrackData); + $engine = $respTrack->getTrackEngine(); + + $engine->checkRoundsFor($respTrack, $userId, $this->_batch); + $this->_batch->addToCounter('checkedRespondentTracks'); + } +} \ No newline at end of file Modified: trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php =================================================================== --- trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php 2012-06-07 14:32:08 UTC (rev 746) +++ trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php 2012-06-07 15:54:06 UTC (rev 747) @@ -405,32 +405,25 @@ * * @param Gems_Tracker_RespondentTrack $respTrack The respondent track to check * @param int $userId Id of the user who takes the action (for logging) - * @param Gems_Tracker_ChangeTracker $changes Optional change tracker - * @return Gems_Tracker_ChangeTracker detailed info on changes + * @param Gems_Task_TaskRunnerBatch $changes batch for counters */ - public function checkRoundsFor(Gems_Tracker_RespondentTrack $respTrack, $userId, Gems_Tracker_ChangeTracker $changes = null) + public function checkRoundsFor(Gems_Tracker_RespondentTrack $respTrack, $userId, Gems_Task_TaskRunnerBatch $batch) { - if (null === $changes) { - $changes = new Gems_Tracker_ChangeTracker(); - } - //Step one: update existing tokens - $changes->roundChangeUpdates += $this->checkExistingRoundsFor($respTrack, $userId); + $batch->addToCounter('roundChangeUpdates', $this->checkExistingRoundsFor($respTrack, $userId)); //Step two: deactivate inactive rounds - $changes->deletedTokens += $this->removeInactiveRounds($respTrack, $userId); + $batch->addToCounter('deletedTokens', $this->removeInactiveRounds($respTrack, $userId)); // Step three: create lacking tokens - $changes->createdTokens += $this->addNewTokens($respTrack, $userId); + $batch->addToCounter('createdTokens', $this->addNewTokens($respTrack, $userId)); // Step four: set the dates and times $changed = $this->checkTokensFromStart($respTrack, $userId); if ($changed) { - $changes->tokenDateCauses++; - $changes->tokenDateChanges += $changed; + $batch->addToCounter('tokenDateCauses'); + $batch->addToCounter('tokenDateChanges', $changed); } - - return $changes; } /** Modified: trunk/library/classes/Gems/Tracker/Engine/TrackEngineInterface.php =================================================================== --- trunk/library/classes/Gems/Tracker/Engine/TrackEngineInterface.php 2012-06-07 14:32:08 UTC (rev 746) +++ trunk/library/classes/Gems/Tracker/Engine/TrackEngineInterface.php 2012-06-07 15:54:06 UTC (rev 747) @@ -79,10 +79,9 @@ * * @param Gems_Tracker_RespondentTrack $respTrack The respondent track to check * @param int $userId Id of the user who takes the action (for logging) - * @param Gems_Tracker_ChangeTracker $changes Optional change tracker - * @return Gems_Tracker_ChangeTracker detailed info on changes + * @param Gems_Task_TaskRunnerBatch $changes batch for counters */ - public function checkRoundsFor(Gems_Tracker_RespondentTrack $respTrack, $userId, Gems_Tracker_ChangeTracker $changes = null); + public function checkRoundsFor(Gems_Tracker_RespondentTrack $respTrack, $userId, Gems_Task_TaskRunnerBatch $batch); /** * Check the valid from and until dates in the track starting at a specified token Modified: trunk/library/classes/Gems/Tracker/RespondentTrack.php =================================================================== --- trunk/library/classes/Gems/Tracker/RespondentTrack.php 2012-06-07 14:32:08 UTC (rev 746) +++ trunk/library/classes/Gems/Tracker/RespondentTrack.php 2012-06-07 15:54:06 UTC (rev 747) @@ -318,20 +318,6 @@ } /** - * Check for the existence of all tokens and create them otherwise - * - * @param int $userId Id of the user who takes the action (for logging) - * @param Gems_Tracker_ChangeTracker $changes Optional change tracker - * @return Gems_Tracker_ChangeTracker detailed info on changes - */ - public function checkRounds($userId, Gems_Tracker_ChangeTracker $changes = null) - { - $engine = $this->getTrackEngine(); - - return $engine->checkRoundsFor($this, $userId, $changes); - } - - /** * Check this respondent track for changes to the tokens * * @param int $userId Id of the user who takes the action (for logging) @@ -504,7 +490,7 @@ { return $this->_respTrackData['gr2t_id_organization']; } - + public function getReceptionCode() { return $this->_respTrackData['gr2t_reception_code']; Modified: trunk/library/classes/Gems/Tracker/TrackerInterface.php =================================================================== --- trunk/library/classes/Gems/Tracker/TrackerInterface.php 2012-06-07 14:32:08 UTC (rev 746) +++ trunk/library/classes/Gems/Tracker/TrackerInterface.php 2012-06-07 15:54:06 UTC (rev 747) @@ -53,8 +53,8 @@ * how tokens are created and checked), TokenSelect (Gems_Tracker_Token_TokenSelect * extension) and TokenValidator. * - * Other functions are general utility functions, e.g. checkTrackRounds(), createToken(), - * processCompletedTokens() and recalculateTokensBatch(). + * Other functions are general utility functions, e.g. checkTrackRoundsBatch(), createToken(), + * processCompletedTokensBatch() and recalculateTokensBatch(). * * @package Gems * @subpackage Tracker @@ -62,18 +62,20 @@ * @license New BSD License * @since Class available since version 1.4 */ -interface Gems_Tracker_TrackerInterface { +interface Gems_Tracker_TrackerInterface +{ /** * Checks tracks for changes to the the track and round definitions * and corrects them. * * Does recalculate changed tracks * - * @param int $userId - * @param string $cond - * @return array of translated messages + * @param string $batchId A unique identifier for the current batch + * @param int $userId Id of the user who takes the action (for logging) + * @param string $cond Optional where statement for selecting tracks + * @return Gems_Task_TaskRunnerBatch A batch to process the changes */ - public function checkTrackRounds($userId = null, $cond = null); + public function checkTrackRoundsBatch($batchId, $userId = null, $cond = null); /** * Create a new track for a patient Modified: trunk/library/classes/Gems/Tracker.php =================================================================== --- trunk/library/classes/Gems/Tracker.php 2012-06-07 14:32:08 UTC (rev 746) +++ trunk/library/classes/Gems/Tracker.php 2012-06-07 15:54:06 UTC (rev 747) @@ -47,8 +47,8 @@ * how tokens are created and checked), TokenSelect (Gems_Tracker_Token_TokenSelect * extension) and TokenValidator. * - * Other functions are general utility functions, e.g. checkTrackRounds(), createToken(), - * processCompletedTokens() and recalculateTokensBatch(). + * Other functions are general utility functions, e.g. checkTrackRoundsBatch(), createToken(), + * processCompletedTokensBatch() and recalculateTokensBatch(). * * @package Gems * @subpackage Tracker @@ -194,17 +194,18 @@ * * Does recalculate changed tracks * - * @param int $userId - * @param string $cond - * @return array of translated messages + * @param string $batchId A unique identifier for the current batch + * @param int $userId Id of the user who takes the action (for logging) + * @param string $cond Optional where statement for selecting tracks + * @return Gems_Task_TaskRunnerBatch A batch to process the changes */ - public function checkTrackRounds($userId = null, $cond = null) + public function checkTrackRoundsBatch($batchId, $userId = null, $cond = null) { $userId = $this->_checkUserId($userId); $respTrackSelect = $this->db->select(); - $respTrackSelect->from('gems__respondent2track'); - $respTrackSelect->join('gems__reception_codes', 'gr2t_reception_code = grc_id_reception_code'); - $respTrackSelect->join('gems__tracks', 'gr2t_id_track = gtr_id_track'); + $respTrackSelect->from('gems__respondent2track', array('gr2t_id_respondent_track')); + $respTrackSelect->join('gems__reception_codes', 'gr2t_reception_code = grc_id_reception_code', array()); + $respTrackSelect->join('gems__tracks', 'gr2t_id_track = gtr_id_track', array()); if ($cond) { $respTrackSelect->where($cond); @@ -214,21 +215,21 @@ $respTrackSelect->where('gtr_active = 1'); $respTrackSelect->where('gr2t_count != gr2t_completed'); - self::$verbose = true; + $batch = $this->loader->getTaskRunnerBatch($batchId); + //Now set the step duration + $batch->minimalStepDurationMs = 3000; - $changes = new Gems_Tracker_ChangeTracker(); - $respTracks = $respTrackSelect->query()->fetchAll(); - - foreach ($respTracks as $respTrackData) { - $respTrack = $this->getRespondentTrack($respTrackData); - - $respTrack->checkRounds($userId, $changes); - $changes->checkedRespondentTracks++; - - unset($respTrack); + if (! $batch->isLoaded()) { + $statement = $respTrackSelect->query(); + //Process one item at a time to prevent out of memory errors for really big resultsets + while ($respTrackData = $statement->fetch()) { + $respTrackId = $respTrackData['gr2t_id_respondent_track']; + $batch->setTask('Tracker_CheckTrackRounds', 'trkchk-' . $respTrackId, $respTrackId, $userId); + $batch->addToCounter('resptracks'); + } } - return $changes->getMessages($this->translate); + return $batch; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-06-21 12:08:03
|
Revision: 776 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=776&view=rev Author: mennodekker Date: 2012-06-21 12:07:52 +0000 (Thu, 21 Jun 2012) Log Message: ----------- RespondentExport: sort tracks on start date Modified Paths: -------------- trunk/library/classes/Gems/Default/RespondentAction.php trunk/library/classes/Gems/Tracker/TrackerInterface.php trunk/library/classes/Gems/Tracker.php Modified: trunk/library/classes/Gems/Default/RespondentAction.php =================================================================== --- trunk/library/classes/Gems/Default/RespondentAction.php 2012-06-21 10:00:46 UTC (rev 775) +++ trunk/library/classes/Gems/Default/RespondentAction.php 2012-06-21 12:07:52 UTC (rev 776) @@ -489,7 +489,7 @@ $form->populate($request->getParams()); if ($request->isPost()) { - $export->render((array) $this->getRequest()->getParam('id'), $this->getRequest()->getParam('group'), $this->getRequest()->getParam('format')); + $export->render((array) $data['gr2o_patient_nr'], $this->getRequest()->getParam('group'), $this->getRequest()->getParam('format')); } } } Modified: trunk/library/classes/Gems/Tracker/TrackerInterface.php =================================================================== --- trunk/library/classes/Gems/Tracker/TrackerInterface.php 2012-06-21 10:00:46 UTC (rev 775) +++ trunk/library/classes/Gems/Tracker/TrackerInterface.php 2012-06-21 12:07:52 UTC (rev 776) @@ -130,6 +130,18 @@ * @return Gems_Tracker_RespondentTrack */ public function getRespondentTrack($respTrackData); + + /** + * Get all tracks for a respondent + * + * Specify the optional $order to sort other than on start date + * + * @param int $userId + * @param int $organizationId + * @param mixed $order The column(s) and direction to order by + * @return array of Gems_Tracker_RespondentTrack + */ + public function getRespondentTracks($userId, $organizationId, $order = array('gr2t_start_date')); /** * Load project specific model or general Gems model otherwise Modified: trunk/library/classes/Gems/Tracker.php =================================================================== --- trunk/library/classes/Gems/Tracker.php 2012-06-21 10:00:46 UTC (rev 775) +++ trunk/library/classes/Gems/Tracker.php 2012-06-21 12:07:52 UTC (rev 776) @@ -337,30 +337,9 @@ { return $this->getTokenLibrary()->filter($tokenId); } - + /** * - * @param int $userId - * @param int $organizationId - * @return array of Gems_Tracker_RespondentTrack - */ - public function getRespondentTracks($userId, $organizationId) - { - $sql = "SELECT * - FROM gems__respondent2track INNER JOIN gems__reception_codes ON gr2t_reception_code = grc_id_reception_code - WHERE gr2t_id_user = ? AND gr2t_id_organization = ?"; - $rows = $this->db->fetchAll($sql, array($userId, $organizationId)); - $tracks = array(); - - foreach ($rows as $row) { - $tracks[$row['gr2t_id_respondent_track']] = $this->getRespondentTrack($row); - } - - return $tracks; - } - - /** - * * @param mixed $respTrackData Track id or array containing trackdata * @return Gems_Tracker_RespondentTrack */ @@ -380,6 +359,39 @@ } /** + * Get all tracks for a respondent + * + * Specify the optional $order to sort other than on start date + * + * @param int $userId + * @param int $organizationId + * @param mixed $order The column(s) and direction to order by + * @return array of Gems_Tracker_RespondentTrack + */ + public function getRespondentTracks($userId, $organizationId, $order = array('gr2t_start_date')) + { + /*$sql = "SELECT * + FROM gems__respondent2track INNER JOIN gems__reception_codes ON gr2t_reception_code = grc_id_reception_code + WHERE gr2t_id_user = ? AND gr2t_id_organization = ?"; + */ + $select = $this->db->select() + ->from('gems__respondent2track') + ->joinInner('gems__reception_codes', 'gr2t_reception_code = grc_id_reception_code') + ->where('gr2t_id_user = ? AND gr2t_id_organization = ?'); + if (!is_null($order)) { + $select->order($order); + } + $rows = $this->db->fetchAll($select, array($userId, $organizationId)); + $tracks = array(); + + foreach ($rows as $row) { + $tracks[$row['gr2t_id_respondent_track']] = $this->getRespondentTrack($row); + } + + return $tracks; + } + + /** * Returns a form to ask for a token * * @param mixed $args_array MUtil_Ra::args array for Form initiation. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-06-22 12:25:45
|
Revision: 782 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=782&view=rev Author: matijsdejong Date: 2012-06-22 12:25:39 +0000 (Fri, 22 Jun 2012) Log Message: ----------- Fixed bug in survey return urls and made the hidden model slightly more adapted to the current situation Modified Paths: -------------- trunk/library/classes/Gems/Model/HiddenOrganizationModel.php trunk/library/classes/Gems/Tracker/Token.php Modified: trunk/library/classes/Gems/Model/HiddenOrganizationModel.php =================================================================== --- trunk/library/classes/Gems/Model/HiddenOrganizationModel.php 2012-06-22 10:46:48 UTC (rev 781) +++ trunk/library/classes/Gems/Model/HiddenOrganizationModel.php 2012-06-22 12:25:39 UTC (rev 782) @@ -83,7 +83,7 @@ { if ($parameters) { // Allow use when passed only an ID value - if (isset($parameters[MUtil_Model::REQUEST_ID])) { + if (isset($parameters[MUtil_Model::REQUEST_ID]) && (! isset($parameters[MUtil_Model::REQUEST_ID1], $parameters[MUtil_Model::REQUEST_ID2]))) { $id = $parameters[MUtil_Model::REQUEST_ID]; $keys = $this->getKeys(); Modified: trunk/library/classes/Gems/Tracker/Token.php =================================================================== --- trunk/library/classes/Gems/Tracker/Token.php 2012-06-22 10:46:48 UTC (rev 781) +++ trunk/library/classes/Gems/Tracker/Token.php 2012-06-22 12:25:39 UTC (rev 782) @@ -367,6 +367,10 @@ // Do not show the base url as it is in $currentUri $surveyReturn['NoBase'] = true; + // Add route reset to prevet the current parameters to be + // added to the url. + $surveyReturn['RouteReset'] = true; + return $currentUri . MUtil_Html::urlString($surveyReturn); // MUtil_Echo::track($currentUri . MUtil_Html::urlString($surveyReturn)); } @@ -1084,6 +1088,8 @@ $values['gto_by'] = $userId; $values['gto_return_url'] = $this->calculateReturnUrl(); + // MUtil_Echo::track($values); + $this->_updateToken($values, $userId); $this->handleBeforeAnswering(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-07-18 08:01:15
|
Revision: 852 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=852&view=rev Author: mennodekker Date: 2012-07-18 08:01:04 +0000 (Wed, 18 Jul 2012) Log Message: ----------- Fixed #549: Allow a layered login when organizations have children Modified Paths: -------------- trunk/library/classes/Gems/Default/IndexAction.php trunk/library/classes/Gems/User/Form/OrganizationFormAbstract.php trunk/library/classes/Gems/User/UserLoader.php Added Paths: ----------- trunk/library/classes/Gems/User/Form/LayeredLoginForm.php Modified: trunk/library/classes/Gems/Default/IndexAction.php =================================================================== --- trunk/library/classes/Gems/Default/IndexAction.php 2012-07-17 15:55:22 UTC (rev 851) +++ trunk/library/classes/Gems/Default/IndexAction.php 2012-07-18 08:01:04 UTC (rev 852) @@ -56,6 +56,14 @@ protected $labelWidthFactor = null; /** + * Use a flat login (false = default) or a layered login where you first + * select a parent organization and then see a list of child organizations. + * + * @var boolean + */ + protected $layeredLogin = false; + + /** * For small numbers of organizations a multiline selectbox will be nice. This * setting handles how many lines will display at once. Use 1 for the normal * dropdown selectbox @@ -108,7 +116,11 @@ Gems_Html::init(); - return $this->loader->getUserLoader()->getLoginForm($args); + if ($this->layeredLogin === true) { + return $this->loader->getUserLoader()->getLayeredLoginForm($args); + } else { + return $this->loader->getUserLoader()->getLoginForm($args); + } } /** @@ -208,7 +220,7 @@ $previousRequestParameters = $staticSession->previousRequestParameters; $previousRequestMode = $staticSession->previousRequestMode; - if ($request->isPost()) { + if ($form->wasSubmitted()) { if ($form->isValid($request->getPost(), false)) { $user = $form->getUser(); $user->setAsCurrentUser(); @@ -258,6 +270,10 @@ $log = Gems_AccessLog::getLog(); $log->log('loginFail', $this->getRequest(), $msg, null, true); } // */ + } else { + if ($request->isPost()) { + $form->populate($this->getRequest()->getPost()); + } } $this->displayLoginForm($form); Added: trunk/library/classes/Gems/User/Form/LayeredLoginForm.php =================================================================== --- trunk/library/classes/Gems/User/Form/LayeredLoginForm.php (rev 0) +++ trunk/library/classes/Gems/User/Form/LayeredLoginForm.php 2012-07-18 08:01:04 UTC (rev 852) @@ -0,0 +1,248 @@ +<?php + +/** + * Copyright (c) 2011, Erasmus MC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Erasmus MC nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Short description of file + * + * @package Gems + * @subpackage + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: Sample.php 215 2011-07-12 08:52:54Z michiel $ + */ + +/** + * Short description for LoginForm + * + * Long description for class LoginForm (if any)... + * + * @package Gems + * @subpackage Sample + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.0 + * @deprecated Class deprecated since version 2.0 + */ +class Gems_User_Form_LayeredLoginForm extends Gems_User_Form_LoginForm +{ + /** + * @var Zend_Db_Adapter_Abstract + */ + public $db; + + /** + * The field name for the top organization element. + * + * @var string + */ + public $topOrganizationFieldName = 'toporganization'; + + /** + * Return array of organizations that are a child of the given parentId + * + * @param int $parentId + * @return array + */ + public function getChildOrganisations($parentId = null) + { + if (is_null($parentId)) { + return array(); + } + + try { + $organizations = $this->db->fetchPairs('SELECT gor_id_organization, gor_name FROM gems__organizations WHERE gor_active=1 AND gor_has_login=1 AND (gor_accessible_by LIKE ' . $this->db->quote(':' . $parentId . ':') . ' OR gor_id_organization = ' . $this->db->quote($parentId) . ') ORDER BY gor_name'); + } catch (Exception $e) { + try { + // 1.4 fallback + $organizations = $this->db->fetchPairs('SELECT gor_id_organization, gor_name FROM gems__organizations WHERE gor_active=1 AND (gor_accessible_by LIKE ' . $this->db->quote(':' . $parentId . ':') . ' OR gor_id_organization = ' . $this->db->quote($parentId) . ') ORDER BY gor_name'); + } catch (Exception $e) { + $organizations = array(); + } + } + + natsort($organizations); + + return $organizations; + } + + /** + * Returns the top organization id that should currently be used for this form. + * + * @return int Returns the current organization id, if any + */ + public function getCurrentTopOrganizationId() + { + $userLoader = $this->loader->getUserLoader(); + + // Url determines organization first. + if ($orgId = $userLoader->getOrganizationIdByUrl()) { + $this->_organizationFromUrl = true; + return ' '; + } + + $request = $this->getRequest(); + if ($request->isPost() && ($orgId = $request->getParam($this->topOrganizationFieldName))) { + Gems_Cookies::set('gems_toporganization', $orgId); + return $orgId; + } else { + return Gems_Cookies::get($this->getRequest(), 'gems_toporganization', ' '); + } + } + + /** + * Returns/sets an element for determining / selecting the organization. + * + * Depends on the top-organization + * + * @return Zend_Form_Element_Xhtml + */ + public function getOrganizationElement() + { + $element = $this->getElement($this->organizationFieldName); + $orgId = $this->getCurrentOrganizationId(); + $parentId = $this->getCurrentTopOrganizationId(); + $childOrgs = $this->getChildOrganisations($parentId); + + if (!empty($childOrgs)) { + if (count($childOrgs) == 1) { + $element = new Zend_Form_Element_Hidden($this->organizationFieldName); + $this->addElement($element); + + if (! $this->_organizationFromUrl) { + $orgIds = array_keys($childOrgs); + $orgId = reset($orgIds); + } + + $element->setValue($orgId); + $this->getRequest()->setPost($this->organizationFieldName, $orgId); + + } else { + $element = new Zend_Form_Element_Select($this->organizationFieldName); + $element->setLabel($this->translate->_('Organization')); + $element->setRegisterInArrayValidator(true); + $element->setRequired(true); + $element->setMultiOptions($childOrgs); + + if ($this->organizationMaxLines > 1) { + $element->setAttrib('size', min(count($orgs) + 1, $this->organizationMaxLines)); + } + $this->addElement($element); + $element->setValue($orgId); + } + } + + return $element; + } + + /** + * Return a list of organizations that are considered top-organizations, in this + * case organizations that are not accessible by others as they are considered + * the children of the top organizations. Feel free to modify to suit your + * needs. + * + * @return array + */ + public function getTopOrganisations() + { + try { + $organizations = $this->db->fetchPairs('SELECT gor_id_organization, gor_name FROM gems__organizations WHERE gor_active=1 AND gor_has_login=1 AND gor_accessible_by IS NULL ORDER BY gor_name'); + } catch (Exception $e) { + try { + // 1.4 fallback + $organizations = $this->db->fetchPairs('SELECT gor_id_organization, gor_name FROM gems__organizations WHERE gor_active=1 AND gor_accessible_by IS NULL ORDER BY gor_name'); + } catch (Exception $e) { + $organizations = array(); + } + } + + natsort($organizations); + + return $organizations; + } + + + /** + * Returns/sets an element for determining / selecting the top-organization. + * + * @return null|\Zend_Form_Element_Select + */ + public function getTopOrganizationElement() + { + $element = $this->getElement($this->topOrganizationFieldName); + $orgId = $this->getCurrentTopOrganizationId(); + $orgs = $this->getTopOrganisations(); + $hidden = $this->_organizationFromUrl || (count($orgs) < 2); + + if ($this->_organizationFromUrl) { + return null; + } + + if ($hidden) { + if (! $element instanceof Zend_Form_Element_Hidden) { + $element = new Zend_Form_Element_Hidden($this->topOrganizationFieldName); + $this->addElement($element); + } + + $orgIds = array_keys($orgs); + $orgId = reset($orgIds); + + $element->setValue($orgId); + + } elseif (! $element instanceof Zend_Form_Element_Select) { + $element = new Zend_Form_Element_Select($this->topOrganizationFieldName); + $element->setLabel($this->translate->_('Organization')); + $element->setRegisterInArrayValidator(true); + $element->setRequired(true); + $element->setMultiOptions($orgs); + $element->setAttrib('onchange', 'this.form.submit();'); + + if ($this->organizationMaxLines > 1) { + $element->setAttrib('size', min(count($orgs) + 1, $this->organizationMaxLines)); + } + $this->addElement($element); + + $element->setValue($orgId); + } + + return $element; + } + + /** + * Load the elements, starting with the extra top organization element and + * continue with the other elements like in the standard login form + * + * @return Gems_User_Form_LayeredLoginForm + */ + public function loadDefaultElements() + { + $this->getTopOrganizationElement(); + + parent::loadDefaultElements(); + + return $this; + } +} \ No newline at end of file Modified: trunk/library/classes/Gems/User/Form/OrganizationFormAbstract.php =================================================================== --- trunk/library/classes/Gems/User/Form/OrganizationFormAbstract.php 2012-07-17 15:55:22 UTC (rev 851) +++ trunk/library/classes/Gems/User/Form/OrganizationFormAbstract.php 2012-07-18 08:01:04 UTC (rev 852) @@ -284,6 +284,12 @@ */ public function wasSubmitted() { - return $this->getSubmitButton()->isChecked(); + // If form was not (yet) populated, we can not use isChecked() so do this manually + $request = $this->getRequest(); + if ($request->isPost() && $request->getPost($this->_submitFieldName) == $this->getSubmitButtonLabel()) { + return true; + } else { + return false; + } } } Modified: trunk/library/classes/Gems/User/UserLoader.php =================================================================== --- trunk/library/classes/Gems/User/UserLoader.php 2012-07-17 15:55:22 UTC (rev 851) +++ trunk/library/classes/Gems/User/UserLoader.php 2012-07-18 08:01:04 UTC (rev 852) @@ -305,6 +305,20 @@ } /** + * Returns a layered login form where user first selects a top organization and then a + * child organization + * + * @param mixed $args_array MUtil_Ra::args array for LoginForm initiation. + * @return Gems_User_Form_LayeredLoginForm + */ + public function getLayeredLoginForm($args_array = null) + { + $args = MUtil_Ra::args(func_get_args()); + + return $this->_loadClass('Form_LayeredLoginForm', true, array($args)); + } + + /** * Returns a login form * * @param mixed $args_array MUtil_Ra::args array for LoginForm initiation. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-07-30 08:43:09
|
Revision: 884 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=884&view=rev Author: mennodekker Date: 2012-07-30 08:42:58 +0000 (Mon, 30 Jul 2012) Log Message: ----------- Created extra snippet for export: SurveyHeaderSnippet to allow having more or less information on a survey. Added round description. Modified Paths: -------------- trunk/library/classes/Gems/Export/RespondentExport.php Added Paths: ----------- trunk/library/classes/Gems/Snippets/Export/SurveyHeaderSnippet.php Modified: trunk/library/classes/Gems/Export/RespondentExport.php =================================================================== --- trunk/library/classes/Gems/Export/RespondentExport.php 2012-07-27 12:08:05 UTC (rev 883) +++ trunk/library/classes/Gems/Export/RespondentExport.php 2012-07-30 08:42:58 UTC (rev 884) @@ -170,7 +170,7 @@ } if ($engine->getTrackType() == 'S' || !$groupSurveys) { - $this->html->div($token->getSurveyName(), array('class'=>'surveyTitle')); + $this->html->snippet('Export_SurveyHeaderSnippet', 'token', $token); $this->html->snippet($this->_singleSurveySnippet, 'token', $token, 'tokenId', $token->getTokenId(), 'showHeaders', false, 'showButtons', false, 'showSelected', false, 'showTakeButton', false); @@ -179,7 +179,7 @@ if (!isset($surveys[$token->getSurveyId()])) { $surveys[$token->getSurveyId()] = true; - $this->html->div($token->getSurveyName(), array('class'=>'surveyTitle')); + $this->html->snippet('Export_SurveyHeaderSnippet', 'token', $token); $this->html->snippet($this->_groupedSurveySnippet, 'token', $token, 'tokenId', $token->getTokenId(), 'showHeaders', false, 'showButtons', false, 'showSelected', false, 'showTakeButton', false); Added: trunk/library/classes/Gems/Snippets/Export/SurveyHeaderSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/Export/SurveyHeaderSnippet.php (rev 0) +++ trunk/library/classes/Gems/Snippets/Export/SurveyHeaderSnippet.php 2012-07-30 08:42:58 UTC (rev 884) @@ -0,0 +1,59 @@ +<?php +/** + * Copyright (c) 2011, Erasmus MC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Erasmus MC nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * @package Gems + * @subpackage Snippets + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: Sample.php 215 2011-07-12 08:52:54Z michiel $ + */ + +/** + * Header for html/pdf export of a survey + * + * @package Gems + * @subpackage Snippets + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.6 + */ +class Gems_Snippets_Export_SurveyHeaderSnippet extends MUtil_Snippets_SnippetAbstract +{ + /** + * @var Gems_Tracker_Token + */ + public $token; + + public function getHtmlOutput(Zend_View_Abstract $view) + { + $html = $this->getHtmlSequence(); + $html->div($this->token->getSurveyName(), array('class'=>'surveyTitle')); + $html->div($this->token->getRoundDescription(), array('class'=>'roundDescription')); + + return $html; + } +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-03-21 10:59:45
|
Revision: 1199 http://sourceforge.net/p/gemstracker/code/1199 Author: mennodekker Date: 2013-03-21 10:59:41 +0000 (Thu, 21 Mar 2013) Log Message: ----------- Allow more verbose error display for tabforms, disable by using $form->setVerbose(false) Modified Paths: -------------- trunk/library/classes/Gems/Form/Decorator/TabErrors.php trunk/library/classes/Gems/TabForm.php Modified: trunk/library/classes/Gems/Form/Decorator/TabErrors.php =================================================================== --- trunk/library/classes/Gems/Form/Decorator/TabErrors.php 2013-03-20 07:35:34 UTC (rev 1198) +++ trunk/library/classes/Gems/Form/Decorator/TabErrors.php 2013-03-21 10:59:41 UTC (rev 1199) @@ -3,7 +3,7 @@ /** * Copyright (c) 2011, Erasmus MC * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -14,7 +14,7 @@ * * Neither the name of Erasmus MC nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE @@ -25,7 +25,7 @@ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * @package Gems * @subpackage Form * @copyright Copyright (c) 2011 Erasmus MC @@ -44,6 +44,13 @@ class Gems_Form_Decorator_TabErrors extends Zend_Form_Decorator_Abstract { /** + * By default, show verbose error messages in tabforms + * + * @var boolean + */ + protected $_verbose = true; + + /** * Render the TabErrors * * We don't return anything, we just add a class to the tab so it shows the errors @@ -63,6 +70,23 @@ } /** + * Should the tab errors be verbose? + * + * Verbose means that apart from marking and selecting the tab that has errors + * we also show an error above the form. + * + * @return boolean + */ + public function getVerbose() { + if (null !== ($verboseOpt = $this->getOption('verbose'))) { + $this->_verbose = (bool) $verboseOpt; + $this->removeOption('verbose'); + } + + return $this->_verbose; + } + + /** * Recurse through a form object, rendering errors * * @param Zend_Form $form @@ -71,21 +95,62 @@ */ protected function _recurseForm(Zend_Form $form) { + $subFormsWithErrors = array(); + $subFormMessages = array(); $tabId = 0; - foreach ($form->getSubForms() as $subitem) { - if ($subitem instanceof Gems_Form_TabSubForm) { - //This is where we want to do something - foreach ($subitem->getElements() as $tabElement) { - $messages = $tabElement->getMessages(); - if (count($messages)) { - $subitem->setAttrib('jQueryParams', array('class'=>'taberror')); - $errors[$tabId] = $tabId; - $form->selectTab($tabId); - break; + + foreach ($form->getSubForms() as $subForm) { + if ($subForm instanceof Gems_Form_TabSubForm) { + // See if any of the subformelements has an error message + foreach ($subForm->getElements() as $subFormElement) { + $elementMessages = $subFormElement->getMessages(); + if (count($elementMessages)) { + $subFormsWithErrors[$tabId] = $subForm->getAttrib('title'); // Save subform title + $subForm->setAttrib('jQueryParams', array('class'=>'taberror')); // Add css class to the subform + $form->selectTab($tabId); // Select the tab, this way the last tab with error is always selected + break; // don't check other elements + } } + + // Preserve subform level custom messages if we have an error + if (array_key_exists($tabId, $subFormsWithErrors)) { + $subFormMessages[$tabId] = $subForm->getCustomMessages(); + } $tabId++; } + + // If we found at least one error, and 'verbose' is true + if ($this->getVerbose() && (!empty($subFormsWithErrors) || $form->isErrors()) ) { + // First show form level custom error messages (the elements show their own errors) + $formMessage = $form->getCustomMessages(); + if(!empty($formMessage)) { + foreach($formMessage as $message) + { + Zend_Controller_Action_HelperBroker::getStaticHelper('FlashMessenger')->addMessage($message); + } + } + + // Now browse through the tabs with errors + foreach ($subFormsWithErrors as $tabIdx => $tabName) + { + // If more then one tab, show in which tab we found the errors + if ($tabId > 1) { + $translator = Zend_Registry::get('Zend_Translate'); + Zend_Controller_Action_HelperBroker::getStaticHelper('FlashMessenger')->addMessage(sprintf($translator->_('Error in tab "%s"'), $tabName)); + } + + // If we have them, show the tab custom error messages + foreach ($subFormMessages[$tabIdx] as $subFormMessage) + { + foreach ($subFormMessage as $message) + { + Zend_Controller_Action_HelperBroker::getStaticHelper('FlashMessenger')->addMessage("--> " . $message); + } + } + } + + } } } } \ No newline at end of file Modified: trunk/library/classes/Gems/TabForm.php =================================================================== --- trunk/library/classes/Gems/TabForm.php 2013-03-20 07:35:34 UTC (rev 1198) +++ trunk/library/classes/Gems/TabForm.php 2013-03-21 10:59:41 UTC (rev 1199) @@ -299,6 +299,20 @@ $this->getElement('tab')->setValue($tabIdx); $this->setAttrib('selected', $tabIdx); } + + /** + * Set the form to be verbose, showing above the form what tabs have errors and + * possibly add custom (sub)formlevel error messages + * + * @param boolean $bool + */ + public function setVerbose($bool) + { + $decorator = $this->getDecorator('TabErrors'); + if ($decorator) { + $decorator->setOption('verbose', (bool) $bool); + } + } /** * Set the view object This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-04-15 13:23:51
|
Revision: 1232 http://sourceforge.net/p/gemstracker/code/1232 Author: mennodekker Date: 2013-04-15 13:23:48 +0000 (Mon, 15 Apr 2013) Log Message: ----------- Cosmetic changes to batch export (init is a step too, show progress after first step) Removed debug statement in LimeSurvey source Modified Paths: -------------- trunk/library/classes/Gems/Default/ExportAction.php trunk/library/classes/Gems/Export/Excel.php trunk/library/classes/Gems/Export/ExportBatchInterface.php trunk/library/classes/Gems/Export/Spss.php trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9Database.php Modified: trunk/library/classes/Gems/Default/ExportAction.php =================================================================== --- trunk/library/classes/Gems/Default/ExportAction.php 2013-04-15 12:37:00 UTC (rev 1231) +++ trunk/library/classes/Gems/Default/ExportAction.php 2013-04-15 13:23:48 UTC (rev 1232) @@ -327,8 +327,7 @@ $filter = $this->_getFilter($data); $language = $this->locale->getLanguage(); - $exportClass = $this->export->getExport($data['type']); - $exportClass->handleExportBatch($batch, $filter, $language, $data); + $batch->addTask('Export_ExportCommand', $data['type'], 'handleExportBatch', $filter, $language, $data); $batch->autoStart = true; } Modified: trunk/library/classes/Gems/Export/Excel.php =================================================================== --- trunk/library/classes/Gems/Export/Excel.php 2013-04-15 12:37:00 UTC (rev 1231) +++ trunk/library/classes/Gems/Export/Excel.php 2013-04-15 13:23:48 UTC (rev 1232) @@ -122,7 +122,8 @@ * @param string $language The language used / to use for the export * @param array $data The formdata */ - public function handleExportBatch($batch, $filter, $language, $data) { + public function handleExportBatch($filter, $language, $data) { + $batch = $this->_batch; $survey = $this->loader->getTracker()->getSurvey($data['sid']); $answerCount = $survey->getRawTokenAnswerRowsCount($filter); $answers = $survey->getRawTokenAnswerRows(array('limit'=>1,'offset'=>1) + $filter); // Limit to one response Modified: trunk/library/classes/Gems/Export/ExportBatchInterface.php =================================================================== --- trunk/library/classes/Gems/Export/ExportBatchInterface.php 2013-04-15 12:37:00 UTC (rev 1231) +++ trunk/library/classes/Gems/Export/ExportBatchInterface.php 2013-04-15 13:23:48 UTC (rev 1232) @@ -57,12 +57,11 @@ * of headers to set for the download and 'file' that holds the path to the * file relative to GEMS_ROOT_DIR . '/var/tmp/' * - * @param Gems_Task_TaskRunnerBatch $batch The batch to start * @param array $filter The filter to use * @param string $language The language used / to use for the export * @param array $data The formdata */ - public function handleExportBatch($batch, $filter, $language, $data); + public function handleExportBatch($filter, $language, $data); /** * Set the batch to be used by this source Modified: trunk/library/classes/Gems/Export/Spss.php =================================================================== --- trunk/library/classes/Gems/Export/Spss.php 2013-04-15 12:37:00 UTC (rev 1231) +++ trunk/library/classes/Gems/Export/Spss.php 2013-04-15 13:23:48 UTC (rev 1232) @@ -153,8 +153,9 @@ * @param string $language The language used / to use for the export * @param array $data The formdata */ - public function handleExportBatch($batch, $filter, $language, $data) + public function handleExportBatch($filter, $language, $data) { + $batch = $this->_batch; $survey = $this->loader->getTracker()->getSurvey($data['sid']); $answerCount = $survey->getRawTokenAnswerRowsCount($filter); $answers = $survey->getRawTokenAnswerRows(array('limit'=>1,'offset'=>1) + $filter); // Limit to one response Modified: trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9Database.php =================================================================== --- trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9Database.php 2013-04-15 12:37:00 UTC (rev 1231) +++ trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9Database.php 2013-04-15 13:23:48 UTC (rev 1232) @@ -883,7 +883,6 @@ $select = $this->getRawTokenAnswerRowsSelect($filter, $surveyId, $sourceSurveyId); $p = new Zend_Paginator_Adapter_DbSelect($select); - MUtil_Echo::track($p->getCountSelect()->__toString()); $count = $p->getCountSelect()->query()->fetchColumn(); return $count; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |