You can subscribe to this list here.
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(84) |
Oct
(70) |
Nov
(164) |
Dec
(71) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2012 |
Jan
(52) |
Feb
(77) |
Mar
(70) |
Apr
(58) |
May
(81) |
Jun
(74) |
Jul
(87) |
Aug
(30) |
Sep
(45) |
Oct
(37) |
Nov
(51) |
Dec
(31) |
2013 |
Jan
(47) |
Feb
(29) |
Mar
(40) |
Apr
(33) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <gem...@li...> - 2013-04-09 14:36:36
|
Revision: 1215 http://sourceforge.net/p/gemstracker/code/1215 Author: matijsdejong Date: 2013-04-09 14:36:33 +0000 (Tue, 09 Apr 2013) Log Message: ----------- User class creation error solved Modified Paths: -------------- tags/1.6/library/classes/Gems/Model.php Property Changed: ---------------- tags/1.6/library/ Index: tags/1.6/library =================================================================== --- tags/1.6/library 2013-04-09 09:27:03 UTC (rev 1214) +++ tags/1.6/library 2013-04-09 14:36:33 UTC (rev 1215) Property changes on: tags/1.6/library ___________________________________________________________________ Modified: svn:mergeinfo ## -8,3 +8,4 ## /tags/1.5.1/library:485,489,509-510,534 /tags/1.5.3-rc2/library:612,614,616,618 /tags/1.5.6-pulse20121012/library:986 +/trunk/library:1214 \ No newline at end of property Modified: tags/1.6/library/classes/Gems/Model.php =================================================================== --- tags/1.6/library/classes/Gems/Model.php 2013-04-09 09:27:03 UTC (rev 1214) +++ tags/1.6/library/classes/Gems/Model.php 2013-04-09 14:36:33 UTC (rev 1215) @@ -108,6 +108,7 @@ 'gems__user_logins', array($loginField => 'gul_login', $organizationField => 'gul_id_organization'), 'gul', + MUtil_Model_DatabaseModelAbstract::SAVE_MODE_INSERT | MUtil_Model_DatabaseModelAbstract::SAVE_MODE_UPDATE | MUtil_Model_DatabaseModelAbstract::SAVE_MODE_DELETE ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-04-09 09:27:06
|
Revision: 1214 http://sourceforge.net/p/gemstracker/code/1214 Author: mennodekker Date: 2013-04-09 09:27:03 +0000 (Tue, 09 Apr 2013) Log Message: ----------- When creating a user, his userclass is not saved Modified Paths: -------------- trunk/library/classes/Gems/Model.php Modified: trunk/library/classes/Gems/Model.php =================================================================== --- trunk/library/classes/Gems/Model.php 2013-04-04 15:34:26 UTC (rev 1213) +++ trunk/library/classes/Gems/Model.php 2013-04-09 09:27:03 UTC (rev 1214) @@ -108,6 +108,7 @@ 'gems__user_logins', array($loginField => 'gul_login', $organizationField => 'gul_id_organization'), 'gul', + MUtil_Model_DatabaseModelAbstract::SAVE_MODE_INSERT | MUtil_Model_DatabaseModelAbstract::SAVE_MODE_UPDATE | MUtil_Model_DatabaseModelAbstract::SAVE_MODE_DELETE ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-04-04 15:34:30
|
Revision: 1213 http://sourceforge.net/p/gemstracker/code/1213 Author: matijsdejong Date: 2013-04-04 15:34:26 +0000 (Thu, 04 Apr 2013) Log Message: ----------- The agenda is still on the agenda Modified Paths: -------------- trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php Added Paths: ----------- trunk/library/configs/db/tables/gems__respondent2appointment.sql Modified: trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php =================================================================== --- trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php 2013-04-04 09:41:13 UTC (rev 1212) +++ trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php 2013-04-04 15:34:26 UTC (rev 1213) @@ -464,6 +464,7 @@ $events = $this->loader->getEvents(); $model->set('gsu_result_field', 'label', $this->_('Result field')); + $model->set('gsu_agenda_result', 'label', $this->_('Agenda field')); $model->set('gsu_duration', 'label', $this->_('Duration description'), 'description', $this->_('Text to inform the respondent, e.g. "20 seconds" or "1 minute".')); } $model->setIfExists('gsu_code', 'label', $this->_('Code name'), 'size', 10, 'description', $this->_('Only for programmers.')); Added: trunk/library/configs/db/tables/gems__respondent2appointment.sql =================================================================== --- trunk/library/configs/db/tables/gems__respondent2appointment.sql (rev 0) +++ trunk/library/configs/db/tables/gems__respondent2appointment.sql 2013-04-04 15:34:26 UTC (rev 1213) @@ -0,0 +1,27 @@ + +CREATE TABLE if not exists gems__respondent2appointment ( + gr2a_id_appointment bigint unsigned not null auto_increment, + gr2a_id_user bigint unsigned not null references gems__respondents (grs_id_user), + gr2a_id_organization bigint unsigned not null references gems__organizations (gor_id_organization), + + gr2a_appointment datetime not null, + gr2a_whole_day boolean not null default 0, + gr2a_until datetime null, + gr2a_active boolean not null default 1, + + gr2a_subject varchar(250) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null default null, + gr2a_location varchar(250) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null default null, + gr2a_comment TEXT CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null default null, + + gr2a_changed timestamp not null default current_timestamp on update current_timestamp, + gr2a_changed_by bigint unsigned not null, + gr2a_created timestamp not null, + gr2a_created_by bigint unsigned not null, + + PRIMARY KEY (gr2a_id_appointment), + INDEX (gr2a_id_user, gr2a_id_organization), + INDEX (gr2a_appointment) +) +ENGINE=InnoDB +auto_increment = 2000000 +CHARACTER SET 'utf8' COLLATE 'utf8_general_ci'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-04-04 09:41:18
|
Revision: 1212 http://sourceforge.net/p/gemstracker/code/1212 Author: matijsdejong Date: 2013-04-04 09:41:13 +0000 (Thu, 04 Apr 2013) Log Message: ----------- Confirmed _initOpenRosa to coding standards Added Agenda field to surveys Modified Paths: -------------- trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php trunk/library/classes/GemsEscort.php trunk/library/configs/db/patches.sql trunk/library/configs/db/tables/gems__surveys.30.sql Modified: trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php =================================================================== --- trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php 2013-04-03 12:52:59 UTC (rev 1211) +++ trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php 2013-04-04 09:41:13 UTC (rev 1212) @@ -100,7 +100,10 @@ $survey = $this->loader->getTracker()->getSurvey($currentId); $standAlone = $this->escort instanceof Gems_Project_Tracks_StandAloneSurveysInterface; - $surveyFields = $this->util->getTranslated()->getEmptyDropdownArray() + $survey->getQuestionList($this->locale->getLanguage()); + $surveyFields = $this->util->getTranslated()->getEmptyDropdownArray() + + $survey->getQuestionList($this->locale->getLanguage()); + $dateFields = $this->util->getTranslated()->getEmptyDropdownArray() + + $survey->getDatesList($this->locale->getLanguage()); $surveyNotOK = $data['gsu_surveyor_active'] ? null : 'disabled'; // Forced data changes @@ -128,6 +131,7 @@ $bridge->addSelect( 'gsu_id_primary_group', 'description', $this->_('If empty, survey will never show up!')); $bridge->addSelect( 'gsu_result_field', 'multiOptions', $surveyFields); + $bridge->addSelect( 'gsu_agenda_result', 'multiOptions', $dateFields); $bridge->addText( 'gsu_duration'); $bridge->addExhibitor( 'calc_duration', 'label', $this->_('Duration calculated'), 'value', $this->calculateDuration(isset($data['gsu_id_survey']) ? $data['gsu_id_survey'] : null)); $bridge->addText( 'gsu_code'); Modified: trunk/library/classes/GemsEscort.php =================================================================== --- trunk/library/classes/GemsEscort.php 2013-04-03 12:52:59 UTC (rev 1211) +++ trunk/library/classes/GemsEscort.php 2013-04-04 09:41:13 UTC (rev 1212) @@ -433,10 +433,8 @@ /** * Initialize the OpenRosa survey source - * - * @param Zend_Controller_Action $actionController */ - public function _initOpenRosa(Zend_Controller_Action $actionController = null) + protected function _initOpenRosa() { if ($this->getOption('useOpenRosa')) { // First handle dependencies Modified: trunk/library/configs/db/patches.sql =================================================================== --- trunk/library/configs/db/patches.sql 2013-04-03 12:52:59 UTC (rev 1211) +++ trunk/library/configs/db/patches.sql 2013-04-04 09:41:13 UTC (rev 1212) @@ -483,3 +483,7 @@ -- PATCH: Longer SSN hashes ALTER TABLE gems__respondents CHANGE grs_ssn grs_ssn varchar(128) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci'; + +-- GEMS VERSION: 52 +-- PATCH: Agenda items +ALTER TABLE gems__surveys ADD gsu_agenda_result varchar(20) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' AFTER gsu_result_field; Modified: trunk/library/configs/db/tables/gems__surveys.30.sql =================================================================== --- trunk/library/configs/db/tables/gems__surveys.30.sql 2013-04-03 12:52:59 UTC (rev 1211) +++ trunk/library/configs/db/tables/gems__surveys.30.sql 2013-04-04 09:41:13 UTC (rev 1212) @@ -36,6 +36,7 @@ -- end depreciated gsu_result_field varchar(20) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', + gsu_agenda_result varchar(20) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', gsu_duration varchar(50) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', gsu_code varchar(64) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-04-03 12:53:03
|
Revision: 1211 http://sourceforge.net/p/gemstracker/code/1211 Author: matijsdejong Date: 2013-04-03 12:52:59 +0000 (Wed, 03 Apr 2013) Log Message: ----------- Logic error causes warnings, also in trunk Modified Paths: -------------- trunk/library/classes/GemsEscort.php Modified: trunk/library/classes/GemsEscort.php =================================================================== --- trunk/library/classes/GemsEscort.php 2013-04-03 12:25:27 UTC (rev 1210) +++ trunk/library/classes/GemsEscort.php 2013-04-03 12:52:59 UTC (rev 1211) @@ -430,10 +430,10 @@ return $locale; } - + /** * Initialize the OpenRosa survey source - * + * * @param Zend_Controller_Action $actionController */ public function _initOpenRosa(Zend_Controller_Action $actionController = null) @@ -441,12 +441,12 @@ if ($this->getOption('useOpenRosa')) { // First handle dependencies $this->bootstrap(array('db', 'loader', 'util')); - + $this->getLoader()->addPrefixPath('OpenRosa', GEMS_LIBRARY_DIR . '/classes/OpenRosa', true); - + $autoloader = Zend_Loader_Autoloader::getInstance(); $autoloader->registerNamespace('OpenRosa_'); - + /** * Add Source for OpenRosa */ @@ -629,7 +629,7 @@ */ protected function _initZFDebug() { - if ((APPLICATION_ENV === 'production') && + if ((APPLICATION_ENV === 'production') || (false !== strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.'))) { // Never on on production systems, never for IE 6 return; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-04-03 12:25:30
|
Revision: 1210 http://sourceforge.net/p/gemstracker/code/1210 Author: mennodekker Date: 2013-04-03 12:25:27 +0000 (Wed, 03 Apr 2013) Log Message: ----------- added toggle checkbox for track organizations Modified Paths: -------------- trunk/library/classes/Gems/Tracker/Snippets/EditTrackEngineSnippetGeneric.php Modified: trunk/library/classes/Gems/Tracker/Snippets/EditTrackEngineSnippetGeneric.php =================================================================== --- trunk/library/classes/Gems/Tracker/Snippets/EditTrackEngineSnippetGeneric.php 2013-04-03 12:13:49 UTC (rev 1209) +++ trunk/library/classes/Gems/Tracker/Snippets/EditTrackEngineSnippetGeneric.php 2013-04-03 12:25:27 UTC (rev 1210) @@ -138,6 +138,10 @@ $bridge->add('gtr_completed_event'); } $bridge->addMultiCheckbox('gtr_organizations', 'label', $this->_('Organizations'), 'multiOptions', $this->util->getDbLookup()->getOrganizations(), 'required', true); + + $element = new Gems_JQuery_Form_Element_ToggleCheckboxes('toggleOrg', array('selector'=>'input[name^=gtr_organizations]')); + $element->setLabel('Toggle'); + $bridge->addElement($element); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-04-03 12:13:53
|
Revision: 1209 http://sourceforge.net/p/gemstracker/code/1209 Author: matijsdejong Date: 2013-04-03 12:13:49 +0000 (Wed, 03 Apr 2013) Log Message: ----------- Logic error causes warnings Modified Paths: -------------- tags/1.6/library/classes/GemsEscort.php Modified: tags/1.6/library/classes/GemsEscort.php =================================================================== --- tags/1.6/library/classes/GemsEscort.php 2013-04-03 12:11:15 UTC (rev 1208) +++ tags/1.6/library/classes/GemsEscort.php 2013-04-03 12:13:49 UTC (rev 1209) @@ -605,7 +605,7 @@ */ protected function _initZFDebug() { - if ((APPLICATION_ENV === 'production') && + if ((APPLICATION_ENV === 'production') || (false !== strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.'))) { // Never on on production systems, never for IE 6 return; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-04-03 12:11:19
|
Revision: 1208 http://sourceforge.net/p/gemstracker/code/1208 Author: mennodekker Date: 2013-04-03 12:11:15 +0000 (Wed, 03 Apr 2013) Log Message: ----------- fixed wrong default valid from date for a track Modified Paths: -------------- trunk/library/classes/Gems/Tracker/Model/TrackModel.php Modified: trunk/library/classes/Gems/Tracker/Model/TrackModel.php =================================================================== --- trunk/library/classes/Gems/Tracker/Model/TrackModel.php 2013-03-25 14:07:46 UTC (rev 1207) +++ trunk/library/classes/Gems/Tracker/Model/TrackModel.php 2013-04-03 12:11:15 UTC (rev 1208) @@ -80,7 +80,7 @@ Gems_Model::setChangeFieldsByPrefix($this, 'gtr'); - $this->set('gtr_date_start', 'default', date('d-m-Y')); + $this->set('gtr_date_start', 'default', new Zend_Date()); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-03-25 14:07:49
|
Revision: 1207 http://sourceforge.net/p/gemstracker/code/1207 Author: mennodekker Date: 2013-03-25 14:07:46 +0000 (Mon, 25 Mar 2013) Log Message: ----------- Added sample form Added Paths: ----------- trunk/new_project/var/uploads/openrosa/ trunk/new_project/var/uploads/openrosa/forms/ trunk/new_project/var/uploads/openrosa/forms/consent_signature.xml Added: trunk/new_project/var/uploads/openrosa/forms/consent_signature.xml =================================================================== --- trunk/new_project/var/uploads/openrosa/forms/consent_signature.xml (rev 0) +++ trunk/new_project/var/uploads/openrosa/forms/consent_signature.xml 2013-03-25 14:07:46 UTC (rev 1207) @@ -0,0 +1,42 @@ +<?xml version="1.0"?> +<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:orx="http://openrosa.org/xforms/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <h:head> + <h:title>consent_signature</h:title> + <model> + <instance> + <data id="consent.signature" version="1.0"> + <informedconsent> + <consentnotes/> + <consentgiven/> + <signature/> + </informedconsent> + <meta> + <instanceID/> + </meta> + </data> + </instance> + <bind nodeset="/data/informedconsent/consentnotes" readonly="true()" type="string"/> + <bind nodeset="/data/informedconsent/consentgiven" type="string"/> + <bind calculate="concat('uuid:', uuid())" nodeset="/data/meta/instanceID" readonly="true()" type="string"/> + </model> + </h:head> + <h:body> + <group appearance="field-list" ref="/data/informedconsent"> + <label>Introduction & Informed Consent</label> + <input ref="/data/informedconsent/consentnotes"> + <label>Hello. My name is ______________. We are doing a study on X. The data we collect will help the X to X. Can I please speak to the head of your household? + +We very much appreciate your participation in this short survey. The questions will take around 5 to 10 minutes to complete. Any information you provide will be kept strictly confidential. Participation in this survey is voluntary but we hope that you will participate. If there is any question you don’t want to answer, just let me know and I will go to the next question or we can stop the interview. +I would be happy to clarify any doubts you may have regarding this survey, do you have any questions? + +ANSWER ANY QUESTIONS AND ADDRESS CONCERNS.</label> + </input> + <trigger ref="/data/informedconsent/consentgiven"> + <label>May I begin the interview now?</label> + </trigger> + <upload appearance="signature" mediatype="image/*" ref="/data/informedconsent/signature"> + <label>Signature</label> + </upload> + </group> + </h:body> +</h:html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-03-25 14:00:53
|
Revision: 1206 http://sourceforge.net/p/gemstracker/code/1206 Author: mennodekker Date: 2013-03-25 14:00:49 +0000 (Mon, 25 Mar 2013) Log Message: ----------- Some more fixes on handling openrosa forms, still needs more error checking on the form Modified Paths: -------------- trunk/library/classes/Gems/Default/OpenrosaAction.php trunk/library/classes/GemsEscort.php trunk/library/classes/OpenRosa/Tracker/Source/OpenRosa/Form.php Modified: trunk/library/classes/Gems/Default/OpenrosaAction.php =================================================================== --- trunk/library/classes/Gems/Default/OpenrosaAction.php 2013-03-25 11:53:12 UTC (rev 1205) +++ trunk/library/classes/Gems/Default/OpenrosaAction.php 2013-03-25 14:00:49 UTC (rev 1206) @@ -193,7 +193,7 @@ * this only handles storing form data and can be used for resubmission too. * * @param type $xmlFile - * @return string DeviceID or false on failure + * @return string ResultID or false on failure */ private function processReceivedForm($answerXmlFile) { @@ -214,10 +214,8 @@ ); if ($formData = $model->loadFirst($filter)) { $form = new OpenRosa_Tracker_Source_OpenRosa_Form($this->formDir . $formData['gof_form_xml']); - $form->saveAnswer($answerXmlFile); - - $deviceId = $xml->DeviceId[0]; - return $deviceId; + $answers = $form->saveAnswer($answerXmlFile); + return $answers['orf_id']; } else { return false; } @@ -279,6 +277,7 @@ $formCnt = 0; $addCnt = 0; + $files = array(); $rescan = $this->getRequest()->getParam('rescan', false); while (false !== ($filename = $eDir->read())) { $ext = substr($filename, -4); @@ -355,8 +354,8 @@ if ($upload->receive('xml_submission_file')) { $xmlFile = $upload->getFileInfo('xml_submission_file'); $answerXmlFile = $xmlFile['xml_submission_file']['tmp_name']; - $deviceId = $this->processReceivedForm($answerXmlFile); - if ($deviceId === false) { + $resultId = $this->processReceivedForm($answerXmlFile); + if ($resultId === false) { //form not accepted! foreach ($xml->children() as $child) { $log->log($child->getName() . ' -> ' . $child, Zend_Log::ERR); @@ -366,9 +365,9 @@ //$log->log($deviceId, Zend_Log::ERR); foreach ($upload->getFileInfo() as $file => $info) { if ($info['received'] != 1) { - //Rename to deviceid_md5(time)_filename + //Rename to responseid_filename //@@TODO: move to form subdir, for better separation - $upload->addFilter('Rename', $deviceId . '_' . md5(time()) . '_' . $info['name'], $file); + $upload->addFilter('Rename', $resultId . '_' . $info['name'], $file); } } Modified: trunk/library/classes/GemsEscort.php =================================================================== --- trunk/library/classes/GemsEscort.php 2013-03-25 11:53:12 UTC (rev 1205) +++ trunk/library/classes/GemsEscort.php 2013-03-25 14:00:49 UTC (rev 1206) @@ -444,6 +444,9 @@ $this->getLoader()->addPrefixPath('OpenRosa', GEMS_LIBRARY_DIR . '/classes/OpenRosa', true); + $autoloader = Zend_Loader_Autoloader::getInstance(); + $autoloader->registerNamespace('OpenRosa_'); + /** * Add Source for OpenRosa */ Modified: trunk/library/classes/OpenRosa/Tracker/Source/OpenRosa/Form.php =================================================================== --- trunk/library/classes/OpenRosa/Tracker/Source/OpenRosa/Form.php 2013-03-25 11:53:12 UTC (rev 1205) +++ trunk/library/classes/OpenRosa/Tracker/Source/OpenRosa/Form.php 2013-03-25 14:00:49 UTC (rev 1206) @@ -108,7 +108,11 @@ foreach ($this->instance as $name => $element) { $bindName = str_replace('_', '/', '_data_' . $name); - $bindInfo = $this->bind[$bindName]; + if (array_key_exists($bindName, $this->bind)) { + $bindInfo = $this->bind[$bindName]; + } else { + $bindInfo['type'] = 'string'; + } $field = array(); switch ($bindInfo['type']) { @@ -247,6 +251,8 @@ $result['value'] = (string) $element; break; + case 'trigger': + case 'upload': case 'input': case 'select': case 'select1': @@ -381,7 +387,12 @@ $checkbox[0] = $this->translate->_('Not checked'); foreach ($this->instance as $name => $element) { $bindName = str_replace('_', '/', '_data_' . $name); - $bindInfo = $this->bind[$bindName]; + if (array_key_exists($bindName, $this->bind)) { + $bindInfo = $this->bind[$bindName]; + } else { + $bindInfo['type'] = 'string'; + } + switch ($bindInfo['type']) { case 'select': @@ -413,7 +424,7 @@ } $this->model = $model; } - + return $this->model; } @@ -460,7 +471,11 @@ //Now we should parse the response, extract the options given for a (multi)select foreach ($this->instance as $name => $element) { $bindName = str_replace('_', '/', '_data_' . $name); - $bindInfo = $this->bind[$bindName]; + if (array_key_exists($bindName, $this->bind)) { + $bindInfo = $this->bind[$bindName]; + } else { + $bindInfo['type'] = 'string'; + } if ($bindInfo['type'] == 'dateTime') { $answers[$name] = new Zend_Date($answers[$name], Zend_Date::ISO_8601); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-03-25 11:53:16
|
Revision: 1205 http://sourceforge.net/p/gemstracker/code/1205 Author: mennodekker Date: 2013-03-25 11:53:12 +0000 (Mon, 25 Mar 2013) Log Message: ----------- OpenRosa: Moved scan forms from controller to Source Modified Paths: -------------- trunk/library/classes/Gems/Default/DatabaseAction.php trunk/library/classes/Gems/Default/OpenrosaAction.php trunk/library/classes/Gems/Menu.php trunk/library/classes/OpenRosa/Tracker/Source/OpenRosa.php Modified: trunk/library/classes/Gems/Default/DatabaseAction.php =================================================================== --- trunk/library/classes/Gems/Default/DatabaseAction.php 2013-03-22 14:27:33 UTC (rev 1204) +++ trunk/library/classes/Gems/Default/DatabaseAction.php 2013-03-25 11:53:12 UTC (rev 1205) @@ -401,7 +401,7 @@ if ($translations) { $filedir = APPLICATION_PATH . '/languages'; if (! file_exists($filedir)) { - mkdir($filedir, 0777, true); + @mkdir($filedir, 0777, true); } $filename = $filedir . '/' . GEMS_PROJECT_NAME . 'DatabaseTranslations.php'; Modified: trunk/library/classes/Gems/Default/OpenrosaAction.php =================================================================== --- trunk/library/classes/Gems/Default/OpenrosaAction.php 2013-03-22 14:27:33 UTC (rev 1204) +++ trunk/library/classes/Gems/Default/OpenrosaAction.php 2013-03-25 11:53:12 UTC (rev 1205) @@ -269,43 +269,6 @@ } } } - - public function scanAction() - { - $model = $this->getModel(); - - //Perform a scan of the form directory, to update the database of forms - $eDir = dir($this->formDir); - - $formCnt = 0; - $addCnt = 0; - while (false !== ($filename = $eDir->read())) { - if (substr($filename, -4) == '.xml') { - $formCnt++; - $form = new OpenRosa_Tracker_Source_OpenRosa_Form($this->formDir . $filename); - $filter['gof_form_id'] = $form->getFormID(); - $filter['gof_form_version'] = $form->getFormVersion(); - $forms = $model->load($filter); - - if (!$forms) { - $newValues = array(); - $newValues['gof_id'] = null; - $newValues['gof_form_id'] = $form->getFormID(); - $newValues['gof_form_version'] = $form->getFormVersion(); - $newValues['gof_form_title'] = $form->getTitle(); - $newValues['gof_form_xml'] = $filename; - $newValues = $model->save($newValues); - MUtil_Echo::r($newValues, 'added form'); - $addCnt++; - } - } - } - - $cache = GemsEscort::getInstance()->cache; - $cache->clean(); - - $this->html[] = sprintf('Checked %s forms and added %s forms', $formCnt, $addCnt); - } public function scanresponsesAction() { Modified: trunk/library/classes/Gems/Menu.php =================================================================== --- trunk/library/classes/Gems/Menu.php 2013-03-22 14:27:33 UTC (rev 1204) +++ trunk/library/classes/Gems/Menu.php 2013-03-25 11:53:12 UTC (rev 1205) @@ -292,7 +292,6 @@ $parent = $this; } $page = $parent->addBrowsePage($label, 'pr.openrosa','openrosa'); - $page->addButtonOnly($this->_('Scan FormDefs'), 'pr.openrosa.scan', 'openrosa', 'scan'); $page->addButtonOnly($this->_('Scan Responses'), 'pr.openrosa.scan', 'openrosa', 'scanresponses'); $this->addPage(null, null, 'openrosa', 'submission'); $this->addPage(null, null, 'openrosa', 'formList'); //mind the capital L here Modified: trunk/library/classes/OpenRosa/Tracker/Source/OpenRosa.php =================================================================== --- trunk/library/classes/OpenRosa/Tracker/Source/OpenRosa.php 2013-03-22 14:27:33 UTC (rev 1204) +++ trunk/library/classes/OpenRosa/Tracker/Source/OpenRosa.php 2013-03-25 11:53:12 UTC (rev 1205) @@ -51,19 +51,64 @@ { /** * This holds the path to the location where the form definitions will be stored. - * Will be set on init to: GEMS_ROOT_DIR . '/var/uploads/openrosa/forms/'; * * @var string */ - public $formDir; + protected $formDir; + + /** + * This holds the path to the location where OpenRosa will store it's files. + * Will be set on init to: GEMS_ROOT_DIR . '/var/uploads/openrosa/'; + * + * @var string + */ + protected $baseDir; + + /** + * + * @var Gems_Loader + */ + protected $loader; + + /** + * + * @var Zend_Translate + */ + protected $translate; + public function __construct(array $sourceData, Zend_Db_Adapter_Abstract $gemsDb) { parent::__construct($sourceData, $gemsDb); - $this->formDir = GEMS_ROOT_DIR . '/var/uploads/openrosa/forms/'; + $this->baseDir = GEMS_ROOT_DIR . '/var/uploads/openrosa/'; + $this->formDir = $this->baseDir . 'forms/'; } - + /** + * Open the dir, suppressing possible errors and try to + * create when it does not exist + * + * @param type $directory + * @return Directory + */ + protected function _checkDir($directory) + { + $eDir = @dir($directory); + if (false == $eDir) { + // Dir does probably not exist + if (!is_dir($directory)) { + if (false === @mkdir($directory, 0777, true)) { + MUtil_Echo::pre(sprintf($this->translate->_('Directory %s not found and unable to create'), $directory), 'OpenRosa ERROR'); + } else { + $eDir = @dir($directory); + } + } + } + + return $eDir; + } + + /** * Returns the source surveyId for a given Gems survey Id * * @param type $surveyId @@ -73,7 +118,47 @@ { return $this->tracker->getSurvey($surveyId)->getSourceSurveyId(); } + + protected function _scanForms() + { + $messages = array(); + $formCnt = 0; + $addCnt = 0; + $eDir = $this->_checkDir($this->formDir); + + if ($eDir !== false) { + $model = $this->loader->getModels()->getOpenRosaFormModel(); + while (false !== ($filename = $eDir->read())) { + if (substr($filename, -4) == '.xml') { + $formCnt++; + $form = new OpenRosa_Tracker_Source_OpenRosa_Form($this->formDir . $filename); + $filter['gof_form_id'] = $form->getFormID(); + $filter['gof_form_version'] = $form->getFormVersion(); + $forms = $model->load($filter); + if (!$forms) { + $newValues = array(); + $newValues['gof_id'] = null; + $newValues['gof_form_id'] = $form->getFormID(); + $newValues['gof_form_version'] = $form->getFormVersion(); + $newValues['gof_form_title'] = $form->getTitle(); + $newValues['gof_form_xml'] = $filename; + $newValues = $model->save($newValues); + if (Gems_Tracker::$verbose) { + MUtil_Echo::r($newValues, 'added form'); + } + $addCnt++; + } + } + } + } + + $cache = GemsEscort::getInstance()->cache; + $cache->clean(); + + $messages[] = sprintf('Checked %s forms and added %s forms', $formCnt, $addCnt); + } + //put your code here public function checkSourceActive($userId) { @@ -247,6 +332,8 @@ public function synchronizeSurveys($userId) { + $messages = $this->_scanForms(); + // Surveys in LS $db = $this->getSourceDatabase(); @@ -258,8 +345,9 @@ if (!$openRosaSurveys) { //If no surveys present, just use an empty array as array_combine fails $openRosaSurveys = array(); + $openRosaSurveyIds = array(); } else { - $openRosaSurveyIds = array_combine(array_keys($openRosaSurveys), array_keys($openRosaSurveys)); + $openRosaSurveyIds = array_combine(array_keys($openRosaSurveys), array_keys($openRosaSurveys)); } // Surveys in Gems @@ -293,6 +381,8 @@ $survey->exists = false; $survey->saveSurvey($values, $userId); } + + return $messages; } public function updateConsent(Gems_Tracker_Token $token, $surveyId, $sourceSurveyId = null, $consentCode = null) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-03-22 14:27:36
|
Revision: 1204 http://sourceforge.net/p/gemstracker/code/1204 Author: mennodekker Date: 2013-03-22 14:27:33 +0000 (Fri, 22 Mar 2013) Log Message: ----------- First fixes to get it all going Modified Paths: -------------- trunk/library/classes/Gems/Loader/LoaderAbstract.php trunk/library/classes/Gems/Menu.php trunk/library/classes/Gems/Snippets/SnippetLoader.php trunk/library/classes/GemsEscort.php trunk/library/classes/MUtil/Snippets/SnippetLoader.php trunk/library/classes/OpenRosa/Model/OpenRosaFormModel.php Added Paths: ----------- trunk/library/configs/db/tables/gems__openrosaforms.10.sql.sql Modified: trunk/library/classes/Gems/Loader/LoaderAbstract.php =================================================================== --- trunk/library/classes/Gems/Loader/LoaderAbstract.php 2013-03-22 14:02:16 UTC (rev 1203) +++ trunk/library/classes/Gems/Loader/LoaderAbstract.php 2013-03-22 14:27:33 UTC (rev 1204) @@ -183,4 +183,26 @@ return $obj; } + + public function addPrefixPath($prefix, $path, $prepend = true) { + if ($this->cascade) { + $newPrefix = $prefix . '_' . $this->cascade; + $newPath = $path . '/' . strtr($this->cascade, '_', '/'); + } else { + $newPrefix = $prefix; + $newPath = $path; + } + + if ($prepend) { + $this->_dirs = array($newPrefix => $newPath) + $this->_dirs; + } else { + $this->_dirs[$newPrefix] = $newPath; + } + + $this->_loader->addPrefixPath($newPrefix, $newPath, $prepend); + + if (MUtil_Registry_Source::$verbose) { + MUtil_Echo::r($this->_dirs, '$this->_dirs in ' . get_class($this) . '->' . __FUNCTION__ . '():'); + } + } } \ No newline at end of file Modified: trunk/library/classes/Gems/Menu.php =================================================================== --- trunk/library/classes/Gems/Menu.php 2013-03-22 14:02:16 UTC (rev 1203) +++ trunk/library/classes/Gems/Menu.php 2013-03-22 14:27:33 UTC (rev 1204) @@ -226,7 +226,7 @@ $logMaint->addEditAction('pr.log.maintenance'); // OpenRosa - $this->addOpenRosaContainer($this->_('OpenRosa')); + $this->addOpenRosaContainer($this->_('OpenRosa'), $setup); return $setup; } @@ -285,10 +285,13 @@ * * @param string $label Label for the container */ - public function addOpenRosaContainer($label) + public function addOpenRosaContainer($label, $parent = null) { if ($this->escort->getOption('useOpenRosa')) { - $page = $this->addBrowsePage($label, 'pr.openrosa','openrosa'); + if (is_null($parent)) { + $parent = $this; + } + $page = $parent->addBrowsePage($label, 'pr.openrosa','openrosa'); $page->addButtonOnly($this->_('Scan FormDefs'), 'pr.openrosa.scan', 'openrosa', 'scan'); $page->addButtonOnly($this->_('Scan Responses'), 'pr.openrosa.scan', 'openrosa', 'scanresponses'); $this->addPage(null, null, 'openrosa', 'submission'); Modified: trunk/library/classes/Gems/Snippets/SnippetLoader.php =================================================================== --- trunk/library/classes/Gems/Snippets/SnippetLoader.php 2013-03-22 14:02:16 UTC (rev 1203) +++ trunk/library/classes/Gems/Snippets/SnippetLoader.php 2013-03-22 14:27:33 UTC (rev 1204) @@ -83,9 +83,9 @@ * @param string $path * @return MUtil_Snippets_SnippetLoaderInterface */ - public function addPrefixPath($prefix, $path) + public function addPrefixPath($prefix, $path, $prepend = true) { - $this->_loader->addPrefixPath($prefix, $path); + $this->_loader->addPrefixPath($prefix, $path, $prepend); return $this; } Modified: trunk/library/classes/GemsEscort.php =================================================================== --- trunk/library/classes/GemsEscort.php 2013-03-22 14:02:16 UTC (rev 1203) +++ trunk/library/classes/GemsEscort.php 2013-03-22 14:27:33 UTC (rev 1204) @@ -442,6 +442,8 @@ // First handle dependencies $this->bootstrap(array('db', 'loader', 'util')); + $this->getLoader()->addPrefixPath('OpenRosa', GEMS_LIBRARY_DIR . '/classes/OpenRosa', true); + /** * Add Source for OpenRosa */ Modified: trunk/library/classes/MUtil/Snippets/SnippetLoader.php =================================================================== --- trunk/library/classes/MUtil/Snippets/SnippetLoader.php 2013-03-22 14:02:16 UTC (rev 1203) +++ trunk/library/classes/MUtil/Snippets/SnippetLoader.php 2013-03-22 14:27:33 UTC (rev 1204) @@ -92,9 +92,9 @@ * @param string $path * @return MUtil_Snippets_SnippetLoaderInterface */ - public function addPrefixPath($prefix, $path) + public function addPrefixPath($prefix, $path, $prepend = true) { - $this->loader->addPrefixPath($prefix, $path); + $this->loader->addPrefixPath($prefix, $path, $prepend); return $this; } Modified: trunk/library/classes/OpenRosa/Model/OpenRosaFormModel.php =================================================================== --- trunk/library/classes/OpenRosa/Model/OpenRosaFormModel.php 2013-03-22 14:02:16 UTC (rev 1203) +++ trunk/library/classes/OpenRosa/Model/OpenRosaFormModel.php 2013-03-22 14:27:33 UTC (rev 1204) @@ -80,7 +80,7 @@ * @param array $sort * @return Zend_Db_Table_Select */ - public function _createSelect($filter = null, $sort = null) + public function _createSelect(array $filter, array $sort) { $select = parent::_createSelect($filter, $sort); Added: trunk/library/configs/db/tables/gems__openrosaforms.10.sql.sql =================================================================== --- trunk/library/configs/db/tables/gems__openrosaforms.10.sql.sql (rev 0) +++ trunk/library/configs/db/tables/gems__openrosaforms.10.sql.sql 2013-03-22 14:27:33 UTC (rev 1204) @@ -0,0 +1,13 @@ +CREATE TABLE IF NOT EXISTS `gems__openrosaforms` ( + `gof_id` bigint(20) NOT NULL auto_increment, + `gof_form_id` varchar(249) collate utf8_unicode_ci NOT NULL, + `gof_form_version` varchar(249) collate utf8_unicode_ci NOT NULL, + `gof_form_active` int(1) NOT NULL default '1', + `gof_form_title` text collate utf8_unicode_ci NOT NULL, + `gof_form_xml` varchar(64) collate utf8_unicode_ci NOT NULL, + `gof_changed` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `gof_changed_by` bigint(20) NOT NULL, + `gof_created` timestamp NOT NULL default '0000-00-00 00:00:00', + `gof_createf_by` bigint(20) NOT NULL, + PRIMARY KEY (`gof_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ 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-22 14:02:21
|
Revision: 1203 http://sourceforge.net/p/gemstracker/code/1203 Author: mennodekker Date: 2013-03-22 14:02:16 +0000 (Fri, 22 Mar 2013) Log Message: ----------- Initial checking of OpenRosa survey source (not tested to work yet) Modified Paths: -------------- trunk/library/classes/Gems/Menu.php trunk/library/classes/Gems/Model.php trunk/library/classes/GemsEscort.php trunk/new_project/application/configs/application.ini Added Paths: ----------- trunk/library/classes/Gems/Default/OpenrosaAction.php trunk/library/classes/OpenRosa/ trunk/library/classes/OpenRosa/Model/ trunk/library/classes/OpenRosa/Model/OpenRosaFormModel.php trunk/library/classes/OpenRosa/Tracker/ trunk/library/classes/OpenRosa/Tracker/Source/ trunk/library/classes/OpenRosa/Tracker/Source/OpenRosa/ trunk/library/classes/OpenRosa/Tracker/Source/OpenRosa/Form.php trunk/library/classes/OpenRosa/Tracker/Source/OpenRosa/Model.php trunk/library/classes/OpenRosa/Tracker/Source/OpenRosa.php trunk/library/controllers/OpenrosaController.php trunk/new_project/var/settings/pwd.txt Added: trunk/library/classes/Gems/Default/OpenrosaAction.php =================================================================== --- trunk/library/classes/Gems/Default/OpenrosaAction.php (rev 0) +++ trunk/library/classes/Gems/Default/OpenrosaAction.php 2013-03-22 14:02:16 UTC (rev 1203) @@ -0,0 +1,422 @@ +<?php + +/** + * Handles call like an openRosa compliant server. Implements the api as described on + * https://bitbucket.org/javarosa/javarosa/wiki/OpenRosaAPI + * + * To implement, place the controller in the right directory and allow access without login to the + * following actions: + * formList - Lists the forms available + * submission - Handles receiving a submitted form + * download - Download a form + */ +class Gems_Default_OpenrosaAction extends Gems_Controller_BrowseEditAction +{ + /** + * This holds the path to the location where the form definitions will be stored. + * Will be set on init to: GEMS_ROOT_DIR . '/var/uploads/openrosa/forms/'; + * + * @var string + */ + public $formDir; + + /** + * This holds the path to the location where the uploaded responses and their + * backups will be stored. + * + * Will be set on init to: GEMS_ROOT_DIR . '/var/uploads/openrosa/'; + * + * @var string + */ + public $responseDir; + + /** + * @var Zend_Auth + */ + protected $auth; + + /** + * This lists the actions that need http-auth. Only applies to the actions that + * the openRosa application needs. + * + * ODK Collect: http://code.google.com/p/opendatakit/wiki/ODKCollect + * + * @var array Array of actions + */ + protected $authActions = array('formlist', 'submission', 'download'); + + /** + * This can be used to generate barcodes, use the action + * + * /openrosa/barcode/code/<tokenid> + * + * example: + * /openrosa/barocde/code/22pq-grkq + * + * The image will be a png + */ + public function barcodeAction() + { + $code = $this->getRequest()->getParam('code', 'empty'); + Zend_Layout::getMvcInstance()->disableLayout(); + $this->_helper->viewRenderer->setNoRender(); + + $barcodeOptions = array('text' => $code); + $rendererOptions = array(); + $barcode = Zend_Barcode::render('code128', 'image', $barcodeOptions, $rendererOptions); + $barcode->render(); + } + + protected function createModel($detailed, $action) + { + $model = $this->loader->getModels()->getOpenRosaFormModel(); + + $model->set('TABLE_ROWS', 'label', $this->_('Responses'), 'elementClass', 'Exhibitor'); + + return $model; + } + + /** + * This action should serve the right form to the downloading application + * it should also handle expiration / availability of forms + */ + public function downloadAction() + { + $filename = $this->getRequest()->getParam('form'); + $filename = basename($filename); //Strip paths + + $file = $this->formDir . $filename; + + if (!empty($filename) && file_exists($file)) { + $this->getHelper('layout')->disableLayout(); + $this->getResponse()->setHeader('Content-Type', 'application/xml; charset=utf-8'); + header('Content-Description: File Transfer'); + header('Content-Type: application/octet-stream'); + header('Content-Disposition: attachment; filename="' . $filename . '"'); + header('Content-Transfer-Encoding: binary'); + header('Expires: 0'); + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + header('Pragma: public'); + header('Content-Length: ' . filesize($file)); + ob_clean(); + flush(); + readfile($file); + exit; + } else { + $this->getResponse()->setHttpResponseCode(404); + $this->html->div("form $filename not found"); + } + } + + /** + * Accessible via formList as defined in the menu and standard for openRosa clients + */ + public function formlistAction() + { + //first create the baseurl of the form http(s)://projecturl/openrosa/download/form/ + $helper = new Zend_View_Helper_ServerUrl(); + $baseUrl = $helper->serverUrl() . Zend_Controller_Front::getInstance()->getBaseUrl() . '/openrosa/download/form/'; + + //As we don't have forms defined yet, we pass in an array, but ofcourse this should be dynamic + //and come from a helper method + $model = $this->getModel(); + $rawForms = $model->load(array('gof_form_active'=>1)); + foreach($rawForms as $form) { + $forms[] = array( + 'formID' => $form['gof_form_id'], + 'name' => $form['gof_form_title'], + 'version' => $form['gof_form_version'], + 'hash' => md5($form['gof_form_id'].$form['gof_form_version']), + 'downloadUrl' => $baseUrl . $form['gof_form_xml'] + ); + } + + //Now make it a rosaresponse + $this->makeRosaResponse(); + + $xml = $this->getXml('xforms xmlns="http://openrosa.org/xforms/xformsList"'); + foreach ($forms as $form) { + $xform = $xml->addChild('xform'); + foreach ($form as $key => $value) { + $xform->addChild($key, $value); + } + } + + echo $xml->asXML(); + } + + public function getTopic($count = 1) + { + return 'OpenRosa Form'; + } + + public function getTopicTitle() + { + return 'OpenRosa Forms'; + } + + /** + * Create an xml response + * + * @param string $rootNode + * @return SimpleXMLElement + */ + protected function getXml($rootNode) + { + $this->getResponse()->setHeader('Content-Type', 'text/xml; charset=utf-8'); + + $xml = simplexml_load_string("<?xml version='1.0' encoding='utf-8'?><$rootNode />"); + + return $xml; + } + + public function init() + { + parent::init(); + + $this->responseDir = GEMS_ROOT_DIR . '/var/uploads/openrosa/'; + $this->formDir = $this->responseDir . 'forms/'; + } + + /** + * Each rosa response should have the x-openrosa-version header and disable the layout to allow + * for xml repsonses if needed. We don't need a menu etc. on the openrosa responses + */ + protected function makeRosaResponse() + { + $this->getHelper('layout')->disableLayout(); + $this->getResponse()->setHeader('X-OpenRosa-Version', '1.0'); + } + + /** + * Handles receiving and storing the data from a form, files are stored on actual upload process + * this only handles storing form data and can be used for resubmission too. + * + * @param type $xmlFile + * @return string DeviceID or false on failure + */ + private function processReceivedForm($answerXmlFile) + { + //Log what we received + $log = Gems_Log::getLogger(); + //$log->log(print_r($xmlFile, true), Zend_Log::ERR); + + $xml = simplexml_load_file($answerXmlFile); + + $formId = $xml->attributes()->id; + $formVersion = $xml->attributes()->version; + //Lookup what form belongs to this formId and then save + $model = $this->getModel(); + $filter = array( + //'gof_form_active' => 1, + 'gof_form_id' => $formId, + 'gof_form_version' => $formVersion, + ); + if ($formData = $model->loadFirst($filter)) { + $form = new OpenRosa_Tracker_Source_OpenRosa_Form($this->formDir . $formData['gof_form_xml']); + $form->saveAnswer($answerXmlFile); + + $deviceId = $xml->DeviceId[0]; + return $deviceId; + } else { + return false; + } + } + + + /** + * Implements HTTP Basic auth + */ + public function preDispatch() + { + parent::preDispatch(); + + $action = strtolower($this->getRequest()->getActionName()); + if (in_array($action, $this->authActions)) { + $auth = Zend_Auth::getInstance(); + $this->auth = $auth; + + if (!$auth->hasIdentity()) { + $config = array( + 'accept_schemes' => 'basic', + 'realm' => GEMS_PROJECT_NAME, + 'nonce_timeout' => 3600, + ); + $adapter = new Zend_Auth_Adapter_Http($config); + $basicResolver = new Zend_Auth_Adapter_Http_Resolver_File(); + + //This is a basic resolver, use username:realm:password + //@@TODO: move to a better db stored authentication system + + $basicResolver->setFile(GEMS_ROOT_DIR . '/var/settings/pwd.txt'); + $adapter->setBasicResolver($basicResolver); + $request = $this->getRequest(); + $response = $this->getResponse(); + + assert($request instanceof Zend_Controller_Request_Http); + assert($response instanceof Zend_Controller_Response_Http); + + $adapter->setRequest($request); + $adapter->setResponse($response); + + $result = $auth->authenticate($adapter); + + if (!$result->isValid()) { + $adapter->getResponse()->sendResponse(); + print 'Unauthorized'; + exit; + } + } + } + } + + public function scanAction() + { + $model = $this->getModel(); + + //Perform a scan of the form directory, to update the database of forms + $eDir = dir($this->formDir); + + $formCnt = 0; + $addCnt = 0; + while (false !== ($filename = $eDir->read())) { + if (substr($filename, -4) == '.xml') { + $formCnt++; + $form = new OpenRosa_Tracker_Source_OpenRosa_Form($this->formDir . $filename); + $filter['gof_form_id'] = $form->getFormID(); + $filter['gof_form_version'] = $form->getFormVersion(); + $forms = $model->load($filter); + + if (!$forms) { + $newValues = array(); + $newValues['gof_id'] = null; + $newValues['gof_form_id'] = $form->getFormID(); + $newValues['gof_form_version'] = $form->getFormVersion(); + $newValues['gof_form_title'] = $form->getTitle(); + $newValues['gof_form_xml'] = $filename; + $newValues = $model->save($newValues); + MUtil_Echo::r($newValues, 'added form'); + $addCnt++; + } + } + } + + $cache = GemsEscort::getInstance()->cache; + $cache->clean(); + + $this->html[] = sprintf('Checked %s forms and added %s forms', $formCnt, $addCnt); + } + + public function scanresponsesAction() + { + $model = $this->getModel(); + + //Perform a scan of the form directory, to update the database of forms + $eDir = dir($this->responseDir); + + $formCnt = 0; + $addCnt = 0; + $rescan = $this->getRequest()->getParam('rescan', false); + while (false !== ($filename = $eDir->read())) { + $ext = substr($filename, -4); + if ($ext == '.xml' || ($ext == '.bak' && $rescan)) { + if ($rescan) { + $oldname = $filename; + $filename = substr($oldname, 0, -4) . '.xml'; + rename($this->responseDir . $oldname, $this->responseDir . $filename); + } + $files[] = $filename; + $formCnt++; + } + } + + foreach ($files as $filename) { + $result = $this->processReceivedForm($this->responseDir . $filename); + if ($result !== false) { + $addCnt++; + } + } + $cache = GemsEscort::getInstance()->cache; + $cache->clean(); + + $this->html[] = sprintf('Checked %s responses and added %s responses', $formCnt, $addCnt); + } + + /** + * Accepts the form + * + * Takes two roundtrips: + * - first we get a HEAD request that should be answerd with + * responsecode 204 + * - then we get a post that only submits $_FILES (so actual $_POST will be empty) + * this will be an xml file for the actuel response and optionally images and/or video + * proper responses are + * 201 received and stored + * 202 received ok, not stored + */ + public function submissionAction() + { + $this->makeRosaResponse(); + + if ($this->getRequest()->isHead()) { + $this->getResponse()->setHttpResponseCode(204); + } elseif ($this->getRequest()->isPost()) { + //Post + // We get $_FILES variable holding the formresults as xml and all possible + // attachments like photo's and video's + $upload = new Zend_File_Transfer_Adapter_Http(); + + // We should really add some validators here see http://framework.zend.com/manual/en/zend.file.transfer.validators.html + // Returns all known internal file information + $files = $upload->getFileInfo(); + + foreach ($files as $file => $info) { + // file uploaded ? + if (!$upload->isUploaded($file)) { + print "Why haven't you uploaded the file ?"; + continue; + } + + // validators are ok ? + if (!$upload->isValid($file)) { + print "Sorry but $file is not what we wanted"; + continue; + } + } + + //Dit moet een filter worden (rename filter) http://framework.zend.com/manual/en/zend.file.transfer.filters.html + $upload->setDestination($this->responseDir); + + //Hier moeten we denk ik eerst de xml_submission_file uitlezen, en daar + //iets mee doen + if ($upload->receive('xml_submission_file')) { + $xmlFile = $upload->getFileInfo('xml_submission_file'); + $answerXmlFile = $xmlFile['xml_submission_file']['tmp_name']; + $deviceId = $this->processReceivedForm($answerXmlFile); + if ($deviceId === false) { + //form not accepted! + foreach ($xml->children() as $child) { + $log->log($child->getName() . ' -> ' . $child, Zend_Log::ERR); + } + } else { + //$log->log(print_r($files, true), Zend_Log::ERR); + //$log->log($deviceId, Zend_Log::ERR); + foreach ($upload->getFileInfo() as $file => $info) { + if ($info['received'] != 1) { + //Rename to deviceid_md5(time)_filename + //@@TODO: move to form subdir, for better separation + $upload->addFilter('Rename', $deviceId . '_' . md5(time()) . '_' . $info['name'], $file); + } + } + + //Now receive the other files + if (!$upload->receive()) { + $messages = $upload->getMessages(); + echo implode("\n", $messages); + } + $this->getResponse()->setHttpResponseCode(201); //Form received ok + } + } + } + } +} \ No newline at end of file Modified: trunk/library/classes/Gems/Menu.php =================================================================== --- trunk/library/classes/Gems/Menu.php 2013-03-22 13:17:27 UTC (rev 1202) +++ trunk/library/classes/Gems/Menu.php 2013-03-22 14:02:16 UTC (rev 1203) @@ -224,6 +224,9 @@ $logMaint = $page->addPage($this->_('Maintenance'), 'pr.log.maintenance', 'log-maintenance'); $logMaint->addAutofilterAction(); $logMaint->addEditAction('pr.log.maintenance'); + + // OpenRosa + $this->addOpenRosaContainer($this->_('OpenRosa')); return $setup; } @@ -274,6 +277,26 @@ } } + + /** + * Shortcut function to add all items needed for OpenRosa + * + * Should be enabled in application.ini by using useOpenRosa = 1 + * + * @param string $label Label for the container + */ + public function addOpenRosaContainer($label) + { + if ($this->escort->getOption('useOpenRosa')) { + $page = $this->addBrowsePage($label, 'pr.openrosa','openrosa'); + $page->addButtonOnly($this->_('Scan FormDefs'), 'pr.openrosa.scan', 'openrosa', 'scan'); + $page->addButtonOnly($this->_('Scan Responses'), 'pr.openrosa.scan', 'openrosa', 'scanresponses'); + $this->addPage(null, null, 'openrosa', 'submission'); + $this->addPage(null, null, 'openrosa', 'formList'); //mind the capital L here + $this->addPage(null, null, 'openrosa', 'download'); + $this->addPage(null, null, 'openrosa', 'barcode'); // For barcode rendering + } + } /** * Shortcut function to create the respondent page. Modified: trunk/library/classes/Gems/Model.php =================================================================== --- trunk/library/classes/Gems/Model.php 2013-03-22 13:17:27 UTC (rev 1202) +++ trunk/library/classes/Gems/Model.php 2013-03-22 14:02:16 UTC (rev 1203) @@ -177,7 +177,21 @@ return $model; } + + /** + * Returns the OpenRosaFormModel + * + * It is special since it can show how many responses each table has + * + * @return OpenRosa_Model_OpenRosaFormModel + */ + public function getOpenRosaFormModel() + { + $model = $this->_loadClass('OpenRosaFormModel', true); + return $model; + } + /** * Load the organization model * Modified: trunk/library/classes/GemsEscort.php =================================================================== --- trunk/library/classes/GemsEscort.php 2013-03-22 13:17:27 UTC (rev 1202) +++ trunk/library/classes/GemsEscort.php 2013-03-22 14:02:16 UTC (rev 1203) @@ -430,6 +430,25 @@ return $locale; } + + /** + * Initialize the OpenRosa survey source + * + * @param Zend_Controller_Action $actionController + */ + public function _initOpenRosa(Zend_Controller_Action $actionController = null) + { + if ($this->getOption('useOpenRosa')) { + // First handle dependencies + $this->bootstrap(array('db', 'loader', 'util')); + + /** + * Add Source for OpenRosa + */ + $tracker = $this->loader->getTracker(); + $tracker->addSourceClasses(array('OpenRosa'=>'OpenRosa form')); + } + } /** Added: trunk/library/classes/OpenRosa/Model/OpenRosaFormModel.php =================================================================== --- trunk/library/classes/OpenRosa/Model/OpenRosaFormModel.php (rev 0) +++ trunk/library/classes/OpenRosa/Model/OpenRosaFormModel.php 2013-03-22 14:02:16 UTC (rev 1203) @@ -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. + * + * 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 OpenRosaFormModel + * + * Long description for class OpenRosaFormModel (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 OpenRosa_Model_OpenRosaFormModel extends Gems_Model_JoinModel +{ + /** + * + * @var Zend_Translate_Adapter + */ + public $translate; + + public function __construct() + { + parent::__construct('orf', 'gems__openrosaforms', 'gof'); + } + + public function afterRegistry() + { + parent::afterRegistry(); + + $this->setIfExists('gof_form_id', 'label', $this->translate->_('FormID')); + $this->setIfExists('gof_form_version', 'label', $this->translate->_('Version')); + $this->setIfExists('gof_form_title', 'label', $this->translate->_('Name')); + $this->setIfExists('gof_form_active', 'label', $this->translate->_('Active'), 'elementClass', 'checkbox'); + } + + /** + * Get a select statement using a filter and sort + * + * Modified to add the information schema, only possible like this since + * the table has no primary key and can not be added using normal joins + * + * @param array $filter + * @param array $sort + * @return Zend_Db_Table_Select + */ + public function _createSelect($filter = null, $sort = null) + { + $select = parent::_createSelect($filter, $sort); + + $config = $select->getAdapter()->getConfig(); + if (isset($config['dbname'])) { + $constraint = $select->getAdapter()->quoteInto(' AND TABLE_SCHEMA=?', $config['dbname']); + } else { + $constraint = ''; + } + $select->joinLeft('INFORMATION_SCHEMA.TABLES', "table_name = convert(concat_ws('_','gems__orf_', REPLACE(gof_form_id,'.','_'),gof_form_version) USING utf8)" . $constraint, array('TABLE_ROWS')); + return $select; + } +} \ No newline at end of file Added: trunk/library/classes/OpenRosa/Tracker/Source/OpenRosa/Form.php =================================================================== --- trunk/library/classes/OpenRosa/Tracker/Source/OpenRosa/Form.php (rev 0) +++ trunk/library/classes/OpenRosa/Tracker/Source/OpenRosa/Form.php 2013-03-22 14:02:16 UTC (rev 1203) @@ -0,0 +1,497 @@ +<?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. + * + * Helper for OpenRosa forms + * + * It supports a subset of OpenRosa forms and provides a bridge between GemsTracker + * models and the xml-formdefinition. + * + * @package Gems + * @subpackage OpenRosa + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: Sample.php 215 2011-07-12 08:52:54Z michiel $ + */ + +/** + * Helper for OpenRosa forms + * + * It supports a subset of OpenRosa forms and provides a bridge between GemsTracker + * models and the xml-formdefinition. + * + * @package Gems + * @subpackage OpenRosa + * @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 OpenRosa_Tracker_Source_OpenRosa_Form +{ + /** + * @var Gems_Model_JoinModel + */ + private $model; + private $bind; + private $instance; + private $body; + private $deviceIdField; + private $formID; + private $formVersion; + private $title; + + /** + * @var SimpleXmlElement + */ + private $_xml; + + /** + * Create an OpenRosaForm from an existing filename + * + * @param string $file the sanitized filename (absolute path) + */ + public function __construct($file) + { + $this->translate = Zend_Registry::getInstance()->get('Zend_Translate'); + if (!file_exists($file)) { + throw new Gems_Exception_Coding(sprintf($this->translate->_('File not found: %s'), $file)); + } + + //We read the xml file + $xml = simplexml_load_file($file); + if ($xml === false) { + throw new Gems_Exception_Coding(sprintf($this->translate->_('Could not read form definition for form %s'), $file)); + } + $this->_xml = $xml; + + //For working with the namespaces: + //$xml->children('h', true)->head->children()->model->bind + //use namespace h children for the root element, and find h:head, then use no namespace children + //and find model->bind so we get h:head/model/bind elements + $this->bind = $this->flattenBind($this->_xml->children('h', true)->head->children()->model->bind); + $this->body = $this->flattenBody($xml->children('h', true)->body->children(), $context = ''); + $this->instance = $this->flattenInstance($this->_xml->children('h', true)->head->children()->model->instance->data->children()); + } + + private function createTable() + { + $tableName = $this->getTableName(); + $tablePrefix = 'orf'; + $db = Zend_Registry::getInstance()->get('db'); + + $sql = 'CREATE TABLE IF NOT EXISTS ' . $db->quoteIdentifier($tableName) . ' (' + . $db->quoteIdentifier($tablePrefix . '_id') . " bigint(20) NOT NULL auto_increment,\n"; + + foreach ($this->instance as $name => $element) { + $bindName = str_replace('_', '/', '_data_' . $name); + $bindInfo = $this->bind[$bindName]; + + $field = array(); + switch ($bindInfo['type']) { + case 'date': + case 'dateTime': + $field['type'] = 'datetime'; + $field['size'] = ''; + break; + + case 'barcode': + // The token field + $field['size'] = 32; + $field['type'] = 'varchar'; + $field['size'] = '(' . $field['size'] . ')'; + + case 'string': + // Always make it text + $field['type'] = 'text'; + $field['size'] = ''; + break; + + case 'select': + //A multi select + $field['size'] = '(1)'; + $field['type'] = 'int'; + $items = $this->body[$bindName]['item']; + foreach ($items as $key => $value) { + $multiName = $name . '_' . $key; + $sql .= " " . $db->quoteIdentifier($multiName) . " {$field['type']}{$field['size']} DEFAULT 0 NOT NULL,\n"; + } + //So we don't get an extra field + unset($field['type']); + break; + + case 'select1': + //Select one, size can be as a small as largest answeroption + $items = $this->body[$bindName]['item']; + $field['size'] = 1; + foreach ($items as $key => $value) { + if (strlen($key) > $field['size']) { + $field['size'] = strlen($key); + } + } + $field['type'] = 'varchar'; + $field['size'] = '(' . $field['size'] . ')'; + break; + + case 'int': + $field['type'] = 'bigint'; + $field['size'] = '(20)'; + + case 'decimal': + $field['type'] = 'float'; + $field['size'] = ''; + + default: + $field['type'] = 'varchar'; + $field['size'] = 5; + $field['size'] = '(' . $field['size'] . ')'; + } + + if (isset($field['type'])) { + $sql .= " " . $db->quoteIdentifier($name) . " {$field['type']}{$field['size']} DEFAULT NULL,\n"; + } + } + + $sql .= $db->quoteIdentifier($tablePrefix . '_changed') . " timestamp NOT NULL,\n" + . $db->quoteIdentifier($tablePrefix . '_changed_by') . " bigint(20) NOT NULL,\n" + . $db->quoteIdentifier($tablePrefix . '_created') . " timestamp NOT NULL,\n" + . $db->quoteIdentifier($tablePrefix . '_created_by') . " bigint(20) NOT NULL,\n" + . 'PRIMARY KEY (`' . $tablePrefix . '_id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;'; + + $db->query($sql); + + return new Gems_Model_JoinModel($this->getFormID(), $tableName, $tablePrefix); + } + + private function flattenBind($xml) + { + foreach ($xml as $name => $element) { + $attributes = array(); + foreach ($element->attributes() as $name => $value) { + $attributes[$name] = (string) $value; + if ($name == 'nodeset') { + $ref = (string) $value; + } + } + foreach ($element->attributes('jr', true) as $name => $value) { + $attributes['jr'] [$name] = (string) $value; + } + $output[$ref] = $attributes; + } + + return $output; + } + + /** + * Return flattend element + * + * @param SimpleXMLElement $xml + * @param type $context + */ + private function flattenBody($xml, $context = '') + { + foreach ($xml as $elementName => $element) { + //Check ref first + $elementContext = $context; + foreach ($element->attributes() as $name => $value) { + if ($name == 'ref') { + if (!empty($elementContext)) { + $elementContext .= '/'; + } else { + $elementContext = '/data/'; + } + if (substr($value, 0, 1) == '/') { + $elementContext = ''; + } + $elementContext .= $value; + break; + } + } + $result['context'] = $elementContext; + $result['name'] = $element->getName(); + + //elementName can be label, hint, or a sub element (group, input, select, select1 + switch ($elementName) { + case 'label': + $result['label'] = (string) $element; + break; + + case 'hint': + $result['hint'] = (string) $element; + break; + + case 'value': + $result['value'] = (string) $element; + break; + + case 'input': + case 'select': + case 'select1': + //has only value and label but repeated, add value/label pairs in array + $rawItem = $this->flattenBody($element, $elementContext); + $rawItem['context'] = $elementContext; + $rawItem['name'] = $element->getName(); + $result[$rawItem['context']] = $rawItem; + break; + + case 'item': + //has only value and label but repeated, add value/label pairs in array + $rawItem = $this->flattenBody($element->children(), $elementContext); + unset($rawItem['context']); + unset($rawItem['name']); + $result['item'][$rawItem['value']] = $rawItem['label']; + break; + + case 'group': + default: + unset($result['context']); + unset($result['name']); + $subarray = $this->flattenBody($element->children(), $elementContext); + unset($subarray['context']); + unset($subarray['label']); + unset($subarray['hint']); + unset($subarray['name']); + $result = $result + $subarray; + break; + } + } + + return $result; + } + + private function flattenInstance($xml, $parent = '') + { + $output = array(); + foreach ($xml as $name => $element) { + if (!empty($parent)) { + $elementName = $parent . '_' . $name; + } else { + $elementName = $name; + } + if (count($element->children()) > 0) { + $output = $output + $this->flattenInstance($element, $elementName); + } else { + $output[$elementName] = (string) $element; + } + } + return $output; + } + + /** + * Returns what field (path) contains the attributes jr:preload="property" jr:preloadParams="deviceid" + * from the moden -> bind elements + * + * @return string + */ + public function getDeviceIdField() + { + if (empty($this->deviceIdField)) { + foreach ($this->_xml->children('h', true)->head->children()->model->bind as $bind) { + if ($presets = $bind->attributes('jr', true)) { + foreach ($presets as $key => $value) { + if ($value == 'deviceid') { + $this->deviceIdField = $bind->attributes()->nodeset; + break; + } + } + } + } + } + + return $this->deviceIdField; + } + + /** + * Returns the formID from the instance element id attribute + * + * @return string + */ + public function getFormID() + { + if (empty($this->formID)) { + foreach ($this->_xml->children('h', true)->head->children()->model->instance->children() as $name => $element) { + if (!empty($element->attributes()->id)) { + $this->formID = $element->attributes()->id; + break; + } + } + } + + return $this->formID; + } + + /** + * Returns the formVersion from the instance element version attribute + * + * @return string + */ + public function getFormVersion() + { + if (empty($this->formVersion)) { + foreach ($this->_xml->children('h', true)->head->children()->model->instance->children() as $name => $element) { + if (!empty($element->attributes()->version)) { + $this->formVersion = $element->attributes()->version; + break; + } + } + } + + return $this->formVersion; + + } + + /** + * @return Gems_Model_JoinModel + */ + public function getModel() + { + if (empty($this->model)) { + try { + $model = new Gems_Model_JoinModel($this->getFormID(), $this->getTableName(), 'orf'); + } catch (Exception $exc) { + //Failed, now create the table as it obviously doesn't exists + $model = $this->createTable(); + } + + //Now we have the table, let's add some multi options etc. + $checkBox[1] = $this->translate->_('Checked'); + $checkbox[0] = $this->translate->_('Not checked'); + foreach ($this->instance as $name => $element) { + $bindName = str_replace('_', '/', '_data_' . $name); + $bindInfo = $this->bind[$bindName]; + + switch ($bindInfo['type']) { + case 'select': + //A multi select + $items = $this->body[$bindName]['item']; + foreach ($items as $key => $value) { + $multiName = $name . '_' . $key; + $label = sprintf('%s [%s]', $this->body[$bindName]['label'], $value); + $model->set($multiName, 'multiOptions', $checkBox, 'label', $label); + } + break; + + case 'select1': + $items = $this->body[$bindName]['item']; + $model->set($name, 'multiOptions', $items); + default: + $label = null; + if (array_key_exists($bindName, $this->body)) { + if (array_key_exists('label', $this->body[$bindName])) { + $label = $this->body[$bindName]['label']; + if (array_key_exists('hint', $this->body[$bindName])) { + $label = sprintf('%s (%s)', $label, $this->body[$bindName]['hint']); + } + $model->set($name, 'label', $label); + } + } + break; + } + } + $this->model = $model; + } + + return $this->model; + } + + public function getTableName() + { + $tableName = str_replace('.', '_', 'gems__orf__' . $this->getFormID() . '_' . $this->getFormVersion()); + + return $tableName; + } + + /** + * Returns the form title from the h:title element + * + * @return string + */ + public function getTitle() + { + if (empty($this->title)) { + $this->title = $this->_xml->children('h', true)->head->children('h', true)->title; + } + + return $this->title; + } + + public function saveAnswer($file, $remove = true) + { + if (!file_exists($file)) { + throw new Gems_Exception_Coding(sprintf($this->translate->_('File not found: %s'), $file)); + } + + //We read the xml file + $xml = simplexml_load_file($file); + if ($xml === false) { + throw new Gems_Exception_Coding(sprintf($this->translate->_('Could not read form definition for form %s'), $file)); + } + + $formId = (string) $xml->attributes()->id; + if ($formId != $this->getFormID()) { + //Can not save to this object as it is a different form! + throw new Gems_Exception_Coding(sprintf($this->translate->_('Response is for a different formId: %s <-> %s'), $formId, $this->getFormID())); + } + + $answers = $this->flattenInstance($xml); + //Now we should parse the response, extract the options given for a (multi)select + foreach ($this->instance as $name => $element) { + $bindName = str_replace('_', '/', '_data_' . $name); + $bindInfo = $this->bind[$bindName]; + + if ($bindInfo['type'] == 'dateTime') { + $answers[$name] = new Zend_Date($answers[$name], Zend_Date::ISO_8601); + } + if ($bindInfo['type'] == 'select') { + //A multi select + $items = explode(' ', $answers[$name]); + foreach ($items as $idx => $key) { + $multiName = $name . '_' . $key; + $answers[$multiName] = 1; + } + unset($answers[$name]); + } + } + + $answers['orf_id'] = null; + $model = $this->getModel(); + $answers = $model->save($answers); + if ($model->getChanged() && $remove) { + $log = Gems_Log::getLogger(); + $log->log($file . '-->' . substr($file, 0, -3) . 'bak', Zend_Log::ERR); + rename($file, substr($file, 0, -3) . 'bak'); + } + // @@TODO: make hook for respondentID lookup too + if (isset($answers['token'])) { + // We receveid a form linked to a token, signal the 'inSource' for this token. + $loader = GemsEscort::getInstance()->getLoader(); + $token = $loader->getTracker()->getToken($answers['token']); + $token->getUrl($loader->getCurrentUser()->getLocale(), $loader->getCurrentUser()->getUserId()); + } + + return $answers; + } +} \ No newline at end of file Added: trunk/library/classes/OpenRosa/Tracker/Source/OpenRosa/Model.php =================================================================== --- trunk/library/classes/OpenRosa/Tracker/Source/OpenRosa/Model.php (rev 0) +++ trunk/library/classes/OpenRosa/Tracker/Source/OpenRosa/Model.php 2013-03-22 14:02:16 UTC (rev 1203) @@ -0,0 +1,67 @@ +<?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 Zsd + * @subpackage Tracker + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: DbSourceSurveyModel.php 223 2011-12-19 09:48:15Z 175780 $ + */ + +/** + * More correctly a Survey ANSWERS Model as it adds answers to token information + * + * @package Zsd + * @subpackage Tracker + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5 + */ +class OpenRosa_Tracker_Source_OpenRosa_Model extends Gems_Tracker_SurveyModel +{ + public function addAnswers(array $inputRows) + { + $tokens = MUtil_Ra::column('gto_id_token', $inputRows); + + $answerRows = $this->source->getRawTokenAnswerRows(array('token' => $tokens), $this->survey->getSurveyId()); + $emptyRow = array_fill_keys($this->getItemNames(), null); + $resultRows = array(); + + $answerTokens = MUtil_Ra::column('token', $answerRows); + + foreach ($inputRows as $row) { + $tokenId = $row['gto_id_token']; + $idx = array_search($tokenId, $answerTokens); + if ($idx !== false && isset($answerRows[$idx])) { + $resultRows[$tokenId] = $row + $answerRows[$idx] + $emptyRow; + } else { + $resultRows[$tokenId] = $row + $emptyRow; + } + } + return $resultRows; + } +} \ No newline at end of file Added: trunk/library/classes/OpenRosa/Tracker/Source/OpenRosa.php =================================================================== --- trunk/library/classes/OpenRosa/Tracker/Source/OpenRosa.php (rev 0) +++ trunk/library/classes/OpenRosa/Tracker/Source/OpenRosa.php 2013-03-22 14:02:16 UTC (rev 1203) @@ -0,0 +1,302 @@ +<?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 OpenRosaSource + * + * Long description for class OpenRosaSource (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 OpenRosa_Tracker_Source_OpenRosa extends Gems_Tracker_Source_SourceAbstract +{ + /** + * This holds the path to the location where the form definitions will be stored. + * Will be set on init to: GEMS_ROOT_DIR . '/var/uploads/openrosa/forms/'; + * + * @var string + */ + public $formDir; + + public function __construct(array $sourceData, Zend_Db_Adapter_Abstract $gemsDb) + { + parent::__construct($sourceData, $gemsDb); + $this->formDir = GEMS_ROOT_DIR . '/var/uploads/openrosa/forms/'; + } + + /** + * Returns the source surveyId for a given Gems survey Id + * + * @param type $surveyId + * @return type + */ + private function _getSid($surveyId) + { + return $this->tracker->getSurvey($surveyId)->getSourceSurveyId(); + } + + //put your code here + public function checkSourceActive($userId) + { + $active = true; + + $values['gso_active'] = $active ? 1 : 0; + $values['gso_status'] = $active ? 'Active' : 'Inactive'; + $values['gso_last_synch'] = new Zend_Db_Expr('CURRENT_TIMESTAMP'); + + $this->_updateSource($values, $userId); + + return $active; + } + + public function copyTokenToSource(Gems_Tracker_Token $token, $language, $surveyId, $sourceSurveyId = null) + { + // Maybe insert meta data here? + } + + public function getAnswerDateTime($fieldName, Gems_Tracker_Token $token, $surveyId, $sourceSurveyId = null) + { + + } + + public function getCompletionTime(Gems_Tracker_Token $token, $surveyId, $sourceSurveyId = null) + { + + } + + public function getDatesList($language, $surveyId, $sourceSurveyId = null) + { + + } + + public function getQuestionInformation($language, $surveyId, $sourceSurveyId = null) + { + $survey = $this->getSurvey($surveyId, $sourceSurveyId); + $model = $survey->getModel(); + $result = array(); + + foreach($model->getItemsOrdered() as $name) { + if ($label = $model->get($name, 'label')) { + $result[$name]['question'] = $label; + if ($answers = $model->get($name, 'multiOptions')) { + $result[$name]['answers'] = $answers; + } + } + } + + return $result; + } + + public function getQuestionList($language, $surveyId, $sourceSurveyId = null) + { + $survey = $this->getSurvey($surveyId, $sourceSurveyId); + $model = $survey->getModel(); + $result = array(); + + foreach($model->getItemsOrdered() as $name) { + if ($label = $model->get($name, 'label')) { + $result[$name] = $label; + } + } + + return $result; + } + + public function getRawTokenAnswerRow($tokenId, $surveyId, $sourceSurveyId = null) + { + $survey = $this->getSurvey($surveyId, $sourceSurveyId); + $model = $survey->getModel(); + + $result = $model->loadFirst(array('token' => $tokenId)); + return $result; + } + + public function getRawTokenAnswerRows(array $filter, $surveyId, $sourceSurveyId = null) + { + $survey = $this->getSurvey($surveyId, $sourceSurveyId); + $model = $survey->getModel(); + + $result = $model->load(); + + if ($result) { + return $result; + } + return array(); + } + + public function getStartTime(Gems_Tracker_Token $token, $surveyId, $sourceSurveyId = null) + { + + } + + public function getSurvey($surveyId, $sourceSurveyId = null) + { + if (is_null($sourceSurveyId)) { + $sourceSurveyId = $this->_getSid($surveyId); + } + + $surveyInfo = $this->getSurveyInfo($sourceSurveyId); + $survey = new OpenRosa_Tracker_Source_OpenRosa_Form($this->formDir . $surveyInfo['gof_form_xml']); + + return $survey; + } + + /** + * Return info about the survey (row from gems__openrosaforms) + * + * @param int $sourceSurveyId + * @return array + */ + public function getSurveyInfo($sourceSurveyId) + { + $db = $this->getSourceDatabase(); + + $select = $db->select(); + $select->from('gems__openrosaforms') + ->where('gof_id = ?', $sourceSurveyId); + + return $db->fetchRow($select); + } + + public function getSurveyAnswerModel(Gems_Tracker_Survey $survey, $language = null, $sourceSurveyId = null) + { + if (null === $sourceSurveyId) { + $sourceSurveyId = $this->_getSid($survey->getSurveyId()); + } + + $surveyModel = $this->getSurvey($survey->getSurveyId(), $sourceSurveyId)->getModel(); + $model = new OpenRosa_Tracker_Source_OpenRosa_Model($survey, $this); + $questionsList = $this->getQuestionList($language, $survey->getSurveyId(), $sourceSurveyId); + foreach($questionsList as $item => $question) { + $allOptions = $surveyModel->get($item); + $allowed = array_fill_keys(array('storageFormat', 'dateFormat', 'label', 'multiOptions', 'maxlength', 'type'),1); + $options = array_intersect_key($allOptions, $allowed); + + $options['label'] = strip_tags($question); + + //Should also do something to get the better titles... + $model->set($item, $options); + } + + return $model; + } + + public function getTokenUrl(Gems_Tracker_Token $token, $language, $surveyId, $sourceSurveyId) + { + // There is no url, so return null + return; + } + + public function inSource(Gems_Tracker_Token $token, $surveyId, $sourceSurveyId = null) + { + // The token is always in source + return true; + } + + public function isCompleted(Gems_Tracker_Token $token, $surveyId, $sourceSurveyId = null) + { + $result = $this->getRawTokenAnswerRow($token->getTokenId(), $surveyId); + $completed = !empty($result); + + return $completed; + } + + public function setRawTokenAnswers(Gems_Tracker_Token $token, array $answers, $surveyId, $sourceSurveyId = null) + { + + } + + public function synchronizeSurveys($userId) + { + // Surveys in LS + $db = $this->getSourceDatabase(); + + $select = $db->select(); + $select->from('gems__openrosaforms'); + + $openRosaSurveys = $db->fetchAssoc($select); + + if (!$openRosaSurveys) { + //If no surveys present, just use an empty array as array_combine fails + $openRosaSurveys = array(); + } else { + $openRosaSurveyIds = array_combine(array_keys($openRosaSurveys), array_keys($openRosaSurveys)); + } + + // Surveys in Gems + $gemsSurveys = $this->_getGemsSurveysForSynchronisation(); + + foreach ($gemsSurveys as $surveyId => $sourceSurveyId) { + $survey = $this->tracker->getSurveyBySourceId($sourceSurveyId, $this->getId()); + if (isset($openRosaSurveyIds[$sourceSurveyId])) { + // Exists + $values['gsu_survey_name'] = $openRosaSurveys[$sourceSurveyId]['gof_form_title'] . ' [' . $openRosaSurveys[$sourceSurveyId]['gof_form_version'] . ']'; + $values['gsu_surveyor_active'] = $openRosaSurveys[$sourceSurveyId]['gof_form_active']; + $values['gsu_status'] = 'Ok'; + } else { + // No longer exists + $values['gsu_surveyor_active'] = 0; + $values['gsu_status'] = 'No longer exists'; + } + + $survey->saveSurvey($values, $userId); + } + + foreach (array_diff($openRosaSurveyIds, $gemsSurveys) as $sourceSurveyId) { + // New survey + $values = array(); + $values['gsu_survey_name'] = $openRosaSurveys[$sourceSurveyId]['gof_form_title'] . ' [' . $openRosaSurveys[$sourceSurveyId]['gof_form_version'] . ']'; + $values['gsu_surveyor_active'] = $openRosaSurveys[$sourceSurveyId]['gof_form_active']; + $values['gsu_active'] = 0; + $values['gsu_status'] = ''; + + $survey = $this->tracker->getSurveyBySourceId($sourceSurveyId, $this->getId()); + $survey->exists = false; + $survey->saveSurvey($values, $userId); + } + } + + public function updateConsent(Gems_Tracker_Token $token, $surveyId, $sourceSurveyId = null, $consentCode = null) + { + + } +} \ No newline at end of file Added: trunk/library/controllers/OpenrosaController.php =================================================================== --- trunk/library/controllers/OpenrosaController.php (rev 0) +++ trunk/library/controllers/OpenrosaController.php 2013-03-22 14:02:16 UTC (rev 1203) @@ -0,0 +1,49 @@ +<?php + +/** + * Copyright (c) 2012, 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 WA... [truncated message content] |
From: <gem...@li...> - 2013-03-22 13:17:31
|
Revision: 1202 http://sourceforge.net/p/gemstracker/code/1202 Author: matijsdejong Date: 2013-03-22 13:17:27 +0000 (Fri, 22 Mar 2013) Log Message: ----------- Up to the new version 1.6.1 Modified Paths: -------------- trunk/library/classes/Gems/Versions.php trunk/library/classes/MUtil/Version.php trunk/library/configs/db/tables/gems__patch_levels.10.sql Modified: trunk/library/classes/Gems/Versions.php =================================================================== --- trunk/library/classes/Gems/Versions.php 2013-03-21 15:55:39 UTC (rev 1201) +++ trunk/library/classes/Gems/Versions.php 2013-03-22 13:17:27 UTC (rev 1202) @@ -59,7 +59,7 @@ * This means that future patches for will be loaded, * but that previous patches are ignored. */ - return 51; + return 52; } /** @@ -69,7 +69,7 @@ */ public final function getGemsVersion() { - return '1.6'; + return '1.6.1'; } /** Modified: trunk/library/classes/MUtil/Version.php =================================================================== --- trunk/library/classes/MUtil/Version.php 2013-03-21 15:55:39 UTC (rev 1201) +++ trunk/library/classes/MUtil/Version.php 2013-03-22 13:17:27 UTC (rev 1202) @@ -48,7 +48,7 @@ { const MAJOR = 1; const MINOR = 2; - const BUILD = 40; + const BUILD = 41; public static function get() { Modified: trunk/library/configs/db/tables/gems__patch_levels.10.sql =================================================================== --- trunk/library/configs/db/tables/gems__patch_levels.10.sql 2013-03-21 15:55:39 UTC (rev 1201) +++ trunk/library/configs/db/tables/gems__patch_levels.10.sql 2013-03-22 13:17:27 UTC (rev 1202) @@ -11,4 +11,4 @@ INSERT INTO gems__patch_levels (gpl_level, gpl_created) VALUES - (52, CURRENT_TIMESTAMP); + (53, CURRENT_TIMESTAMP); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-03-21 15:55:42
|
Revision: 1201 http://sourceforge.net/p/gemstracker/code/1201 Author: matijsdejong Date: 2013-03-21 15:55:39 +0000 (Thu, 21 Mar 2013) Log Message: ----------- Functions sorted by name Modified Paths: -------------- trunk/library/classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php Modified: trunk/library/classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php =================================================================== --- trunk/library/classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php 2013-03-21 15:09:37 UTC (rev 1200) +++ trunk/library/classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php 2013-03-21 15:55:39 UTC (rev 1201) @@ -164,18 +164,7 @@ } /** - * 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) - { - return $this->plural('track', 'tracks', $count); - } - - /** - * * @return string The header title to display */ protected function getTitle() @@ -188,6 +177,17 @@ } /** + * 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) + { + return $this->plural('track', 'tracks', $count); + } + + /** * The place to check if the data set in the snippet is valid * to generate the snippet. * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-03-21 15:09:40
|
Revision: 1200 http://sourceforge.net/p/gemstracker/code/1200 Author: matijsdejong Date: 2013-03-21 15:09:37 +0000 (Thu, 21 Mar 2013) Log Message: ----------- Extra comments and changed echo output to always Modified Paths: -------------- trunk/library/classes/MUtil/Controller/ModelSnippetActionAbstract.php trunk/library/classes/MUtil/Model/DatabaseModelAbstract.php trunk/library/classes/MUtil/Model/JoinModel.php trunk/library/classes/MUtil/Model/SelectModel.php Modified: trunk/library/classes/MUtil/Controller/ModelSnippetActionAbstract.php =================================================================== --- trunk/library/classes/MUtil/Controller/ModelSnippetActionAbstract.php 2013-03-21 10:59:41 UTC (rev 1199) +++ trunk/library/classes/MUtil/Controller/ModelSnippetActionAbstract.php 2013-03-21 15:09:37 UTC (rev 1200) @@ -323,7 +323,7 @@ $this->addSnippets($this->autofilterSnippets, $params); } - if ($resetMvc && MUtil_Echo::hasOutput()) { + if ($resetMvc) { // Lazy call here, because any echo calls in the snippets have not yet been // performed. so they will appear only in the next call when not lazy. $this->html->raw(MUtil_Lazy::call(array('MUtil_Echo', 'out'))); Modified: trunk/library/classes/MUtil/Model/DatabaseModelAbstract.php =================================================================== --- trunk/library/classes/MUtil/Model/DatabaseModelAbstract.php 2013-03-21 10:59:41 UTC (rev 1199) +++ trunk/library/classes/MUtil/Model/DatabaseModelAbstract.php 2013-03-21 15:09:37 UTC (rev 1200) @@ -843,7 +843,7 @@ /** * The select object where we get the query from. * - * @return Zend_Db_Table_Select + * @return Zend_Db_Select */ abstract public function getSelect(); Modified: trunk/library/classes/MUtil/Model/JoinModel.php =================================================================== --- trunk/library/classes/MUtil/Model/JoinModel.php 2013-03-21 10:59:41 UTC (rev 1199) +++ trunk/library/classes/MUtil/Model/JoinModel.php 2013-03-21 15:09:37 UTC (rev 1200) @@ -292,6 +292,11 @@ return $this->_select->getAdapter(); } + /** + * The select object where we get the query from. + * + * @return Zend_Db_Select + */ public function getSelect() { $select = clone $this->_select; Modified: trunk/library/classes/MUtil/Model/SelectModel.php =================================================================== --- trunk/library/classes/MUtil/Model/SelectModel.php 2013-03-21 10:59:41 UTC (rev 1199) +++ trunk/library/classes/MUtil/Model/SelectModel.php 2013-03-21 15:09:37 UTC (rev 1200) @@ -109,7 +109,7 @@ /** * The select object where we get the query from. * - * @return Zend_Db_Table_Select + * @return Zend_Db_Select */ public function getSelect() { 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-03-20 07:35:38
|
Revision: 1198 http://sourceforge.net/p/gemstracker/code/1198 Author: mennodekker Date: 2013-03-20 07:35:34 +0000 (Wed, 20 Mar 2013) Log Message: ----------- Release 1.6 Added Paths: ----------- tags/1.6/ Index: tags/1.6 =================================================================== --- trunk 2013-03-19 15:34:29 UTC (rev 1197) +++ tags/1.6 2013-03-20 07:35:34 UTC (rev 1198) Property changes on: tags/1.6 ___________________________________________________________________ Added: svn:ignore ## -0,0 +1 ## +nbproject Added: svn:mergeinfo ## -0,0 +1,6 ## +/branches/1.5.0-pulse:306-430,467 +/branches/1.5.x:426-455,458-472,475-481 +/branches/receptioncodes:1053-1054 +/tags/1.5.0beta1:305 +/tags/1.5.1:485,489,509-510 +/tags/1.5.3-rc2:612,614,616,618 \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-03-19 15:34:34
|
Revision: 1197 http://sourceforge.net/p/gemstracker/code/1197 Author: matijsdejong Date: 2013-03-19 15:34:29 +0000 (Tue, 19 Mar 2013) Log Message: ----------- Version 1.6 done - I think Modified Paths: -------------- trunk/library/changelog.txt Modified: trunk/library/changelog.txt =================================================================== --- trunk/library/changelog.txt 2013-03-19 15:14:49 UTC (rev 1196) +++ trunk/library/changelog.txt 2013-03-19 15:34:29 UTC (rev 1197) @@ -1,5 +1,11 @@ Important changes from 1.5.7 => 1.6 ============================================================ +Patients can now be shared between organizations on the basis of their social security number +No longer Dutch: the default new project is still Dutch, but the basic GemsTracker core is international +New summary and compliance reports +Mail log now shows more information and is better searchable +Tracks can be cloned +Better menu structure Defined constant GEMS_PROJECT_PATH removed from code (update at least your application.ini and use APPLICATION_PATH instead) Moved date_default_timezone_set to index.php (can generate warnings) longDescr in project.ini enables more project specific information on the about pages @@ -20,6 +26,8 @@ loaderDirs.NewProject = APPLICATION_PATH "/classes/NewProject" loaderDirs.Gems = GEMS_LIBRARY_DIR "/classes/Gems" +Numerous small bugs solved + Important changes from 1.5.6 => 1.5.7 ============================================================ In LimeSurvey tokenanswerpersistence must be set to true for all surveys This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-03-19 15:15:56
|
Revision: 1196 http://sourceforge.net/p/gemstracker/code/1196 Author: matijsdejong Date: 2013-03-19 15:14:49 +0000 (Tue, 19 Mar 2013) Log Message: ----------- Extended mail log details shown and search capabilities Modified Paths: -------------- trunk/library/classes/Gems/Default/ComplianceAction.php trunk/library/classes/Gems/Default/MailLogAction.php trunk/library/classes/Gems/Util/TokenData.php Added Paths: ----------- trunk/library/classes/Gems/Snippets/Mail/ trunk/library/classes/Gems/Snippets/Mail/Log/ trunk/library/classes/Gems/Snippets/Mail/Log/MailLogBrowseSnippet.php trunk/library/classes/Gems/Snippets/Mail/Log/MailLogSearchSnippet.php Removed Paths: ------------- trunk/library/snippets/Mail/ Modified: trunk/library/classes/Gems/Default/ComplianceAction.php =================================================================== --- trunk/library/classes/Gems/Default/ComplianceAction.php 2013-03-19 13:08:04 UTC (rev 1195) +++ trunk/library/classes/Gems/Default/ComplianceAction.php 2013-03-19 15:14:49 UTC (rev 1196) @@ -122,16 +122,7 @@ return $model; } - $status = new Zend_Db_Expr(" - CASE - WHEN grc_success = 0 THEN 'D' - WHEN gto_completion_time IS NOT NULL THEN 'A' - WHEN gto_valid_from IS NULL THEN 'U' - WHEN gto_valid_from > CURRENT_TIMESTAMP THEN 'W' - WHEN gto_valid_until < CURRENT_TIMESTAMP THEN 'M' - ELSE 'O' - END - "); + $status = $this->util->getTokenData()->getStatusExpression(); $select = $this->db->select(); $select->from('gems__tokens', array( Modified: trunk/library/classes/Gems/Default/MailLogAction.php =================================================================== --- trunk/library/classes/Gems/Default/MailLogAction.php 2013-03-19 13:08:04 UTC (rev 1195) +++ trunk/library/classes/Gems/Default/MailLogAction.php 2013-03-19 15:14:49 UTC (rev 1196) @@ -58,7 +58,6 @@ * @var array Mixed key => value array for snippet initialization */ protected $autofilterParameters = array( - 'extraFilter' => 'getExtraFilter', 'extraSort' => array('grco_created' => SORT_DESC), ); @@ -70,6 +69,13 @@ protected $autofilterSnippets = 'Mail_Log_MailLogBrowseSnippet'; /** + * The snippets used for the index action, before those in autofilter + * + * @var mixed String or array of snippets name + */ + protected $indexStartSnippets = array('Generic_ContentTitleSnippet', 'Mail_Log_MailLogSearchSnippet'); + + /** * Creates a model for getModel(). Called only for each new $action. * * The parameters allow you to easily adapt the model to the current action. The $detailed @@ -88,6 +94,11 @@ $model->addLeftTable('gems__staff', array('grco_id_by' => 'gsf_id_user')); $model->addLeftTable('gems__mail_templates', array('grco_id_message' => 'gmt_id_message')); + $model->addLeftTable('gems__tokens', array('grco_id_token' => 'gto_id_token')); + $model->addLeftTable('gems__reception_codes', array('gto_reception_code' => 'grc_id_reception_code')); + $model->addLeftTable('gems__tracks', array('gto_id_track' => 'gtr_id_track')); + $model->addLeftTable('gems__surveys', array('gto_id_survey' => 'gsu_id_survey')); + $model->addColumn( "TRIM(CONCAT(COALESCE(CONCAT(grs_last_name, ', '), '-, '), COALESCE(CONCAT(grs_first_name, ' '), ''), COALESCE(grs_surname_prefix, '')))", 'respondent_name'); @@ -103,6 +114,7 @@ ) END", 'assigned_by'); + $model->addColumn($this->util->getTokenData()->getStatusExpression(), 'status'); $model->resetOrder(); @@ -113,6 +125,10 @@ $model->set('grco_sender', 'label', $this->_('From address'), 'itemDisplay', 'MUtil_Html_AElement::ifmail'); $model->set('grco_id_token', 'label', $this->_('Token')); $model->set('grco_topic', 'label', $this->_('Subject')); + $model->set('gtr_track_name', 'label', $this->_('Track')); + $model->set('gsu_survey_name', 'label', $this->_('Survey')); + $model->set('status', 'label', $this->_('Status'), + 'formatFunction', array($this->util->getTokenData(), 'getStatusDescription')); if ($detailed) { $model->set('gmt_subject', 'label', $this->_('Template')); @@ -120,20 +136,17 @@ $model->set('grco_created', 'formatFunction', $this->util->getTranslated()->formatDate); } + $filter = $this->util->getRequestCache('index', $detailed)->getProgramParams(); + + // Add the period filter - if any + if ($where = Gems_Snippets_AutosearchFormSnippet::getPeriodFilter($filter, $this->db)) { + $model->addFilter(array($where)); + } + return $model; } /** - * Returns an extra filter for this action - * - * @return array - */ - protected function getExtraFilter() - { - return array('grco_organization' => $this->escort->getCurrentOrganization()); - } - - /** * Helper function to get the title for the index action. * * @return $string Copied: trunk/library/classes/Gems/Snippets/Mail/Log/MailLogBrowseSnippet.php (from rev 1194, trunk/library/snippets/Mail/Log/MailLogBrowseSnippet.php) =================================================================== --- trunk/library/classes/Gems/Snippets/Mail/Log/MailLogBrowseSnippet.php (rev 0) +++ trunk/library/classes/Gems/Snippets/Mail/Log/MailLogBrowseSnippet.php 2013-03-19 15:14:49 UTC (rev 1196) @@ -0,0 +1,115 @@ +<?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 <COPYRIGHT HOLDER> 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\Mail\Log + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id$ + */ + +/** + * Add complex column layout to display. + * + * + * @package Gems + * @subpackage Snippets\Mail\Log + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.4.4 + */ +class Gems_Snippets_Mail_Log_MailLogBrowseSnippet extends Gems_Snippets_ModelTableSnippetGeneric +{ + /** + * + * @var Gems_Util + */ + protected $util; + + /** + * Adds columns from the model to the bridge that creates the browse table. + * + * Overrule this function to add different columns to the browse table, without + * having to recode the core table building code. + * + * @param MUtil_Model_TableBridge $bridge + * @param MUtil_Model_ModelAbstract $model + * @return void + */ + protected function addBrowseTableColumns(MUtil_Model_TableBridge $bridge, MUtil_Model_ModelAbstract $model) + { + if ($menuItem = $this->getShowMenuItem()) { + $bridge->addItemLink($menuItem->toActionLinkLower($this->request, $bridge)); + } + + // Newline placeholder + $br = MUtil_Html::create('br'); + + // make sure search results are highlighted + $this->applyTextMarker(); + + $bridge->addMultiSort('grco_created', $br, 'respondent_name', $br, 'grco_address', $br, 'gtr_track_name'); + $bridge->addMultiSort('grco_id_token', $br, 'assigned_by', $br, 'grco_sender', $br, 'gsu_survey_name'); + $bridge->addMultiSort('status', $br, 'grco_topic'); + + $title = MUtil_Html::create()->strong($this->_('+')); + $params = array( + 'gto_id_token' => $bridge->gto_id_token, + 'gtr_track_type' => $bridge->gtr_track_type, + 'grc_success' => 1, + Gems_Model::ID_TYPE => 'token', + ); + + $showLinks[] = $this->createMenuLink($params, 'track', 'show', $title); + $showLinks[] = $this->createMenuLink($params, 'survey', 'show', $title); + + // Remove nulls + $showLinks = array_filter($showLinks); + + if ($showLinks) { + foreach ($showLinks as $showLink) { + if ($showLink) { + $showLink->title = array($this->_('Token'), $bridge->gto_id_token->strtoupper()); + } + } + } + $bridge->getTable()->appendAttrib('class', 'compliance'); + + $tbody = $bridge->tbody(); + $td = $tbody[0][0]; + /* // Does not repeat for some reason + $td->appendAttrib('class', MUtil_Lazy::method($this->util->getTokenData(), 'getStatusClass', $bridge->status)); + $td->append($br); + $td->append($br); // */ + $td->append($br); + $td->append($showLinks); + // $bridge->addItemLink($showLinks); + } +} Added: trunk/library/classes/Gems/Snippets/Mail/Log/MailLogSearchSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/Mail/Log/MailLogSearchSnippet.php (rev 0) +++ trunk/library/classes/Gems/Snippets/Mail/Log/MailLogSearchSnippet.php 2013-03-19 15:14:49 UTC (rev 1196) @@ -0,0 +1,125 @@ +<?php + +/** + * Copyright (c) 2012, 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 Pulse + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @version $id: MailLogSearchSnippet.php 203 2012-01-01t 12:51:32Z matijs $ + */ + +/** + * + * + * @package Gems + * @subpackage Pulse + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since version 1.6 + */ +class Gems_Snippets_Mail_Log_MailLogSearchSnippet extends Gems_Snippets_AutosearchFormSnippet +{ + /** + * + * @var Gems_Loader + */ + public $loader; + + /** + * Creates the form itself + * + * @param array $options + * @return Gems_Form + */ + protected function createForm($options = null) + { + $form = parent::createForm($options); + + $form->activateJQuery(); + + return $form; + } + + /** + * Returns a text element for autosearch. Can be overruled. + * + * The form / html elements to search on. Elements can be grouped by inserting null's between them. + * That creates a distinct group of elements + * + * @param array $data The $form field values (can be usefull, but no need to set them) + * @return array Of Zend_Form_Element's or static tekst to add to the html or null for group breaks. + */ + protected function getAutoSearchElements(array $data) + { + // Search text + $elements = parent::getAutoSearchElements($data); + + $this->_addPeriodSelectors($elements, array('grco_created' => $this->_('Date sent'))); + + $br = MUtil_Html::create()->br(); + + $elements[] = null; + + $dbLookup = $this->util->getDbLookup(); + + $elements[] = $this->_createSelectElement( + 'gto_id_track', + $this->util->getTrackData()->getSteppedTracks(), + $this->_('(select a track)') + ); + + $elements[] = $this->_createSelectElement('gto_id_survey', + $this->util->getTrackData()->getAllSurveys(), + $this->_('(all surveys)')); + + $elements[] = $this->_createSelectElement( + 'grco_organization', + $this->loader->getCurrentUser()->getRespondentOrganizations(), + $this->_('(all organizations)') + ); + + return $elements; + } + + /** + * + * @return array The data to fill the form with + */ + protected function getSearchData() + { + $data = parent::getSearchData(); + + if (!array_key_exists('grco_organization', $data)) { + $data['grco_organization'] = $this->loader->getOrganization()->getId(); + } + + return $data; + } +} Modified: trunk/library/classes/Gems/Util/TokenData.php =================================================================== --- trunk/library/classes/Gems/Util/TokenData.php 2013-03-19 13:08:04 UTC (rev 1195) +++ trunk/library/classes/Gems/Util/TokenData.php 2013-03-19 15:14:49 UTC (rev 1196) @@ -112,4 +112,23 @@ return $status['D']; } + + /** + * An expression for calculating the token status + * + * @return Zend_Db_Expr + */ + public function getStatusExpression() + { + return new Zend_Db_Expr(" + CASE + WHEN gto_id_token IS NULL OR grc_success = 0 THEN 'D' + WHEN gto_completion_time IS NOT NULL THEN 'A' + WHEN gto_valid_from IS NULL THEN 'U' + WHEN gto_valid_from > CURRENT_TIMESTAMP THEN 'W' + WHEN gto_valid_until < CURRENT_TIMESTAMP THEN 'M' + ELSE 'O' + END + "); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-03-19 13:08:08
|
Revision: 1195 http://sourceforge.net/p/gemstracker/code/1195 Author: matijsdejong Date: 2013-03-19 13:08:04 +0000 (Tue, 19 Mar 2013) Log Message: ----------- Removed empty shell snippets (should not cause any trouble) requestCache has better handling of reset clause setSurveyReturn has some intelligence to prevent autofilter action returns and to shorten the return url's autosearchform uses _ and - instead of > and < in period determination (as <> cause trouble in html) Modified Paths: -------------- trunk/library/classes/Gems/Controller/BrowseEditAction.php trunk/library/classes/Gems/Default/TokenPlanAction.php trunk/library/classes/Gems/Snippets/AutosearchFormSnippet.php trunk/library/classes/Gems/User/User.php trunk/library/classes/Gems/Util/RequestCache.php Removed Paths: ------------- trunk/library/snippets/AnswerModelSnippet.php trunk/library/snippets/EditRoundSnippet.php trunk/library/snippets/EditTrackEngineSnippet.php trunk/library/snippets/Generic/AutosearchFormSnippet.php trunk/library/snippets/Generic/ModelFormSnippet.php trunk/library/snippets/Generic/ModelItemTableSnippet.php trunk/library/snippets/Generic/ModelItemYesNoDeleteSnippet.php trunk/library/snippets/Generic/ModelTabFormSnippet.php trunk/library/snippets/Generic/ModelTableSnippet.php trunk/library/snippets/ShowRoundSnippet.php trunk/library/snippets/TrackAnswersModelSnippet.php Modified: trunk/library/classes/Gems/Controller/BrowseEditAction.php =================================================================== --- trunk/library/classes/Gems/Controller/BrowseEditAction.php 2013-03-19 11:08:57 UTC (rev 1194) +++ trunk/library/classes/Gems/Controller/BrowseEditAction.php 2013-03-19 13:08:04 UTC (rev 1195) @@ -101,6 +101,7 @@ if ($filter = $this->getDataFilter($data)) { $model->addFilter($filter); + // MUtil_Echo::track($filter, $data, $model->getFilter()); } if ($this->sortKey) { Modified: trunk/library/classes/Gems/Default/TokenPlanAction.php =================================================================== --- trunk/library/classes/Gems/Default/TokenPlanAction.php 2013-03-19 11:08:57 UTC (rev 1194) +++ trunk/library/classes/Gems/Default/TokenPlanAction.php 2013-03-19 13:08:04 UTC (rev 1195) @@ -220,9 +220,9 @@ } $dates = array( - '<gto_valid_from gto_valid_until' + '_gto_valid_from gto_valid_until' => $this->_('Is valid during'), - '>gto_valid_from gto_valid_until' + '-gto_valid_from gto_valid_until' => $this->_('Is valid within'), 'gto_valid_from' => $this->_('Valid from'), 'gto_valid_until' => $this->_('Valid until'), @@ -446,7 +446,7 @@ return array( 'datefrom' => $now->toString($inFormat), - 'dateused' => '<gto_valid_from gto_valid_until', + 'dateused' => '_gto_valid_from gto_valid_until', 'dateuntil' => $now->toString($inFormat), 'gto_id_organization' => $this->escort->getCurrentOrganization(), 'main_filter' => 'all', Modified: trunk/library/classes/Gems/Snippets/AutosearchFormSnippet.php =================================================================== --- trunk/library/classes/Gems/Snippets/AutosearchFormSnippet.php 2013-03-19 11:08:57 UTC (rev 1194) +++ trunk/library/classes/Gems/Snippets/AutosearchFormSnippet.php 2013-03-19 13:08:04 UTC (rev 1195) @@ -364,7 +364,7 @@ switch ($data['dateused'][0]) { - case '<': + case '_': // overlaps $periods = explode(' ', substr($data['dateused'], 1)); @@ -396,7 +396,7 @@ } return; - case '>': + case '-': // within $periods = explode(' ', substr($data['dateused'], 1)); Modified: trunk/library/classes/Gems/User/User.php =================================================================== --- trunk/library/classes/Gems/User/User.php 2013-03-19 11:08:57 UTC (rev 1194) +++ trunk/library/classes/Gems/User/User.php 2013-03-19 13:08:04 UTC (rev 1195) @@ -1452,7 +1452,13 @@ } elseif (! is_array($return)) { $return = MUtil_Ra::to($return); } + if ('autofilter' == $return['action']) { + $return['action'] = 'index'; + } + $return = array_filter($return); + // MUtil_Echo::track($return); + $this->_setVar('surveyReturn', $return); return $this; Modified: trunk/library/classes/Gems/Util/RequestCache.php =================================================================== --- trunk/library/classes/Gems/Util/RequestCache.php 2013-03-19 11:08:57 UTC (rev 1194) +++ trunk/library/classes/Gems/Util/RequestCache.php 2013-03-19 13:08:04 UTC (rev 1195) @@ -187,8 +187,8 @@ $programParams = array_diff($request->getParams(), $this->getRequestKey()); if (isset($programParams[self::RESET_PARAM]) && $programParams[self::RESET_PARAM]) { - unset($programParams[self::RESET_PARAM]); unset($this->session->requestCache[$this->_storageKey]); + $request->setParam(self::RESET_PARAM, null); } else { // Add cache $programParams = $programParams + $this->getCachedRequest(); @@ -196,8 +196,9 @@ // Set menu up for reset $menu->getCurrent()->addParameters(self::RESET_PARAM); // Means this - $request->setParam(self::RESET_PARAM, 1); + $menu->getParameterSource()->offsetSet(self::RESET_PARAM, 1); } + unset($programParams[self::RESET_PARAM]); $this->setProgramParams($programParams); Deleted: trunk/library/snippets/AnswerModelSnippet.php =================================================================== --- trunk/library/snippets/AnswerModelSnippet.php 2013-03-19 11:08:57 UTC (rev 1194) +++ trunk/library/snippets/AnswerModelSnippet.php 2013-03-19 13:08:04 UTC (rev 1195) @@ -1,50 +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 Tracker - * @author Matijs de Jong <mj...@ma...> - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @version $Id$ - */ - -/** - * Displays answers to a survey. - * - * @deprecated - * @package Gems - * @subpackage Tracker - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @since Class available since version 1.4 - */ -class AnswerModelSnippet extends Gems_Snippets_Tracker_Answers_SingleTokenAnswerModelSnippet -{ -} Deleted: trunk/library/snippets/EditRoundSnippet.php =================================================================== --- trunk/library/snippets/EditRoundSnippet.php 2013-03-19 11:08:57 UTC (rev 1194) +++ trunk/library/snippets/EditRoundSnippet.php 2013-03-19 13:08:04 UTC (rev 1195) @@ -1,48 +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 Tracker - * @author Matijs de Jong <mj...@ma...> - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @version $Id$ - */ - -/** - * - * @package Gems - * @subpackage Tracker - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @since Class available since version 1.4 - */ -class EditRoundSnippet extends Gems_Tracker_Snippets_EditRoundSnippetAbstract -{ -} Deleted: trunk/library/snippets/EditTrackEngineSnippet.php =================================================================== --- trunk/library/snippets/EditTrackEngineSnippet.php 2013-03-19 11:08:57 UTC (rev 1194) +++ trunk/library/snippets/EditTrackEngineSnippet.php 2013-03-19 13:08:04 UTC (rev 1195) @@ -1,49 +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 Snippets - * @author Matijs de Jong <mj...@ma...> - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @version $Id$ - */ - -/** - * Default snippet for editing track engines instances - * - * @package Gems - * @subpackage Snippets - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @since Class available since version 1.4 - */ -class EditTrackEngineSnippet extends Gems_Tracker_Snippets_EditTrackEngineSnippetGeneric -{ -} Deleted: trunk/library/snippets/Generic/AutosearchFormSnippet.php =================================================================== --- trunk/library/snippets/Generic/AutosearchFormSnippet.php 2013-03-19 11:08:57 UTC (rev 1194) +++ trunk/library/snippets/Generic/AutosearchFormSnippet.php 2013-03-19 13:08:04 UTC (rev 1195) @@ -1,52 +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. - * - * Short description of file - * - * @package Gems - * @subpackage Snippets\Generic - * @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 $ - */ - -/** - * Short description for class - * - * Long description for class (if any)... - * - * @deprecated No longer needed with new snippet loader - * @package Gems - * @subpackage Snippets\Generic - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @since Class available since version 1.4.2 - */ -class Generic_AutosearchFormSnippet extends Gems_Snippets_AutosearchFormSnippet -{ } Deleted: trunk/library/snippets/Generic/ModelFormSnippet.php =================================================================== --- trunk/library/snippets/Generic/ModelFormSnippet.php 2013-03-19 11:08:57 UTC (rev 1194) +++ trunk/library/snippets/Generic/ModelFormSnippet.php 2013-03-19 13:08:04 UTC (rev 1195) @@ -1,53 +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 Snippets\Generic - * @author Matijs de Jong <mj...@ma...> - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @version $Id$ - */ - -/** - * Displays an edit form based on the model the model set through the $model snippet parameter. - * - * Usage snippet for Gems_Controller_ModelSnippetActionAbstract - * - * @see Gems_Controller_ModelSnippetActionAbstract - * - * @deprecated No longer needed with new snippet loader - * @package Gems - * @subpackage Snippets\Generic - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @since Class available since version 1.4 - */ -class Generic_ModelFormSnippet extends Gems_Snippets_ModelFormSnippetGeneric -{ } Deleted: trunk/library/snippets/Generic/ModelItemTableSnippet.php =================================================================== --- trunk/library/snippets/Generic/ModelItemTableSnippet.php 2013-03-19 11:08:57 UTC (rev 1194) +++ trunk/library/snippets/Generic/ModelItemTableSnippet.php 2013-03-19 13:08:04 UTC (rev 1195) @@ -1,50 +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 Snippets\Generic - * @author Matijs de Jong <mj...@ma...> - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @version $Id$ - */ - -/** - * Displays each fields of a single item in a model in a row in a Html table - * the model set through the $model snippet parameter. - * - * @deprecated No longer needed with new snippet loader - * @package Gems - * @subpackage Snippets\Generic - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @since Class available since version 1.4.4 - */ -class Generic_ModelItemTableSnippet extends Gems_Snippets_ModelItemTableSnippetGeneric -{ } Deleted: trunk/library/snippets/Generic/ModelItemYesNoDeleteSnippet.php =================================================================== --- trunk/library/snippets/Generic/ModelItemYesNoDeleteSnippet.php 2013-03-19 11:08:57 UTC (rev 1194) +++ trunk/library/snippets/Generic/ModelItemYesNoDeleteSnippet.php 2013-03-19 13:08:04 UTC (rev 1195) @@ -1,50 +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 Snippets\Generic - * @author Matijs de Jong <mj...@ma...> - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @version $Id$ - */ - -/** - * Displays each fields of a single item in a model in a row in a Html table - * the model set through the $model snippet parameter. - * - * @deprecated No longer needed with new snippet loader - * @package Gems - * @subpackage Snippets\Generic - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @since Class available since version 1.4.4 - */ -class Generic_ModelItemYesNoDeleteSnippet extends Gems_Snippets_ModelItemYesNoDeleteSnippetGeneric -{ } Deleted: trunk/library/snippets/Generic/ModelTabFormSnippet.php =================================================================== --- trunk/library/snippets/Generic/ModelTabFormSnippet.php 2013-03-19 11:08:57 UTC (rev 1194) +++ trunk/library/snippets/Generic/ModelTabFormSnippet.php 2013-03-19 13:08:04 UTC (rev 1195) @@ -1,49 +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 Snippets\Generic - * @author Matijs de Jong <mj...@ma...> - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @version $Id$ - */ - -/** - * Displays an edit form using tabs based on the model the model set through the $model snippet parameter. - * - * Usage snippet for Gems_Snippets_ModelTabFormSnippetGeneric - * - * @deprecated No longer needed with new snippet loader - * @package Gems - * @subpackage Snippets\Generic - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @since Class available since version 1.5 - */ -class Generic_ModelTabFormSnippet extends Gems_Snippets_ModelTabFormSnippetGeneric -{ } Deleted: trunk/library/snippets/Generic/ModelTableSnippet.php =================================================================== --- trunk/library/snippets/Generic/ModelTableSnippet.php 2013-03-19 11:08:57 UTC (rev 1194) +++ trunk/library/snippets/Generic/ModelTableSnippet.php 2013-03-19 13:08:04 UTC (rev 1195) @@ -1,54 +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 MUtil - * @subpackage Snippets\Generic - * @author Matijs de Jong <mj...@ma...> - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @version $Id$ - */ - -/** - * Displays multiple items from a model in a tabel by row using - * the model set through the $model snippet parameter. - * - * Usage snippet for Gems_Controller_ModelSnippetActionAbstract - * - * @see Gems_Controller_ModelSnippetActionAbstract - * - * @deprecated No longer needed with new snippet loader - * @package MUtil - * @subpackage Snippets\Generic - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @since Class available since version 1.4 - */ -class Generic_ModelTableSnippet extends Gems_Snippets_ModelTableSnippetGeneric -{ } Deleted: trunk/library/snippets/ShowRoundSnippet.php =================================================================== --- trunk/library/snippets/ShowRoundSnippet.php 2013-03-19 11:08:57 UTC (rev 1194) +++ trunk/library/snippets/ShowRoundSnippet.php 2013-03-19 13:08:04 UTC (rev 1195) @@ -1,48 +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 Tracker - * @author Matijs de Jong <mj...@ma...> - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @version $Id$ - */ - -/** - * - * @package Gems - * @subpackage Tracker - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @since Class available since version 1.4 - */ -class ShowRoundSnippet extends Gems_Tracker_Snippets_ShowRoundSnippetAbstract -{ -} Deleted: trunk/library/snippets/TrackAnswersModelSnippet.php =================================================================== --- trunk/library/snippets/TrackAnswersModelSnippet.php 2013-03-19 11:08:57 UTC (rev 1194) +++ trunk/library/snippets/TrackAnswersModelSnippet.php 2013-03-19 13:08:04 UTC (rev 1195) @@ -1,51 +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 Tracker - * @author Matijs de Jong <mj...@ma...> - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @version $Id$ - */ - -/** - * Class description of TrackAnswersModelSnippet - * - * @deprecated - * @package Gems - * @subpackage Tracker - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @since Class available since version 1.4 - */ -class TrackAnswersModelSnippet extends Gems_Snippets_Tracker_Answers_TrackAnswersModelSnippet -{ -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-03-19 11:09:00
|
Revision: 1194 http://sourceforge.net/p/gemstracker/code/1194 Author: matijsdejong Date: 2013-03-19 11:08:57 +0000 (Tue, 19 Mar 2013) Log Message: ----------- returned grs_surname_prefix to default installation. Is used in to many places Modified Paths: -------------- trunk/library/configs/db/tables/gems__respondents.30.sql Modified: trunk/library/configs/db/tables/gems__respondents.30.sql =================================================================== --- trunk/library/configs/db/tables/gems__respondents.30.sql 2013-03-19 08:15:06 UTC (rev 1193) +++ trunk/library/configs/db/tables/gems__respondents.30.sql 2013-03-19 11:08:57 UTC (rev 1194) @@ -10,7 +10,7 @@ grs_email varchar(100) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, grs_first_name varchar(30) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', - -- grs_surname_prefix varchar(10) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', + grs_surname_prefix varchar(10) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', grs_last_name varchar(50) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci', grs_gender char(1) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' not null default 'U', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-03-19 08:15:12
|
Revision: 1193 http://sourceforge.net/p/gemstracker/code/1193 Author: mennodekker Date: 2013-03-19 08:15:06 +0000 (Tue, 19 Mar 2013) Log Message: ----------- Fix for when no project admin defined in project.ini Modified Paths: -------------- trunk/library/classes/Gems/User/UserLoader.php Modified: trunk/library/classes/Gems/User/UserLoader.php =================================================================== --- trunk/library/classes/Gems/User/UserLoader.php 2013-03-18 18:04:19 UTC (rev 1192) +++ trunk/library/classes/Gems/User/UserLoader.php 2013-03-19 08:15:06 UTC (rev 1193) @@ -514,7 +514,7 @@ protected function getUserClass($login_name, $organization) { //First check for project user, as this one can run without a db - if ($this->isProjectUser($login_name)) { + if (!is_null($login_name) && $this->isProjectUser($login_name)) { return $this->loadUser(self::USER_PROJECT, $organization, $login_name); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-03-18 18:04:22
|
Revision: 1192 http://sourceforge.net/p/gemstracker/code/1192 Author: matijsdejong Date: 2013-03-18 18:04:19 +0000 (Mon, 18 Mar 2013) Log Message: ----------- Fixed bug in EventCaculations where 0 was equal to null (pulse #568) Added sort handling to transformer Modified Paths: -------------- trunk/library/classes/Gems/Event/EventCalculations.php trunk/library/classes/Gems/Tracker/Token.php trunk/library/classes/MUtil/Model/ModelAbstract.php trunk/library/classes/MUtil/Model/ModelTransformerAbstract.php trunk/library/classes/MUtil/Model/ModelTransformerInterface.php trunk/library/classes/MUtil/Model/Transform/JoinTransformer.php Modified: trunk/library/classes/Gems/Event/EventCalculations.php =================================================================== --- trunk/library/classes/Gems/Event/EventCalculations.php 2013-03-18 13:16:50 UTC (rev 1191) +++ trunk/library/classes/Gems/Event/EventCalculations.php 2013-03-18 18:04:19 UTC (rev 1192) @@ -149,7 +149,7 @@ foreach($values as $name => $result) { $result = intval($result); - if ($tokenAnswers[$name] != $result) { + if (($tokenAnswers[$name] != $result) && ($tokenAnswers[$name] !== null)) { $results[$name] = $result; } } Modified: trunk/library/classes/Gems/Tracker/Token.php =================================================================== --- trunk/library/classes/Gems/Tracker/Token.php 2013-03-18 13:16:50 UTC (rev 1191) +++ trunk/library/classes/Gems/Tracker/Token.php 2013-03-18 18:04:19 UTC (rev 1192) @@ -385,11 +385,11 @@ // added to the url. $surveyReturn['RouteReset'] = true; + // MUtil_Echo::track($currentUri, MUtil_Html::urlString($surveyReturn)); return $currentUri . MUtil_Html::urlString($surveyReturn); - // MUtil_Echo::track($currentUri . MUtil_Html::urlString($surveyReturn)); } - // Ultimate backup solution for reutrn + // Ultimate backup solution for return return $currentUri . '/ask/forward/' . MUtil_Model::REQUEST_ID . '/' . urlencode($this->getTokenId()); } Modified: trunk/library/classes/MUtil/Model/ModelAbstract.php =================================================================== --- trunk/library/classes/MUtil/Model/ModelAbstract.php 2013-03-18 13:16:50 UTC (rev 1191) +++ trunk/library/classes/MUtil/Model/ModelAbstract.php 2013-03-18 18:04:19 UTC (rev 1192) @@ -132,7 +132,7 @@ } /** - * Checks the filter on sematic correctness and replaces the text seacrh filter + * Checks the filter on sematic correctness and replaces the text search filter * with the real filter. * * @param mixed $filter True for the filter stored in this model or a filter array @@ -143,7 +143,7 @@ if (true === $filter) { $filter = $this->getFilter(); } - if ($filter && is_array($filter)) { + if (is_array($filter)) { foreach ($this->_transformers as $transformer) { $filter = $transformer->transformFilter($this, $filter); } @@ -162,16 +162,27 @@ return array(); } + /** + * Checks the sort on sematic correctness + * + * @param mixed $sort True for the sort stored in this model or a sort array or a single sort value + * @return array The filter to use + */ protected function _checkSortUsed($sort) { if (true === $sort) { - return $this->getSort(); + $sort = $this->getSort(); + } elseif (false === $sort) { + $sort = array(); + } else { + $sort = $this->_checkSortValue($sort); } - if (false === $sort) { - return array(); + + foreach ($this->_transformers as $transformer) { + $sort = $transformer->transformSort($this, $sort); } - return $this->_checkSortValue($sort); + return $sort; } protected function _checkSortValue($value) @@ -1313,13 +1324,21 @@ return $this; } - public function setAlias($name, $alias) + /** + * Set the value to be an alias of another field + * + * @param string $name + * @param string $aliasOf + * @return \MUtil_Model_ModelAbstract + * @throws MUtil_Model_ModelException + */ + public function setAlias($name, $aliasOf) { - if ($this->has($alias)) { - $this->set($name, self::ALIAS_OF, $alias); + if ($this->has($aliasOf)) { + $this->set($name, self::ALIAS_OF, $aliasOf); return $this; } - throw new MUtil_Model_ModelException("Alias for '$name' set to non existing field '$alias'"); + throw new MUtil_Model_ModelException("Alias for '$name' set to non existing field '$aliasOf'"); } /** Modified: trunk/library/classes/MUtil/Model/ModelTransformerAbstract.php =================================================================== --- trunk/library/classes/MUtil/Model/ModelTransformerAbstract.php 2013-03-18 13:16:50 UTC (rev 1191) +++ trunk/library/classes/MUtil/Model/ModelTransformerAbstract.php 2013-03-18 18:04:19 UTC (rev 1192) @@ -156,7 +156,7 @@ /** * This transform function checks the filter for * a) retreiving filters to be applied to the transforming data, - * b) adding filters that are the result + * b) adding filters that are needed * * @param MUtil_Model_ModelAbstract $model * @param array $filter @@ -169,6 +169,21 @@ } /** + * This transform function checks the sort to + * a) remove sorts from the main model that are not possible + * b) add sorts that are required needed + * + * @param MUtil_Model_ModelAbstract $model + * @param array $sort + * @return array The (optionally changed) sort + */ + public function transformSort(MUtil_Model_ModelAbstract $model, array $sort) + { + // No changes + return $sort; + } + + /** * The transform function performs the actual transformation of the data and is called after * the loading of the data in the source model. * Modified: trunk/library/classes/MUtil/Model/ModelTransformerInterface.php =================================================================== --- trunk/library/classes/MUtil/Model/ModelTransformerInterface.php 2013-03-18 13:16:50 UTC (rev 1191) +++ trunk/library/classes/MUtil/Model/ModelTransformerInterface.php 2013-03-18 18:04:19 UTC (rev 1192) @@ -60,15 +60,26 @@ /** * This transform function checks the filter for * a) retreiving filters to be applied to the transforming data, - * b) adding filters that are the result + * b) adding filters that are needed * * @param MUtil_Model_ModelAbstract $model * @param array $filter * @return array The (optionally changed) filter */ public function transformFilter(MUtil_Model_ModelAbstract $model, array $filter); - + /** + * This transform function checks the sort to + * a) remove sorts from the main model that are not possible + * b) add sorts that are required needed + * + * @param MUtil_Model_ModelAbstract $model + * @param array $sort + * @return array The (optionally changed) sort + */ + public function transformSort(MUtil_Model_ModelAbstract $model, array $sort); + + /** * The transform function performs the actual transformation of the data and is called after * the loading of the data in the source model. * Modified: trunk/library/classes/MUtil/Model/Transform/JoinTransformer.php =================================================================== --- trunk/library/classes/MUtil/Model/Transform/JoinTransformer.php 2013-03-18 13:16:50 UTC (rev 1191) +++ trunk/library/classes/MUtil/Model/Transform/JoinTransformer.php 2013-03-18 18:04:19 UTC (rev 1192) @@ -120,6 +120,29 @@ } /** + * This transform function checks the sort to + * a) remove sorts from the main model that are not possible + * b) add sorts that are required needed + * + * @param MUtil_Model_ModelAbstract $model + * @param array $sort + * @return array The (optionally changed) sort + */ + public function transformSort(MUtil_Model_ModelAbstract $model, array $sort) + { + foreach ($this->_subModels as $sub) { + foreach ($sort as $key => $value) { + if ($sub->has($key)) { + // Remove all sorts on columns from the submodel + unset($sort[$key]); + } + } + } + + return $sort; + } + + /** * The transform function performs the actual transformation of the data and is called after * the loading of the data in the source model. * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2013-03-18 13:16:55
|
Revision: 1191 http://sourceforge.net/p/gemstracker/code/1191 Author: matijsdejong Date: 2013-03-18 13:16:50 +0000 (Mon, 18 Mar 2013) Log Message: ----------- Updated translations Modified Paths: -------------- trunk/library/languages/default-en.mo trunk/library/languages/default-en.po trunk/library/languages/default-nl.mo trunk/library/languages/default-nl.po Modified: trunk/library/languages/default-en.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-en.po =================================================================== --- trunk/library/languages/default-en.po 2013-03-18 13:14:10 UTC (rev 1190) +++ trunk/library/languages/default-en.po 2013-03-18 13:16:50 UTC (rev 1191) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: GemsTracker EN\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-03-13 16:39+0100\n" +"POT-Creation-Date: 2013-03-18 14:14+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -326,7 +326,7 @@ #: classes/Gems/Export/RespondentExport.php:238 #: classes/Gems/Export/RespondentExport.php:250 #: classes/Gems/Tracker/Engine/StepEngineAbstract.php:484 -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:728 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:727 #: classes/Gems/Tracker/Model/StandardTokenModel.php:216 #: classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php:149 #: classes/Gems/Tracker/Snippets/ShowTrackUsageAbstract.php:146 @@ -336,7 +336,7 @@ #: classes/Gems/Menu.php:321 classes/Gems/Menu.php:346 #: classes/Gems/Menu.php:388 -#: classes/Gems/Default/TrackMaintenanceAction.php:458 +#: classes/Gems/Default/TrackMaintenanceAction.php:460 #: snippets/AddTracksSnippet.php:241 msgid "Add" msgstr "Add" @@ -350,7 +350,7 @@ msgstr "Preview" #: classes/Gems/Menu.php:336 classes/Gems/Default/ExportAction.php:149 -#: classes/Gems/Default/TrackMaintenanceAction.php:405 +#: classes/Gems/Default/TrackMaintenanceAction.php:407 #: classes/Gems/Menu/MenuAbstract.php:415 #: classes/Gems/Menu/MenuAbstract.php:497 snippets/AddTracksSnippet.php:238 msgid "Tracks" @@ -397,44 +397,44 @@ msgid "Export archive" msgstr "Export archive" -#: classes/Gems/Menu.php:586 classes/Gems/Default/GroupAction.php:122 +#: classes/Gems/Menu.php:617 classes/Gems/Default/GroupAction.php:122 #: classes/Gems/Default/OrganizationAction.php:154 -#: classes/Gems/Default/RespondentAction.php:462 -#: classes/Gems/Default/RespondentNewAction.php:131 +#: classes/Gems/Default/RespondentAction.php:465 +#: classes/Gems/Default/RespondentNewAction.php:309 msgid "Respondents" msgstr "Patients" -#: classes/Gems/Menu.php:594 +#: classes/Gems/Menu.php:625 msgid "Overview" msgstr "Overview" -#: classes/Gems/Menu.php:601 classes/Gems/Menu/MenuAbstract.php:379 +#: classes/Gems/Menu.php:632 classes/Gems/Menu/MenuAbstract.php:379 msgid "Project" msgstr "Project" -#: classes/Gems/Menu.php:604 +#: classes/Gems/Menu.php:635 msgid "Setup" msgstr "Setup" -#: classes/Gems/Menu.php:607 +#: classes/Gems/Menu.php:638 msgid "Track Builder" msgstr "Track Builder" -#: classes/Gems/Menu.php:610 classes/Gems/Export/RespondentExport.php:344 +#: classes/Gems/Menu.php:641 classes/Gems/Export/RespondentExport.php:344 msgid "Export" msgstr "Export" -#: classes/Gems/Menu.php:616 classes/Gems/Default/ContactAction.php:170 +#: classes/Gems/Menu.php:647 classes/Gems/Default/ContactAction.php:170 #: snippets/Organization/OrganizationEditSnippet.php:82 msgid "Contact" msgstr "Contact" -#: classes/Gems/Menu.php:630 +#: classes/Gems/Menu.php:661 msgid "Changelog" msgstr "Changelog" #: classes/Gems/Model.php:212 classes/Gems/Default/ComplianceAction.php:93 -#: classes/Gems/Model/RespondentModel.php:179 +#: classes/Gems/Model/RespondentModel.php:200 #: classes/Gems/Tracker/Model/StandardTokenModel.php:213 msgid "Respondent nr" msgstr "Patient nr" @@ -444,8 +444,8 @@ #: classes/Gems/Default/LogAction.php:197 #: classes/Gems/Default/MailJobAction.php:98 #: classes/Gems/Default/StaffAction.php:347 -#: classes/Gems/Model/RespondentModel.php:174 -#: classes/Gems/Model/RespondentModel.php:228 +#: classes/Gems/Model/RespondentModel.php:195 +#: classes/Gems/Model/RespondentModel.php:251 #: classes/Gems/Snippets/Export/ReportHeaderSnippet.php:63 #: classes/Gems/User/Form/LayeredLoginForm.php:254 #: classes/Gems/User/Form/OrganizationFormAbstract.php:166 @@ -453,32 +453,32 @@ msgid "Organization" msgstr "Organization" -#: classes/Gems/Model.php:217 classes/Gems/Model/RespondentModel.php:202 -#: classes/Gems/Model/RespondentModel.php:294 +#: classes/Gems/Model.php:217 classes/Gems/Model/RespondentModel.php:223 +#: classes/Gems/Model/RespondentModel.php:315 msgid "Opened" msgstr "Opened" -#: classes/Gems/Model.php:218 classes/Gems/Model/RespondentModel.php:205 -#: classes/Gems/Model/RespondentModel.php:289 +#: classes/Gems/Model.php:218 classes/Gems/Model/RespondentModel.php:226 +#: classes/Gems/Model/RespondentModel.php:310 msgid "Consent" msgstr "Consent" #: classes/Gems/Model.php:220 classes/Gems/Default/OptionAction.php:130 #: classes/Gems/Default/StaffAction.php:337 -#: classes/Gems/Model/RespondentModel.php:189 -#: classes/Gems/Model/RespondentModel.php:267 +#: classes/Gems/Model/RespondentModel.php:210 +#: classes/Gems/Model/RespondentModel.php:288 msgid "E-Mail" msgstr "E-Mail" #: classes/Gems/Model.php:225 classes/Gems/Default/OptionAction.php:134 #: classes/Gems/Default/StaffAction.php:350 -#: classes/Gems/Model/RespondentModel.php:255 +#: classes/Gems/Model/RespondentModel.php:276 msgid "Gender" msgstr "Gender" #: classes/Gems/Model.php:226 classes/Gems/Default/OptionAction.php:131 #: classes/Gems/Default/StaffAction.php:192 -#: classes/Gems/Model/RespondentModel.php:251 +#: classes/Gems/Model/RespondentModel.php:272 msgid "First name" msgstr "First name" @@ -490,7 +490,7 @@ #: classes/Gems/Model.php:228 classes/Gems/Default/OptionAction.php:133 #: classes/Gems/Default/StaffAction.php:195 -#: classes/Gems/Model/RespondentModel.php:252 +#: classes/Gems/Model/RespondentModel.php:273 msgid "Last name" msgstr "Last name" @@ -504,39 +504,39 @@ #: classes/Gems/Default/SurveyMaintenanceAction.php:435 #: classes/Gems/Default/TokenPlanAction.php:116 #: classes/Gems/Default/TrackFieldsAction.php:98 -#: classes/Gems/Default/TrackMaintenanceAction.php:318 -#: classes/Gems/Model/RespondentModel.php:182 +#: classes/Gems/Default/TrackMaintenanceAction.php:320 +#: classes/Gems/Model/RespondentModel.php:203 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:60 #: classes/Gems/Tracker/Model/TrackModel.php:98 msgid "Name" msgstr "Name" -#: classes/Gems/Model.php:234 classes/Gems/Model/RespondentModel.php:191 -#: classes/Gems/Model/RespondentModel.php:270 +#: classes/Gems/Model.php:234 classes/Gems/Model/RespondentModel.php:212 +#: classes/Gems/Model/RespondentModel.php:291 msgid "Street" msgstr "Street" -#: classes/Gems/Model.php:235 classes/Gems/Model/RespondentModel.php:192 -#: classes/Gems/Model/RespondentModel.php:276 +#: classes/Gems/Model.php:235 classes/Gems/Model/RespondentModel.php:213 +#: classes/Gems/Model/RespondentModel.php:297 msgid "Zipcode" msgstr "Zipcode" #: classes/Gems/Model.php:236 #: classes/Gems/Default/RespondentPlanAction.php:134 -#: classes/Gems/Model/RespondentModel.php:193 -#: classes/Gems/Model/RespondentModel.php:277 +#: classes/Gems/Model/RespondentModel.php:214 +#: classes/Gems/Model/RespondentModel.php:298 msgid "City" msgstr "City" -#: classes/Gems/Model.php:238 classes/Gems/Model/RespondentModel.php:195 -#: classes/Gems/Model/RespondentModel.php:281 +#: classes/Gems/Model.php:238 classes/Gems/Model/RespondentModel.php:216 +#: classes/Gems/Model/RespondentModel.php:302 msgid "Phone" msgstr "Phone" #: classes/Gems/Model.php:240 #: classes/Gems/Default/RespondentPlanAction.php:133 -#: classes/Gems/Model/RespondentModel.php:198 -#: classes/Gems/Model/RespondentModel.php:260 +#: classes/Gems/Model/RespondentModel.php:219 +#: classes/Gems/Model/RespondentModel.php:281 msgid "Birthday" msgstr "Birthday" @@ -586,7 +586,7 @@ #: classes/Gems/Controller/BrowseEditAction.php:357 #: classes/Gems/Controller/ModelSnippetActionAbstract.php:261 #: classes/Gems/Default/StaffAction.php:235 -#: classes/Gems/Snippets/ModelFormSnippetAbstract.php:186 +#: classes/Gems/Snippets/ModelFormSnippetAbstract.php:299 #, php-format msgid "New %s..." msgstr "New %s..." @@ -616,7 +616,7 @@ #: classes/Gems/Controller/BrowseEditAction.php:413 #: classes/Gems/Controller/ModelSnippetActionAbstract.php:291 -#: classes/Gems/Snippets/ModelFormSnippetAbstract.php:188 +#: classes/Gems/Snippets/ModelFormSnippetAbstract.php:301 #, php-format msgid "Edit %s" msgstr "Edit %s" @@ -632,7 +632,7 @@ msgstr "Search" #: classes/Gems/Controller/BrowseEditAction.php:603 -#: classes/Gems/Default/TrackMaintenanceAction.php:452 +#: classes/Gems/Default/TrackMaintenanceAction.php:454 #, php-format msgid "No %s found" msgstr "No %s found" @@ -684,9 +684,10 @@ msgstr "No" #: classes/Gems/Controller/BrowseEditAction.php:875 -#: classes/Gems/Default/RespondentAction.php:246 -#: classes/Gems/Default/RespondentAction.php:339 -#: classes/Gems/Default/RespondentAction.php:515 +#: classes/Gems/Default/RespondentAction.php:248 +#: classes/Gems/Default/RespondentAction.php:342 +#: classes/Gems/Default/RespondentAction.php:518 +#: classes/Gems/Default/RespondentNewAction.php:337 #: classes/Gems/Default/TrackAction.php:554 #, php-format msgid "Unknown %s requested" @@ -716,7 +717,8 @@ msgstr "No changes to save." #: classes/Gems/Controller/BrowseEditAction.php:954 -#: classes/Gems/Default/RespondentAction.php:307 +#: classes/Gems/Default/RespondentAction.php:310 +#: classes/Gems/Default/RespondentNewAction.php:210 msgid "Input error! No changes saved!" msgstr "Input error! No changes saved!" @@ -736,8 +738,9 @@ #: classes/Gems/Default/DatabaseAction.php:503 #: classes/Gems/Default/SourceAction.php:292 #: classes/Gems/Default/UpgradeAction.php:184 -#: classes/Gems/Snippets/ModelFormSnippetAbstract.php:171 -#: classes/Gems/Snippets/ModelItemTableSnippetAbstract.php:180 +#: classes/Gems/Snippets/ModelFormSnippetAbstract.php:284 +#: classes/Gems/Snippets/ModelItemTableSnippetAbstract.php:176 +#: classes/Gems/Snippets/RespondentDetailSnippetAbstract.php:106 #: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:193 #: snippets/Generic/CurrentButtonRowSnippet.php:77 #: snippets/Track/Token/ShowFirstOpenSnippet.php:133 @@ -863,7 +866,7 @@ #: classes/Gems/Default/ComplianceAction.php:196 #: classes/Gems/Default/ProjectTracksAction.php:85 #: classes/Gems/Default/TrackAction.php:452 -#: classes/Gems/Default/TrackMaintenanceAction.php:400 +#: classes/Gems/Default/TrackMaintenanceAction.php:402 #: classes/Gems/Tracker/Snippets/EditTrackEngineSnippetGeneric.php:191 #: classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php:174 msgid "track" @@ -881,7 +884,7 @@ #: classes/Gems/Default/TrackFieldsAction.php:101 #: classes/Gems/Default/UpgradeAction.php:176 #: classes/Gems/Export/RespondentExport.php:239 -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:734 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:733 #: classes/Gems/Tracker/Model/StandardTokenModel.php:214 #: classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php:150 #: classes/Gems/Tracker/Snippets/ShowTrackUsageAbstract.php:147 @@ -892,7 +895,7 @@ #: classes/Gems/Default/ConsentAction.php:70 #: classes/Gems/Default/DatabaseAction.php:139 #: classes/Gems/Default/TrackFieldsAction.php:97 -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:733 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:732 msgid "Order" msgstr "Order" @@ -1065,12 +1068,13 @@ #: classes/Gems/Default/DatabaseAction.php:134 #: classes/Gems/Default/TrackFieldsAction.php:104 -#: classes/Gems/Default/TrackMaintenanceAction.php:320 +#: classes/Gems/Default/TrackMaintenanceAction.php:322 msgid "Type" msgstr "Type" #: classes/Gems/Default/DatabaseAction.php:138 #: classes/Gems/Default/SurveyMaintenanceAction.php:457 +#: classes/Gems/Default/TrackMaintenanceAction.php:313 msgid "Group" msgstr "Group" @@ -1353,7 +1357,7 @@ #: classes/Gems/Default/SurveyAction.php:201 #: classes/Gems/Email/OneMailForm.php:57 #: classes/Gems/Export/RespondentExport.php:156 -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:731 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:730 #: classes/Gems/Tracker/Model/StandardTokenModel.php:215 #: snippets/TrackSurveyOverviewSnippet.php:111 msgid "Survey" @@ -1394,7 +1398,7 @@ #: classes/Gems/Default/SourceAction.php:101 #: classes/Gems/Default/SurveyMaintenanceAction.php:448 #: classes/Gems/Default/SurveyMaintenanceAction.php:503 -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:737 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:736 #: classes/Gems/Tracker/Model/TrackModel.php:102 #: classes/Gems/Util/TrackData.php:153 msgid "Active" @@ -1637,7 +1641,7 @@ #: classes/Gems/Default/LogAction.php:198 #: classes/Gems/Default/TokenPlanAction.php:111 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:55 -#: snippets/RespondentDetailsSnippet.php:78 +#: snippets/RespondentDetailsSnippet.php:80 #: snippets/RespondentDetailsWithAssignmentsSnippet.php:148 msgid "Respondent" msgstr "Patient" @@ -1879,7 +1883,7 @@ msgstr "Email servers" #: classes/Gems/Default/MailTemplateAction.php:76 -#: classes/Gems/Default/RespondentAction.php:386 +#: classes/Gems/Default/RespondentAction.php:389 #: classes/Gems/Default/StaffAction.php:342 #: classes/Gems/Default/StaffAction.php:416 #: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:75 @@ -1907,9 +1911,9 @@ #: classes/Gems/Default/OptionAction.php:136 #: classes/Gems/Default/OrganizationAction.php:147 -#: classes/Gems/Default/RespondentAction.php:195 +#: classes/Gems/Default/RespondentAction.php:197 #: classes/Gems/Default/StaffAction.php:359 -#: classes/Gems/Model/RespondentModel.php:285 +#: classes/Gems/Model/RespondentModel.php:306 msgid "Language" msgstr "Language" @@ -2343,25 +2347,25 @@ msgstr[1] "reception codes" #: classes/Gems/Default/RespondentAction.php:127 -#: classes/Gems/Model/RespondentNlModel.php:119 +#: classes/Gems/Model/RespondentNlModel.php:125 #, php-format msgid "Random Example BSN: %s" msgstr "Random Example BSN: %s" #: classes/Gems/Default/RespondentAction.php:129 -#: classes/Gems/Model/RespondentNlModel.php:121 +#: classes/Gems/Model/RespondentNlModel.php:127 msgid "Enter a 9-digit SSN number." msgstr "Enter a 9-digit BSN number." #: classes/Gems/Default/RespondentAction.php:143 -#: classes/Gems/Model/RespondentModel.php:229 -#: classes/Gems/Model/RespondentModel.php:245 -#: classes/Gems/Model/RespondentModel.php:249 +#: classes/Gems/Model/RespondentModel.php:252 +#: classes/Gems/Model/RespondentModel.php:266 +#: classes/Gems/Model/RespondentModel.php:270 msgid "Identification" msgstr "Identification" #: classes/Gems/Default/RespondentAction.php:154 -#: classes/Gems/Model/RespondentModel.php:244 +#: classes/Gems/Model/RespondentModel.php:265 msgid "SSN" msgstr "BSN" @@ -2370,7 +2374,7 @@ msgstr "Patient number" #: classes/Gems/Default/RespondentAction.php:167 -#: classes/Gems/Model/RespondentModel.php:352 +#: classes/Gems/Model/RespondentModel.php:379 msgid "Medical data" msgstr "Medical data" @@ -2380,48 +2384,49 @@ msgstr "DBC's, etc..." #: classes/Gems/Default/RespondentAction.php:177 -#: classes/Gems/Model/RespondentModel.php:268 +#: classes/Gems/Model/RespondentModel.php:289 msgid "Contact information" msgstr "Contact information" #: classes/Gems/Default/RespondentAction.php:182 -#: classes/Gems/Model/RespondentModel.php:335 -#: classes/Gems/Model/RespondentModel.php:339 +#: classes/Gems/Model/RespondentModel.php:362 +#: classes/Gems/Model/RespondentModel.php:366 msgid "Respondent has no e-mail" msgstr "Patient has no e-mail" #: classes/Gems/Default/RespondentAction.php:183 -#: classes/Gems/Model/RespondentModel.php:365 +#: classes/Gems/Model/RespondentModel.php:392 msgid "With housenumber" msgstr "With housenumber" -#: classes/Gems/Default/RespondentAction.php:190 -#: classes/Gems/Model/RespondentModel.php:278 +#: classes/Gems/Default/RespondentAction.php:192 +#: classes/Gems/Model/RespondentModel.php:299 msgid "Country" msgstr "Country" -#: classes/Gems/Default/RespondentAction.php:194 -#: classes/Gems/Model/RespondentModel.php:287 +#: classes/Gems/Default/RespondentAction.php:196 +#: classes/Gems/Model/RespondentModel.php:308 msgid "Settings" msgstr "Settings" -#: classes/Gems/Default/RespondentAction.php:196 -#: classes/Gems/Model/RespondentModel.php:380 +#: classes/Gems/Default/RespondentAction.php:198 +#: classes/Gems/Model/RespondentModel.php:407 msgid "Has the respondent signed the informed consent letter?" msgstr "Has the patient signed the informed consent letter?" -#: classes/Gems/Default/RespondentAction.php:228 -#: classes/Gems/Model/RespondentModel.php:265 +#: classes/Gems/Default/RespondentAction.php:230 +#: classes/Gems/Model/RespondentModel.php:286 #: classes/Gems/Tracker/Model/StandardTokenModel.php:203 msgid "Comments" msgstr "Comments" -#: classes/Gems/Default/RespondentAction.php:229 -#: classes/Gems/Model/RespondentModel.php:264 +#: classes/Gems/Default/RespondentAction.php:231 +#: classes/Gems/Model/RespondentModel.php:285 msgid "Treatment" msgstr "Treatment" -#: classes/Gems/Default/RespondentAction.php:257 +#: classes/Gems/Default/RespondentAction.php:260 +#: classes/Gems/Default/RespondentNewAction.php:160 #: classes/Gems/Default/TrackAction.php:132 #: classes/Gems/Default/TrackAction.php:482 #: classes/Gems/Tracker/Model/StandardTokenModel.php:212 @@ -2430,36 +2435,41 @@ msgid "Rejection code" msgstr "Rejection code" -#: classes/Gems/Default/RespondentAction.php:264 +#: classes/Gems/Default/RespondentAction.php:267 +#: classes/Gems/Default/RespondentNewAction.php:167 msgid "Delete respondent" msgstr "Delete patient" -#: classes/Gems/Default/RespondentAction.php:296 +#: classes/Gems/Default/RespondentAction.php:299 +#: classes/Gems/Default/RespondentNewAction.php:199 msgid "Respondent deleted." msgstr "Patient deleted" -#: classes/Gems/Default/RespondentAction.php:300 +#: classes/Gems/Default/RespondentAction.php:303 +#: classes/Gems/Default/RespondentNewAction.php:203 msgid "Respondent tracks stopped." msgstr "Patient tracks stopped." -#: classes/Gems/Default/RespondentAction.php:304 +#: classes/Gems/Default/RespondentAction.php:307 +#: classes/Gems/Default/RespondentNewAction.php:207 #: classes/Gems/Default/TrackAction.php:405 msgid "Choose a reception code to delete." msgstr "Choose a reception code to delete." -#: classes/Gems/Default/RespondentAction.php:356 +#: classes/Gems/Default/RespondentAction.php:359 #: classes/Gems/Default/RespondentExportAction.php:63 +#: classes/Gems/Default/RespondentNewAction.php:237 msgid "Export respondent archive" msgstr "Export patient archive" -#: classes/Gems/Default/RespondentAction.php:457 -#: classes/Gems/Default/RespondentNewAction.php:142 +#: classes/Gems/Default/RespondentAction.php:460 +#: classes/Gems/Default/RespondentNewAction.php:362 msgid "respondent" msgid_plural "respondents" msgstr[0] "patient" msgstr[1] "patients" -#: classes/Gems/Default/RespondentAction.php:532 +#: classes/Gems/Default/RespondentAction.php:535 msgid "Please settle the informed consent form for this respondent." msgstr "Please settle the informed consent form for this patient." @@ -3023,7 +3033,7 @@ msgstr "After completion" #: classes/Gems/Default/SurveyMaintenanceAction.php:469 -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:736 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:735 msgid "Answer display" msgstr "Answer display" @@ -3181,7 +3191,7 @@ msgstr "Token planning" #: classes/Gems/Default/TrackAction.php:121 -#: classes/Gems/Model/RespondentModel.php:248 +#: classes/Gems/Model/RespondentModel.php:269 #: snippets/DeleteInSourceTrackSnippet.php:82 snippets/EditTrackSnippet.php:72 msgid "Respondent number" msgstr "Patient number" @@ -3375,12 +3385,12 @@ msgstr "Code Name" #: classes/Gems/Default/TrackFieldsAction.php:103 -#: classes/Gems/Default/TrackMaintenanceAction.php:319 +#: classes/Gems/Default/TrackMaintenanceAction.php:321 msgid "Values" msgstr "Values" #: classes/Gems/Default/TrackFieldsAction.php:105 -#: classes/Gems/Default/TrackMaintenanceAction.php:321 +#: classes/Gems/Default/TrackMaintenanceAction.php:323 msgid "Required" msgstr "Required" @@ -3481,23 +3491,23 @@ msgid "Checking round assignments for track '%s'." msgstr "Checking round assignments for track '%s'." -#: classes/Gems/Default/TrackMaintenanceAction.php:364 +#: classes/Gems/Default/TrackMaintenanceAction.php:366 msgid "(all track engines)" msgstr "(all track engines)" -#: classes/Gems/Default/TrackMaintenanceAction.php:368 +#: classes/Gems/Default/TrackMaintenanceAction.php:370 msgid "(both)" msgstr "(both)" -#: classes/Gems/Default/TrackMaintenanceAction.php:424 +#: classes/Gems/Default/TrackMaintenanceAction.php:426 msgid "fields" msgstr "fields" -#: classes/Gems/Default/TrackMaintenanceAction.php:425 +#: classes/Gems/Default/TrackMaintenanceAction.php:427 msgid "rounds" msgstr "rounds" -#: classes/Gems/Default/TrackMaintenanceAction.php:456 +#: classes/Gems/Default/TrackMaintenanceAction.php:458 #, php-format msgid "%s in track" msgstr "%s in track" @@ -3952,15 +3962,11 @@ msgid "No script for %1$s." msgstr "No script for %1$s." -#: classes/Gems/Model/RespondentModel.php:271 -msgid " " -msgstr " " - -#: classes/Gems/Model/RespondentModel.php:282 +#: classes/Gems/Model/RespondentModel.php:303 msgid "Phone 2" msgstr "Phone 2" -#: classes/Gems/Model/RespondentModel.php:283 +#: classes/Gems/Model/RespondentModel.php:304 msgid "Phone 3" msgstr "Phone 3" @@ -3968,7 +3974,7 @@ msgid "de, van der, 't, etc..." msgstr "de, van der, 't, etc..." -#: classes/Gems/Model/RespondentNlModel.php:136 +#: classes/Gems/Model/RespondentNlModel.php:142 msgid "E.g.: 0000 AA" msgstr "E.g.: 0000 AA" @@ -4102,17 +4108,26 @@ msgid "Answered surveys" msgstr "Answered surveys" -#: classes/Gems/Snippets/RespondentDetailSnippetAbstract.php:141 +#: classes/Gems/Snippets/RespondentDetailSnippetAbstract.php:146 #: classes/Gems/Snippets/Export/RespondentSnippet.php:81 #: classes/Gems/Snippets/Export/RespondentSnippet.php:89 msgid "Respondent information" msgstr "Patient information" -#: classes/Gems/Snippets/RespondentDetailSnippetAbstract.php:144 +#: classes/Gems/Snippets/RespondentDetailSnippetAbstract.php:149 #, php-format msgid "%s respondent information" msgstr "%s patient information" +#: classes/Gems/Snippets/RespondentFormSnippet.php:109 +msgid "Known respondent." +msgstr "Known patient." + +#: classes/Gems/Snippets/RespondentFormSnippet.php:126 +#, php-format +msgid "Respondent data retrieved from %s." +msgstr "Patient data retrieved from %s." + #: classes/Gems/Snippets/Export/ReportFooterSnippet.php:55 msgid "Report generation finished." msgstr "Report generation finished." @@ -4365,28 +4380,28 @@ msgid "%s track engines cannot be converted to %s track engines." msgstr "%s track engines cannot be converted to %s track engines." -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:683 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:682 #, php-format msgid "%d: %s - %s" msgstr "%d: %s - %s" -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:686 -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:689 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:685 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:688 #, php-format msgid "%d: %s" msgstr "%d: %s" -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:692 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:691 #: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:760 #, php-format msgid "%s - %s" msgstr "%s - %s" -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:732 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:731 msgid "Icon" msgstr "Icon" -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:735 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:734 msgid "After change" msgstr "After change" @@ -5316,12 +5331,12 @@ msgid "Recalculate track" msgstr "Recalculate track" -#: snippets/RespondentDetailsSnippet.php:73 +#: snippets/RespondentDetailsSnippet.php:75 #: snippets/RespondentDetailsWithAssignmentsSnippet.php:97 msgid "Respondent nr: " msgstr "Patient nr:" -#: snippets/RespondentDetailsSnippet.php:86 +#: snippets/RespondentDetailsSnippet.php:88 msgid "Address" msgstr "Address" @@ -5514,6 +5529,9 @@ msgstr[1] "" "After this survey there are another %d surveys we would like you to answer." +#~ msgid " " +#~ msgstr " " + #~ msgid "%s is a web application." #~ msgstr "%s is a web application." Modified: trunk/library/languages/default-nl.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-nl.po =================================================================== --- trunk/library/languages/default-nl.po 2013-03-18 13:14:10 UTC (rev 1190) +++ trunk/library/languages/default-nl.po 2013-03-18 13:16:50 UTC (rev 1191) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: GemsTracker NL\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-03-13 16:40+0100\n" +"POT-Creation-Date: 2013-03-18 14:15+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -326,7 +326,7 @@ #: classes/Gems/Export/RespondentExport.php:238 #: classes/Gems/Export/RespondentExport.php:250 #: classes/Gems/Tracker/Engine/StepEngineAbstract.php:484 -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:728 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:727 #: classes/Gems/Tracker/Model/StandardTokenModel.php:216 #: classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php:149 #: classes/Gems/Tracker/Snippets/ShowTrackUsageAbstract.php:146 @@ -336,7 +336,7 @@ #: classes/Gems/Menu.php:321 classes/Gems/Menu.php:346 #: classes/Gems/Menu.php:388 -#: classes/Gems/Default/TrackMaintenanceAction.php:458 +#: classes/Gems/Default/TrackMaintenanceAction.php:460 #: snippets/AddTracksSnippet.php:241 msgid "Add" msgstr "Voeg toe" @@ -350,7 +350,7 @@ msgstr "Preview" #: classes/Gems/Menu.php:336 classes/Gems/Default/ExportAction.php:149 -#: classes/Gems/Default/TrackMaintenanceAction.php:405 +#: classes/Gems/Default/TrackMaintenanceAction.php:407 #: classes/Gems/Menu/MenuAbstract.php:415 #: classes/Gems/Menu/MenuAbstract.php:497 snippets/AddTracksSnippet.php:238 msgid "Tracks" @@ -397,44 +397,44 @@ msgid "Export archive" msgstr "Dossier export" -#: classes/Gems/Menu.php:586 classes/Gems/Default/GroupAction.php:122 +#: classes/Gems/Menu.php:617 classes/Gems/Default/GroupAction.php:122 #: classes/Gems/Default/OrganizationAction.php:154 -#: classes/Gems/Default/RespondentAction.php:462 -#: classes/Gems/Default/RespondentNewAction.php:131 +#: classes/Gems/Default/RespondentAction.php:465 +#: classes/Gems/Default/RespondentNewAction.php:309 msgid "Respondents" msgstr "Patiënten" -#: classes/Gems/Menu.php:594 +#: classes/Gems/Menu.php:625 msgid "Overview" msgstr "Overzicht" -#: classes/Gems/Menu.php:601 classes/Gems/Menu/MenuAbstract.php:379 +#: classes/Gems/Menu.php:632 classes/Gems/Menu/MenuAbstract.php:379 msgid "Project" msgstr "Project" -#: classes/Gems/Menu.php:604 +#: classes/Gems/Menu.php:635 msgid "Setup" msgstr "Beheer" -#: classes/Gems/Menu.php:607 +#: classes/Gems/Menu.php:638 msgid "Track Builder" msgstr "Traject bouwer" -#: classes/Gems/Menu.php:610 classes/Gems/Export/RespondentExport.php:344 +#: classes/Gems/Menu.php:641 classes/Gems/Export/RespondentExport.php:344 msgid "Export" msgstr "Exporteer" -#: classes/Gems/Menu.php:616 classes/Gems/Default/ContactAction.php:170 +#: classes/Gems/Menu.php:647 classes/Gems/Default/ContactAction.php:170 #: snippets/Organization/OrganizationEditSnippet.php:82 msgid "Contact" msgstr "Contact" -#: classes/Gems/Menu.php:630 +#: classes/Gems/Menu.php:661 msgid "Changelog" msgstr "Changelog" #: classes/Gems/Model.php:212 classes/Gems/Default/ComplianceAction.php:93 -#: classes/Gems/Model/RespondentModel.php:179 +#: classes/Gems/Model/RespondentModel.php:200 #: classes/Gems/Tracker/Model/StandardTokenModel.php:213 msgid "Respondent nr" msgstr "Patiënt nr" @@ -444,8 +444,8 @@ #: classes/Gems/Default/LogAction.php:197 #: classes/Gems/Default/MailJobAction.php:98 #: classes/Gems/Default/StaffAction.php:347 -#: classes/Gems/Model/RespondentModel.php:174 -#: classes/Gems/Model/RespondentModel.php:228 +#: classes/Gems/Model/RespondentModel.php:195 +#: classes/Gems/Model/RespondentModel.php:251 #: classes/Gems/Snippets/Export/ReportHeaderSnippet.php:63 #: classes/Gems/User/Form/LayeredLoginForm.php:254 #: classes/Gems/User/Form/OrganizationFormAbstract.php:166 @@ -453,32 +453,32 @@ msgid "Organization" msgstr "Organisatie" -#: classes/Gems/Model.php:217 classes/Gems/Model/RespondentModel.php:202 -#: classes/Gems/Model/RespondentModel.php:294 +#: classes/Gems/Model.php:217 classes/Gems/Model/RespondentModel.php:223 +#: classes/Gems/Model/RespondentModel.php:315 msgid "Opened" msgstr "Bekeken op" -#: classes/Gems/Model.php:218 classes/Gems/Model/RespondentModel.php:205 -#: classes/Gems/Model/RespondentModel.php:289 +#: classes/Gems/Model.php:218 classes/Gems/Model/RespondentModel.php:226 +#: classes/Gems/Model/RespondentModel.php:310 msgid "Consent" msgstr "Toestemming" #: classes/Gems/Model.php:220 classes/Gems/Default/OptionAction.php:130 #: classes/Gems/Default/StaffAction.php:337 -#: classes/Gems/Model/RespondentModel.php:189 -#: classes/Gems/Model/RespondentModel.php:267 +#: classes/Gems/Model/RespondentModel.php:210 +#: classes/Gems/Model/RespondentModel.php:288 msgid "E-Mail" msgstr "Email" #: classes/Gems/Model.php:225 classes/Gems/Default/OptionAction.php:134 #: classes/Gems/Default/StaffAction.php:350 -#: classes/Gems/Model/RespondentModel.php:255 +#: classes/Gems/Model/RespondentModel.php:276 msgid "Gender" msgstr "Geslacht" #: classes/Gems/Model.php:226 classes/Gems/Default/OptionAction.php:131 #: classes/Gems/Default/StaffAction.php:192 -#: classes/Gems/Model/RespondentModel.php:251 +#: classes/Gems/Model/RespondentModel.php:272 msgid "First name" msgstr "Voornaam" @@ -490,7 +490,7 @@ #: classes/Gems/Model.php:228 classes/Gems/Default/OptionAction.php:133 #: classes/Gems/Default/StaffAction.php:195 -#: classes/Gems/Model/RespondentModel.php:252 +#: classes/Gems/Model/RespondentModel.php:273 msgid "Last name" msgstr "Achternaam" @@ -504,39 +504,39 @@ #: classes/Gems/Default/SurveyMaintenanceAction.php:435 #: classes/Gems/Default/TokenPlanAction.php:116 #: classes/Gems/Default/TrackFieldsAction.php:98 -#: classes/Gems/Default/TrackMaintenanceAction.php:318 -#: classes/Gems/Model/RespondentModel.php:182 +#: classes/Gems/Default/TrackMaintenanceAction.php:320 +#: classes/Gems/Model/RespondentModel.php:203 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:60 #: classes/Gems/Tracker/Model/TrackModel.php:98 msgid "Name" msgstr "Naam" -#: classes/Gems/Model.php:234 classes/Gems/Model/RespondentModel.php:191 -#: classes/Gems/Model/RespondentModel.php:270 +#: classes/Gems/Model.php:234 classes/Gems/Model/RespondentModel.php:212 +#: classes/Gems/Model/RespondentModel.php:291 msgid "Street" msgstr "Straat" -#: classes/Gems/Model.php:235 classes/Gems/Model/RespondentModel.php:192 -#: classes/Gems/Model/RespondentModel.php:276 +#: classes/Gems/Model.php:235 classes/Gems/Model/RespondentModel.php:213 +#: classes/Gems/Model/RespondentModel.php:297 msgid "Zipcode" msgstr "Postcode" #: classes/Gems/Model.php:236 #: classes/Gems/Default/RespondentPlanAction.php:134 -#: classes/Gems/Model/RespondentModel.php:193 -#: classes/Gems/Model/RespondentModel.php:277 +#: classes/Gems/Model/RespondentModel.php:214 +#: classes/Gems/Model/RespondentModel.php:298 msgid "City" msgstr "Woonplaats" -#: classes/Gems/Model.php:238 classes/Gems/Model/RespondentModel.php:195 -#: classes/Gems/Model/RespondentModel.php:281 +#: classes/Gems/Model.php:238 classes/Gems/Model/RespondentModel.php:216 +#: classes/Gems/Model/RespondentModel.php:302 msgid "Phone" msgstr "Telefoon" #: classes/Gems/Model.php:240 #: classes/Gems/Default/RespondentPlanAction.php:133 -#: classes/Gems/Model/RespondentModel.php:198 -#: classes/Gems/Model/RespondentModel.php:260 +#: classes/Gems/Model/RespondentModel.php:219 +#: classes/Gems/Model/RespondentModel.php:281 msgid "Birthday" msgstr "Geboren op" @@ -586,7 +586,7 @@ #: classes/Gems/Controller/BrowseEditAction.php:357 #: classes/Gems/Controller/ModelSnippetActionAbstract.php:261 #: classes/Gems/Default/StaffAction.php:235 -#: classes/Gems/Snippets/ModelFormSnippetAbstract.php:186 +#: classes/Gems/Snippets/ModelFormSnippetAbstract.php:299 #, php-format msgid "New %s..." msgstr "Nieuwe %s..." @@ -616,7 +616,7 @@ #: classes/Gems/Controller/BrowseEditAction.php:413 #: classes/Gems/Controller/ModelSnippetActionAbstract.php:291 -#: classes/Gems/Snippets/ModelFormSnippetAbstract.php:188 +#: classes/Gems/Snippets/ModelFormSnippetAbstract.php:301 #, php-format msgid "Edit %s" msgstr "Bewerk %s" @@ -632,7 +632,7 @@ msgstr "Zoeken" #: classes/Gems/Controller/BrowseEditAction.php:603 -#: classes/Gems/Default/TrackMaintenanceAction.php:452 +#: classes/Gems/Default/TrackMaintenanceAction.php:454 #, php-format msgid "No %s found" msgstr "Geen %s gevonden" @@ -684,9 +684,10 @@ msgstr "Nee" #: classes/Gems/Controller/BrowseEditAction.php:875 -#: classes/Gems/Default/RespondentAction.php:246 -#: classes/Gems/Default/RespondentAction.php:339 -#: classes/Gems/Default/RespondentAction.php:515 +#: classes/Gems/Default/RespondentAction.php:248 +#: classes/Gems/Default/RespondentAction.php:342 +#: classes/Gems/Default/RespondentAction.php:518 +#: classes/Gems/Default/RespondentNewAction.php:337 #: classes/Gems/Default/TrackAction.php:554 #, php-format msgid "Unknown %s requested" @@ -716,7 +717,8 @@ msgstr "Geen verandering om op te slaan." #: classes/Gems/Controller/BrowseEditAction.php:954 -#: classes/Gems/Default/RespondentAction.php:307 +#: classes/Gems/Default/RespondentAction.php:310 +#: classes/Gems/Default/RespondentNewAction.php:210 msgid "Input error! No changes saved!" msgstr "Invoer fout! Veranderingen niet opgeslagen!" @@ -736,8 +738,9 @@ #: classes/Gems/Default/DatabaseAction.php:503 #: classes/Gems/Default/SourceAction.php:292 #: classes/Gems/Default/UpgradeAction.php:184 -#: classes/Gems/Snippets/ModelFormSnippetAbstract.php:171 -#: classes/Gems/Snippets/ModelItemTableSnippetAbstract.php:180 +#: classes/Gems/Snippets/ModelFormSnippetAbstract.php:284 +#: classes/Gems/Snippets/ModelItemTableSnippetAbstract.php:176 +#: classes/Gems/Snippets/RespondentDetailSnippetAbstract.php:106 #: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:193 #: snippets/Generic/CurrentButtonRowSnippet.php:77 #: snippets/Track/Token/ShowFirstOpenSnippet.php:133 @@ -865,7 +868,7 @@ #: classes/Gems/Default/ComplianceAction.php:196 #: classes/Gems/Default/ProjectTracksAction.php:85 #: classes/Gems/Default/TrackAction.php:452 -#: classes/Gems/Default/TrackMaintenanceAction.php:400 +#: classes/Gems/Default/TrackMaintenanceAction.php:402 #: classes/Gems/Tracker/Snippets/EditTrackEngineSnippetGeneric.php:191 #: classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php:174 msgid "track" @@ -883,7 +886,7 @@ #: classes/Gems/Default/TrackFieldsAction.php:101 #: classes/Gems/Default/UpgradeAction.php:176 #: classes/Gems/Export/RespondentExport.php:239 -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:734 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:733 #: classes/Gems/Tracker/Model/StandardTokenModel.php:214 #: classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php:150 #: classes/Gems/Tracker/Snippets/ShowTrackUsageAbstract.php:147 @@ -894,7 +897,7 @@ #: classes/Gems/Default/ConsentAction.php:70 #: classes/Gems/Default/DatabaseAction.php:139 #: classes/Gems/Default/TrackFieldsAction.php:97 -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:733 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:732 msgid "Order" msgstr "Volgorde" @@ -1066,12 +1069,13 @@ #: classes/Gems/Default/DatabaseAction.php:134 #: classes/Gems/Default/TrackFieldsAction.php:104 -#: classes/Gems/Default/TrackMaintenanceAction.php:320 +#: classes/Gems/Default/TrackMaintenanceAction.php:322 msgid "Type" msgstr "Type" #: classes/Gems/Default/DatabaseAction.php:138 #: classes/Gems/Default/SurveyMaintenanceAction.php:457 +#: classes/Gems/Default/TrackMaintenanceAction.php:313 msgid "Group" msgstr "Groep" @@ -1356,7 +1360,7 @@ #: classes/Gems/Default/SurveyAction.php:201 #: classes/Gems/Email/OneMailForm.php:57 #: classes/Gems/Export/RespondentExport.php:156 -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:731 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:730 #: classes/Gems/Tracker/Model/StandardTokenModel.php:215 #: snippets/TrackSurveyOverviewSnippet.php:111 msgid "Survey" @@ -1397,7 +1401,7 @@ #: classes/Gems/Default/SourceAction.php:101 #: classes/Gems/Default/SurveyMaintenanceAction.php:448 #: classes/Gems/Default/SurveyMaintenanceAction.php:503 -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:737 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:736 #: classes/Gems/Tracker/Model/TrackModel.php:102 #: classes/Gems/Util/TrackData.php:153 msgid "Active" @@ -1643,7 +1647,7 @@ #: classes/Gems/Default/LogAction.php:198 #: classes/Gems/Default/TokenPlanAction.php:111 #: classes/Gems/Snippets/TokenPlanTableSnippet.php:55 -#: snippets/RespondentDetailsSnippet.php:78 +#: snippets/RespondentDetailsSnippet.php:80 #: snippets/RespondentDetailsWithAssignmentsSnippet.php:148 msgid "Respondent" msgstr "Patiënt" @@ -1886,7 +1890,7 @@ msgstr "Email servers" #: classes/Gems/Default/MailTemplateAction.php:76 -#: classes/Gems/Default/RespondentAction.php:386 +#: classes/Gems/Default/RespondentAction.php:389 #: classes/Gems/Default/StaffAction.php:342 #: classes/Gems/Default/StaffAction.php:416 #: classes/Gems/Snippets/Tracker/Compliance/ComplianceSearchFormSnippet.php:75 @@ -1914,9 +1918,9 @@ #: classes/Gems/Default/OptionAction.php:136 #: classes/Gems/Default/OrganizationAction.php:147 -#: classes/Gems/Default/RespondentAction.php:195 +#: classes/Gems/Default/RespondentAction.php:197 #: classes/Gems/Default/StaffAction.php:359 -#: classes/Gems/Model/RespondentModel.php:285 +#: classes/Gems/Model/RespondentModel.php:306 msgid "Language" msgstr "Taal" @@ -2352,25 +2356,25 @@ msgstr[1] "Ontvangst code" #: classes/Gems/Default/RespondentAction.php:127 -#: classes/Gems/Model/RespondentNlModel.php:119 +#: classes/Gems/Model/RespondentNlModel.php:125 #, php-format msgid "Random Example BSN: %s" msgstr "Willekeurig voorbeeld BSN: %s" #: classes/Gems/Default/RespondentAction.php:129 -#: classes/Gems/Model/RespondentNlModel.php:121 +#: classes/Gems/Model/RespondentNlModel.php:127 msgid "Enter a 9-digit SSN number." msgstr "Voer een BSN nummer van 9 cijfers in." #: classes/Gems/Default/RespondentAction.php:143 -#: classes/Gems/Model/RespondentModel.php:229 -#: classes/Gems/Model/RespondentModel.php:245 -#: classes/Gems/Model/RespondentModel.php:249 +#: classes/Gems/Model/RespondentModel.php:252 +#: classes/Gems/Model/RespondentModel.php:266 +#: classes/Gems/Model/RespondentModel.php:270 msgid "Identification" msgstr "Identificatie" #: classes/Gems/Default/RespondentAction.php:154 -#: classes/Gems/Model/RespondentModel.php:244 +#: classes/Gems/Model/RespondentModel.php:265 msgid "SSN" msgstr "BSN" @@ -2379,7 +2383,7 @@ msgstr "Patiënt nummer" #: classes/Gems/Default/RespondentAction.php:167 -#: classes/Gems/Model/RespondentModel.php:352 +#: classes/Gems/Model/RespondentModel.php:379 msgid "Medical data" msgstr "Medische gegevens" @@ -2389,48 +2393,49 @@ msgstr "DBC's, etc..." #: classes/Gems/Default/RespondentAction.php:177 -#: classes/Gems/Model/RespondentModel.php:268 +#: classes/Gems/Model/RespondentModel.php:289 msgid "Contact information" msgstr "Contact informatie" #: classes/Gems/Default/RespondentAction.php:182 -#: classes/Gems/Model/RespondentModel.php:335 -#: classes/Gems/Model/RespondentModel.php:339 +#: classes/Gems/Model/RespondentModel.php:362 +#: classes/Gems/Model/RespondentModel.php:366 msgid "Respondent has no e-mail" msgstr "Patiënt zonder email" #: classes/Gems/Default/RespondentAction.php:183 -#: classes/Gems/Model/RespondentModel.php:365 +#: classes/Gems/Model/RespondentModel.php:392 msgid "With housenumber" msgstr "Met huisnummer" -#: classes/Gems/Default/RespondentAction.php:190 -#: classes/Gems/Model/RespondentModel.php:278 +#: classes/Gems/Default/RespondentAction.php:192 +#: classes/Gems/Model/RespondentModel.php:299 msgid "Country" msgstr "Land" -#: classes/Gems/Default/RespondentAction.php:194 -#: classes/Gems/Model/RespondentModel.php:287 +#: classes/Gems/Default/RespondentAction.php:196 +#: classes/Gems/Model/RespondentModel.php:308 msgid "Settings" msgstr "Instellingen" -#: classes/Gems/Default/RespondentAction.php:196 -#: classes/Gems/Model/RespondentModel.php:380 +#: classes/Gems/Default/RespondentAction.php:198 +#: classes/Gems/Model/RespondentModel.php:407 msgid "Has the respondent signed the informed consent letter?" msgstr "Heeft de patiënt het \"informed consent\" formulier ondertekend?" -#: classes/Gems/Default/RespondentAction.php:228 -#: classes/Gems/Model/RespondentModel.php:265 +#: classes/Gems/Default/RespondentAction.php:230 +#: classes/Gems/Model/RespondentModel.php:286 #: classes/Gems/Tracker/Model/StandardTokenModel.php:203 msgid "Comments" msgstr "Opmerkingen" -#: classes/Gems/Default/RespondentAction.php:229 -#: classes/Gems/Model/RespondentModel.php:264 +#: classes/Gems/Default/RespondentAction.php:231 +#: classes/Gems/Model/RespondentModel.php:285 msgid "Treatment" msgstr "Behandeling" -#: classes/Gems/Default/RespondentAction.php:257 +#: classes/Gems/Default/RespondentAction.php:260 +#: classes/Gems/Default/RespondentNewAction.php:160 #: classes/Gems/Default/TrackAction.php:132 #: classes/Gems/Default/TrackAction.php:482 #: classes/Gems/Tracker/Model/StandardTokenModel.php:212 @@ -2439,36 +2444,41 @@ msgid "Rejection code" msgstr "Afkeuringscode" -#: classes/Gems/Default/RespondentAction.php:264 +#: classes/Gems/Default/RespondentAction.php:267 +#: classes/Gems/Default/RespondentNewAction.php:167 msgid "Delete respondent" msgstr "Verwijder patiënt" -#: classes/Gems/Default/RespondentAction.php:296 +#: classes/Gems/Default/RespondentAction.php:299 +#: classes/Gems/Default/RespondentNewAction.php:199 msgid "Respondent deleted." msgstr "Patiënt verwijderd" -#: classes/Gems/Default/RespondentAction.php:300 +#: classes/Gems/Default/RespondentAction.php:303 +#: classes/Gems/Default/RespondentNewAction.php:203 msgid "Respondent tracks stopped." msgstr "Trajecten van patiënt zijn gestopt." -#: classes/Gems/Default/RespondentAction.php:304 +#: classes/Gems/Default/RespondentAction.php:307 +#: classes/Gems/Default/RespondentNewAction.php:207 #: classes/Gems/Default/TrackAction.php:405 msgid "Choose a reception code to delete." msgstr "Kies een ontvangst code om te verwijderen." -#: classes/Gems/Default/RespondentAction.php:356 +#: classes/Gems/Default/RespondentAction.php:359 #: classes/Gems/Default/RespondentExportAction.php:63 +#: classes/Gems/Default/RespondentNewAction.php:237 msgid "Export respondent archive" msgstr "Exporteer patiënt dossier" -#: classes/Gems/Default/RespondentAction.php:457 -#: classes/Gems/Default/RespondentNewAction.php:142 +#: classes/Gems/Default/RespondentAction.php:460 +#: classes/Gems/Default/RespondentNewAction.php:362 msgid "respondent" msgid_plural "respondents" msgstr[0] "patiënt" msgstr[1] "patiënten" -#: classes/Gems/Default/RespondentAction.php:532 +#: classes/Gems/Default/RespondentAction.php:535 msgid "Please settle the informed consent form for this respondent." msgstr "A.u.b. het informed consent formulier doornemen met deze patiënt" @@ -3042,7 +3052,7 @@ msgstr "Na afronding" #: classes/Gems/Default/SurveyMaintenanceAction.php:469 -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:736 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:735 msgid "Answer display" msgstr "Antwoord weergave" @@ -3200,7 +3210,7 @@ msgstr "Per kenmerk plannen" #: classes/Gems/Default/TrackAction.php:121 -#: classes/Gems/Model/RespondentModel.php:248 +#: classes/Gems/Model/RespondentModel.php:269 #: snippets/DeleteInSourceTrackSnippet.php:82 snippets/EditTrackSnippet.php:72 msgid "Respondent number" msgstr "Patiënt nummer" @@ -3395,12 +3405,12 @@ msgstr "Code Naam" #: classes/Gems/Default/TrackFieldsAction.php:103 -#: classes/Gems/Default/TrackMaintenanceAction.php:319 +#: classes/Gems/Default/TrackMaintenanceAction.php:321 msgid "Values" msgstr "Waarden" #: classes/Gems/Default/TrackFieldsAction.php:105 -#: classes/Gems/Default/TrackMaintenanceAction.php:321 +#: classes/Gems/Default/TrackMaintenanceAction.php:323 msgid "Required" msgstr "Verplicht" @@ -3508,23 +3518,23 @@ msgid "Checking round assignments for track '%s'." msgstr "Controleren ronde toewijzing voor traject '%s'." -#: classes/Gems/Default/TrackMaintenanceAction.php:364 +#: classes/Gems/Default/TrackMaintenanceAction.php:366 msgid "(all track engines)" msgstr "(alle traject types)" -#: classes/Gems/Default/TrackMaintenanceAction.php:368 +#: classes/Gems/Default/TrackMaintenanceAction.php:370 msgid "(both)" msgstr "(beide)" -#: classes/Gems/Default/TrackMaintenanceAction.php:424 +#: classes/Gems/Default/TrackMaintenanceAction.php:426 msgid "fields" msgstr "velden" -#: classes/Gems/Default/TrackMaintenanceAction.php:425 +#: classes/Gems/Default/TrackMaintenanceAction.php:427 msgid "rounds" msgstr "rondes" -#: classes/Gems/Default/TrackMaintenanceAction.php:456 +#: classes/Gems/Default/TrackMaintenanceAction.php:458 #, php-format msgid "%s in track" msgstr "%s in traject" @@ -3980,15 +3990,11 @@ msgid "No script for %1$s." msgstr "Geen script voor %1$s:" -#: classes/Gems/Model/RespondentModel.php:271 -msgid " " -msgstr " " - -#: classes/Gems/Model/RespondentModel.php:282 +#: classes/Gems/Model/RespondentModel.php:303 msgid "Phone 2" msgstr "Telefoon 2" -#: classes/Gems/Model/RespondentModel.php:283 +#: classes/Gems/Model/RespondentModel.php:304 msgid "Phone 3" msgstr "Telefoon 3" @@ -3996,7 +4002,7 @@ msgid "de, van der, 't, etc..." msgstr "de, van der, 't, etc..." -#: classes/Gems/Model/RespondentNlModel.php:136 +#: classes/Gems/Model/RespondentNlModel.php:142 msgid "E.g.: 0000 AA" msgstr "Voorbeeld: 0000 AA" @@ -4130,17 +4136,26 @@ msgid "Answered surveys" msgstr "Beantwoorde vragenlijsten" -#: classes/Gems/Snippets/RespondentDetailSnippetAbstract.php:141 +#: classes/Gems/Snippets/RespondentDetailSnippetAbstract.php:146 #: classes/Gems/Snippets/Export/RespondentSnippet.php:81 #: classes/Gems/Snippets/Export/RespondentSnippet.php:89 msgid "Respondent information" msgstr "Patiënt informatie" -#: classes/Gems/Snippets/RespondentDetailSnippetAbstract.php:144 +#: classes/Gems/Snippets/RespondentDetailSnippetAbstract.php:149 #, php-format msgid "%s respondent information" msgstr "%s patiënt informatie" +#: classes/Gems/Snippets/RespondentFormSnippet.php:109 +msgid "Known respondent." +msgstr "Patiënt is al bekend." + +#: classes/Gems/Snippets/RespondentFormSnippet.php:126 +#, php-format +msgid "Respondent data retrieved from %s." +msgstr "%s patiënt gegevens overgenomen" + #: classes/Gems/Snippets/Export/ReportFooterSnippet.php:55 msgid "Report generation finished." msgstr "Rapport is aangemaakt." @@ -4397,28 +4412,28 @@ msgid "%s track engines cannot be converted to %s track engines." msgstr "Traject type %s kan niet geconverteerd worden naar %s." -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:683 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:682 #, php-format msgid "%d: %s - %s" msgstr "%d: %s - %s" -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:686 -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:689 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:685 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:688 #, php-format msgid "%d: %s" msgstr "%d: %s" -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:692 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:691 #: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:760 #, php-format msgid "%s - %s" msgstr "%s - %s" -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:732 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:731 msgid "Icon" msgstr "Icoon" -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:735 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:734 msgid "After change" msgstr "Ronde veranderingscode" @@ -5370,12 +5385,12 @@ msgid "Recalculate track" msgstr "Berekening traject opnieuw" -#: snippets/RespondentDetailsSnippet.php:73 +#: snippets/RespondentDetailsSnippet.php:75 #: snippets/RespondentDetailsWithAssignmentsSnippet.php:97 msgid "Respondent nr: " msgstr "Patiënt nr:" -#: snippets/RespondentDetailsSnippet.php:86 +#: snippets/RespondentDetailsSnippet.php:88 msgid "Address" msgstr "Adres" @@ -5570,6 +5585,9 @@ msgstr[0] "Na deze vragenlijst hebben we nog één andere vragenlijst voor u." msgstr[1] "Na deze vragenlijst hebben we nog %d andere vragenlijsten voor u." +#~ msgid " " +#~ msgstr " " + #~ msgid "%s is a web application." #~ msgstr "%s is een web applicatie." This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |