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...> - 2011-09-27 13:00:46
|
Revision: 80
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=80&view=rev
Author: matijsdejong
Date: 2011-09-27 13:00:35 +0000 (Tue, 27 Sep 2011)
Log Message:
-----------
- fix for #14, misspelled gtr_organisations name
Modified Paths:
--------------
trunk/library/changelog.txt
trunk/library/classes/Gems/Default/ProjectSurveysAction.php
trunk/library/classes/Gems/Default/ProjectTracksAction.php
trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php
trunk/library/classes/Gems/Default/TokenPlanAction.php
trunk/library/classes/Gems/Default/TrackActionAbstract.php
trunk/library/classes/Gems/Default/TrackMaintenanceAction.php
trunk/library/configs/db/patches.sql
trunk/library/configs/db/tables/gems__tracks.30.sql
trunk/library/snippets/AddTracksSnippet.php
trunk/library/snippets/EditTrackEngineSnippet.php
Modified: trunk/library/changelog.txt
===================================================================
--- trunk/library/changelog.txt 2011-09-27 12:43:37 UTC (rev 79)
+++ trunk/library/changelog.txt 2011-09-27 13:00:35 UTC (rev 80)
@@ -1,3 +1,7 @@
+Important changes from 1.4.2 => 1.4.3
+============================================================
+ * gtr_organisations renamed to gtr_organizations
+
Important changes from 1.4.1 => 1.4.2
============================================================
* To have an autosubmit form it is enough now to just use $form->setAutoSubmit($href, $targetId)
Modified: trunk/library/classes/Gems/Default/ProjectSurveysAction.php
===================================================================
--- trunk/library/classes/Gems/Default/ProjectSurveysAction.php 2011-09-27 12:43:37 UTC (rev 79)
+++ trunk/library/classes/Gems/Default/ProjectSurveysAction.php 2011-09-27 13:00:35 UTC (rev 80)
@@ -78,7 +78,7 @@
$filter = parent::getDataFilter($data);
$organization_id = $this->escort->getCurrentOrganization();
- $filter[] = "gtr_organisations LIKE '%|$organization_id|%'";
+ $filter[] = "gtr_organizations LIKE '%|$organization_id|%'";
return $filter;
}
Modified: trunk/library/classes/Gems/Default/ProjectTracksAction.php
===================================================================
--- trunk/library/classes/Gems/Default/ProjectTracksAction.php 2011-09-27 12:43:37 UTC (rev 79)
+++ trunk/library/classes/Gems/Default/ProjectTracksAction.php 2011-09-27 13:00:35 UTC (rev 80)
@@ -75,7 +75,7 @@
$filter = parent::getDataFilter($data);
$organization_id = $this->escort->getCurrentOrganization();
- $filter[] = "gtr_organisations LIKE '%|$organization_id|%'";
+ $filter[] = "gtr_organizations LIKE '%|$organization_id|%'";
return $filter;
}
Modified: trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php
===================================================================
--- trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php 2011-09-27 12:43:37 UTC (rev 79)
+++ trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php 2011-09-27 13:00:35 UTC (rev 80)
@@ -203,7 +203,7 @@
$bridge->addDate( 'gtr_date_start', 'label', $this->_('Assignable since'));
$bridge->addDate( 'gtr_date_until', 'label', $this->_('Assignable until'));
// feature request #200
- $bridge->addMultiCheckbox('gtr_organisations', 'label', $this->_('Organizations'), 'multiOptions', $this->util->getDbLookup()->getOrganizations(), 'required', true);
+ $bridge->addMultiCheckbox('gtr_organizations', 'label', $this->_('Organizations'), 'multiOptions', $this->util->getDbLookup()->getOrganizations(), 'required', true);
} else {
$standAloneButton = new MUtil_Form_Element_FakeSubmit('create_stand_alone');
@@ -228,8 +228,8 @@
public function afterFormLoad(array &$data, $isNew)
{
// feature request #200
- if (isset($data['gtr_organisations']) && (! is_array($data['gtr_organisations']))) {
- $data['gtr_organisations'] = explode('|', trim($data['gtr_organisations'], '|'));
+ if (isset($data['gtr_organizations']) && (! is_array($data['gtr_organizations']))) {
+ $data['gtr_organizations'] = explode('|', trim($data['gtr_organizations'], '|'));
}
}
@@ -259,8 +259,8 @@
$data['gtr_track_class'] = 'SingleSurveyEngine';
// feature request #200
- if (isset($data['gtr_organisations']) && is_array($data['gtr_organisations'])) {
- $data['gtr_organisations'] = '|' . implode('|', $data['gtr_organisations']) . '|';
+ if (isset($data['gtr_organizations']) && is_array($data['gtr_organizations'])) {
+ $data['gtr_organizations'] = '|' . implode('|', $data['gtr_organizations']) . '|';
}
if ($data['gsu_active']==1 && empty($data['gsu_id_primary_group'])) {
Modified: trunk/library/classes/Gems/Default/TokenPlanAction.php
===================================================================
--- trunk/library/classes/Gems/Default/TokenPlanAction.php 2011-09-27 12:43:37 UTC (rev 79)
+++ trunk/library/classes/Gems/Default/TokenPlanAction.php 2011-09-27 13:00:35 UTC (rev 80)
@@ -289,7 +289,7 @@
// Add track selection
if ($this->escort instanceof Gems_Project_Tracks_MultiTracksInterface) {
- $sql = "SELECT gtr_id_track, gtr_track_name FROM gems__tracks WHERE gtr_active=1 AND gtr_track_type='T' AND INSTR(gtr_organisations, '|$orgId|') > 0";
+ $sql = "SELECT gtr_id_track, gtr_track_name FROM gems__tracks WHERE gtr_active=1 AND gtr_track_type='T' AND INSTR(gtr_organizations, '|$orgId|') > 0";
$elements[] = $this->_createSelectElement('gto_id_track', $sql, $this->_('(all tracks)'));
}
@@ -299,7 +299,7 @@
LENGTH(gro_round_description) > 0 AND
gtr_active=1 AND
gtr_track_type='T' AND
- INSTR(gtr_organisations, '|$orgId|') > 0";
+ INSTR(gtr_organizations, '|$orgId|') > 0";
$elements[] = $this->_createSelectElement('gto_round_description', $sql, $this->_('(all rounds)'));
$sql = "SELECT gsu_id_survey, gsu_survey_name
@@ -309,7 +309,7 @@
gro_active=1 AND
gtr_active=1 AND
gtr_track_type='T' AND
- INSTR(gtr_organisations, '|$orgId|') > 0";
+ INSTR(gtr_organizations, '|$orgId|') > 0";
/* TODO: use this when we can update this list using ajax
if (isset($data['gsu_id_primary_group'])) {
$sql .= $this->db->quoteInto(" AND gsu_id_primary_group = ?", $data['gsu_id_primary_group']);
@@ -335,7 +335,7 @@
gro_active=1 AND
gtr_active=1 AND
gtr_track_type='T' AND
- INSTR(gtr_organisations, '|$orgId|') > 0";
+ INSTR(gtr_organizations, '|$orgId|') > 0";
$elements[] = $this->_createSelectElement('gsu_id_primary_group', $sql, $this->_('(all fillers)'));
if (($this->escort instanceof Gems_Project_Organization_MultiOrganizationInterface) &&
Modified: trunk/library/classes/Gems/Default/TrackActionAbstract.php
===================================================================
--- trunk/library/classes/Gems/Default/TrackActionAbstract.php 2011-09-27 12:43:37 UTC (rev 79)
+++ trunk/library/classes/Gems/Default/TrackActionAbstract.php 2011-09-27 13:00:35 UTC (rev 80)
@@ -93,7 +93,7 @@
$filter['gtr_track_type'] = $this->trackType;
$filter['gtr_active'] = 1;
$filter[] = '(gtr_date_until IS NULL OR gtr_date_until >= CURRENT_DATE) AND gtr_date_start <= CURRENT_DATE';
- $filter[] = "gtr_organisations LIKE '%|$organisation_id|%'";
+ $filter[] = "gtr_organizations LIKE '%|$organisation_id|%'";
$baseurl = array('action' => 'index', 'gr2o_patient_nr' => $id, MUtil_Model::TEXT_FILTER => $searchText);
Modified: trunk/library/classes/Gems/Default/TrackMaintenanceAction.php
===================================================================
--- trunk/library/classes/Gems/Default/TrackMaintenanceAction.php 2011-09-27 12:43:37 UTC (rev 79)
+++ trunk/library/classes/Gems/Default/TrackMaintenanceAction.php 2011-09-27 13:00:35 UTC (rev 80)
@@ -98,7 +98,7 @@
$bridge->addDate( 'gtr_date_until');
// $bridge->addList( 'gtr_start_date_field', 'label', $this->_('Date used for track'));
$bridge->addCheckbox('gtr_active');
- $bridge->addMultiCheckbox('gtr_organisations', 'label', $this->_('Organizations'), 'multiOptions', $this->util->getDbLookup()->getOrganizations(), 'required', true);
+ $bridge->addMultiCheckbox('gtr_organizations', 'label', $this->_('Organizations'), 'multiOptions', $this->util->getDbLookup()->getOrganizations(), 'required', true);
}
/**
@@ -109,8 +109,8 @@
public function afterFormLoad(array &$data, $isNew)
{
// feature request #200
- if (isset($data['gtr_organisations']) && (! is_array($data['gtr_organisations']))) {
- $data['gtr_organisations'] = explode('|', trim($data['gtr_organisations'], '|'));
+ if (isset($data['gtr_organizations']) && (! is_array($data['gtr_organizations']))) {
+ $data['gtr_organizations'] = explode('|', trim($data['gtr_organizations'], '|'));
}
}
@@ -124,8 +124,8 @@
public function beforeSave(array &$data, $isNew, Zend_Form $form = null)
{
// feature request #200
- if (isset($data['gtr_organisations']) && is_array($data['gtr_organisations'])) {
- $data['gtr_organisations'] = '|' . implode('|', $data['gtr_organisations']) . '|';
+ if (isset($data['gtr_organizations']) && is_array($data['gtr_organizations'])) {
+ $data['gtr_organizations'] = '|' . implode('|', $data['gtr_organizations']) . '|';
}
if (isset($data['gtr_id_track'])) {
$data['gtr_survey_rounds'] = $this->db->fetchOne("SELECT COUNT(*) FROM gems__rounds WHERE gro_active = 1 AND gro_id_track = ?", $data['gtr_id_track']);
Modified: trunk/library/configs/db/patches.sql
===================================================================
--- trunk/library/configs/db/patches.sql 2011-09-27 12:43:37 UTC (rev 79)
+++ trunk/library/configs/db/patches.sql 2011-09-27 13:00:35 UTC (rev 80)
@@ -84,10 +84,10 @@
ALTER TABLE `gems__staff` ADD `gsf_reset_key` varchar(64) NULL AFTER `gsf_phone_1`;
ALTER TABLE `gems__staff` ADD `gsf_reset_req`timestamp NULL AFTER `gsf_reset_key`;
--- PATCH: Add gtr_organisations to tracks
-ALTER TABLE `gems__tracks` ADD `gtr_organisations` VARCHAR(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL AFTER `gtr_track_type` ;
+-- PATCH: Add gtr_organizations to tracks
+ALTER TABLE `gems__tracks` ADD `gtr_organizations` VARCHAR(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL AFTER `gtr_track_type` ;
UPDATE gems__tracks
- SET `gtr_organisations` = (SELECT CONCAT('|', CONVERT(GROUP_CONCAT(gor_id_organization SEPARATOR '|'), CHAR), '|') as orgs FROM gems__organizations WHERE gor_active=1)
+ SET `gtr_organizations` = (SELECT CONCAT('|', CONVERT(GROUP_CONCAT(gor_id_organization SEPARATOR '|'), CHAR), '|') as orgs FROM gems__organizations WHERE gor_active=1)
WHERE gtr_active = 1;
-- PATCH: Gewijzigd track model
@@ -196,3 +196,6 @@
ALTER TABLE gems__log_respondent_communications ADD grco_sender varchar(120) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null AFTER grco_address;
ALTER TABLE gems__log_respondent_communications ADD grco_id_message bigint unsigned null references gems__mail_templates (gmt_id_message) AFTER grco_comments;
+-- GEMS VERSION: 41
+-- PATCH: Corrected misspelling of gtr_organisations
+ALTER TABLE gems__tracks CHANGE gtr_organisations gtr_organizations varchar(250) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci';
Modified: trunk/library/configs/db/tables/gems__tracks.30.sql
===================================================================
--- trunk/library/configs/db/tables/gems__tracks.30.sql 2011-09-27 12:43:37 UTC (rev 79)
+++ trunk/library/configs/db/tables/gems__tracks.30.sql 2011-09-27 13:00:35 UTC (rev 80)
@@ -20,7 +20,7 @@
gtr_track_class varchar(64) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' not null,
-- Yes, quick and dirty, will correct later (probably)
- gtr_organisations varchar(250) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci',
+ gtr_organizations varchar(250) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci',
gtr_changed timestamp not null default current_timestamp on update current_timestamp,
gtr_changed_by bigint unsigned not null,
Modified: trunk/library/snippets/AddTracksSnippet.php
===================================================================
--- trunk/library/snippets/AddTracksSnippet.php 2011-09-27 12:43:37 UTC (rev 79)
+++ trunk/library/snippets/AddTracksSnippet.php 2011-09-27 13:00:35 UTC (rev 80)
@@ -117,7 +117,7 @@
(gtr_date_until IS NULL OR gtr_date_until > CURRENT_TIMESTAMP) AND
gtr_active = 1 AND
gtr_track_type = 'T' AND
- gtr_organisations LIKE '%|$organization_id|%'
+ gtr_organizations LIKE '%|$organization_id|%'
ORDER BY gtr_track_name";
break;
case 'S':
@@ -131,7 +131,7 @@
gtr_active = 1 AND
gtr_track_type = 'S' AND
ggp_respondent_members = 1 AND
- gtr_organisations LIKE '%|$organization_id|%'
+ gtr_organizations LIKE '%|$organization_id|%'
ORDER BY gtr_track_name";
break;
case 'M':
@@ -145,7 +145,7 @@
gtr_active = 1 AND
gtr_track_type = 'S' AND
ggp_respondent_members = 0 AND
- gtr_organisations LIKE '%|$organization_id|%'
+ gtr_organizations LIKE '%|$organization_id|%'
ORDER BY gtr_track_name";
break;
// default:
Modified: trunk/library/snippets/EditTrackEngineSnippet.php
===================================================================
--- trunk/library/snippets/EditTrackEngineSnippet.php 2011-09-27 12:43:37 UTC (rev 79)
+++ trunk/library/snippets/EditTrackEngineSnippet.php 2011-09-27 13:00:35 UTC (rev 80)
@@ -134,7 +134,7 @@
if (! $this->createData) {
$bridge->addCheckbox('gtr_active');
}
- $bridge->addMultiCheckbox('gtr_organisations', 'label', $this->_('Organizations'), 'multiOptions', $this->util->getDbLookup()->getOrganizations(), 'required', true);
+ $bridge->addMultiCheckbox('gtr_organizations', 'label', $this->_('Organizations'), 'multiOptions', $this->util->getDbLookup()->getOrganizations(), 'required', true);
}
/**
@@ -247,8 +247,8 @@
parent::loadFormData();
// feature request #200
- if (isset($this->formData['gtr_organisations']) && (! is_array($this->formData['gtr_organisations']))) {
- $this->formData['gtr_organisations'] = explode('|', trim($this->formData['gtr_organisations'], '|'));
+ if (isset($this->formData['gtr_organizations']) && (! is_array($this->formData['gtr_organizations']))) {
+ $this->formData['gtr_organizations'] = explode('|', trim($this->formData['gtr_organizations'], '|'));
}
}
@@ -262,8 +262,8 @@
protected function saveData()
{
// feature request #200
- if (isset($this->formData['gtr_organisations']) && is_array($this->formData['gtr_organisations'])) {
- $this->formData['gtr_organisations'] = '|' . implode('|', $this->formData['gtr_organisations']) . '|';
+ if (isset($this->formData['gtr_organizations']) && is_array($this->formData['gtr_organizations'])) {
+ $this->formData['gtr_organizations'] = '|' . implode('|', $this->formData['gtr_organizations']) . '|';
}
if ($this->trackEngine) {
$this->formData['gtr_survey_rounds'] = $this->trackEngine->calculateRoundCount();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2011-09-27 12:43:43
|
Revision: 79
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=79&view=rev
Author: matijsdejong
Date: 2011-09-27 12:43:37 +0000 (Tue, 27 Sep 2011)
Log Message:
-----------
- fix for #11 forgot to add variables for error logging
- made logger a resource just like the other resources
Modified Paths:
--------------
trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9Database.php
trunk/library/classes/GemsEscort.php
Modified: trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9Database.php
===================================================================
--- trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9Database.php 2011-09-27 11:18:56 UTC (rev 78)
+++ trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9Database.php 2011-09-27 12:43:37 UTC (rev 79)
@@ -83,6 +83,18 @@
/**
*
+ * @var Gems_Log
+ */
+ protected $logger;
+
+ /**
+ *
+ * @var Zend_Controller_Request_Abstract
+ */
+ protected $request;
+
+ /**
+ *
* @var Zend_Translate
*/
protected $translate;
Modified: trunk/library/classes/GemsEscort.php
===================================================================
--- trunk/library/classes/GemsEscort.php 2011-09-27 11:18:56 UTC (rev 78)
+++ trunk/library/classes/GemsEscort.php 2011-09-27 12:43:37 UTC (rev 79)
@@ -62,17 +62,10 @@
/**
* The menu variable
*
- * @var GemsMenu
+ * @var Gems_Menu
*/
public $menu;
- /**
- * The logger
- *
- * @var Zend_Log
- */
- public $logger;
-
public function _($text, $locale = null)
{
if (! isset($this->request)) {
@@ -147,9 +140,9 @@
/**
* Initialize the logger
*/
- protected function _initLog()
+ protected function _initLogger()
{
- $this->logger = Gems_Log::getLogger();
+ $logger = Gems_Log::getLogger();
$log_path = GEMS_ROOT_DIR . '/var/logs';
@@ -160,14 +153,16 @@
die(sprintf($this->translate->_('Path %s not writable'), $log_path));
}
- $this->logger->addWriter($writer);
+ $logger->addWriter($writer);
// OPTIONAL STARTY OF FIREBUG LOGGING.
if ($this->_startFirebird) {
- $this->logger->addWriter(new Zend_Log_Writer_Firebug());
+ $logger->addWriter(new Zend_Log_Writer_Firebug());
}
- Zend_Registry::set('logger', $this->logger);
+ Zend_Registry::set('logger', $logger);
+
+ return $logger;
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2011-09-27 11:19:05
|
Revision: 78
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=78&view=rev
Author: matijsdejong
Date: 2011-09-27 11:18:56 +0000 (Tue, 27 Sep 2011)
Log Message:
-----------
- fixed #7 add role gives errors. Case of no inheritance was the source of this problem
Modified Paths:
--------------
trunk/library/classes/Gems/Default/RoleAction.php
Modified: trunk/library/classes/Gems/Default/RoleAction.php
===================================================================
--- trunk/library/classes/Gems/Default/RoleAction.php 2011-09-27 11:08:50 UTC (rev 77)
+++ trunk/library/classes/Gems/Default/RoleAction.php 2011-09-27 11:18:56 UTC (rev 78)
@@ -85,8 +85,10 @@
//Get inherited privileges and disable tem
$result = $this->escort->acl->getRolePrivileges();
$disable = array();
- foreach($result[$data['grl_name']][MUtil_Acl::INHERITED][Zend_Acl::TYPE_ALLOW] as $key=>$value) {
- $disable[] = $value;
+ if (isset($result[$data['grl_name']][MUtil_Acl::INHERITED][Zend_Acl::TYPE_ALLOW])) {
+ foreach($result[$data['grl_name']][MUtil_Acl::INHERITED][Zend_Acl::TYPE_ALLOW] as $key => $value) {
+ $disable[] = $value;
+ }
}
$checkbox->setAttrib('disable', $disable);
@@ -123,7 +125,9 @@
$values = $checkbox->getValue();
$disabled = $checkbox->getAttrib('disable');
- $values = array_merge($values, $disabled);
+ if ($disabled) {
+ $values = array_merge($values, $disabled);
+ }
$checkbox->setValue($values);
return $form;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2011-09-27 11:09:01
|
Revision: 77
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=77&view=rev
Author: matijsdejong
Date: 2011-09-27 11:08:50 +0000 (Tue, 27 Sep 2011)
Log Message:
-----------
- added documentation to BrowseEditAction.php
- corrected whitespace in gems__staff.20.sql
- bug #13 fixed StaffAction.php for correct treatment of rights
Modified Paths:
--------------
trunk/library/classes/Gems/Controller/BrowseEditAction.php
trunk/library/classes/Gems/Default/StaffAction.php
trunk/library/configs/db/tables/gems__staff.20.sql
Modified: trunk/library/classes/Gems/Controller/BrowseEditAction.php
===================================================================
--- trunk/library/classes/Gems/Controller/BrowseEditAction.php 2011-09-27 10:38:07 UTC (rev 76)
+++ trunk/library/classes/Gems/Controller/BrowseEditAction.php 2011-09-27 11:08:50 UTC (rev 77)
@@ -608,6 +608,16 @@
return $data;
}
+ /**
+ * Additional data filter statements for the user input.
+ *
+ * User input that has the same name as a model field is automatically
+ * used as a filter, but if the name is different processing is needed.
+ * That processing should happen here.
+ *
+ * @param array $data The current user input
+ * @return array New filter statements
+ */
protected function getDataFilter(array $data)
{
if ($this->filterStandard) {
@@ -617,6 +627,13 @@
return array();
}
+ /**
+ * Returns the default search values for this class instance.
+ *
+ * Used to specify the filter when no values have been entered by the user.
+ *
+ * @return array
+ */
public function getDefaultSearchData()
{
return array();
Modified: trunk/library/classes/Gems/Default/StaffAction.php
===================================================================
--- trunk/library/classes/Gems/Default/StaffAction.php 2011-09-27 10:38:07 UTC (rev 76)
+++ trunk/library/classes/Gems/Default/StaffAction.php 2011-09-27 11:08:50 UTC (rev 77)
@@ -42,7 +42,7 @@
* @license New BSD License
* @since Class available since version 1.0
*/
-class Gems_Default_StaffAction extends Gems_Controller_BrowseEditAction // implements Gems_Menu_ParameterSourceInterface
+class Gems_Default_StaffAction extends Gems_Controller_BrowseEditAction
{
public $filterStandard = array('gsf_active' => 1);
public $sortKey = array('name' => SORT_ASC);
@@ -133,7 +133,7 @@
$this->_groups = MUtil_Lazy::call(array($this->db, 'fetchPairs'), $sql);
$bridge->addExhibitor('gsf_id_organization');
- $bridge->addSelect( 'gsf_id_primary_group', 'multiOptions', $dbLookup->getStaffGroupsNoSuper());
+ $bridge->addSelect( 'gsf_id_primary_group', 'multiOptions', $dbLookup->getStaffGroupsNoSuper());
}
$bridge->addCheckbox('gsf_logout_on_survey', 'description', $this->_('If checked the user will logoff when answering a survey.'));
@@ -149,9 +149,8 @@
$sql = "SELECT ggp_id_group,ggp_role FROM gems__groups WHERE ggp_id_group = " . (int) $data['gsf_id_primary_group'];
$groups = $this->db->fetchPairs($sql);
- if (($this->session->user_role == 'admin' && isset($groups) && $groups[$data['gsf_id_primary_group']] == 'super')
- || (! $this->escort->hasPrivilege('pr.staff.edit.all') &&
- $data['gsf_id_organization'] != $this->escort->getCurrentOrganization())) {
+ if (! ($this->escort->hasPrivilege('pr.staff.edit.all') ||
+ $data['gsf_id_organization'] == $this->escort->getCurrentOrganization())) {
throw new Zend_Exception($this->_('You are not allowed to edit this staff member.'));
}
}
@@ -179,7 +178,9 @@
'column_expression', "CONCAT(COALESCE(CONCAT(gsf_last_name, ', '), '-, '), COALESCE(CONCAT(gsf_first_name, ' '), ''), COALESCE(gsf_surname_prefix, ''))");
$model->set('gsf_email', 'label', $this->_('E-Mail'), 'itemDisplay', 'MUtil_Html_AElement::ifmail');
- if ($this->escort->hasPrivilege('pr.staff.see.all')) {
+ if ($detailed || $this->escort->hasPrivilege('pr.staff.see.all')) {
+ $this->menu->getParameterSource()->offsetSet('gsf_id_organization', $this->escort->getCurrentOrganization());
+
$model->set('gsf_id_organization', 'label', $this->_('Organization'),
'multiOptions', $this->util->getDbLookup()->getOrganizations(),
'default', $this->escort->getCurrentOrganization());
@@ -208,18 +209,35 @@
// Select organization
$options = array('' => $this->_('(all organizations)')) + $this->getModel()->get('gsf_id_organization', 'multiOptions');
$select = new Zend_Form_Element_Select('gsf_id_organization', array('multiOptions' => $options));
- } else {
- $select = new Zend_Form_Element_Hidden('gsf_id_organization',
- array('value' => $this->escort->getCurrentOrganization()));
+
+ // Position as second element
+ $search = array_shift($elements);
+ array_unshift($elements, $search, $select);
}
- // Position as second element
- $search = array_shift($elements);
- array_unshift($elements, $search, $select);
-
return $elements;
}
+ /**
+ * Additional data filter statements for the user input.
+ *
+ * User input that has the same name as a model field is automatically
+ * used as a filter, but if the name is different processing is needed.
+ * That processing should happen here.
+ *
+ * @param array $data The current user input
+ * @return array New filter statements
+ */
+ protected function getDataFilter(array $data)
+ {
+ $filter = parent::getDataFilter($data);
+
+ if (! $this->escort->hasPrivilege('pr.staff.see.all')) {
+ $filter['gsf_id_organization'] = $this->escort->getCurrentOrganization();
+ }
+ return $filter;
+ }
+
public function getInstanceId()
{
if ($this->_instanceId) {
@@ -229,11 +247,27 @@
return parent::getInstanceId();
}
- /*
- public function getMenuParameter($name, $default)
+ /**
+ * Creates from the model a MUtil_Html_TableElement for display of a single item.
+ *
+ * Overruled to add css classes for Gems
+ *
+ * @param integer $columns The number of columns to use for presentation
+ * @param mixed $filter A valid filter for MUtil_Model_ModelAbstract->load()
+ * @param mixed $sort A valid sort for MUtil_Model_ModelAbstract->load()
+ * @return MUtil_Html_TableElement
+ */
+ public function getShowTable($columns = 1, $filter = null, $sort = null)
{
+ if ($this->escort->hasPrivilege('pr.staff.see.all')) {
+ // Model filter has now been set.
+ $data = $this->getModel()->loadFirst();
- } // */
+ $this->_setParam('gsf_id_organization', $data['gsf_id_organization']);
+ $this->menu->getParameterSource()->offsetSet('gsf_id_organization', $data['gsf_id_organization']);
+ }
+ return parent::getShowTable($columns, $filter, $sort);
+ }
public function getTopic($count = 1)
{
Modified: trunk/library/configs/db/tables/gems__staff.20.sql
===================================================================
--- trunk/library/configs/db/tables/gems__staff.20.sql 2011-09-27 10:38:07 UTC (rev 76)
+++ trunk/library/configs/db/tables/gems__staff.20.sql 2011-09-27 11:08:50 UTC (rev 77)
@@ -1,5 +1,5 @@
--- Table containing the project staff
+-- Table containing the project staff
--
CREATE TABLE if not exists gems__staff (
gsf_id_user bigint unsigned not null auto_increment,
@@ -9,12 +9,12 @@
gsf_password varchar(32) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci'
not null,
- gsf_active boolean not null default 1,
- gsf_failed_logins int(11) unsigned not null default 0,
+ gsf_active boolean not null default 1,
+ gsf_failed_logins int(11) unsigned not null default 0,
gsf_last_failed timestamp null,
gsf_id_primary_group bigint unsigned
references gems__groups (ggp_id_group),
- gsf_id_organization bigint not null
+ gsf_id_organization bigint not null
references gems__organizations (gor_id_organization),
gsf_iso_lang char(2) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci'
not null default 'nl' references gems__languages (gml_iso_lang),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2011-09-27 10:38:17
|
Revision: 76
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=76&view=rev
Author: mennodekker
Date: 2011-09-27 10:38:07 +0000 (Tue, 27 Sep 2011)
Log Message:
-----------
Append class attrib to the displaygroup for better css control
Removed escaping from labels for better styling
Modified Paths:
--------------
trunk/library/classes/Gems/Form/TableForm.php
trunk/library/classes/Gems/TabForm.php
Modified: trunk/library/classes/Gems/Form/TableForm.php
===================================================================
--- trunk/library/classes/Gems/Form/TableForm.php 2011-09-26 16:29:02 UTC (rev 75)
+++ trunk/library/classes/Gems/Form/TableForm.php 2011-09-27 10:38:07 UTC (rev 76)
@@ -118,9 +118,9 @@
array(array('data' => 'HtmlTag'), array('tag' => 'td', 'class' => 'element')),
array(array('labelCellClose' => 'HtmlTag'), array('tag' => 'td', 'placement'=> Zend_Form_Decorator_Abstract::PREPEND, 'closeOnly'=>true)),
array('Tooltip'),
- array('Description', array('tag'=>'label', 'class'=>'optional', 'placement'=> Zend_Form_Decorator_Abstract::PREPEND)),
+ array('Description', array('tag'=>'label', 'class'=>'optional', 'placement'=> Zend_Form_Decorator_Abstract::PREPEND, 'escape'=>false)),
array(array('labelCellOpen' => 'HtmlTag'), array('tag' => 'td', 'class'=>'label', 'placement'=> Zend_Form_Decorator_Abstract::PREPEND, 'openOnly'=>true)),
- array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'class' => $this->_alternate . ' ' . $group->getName()))
+ array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'class' => $this->_alternate . ' ' . $group->getName(). ' ' . $group->getAttrib('class')))
));
//Now add the right decorators to the elements
@@ -136,7 +136,7 @@
//If we want to see the individual fields labels, do so:
if ($group->getAttrib('showLabels')===true) {
- $decorators[] = 'Label';
+ $decorators[] = array('Label', array('escape'=>false));
}
//Apply final class and id to allow for custom styling
@@ -177,7 +177,7 @@
array('Description', array('class'=>'description')),
'Errors',
array('Tooltip'),
- array('Label'),
+ array('Label', array('escape'=>false)),
array(array('labelCell' => 'HtmlTag'), array('tag' => 'td', 'class'=>'label', 'colspan'=>2)),
array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'class' => $element->getName()))
);
@@ -200,7 +200,7 @@
array(array('data' => 'HtmlTag'), array('tag' => 'td', 'class' => 'element')),
array(array('labelCellClose' => 'HtmlTag'), array('tag' => 'td', 'placement'=> Zend_Form_Decorator_Abstract::PREPEND, 'closeOnly'=>true)),
array('Tooltip'),
- array('Label'),
+ array('Label', array('escape'=>false)),
array(array('labelCellOpen' => 'HtmlTag'), array('tag' => 'td', 'class'=>'label', 'placement'=> Zend_Form_Decorator_Abstract::PREPEND, 'openOnly'=>true)),
array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'class' => $element->getName()))
);
Modified: trunk/library/classes/Gems/TabForm.php
===================================================================
--- trunk/library/classes/Gems/TabForm.php 2011-09-26 16:29:02 UTC (rev 75)
+++ trunk/library/classes/Gems/TabForm.php 2011-09-27 10:38:07 UTC (rev 76)
@@ -226,7 +226,7 @@
//Retrieve it and set decorators
$group = $this->getDisplayGroup($name);
$group->setDecorators( array('FormElements',
- array('HtmlTag', array('tag' => 'div', 'class' => $group->getName()))
+ array('HtmlTag', array('tag' => 'div', 'class' => $group->getName(). ' ' . $group->getAttrib('class')))
));
}
}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2011-09-26 16:29:11
|
Revision: 75
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=75&view=rev
Author: matijsdejong
Date: 2011-09-26 16:29:02 +0000 (Mon, 26 Sep 2011)
Log Message:
-----------
- documented Echo and added hasOutput function
- continued new Model Action
Modified Paths:
--------------
trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php
trunk/library/classes/Gems/Default/MailLogAction.php
trunk/library/classes/MUtil/Controller/ModelSnippetActionAbstract.php
trunk/library/classes/MUtil/Echo.php
trunk/library/classes/MUtil/Snippets/ModelTableSnippetAbstract.php
Added Paths:
-----------
trunk/library/snippets/Generic/ModelItemTableSnippet.php
Modified: trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php
===================================================================
--- trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php 2011-09-26 11:48:45 UTC (rev 74)
+++ trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php 2011-09-26 16:29:02 UTC (rev 75)
@@ -81,6 +81,34 @@
protected $indexSnippets = 'Generic_AutosearchForm';
/**
+ * The snippets used for the show action
+ *
+ * @var mixed String or array of snippets name
+ */
+ protected $showSnippets = 'Generic_ModelItemTableSnippet';
+
+ /**
+ * Finds the first item with one of the actions specified as parameter and using the current controller
+ *
+ * @param string $action
+ * @param string $action2
+ * @return Gems_Menu_SubMenuItem
+ */
+ protected function firstAllowedMenuItem($action, $action2 = null)
+ {
+ $actions = MUtil_Ra::args(func_get_args());
+ $controller = $this->_getParam('controller');
+
+ foreach ($actions as $action) {
+ $menuItem = $this->menu->find(array('controller' => $controller, 'action' => $action, 'allowed' => true));
+
+ if ($menuItem) {
+ return $menuItem;
+ }
+ }
+ }
+
+ /**
* Intializes the html component.
*
* @param boolean $reset Throws away any existing html output when true
Modified: trunk/library/classes/Gems/Default/MailLogAction.php
===================================================================
--- trunk/library/classes/Gems/Default/MailLogAction.php 2011-09-26 11:48:45 UTC (rev 74)
+++ trunk/library/classes/Gems/Default/MailLogAction.php 2011-09-26 16:29:02 UTC (rev 75)
@@ -50,6 +50,43 @@
class Gems_Default_MailLogAction extends Gems_Controller_ModelSnippetActionAbstract
{
/**
+ * Adds columns from the model to the bridge that creates the browse table.
+ *
+ * Adds a button column to the model, if such a button exists in the model.
+ *
+ * @param MUtil_Model_TableBridge $bridge
+ * @param MUtil_Model_ModelAbstract $model
+ * @rturn void
+ */
+ public function addTableColumns(MUtil_Model_TableBridge $bridge, MUtil_Model_ModelAbstract $model)
+ {
+ if ($menuItem = $this->firstAllowedMenuItem('show')) {
+ $bridge->addItemLink($menuItem->toActionLinkLower($this->getRequest(), $bridge));
+ }
+
+ // Newline placeholder
+ $br = MUtil_Html::create('br');
+
+ $bridge->addMultiSort('grco_created', $br, 'respondent_name', $br, 'grco_address');
+ $bridge->addMultiSort('grco_id_token', $br, 'assigned_by', $br, 'grco_sender');
+ $bridge->addMultiSort('grco_topic');
+ }
+
+ /**
+ * The automatically filtered result
+ */
+ public function autofilterAction($resetMvc = true)
+ {
+ $filter = array('grco_organization' => $this->escort->getCurrentOrganization());
+
+ $this->autofilterParameters['addTableColumns'] = array($this, 'addTableColumns');
+ $this->autofilterParameters['extraFilter'] = $filter;
+ $this->autofilterParameters['extraSort'] = array('grco_created' => SORT_DESC);
+
+ return parent::autofilterAction($resetMvc);
+ }
+
+ /**
* 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
@@ -107,11 +144,7 @@
{
$this->html->h3($this->_('Mail Activity Log'));
- $filter = array('grco_organization' => $this->escort->getCurrentOrganization());
-
- $this->indexParameters['extraFilter'] = $filter;
- $this->indexParameters['extraSort'] = array('grco_created' => SORT_DESC);
-
+ // MUtil_Echo::track($this->indexParameters);
parent::indexAction();
}
}
Modified: trunk/library/classes/MUtil/Controller/ModelSnippetActionAbstract.php
===================================================================
--- trunk/library/classes/MUtil/Controller/ModelSnippetActionAbstract.php 2011-09-26 11:48:45 UTC (rev 74)
+++ trunk/library/classes/MUtil/Controller/ModelSnippetActionAbstract.php 2011-09-26 16:29:02 UTC (rev 75)
@@ -77,6 +77,20 @@
protected $indexSnippets = null;
/**
+ * The parameters used for the show action
+ *
+ * @var array Mixed key => value array for snippet initialization
+ */
+ protected $showParameters = array();
+
+ /**
+ * The snippets used for the show action
+ *
+ * @var mixed String or array of snippets name
+ */
+ protected $showSnippets = 'ModelVerticalTableSnippet';
+
+ /**
* Set the action key in request
*
* Use this when an action is a Ajax action for retrieving
@@ -93,6 +107,8 @@
/**
* The automatically filtered result
+ *
+ * @param $resetMvc When true only the filtered resulsts
*/
public function autofilterAction($resetMvc = true)
{
@@ -112,10 +128,14 @@
$this->addSnippets($this->autofilterSnippets, $this->autofilterParameters);
}
+
+ if ($resetMvc && MUtil_Echo::hasOutput()) {
+ $this->html->raw(MUtil_Echo::out());
+ }
}
/**
- * Action for showing a browse page, optional with
+ * Action for showing a browse page
*/
public function indexAction()
{
@@ -131,4 +151,19 @@
$this->autofilterAction(false);
}
+
+ /**
+ * Action for showing an item page
+ */
+ public function showAction()
+ {
+ if ($this->showSnippets) {
+ $this->showParameters = $this->indexParameters + $this->autofilterParameters;
+
+ $this->showParameters['model'] = $this->getModel();
+ $this->showParameters['request'] = $this->getRequest();
+
+ $this->addSnippets($this->showSnippets, $this->showParameters);
+ }
+ }
}
Modified: trunk/library/classes/MUtil/Echo.php
===================================================================
--- trunk/library/classes/MUtil/Echo.php 2011-09-26 11:48:45 UTC (rev 74)
+++ trunk/library/classes/MUtil/Echo.php 2011-09-26 16:29:02 UTC (rev 75)
@@ -1,68 +1,96 @@
<?php
-
-/**
- * Copyright (c) 2011, Erasmus MC
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Erasmus MC nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
+
/**
- * @package MUtil
+ * 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 Echo
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @version $Id$
*/
+/**
+ * This class allows you to echo debug statements over multiple requests by
+ * storing the output in the session.
+ *
+ * @package MUtil
+ * @subpackage Echo
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @since Class available since version 1.0
+ */
class MUtil_Echo
{
+ /**
+ * Add's a backtrace of the position of the code
+ * where this function is called.
+ *
+ * The function itself is not in the backtrace.
+ *
+ * @return void
+ */
public static function backtrace()
{
- $trace = debug_backtrace(false);
+ $trace = debug_backtrace(false);
- $content = "\n<h8><b>Print backtrace</b></h8>\n<br/>\n";
- foreach ($trace as $key => $line) {
- if (0 === $key) {
- // First line is different
- $content .= '<i>Starting backtrace at</i>: ';
- } else {
- if (isset($line['type'])) {
- $content .= $line['class'] . $line['type'];
+ $content = "\n<h8><b>Print backtrace</b></h8>\n<br/>\n";
+ foreach ($trace as $key => $line) {
+ if (0 === $key) {
+ // First line is different
+ $content .= '<i>Starting backtrace at</i>: ';
+ } else {
+ if (isset($line['type'])) {
+ $content .= $line['class'] . $line['type'];
+ }
+ if (isset($line['function'])) {
+ $content .= $line['function'] . '() ';
+ }
}
- if (isset($line['function'])) {
- $content .= $line['function'] . '() ';
+ if (isset($line['file'])) {
+ $content .= $line['file'];
}
+ if (isset($line['line'])) {
+ $content .= ' (' . $line['line'] . ')';
+ }
+ $content .= "<br/>\n";
}
- if (isset($line['file'])) {
- $content .= $line['file'];
- }
- if (isset($line['line'])) {
- $content .= ' (' . $line['line'] . ')';
- }
- $content .= "<br/>\n";
- }
- $session = self::getSession();
- $session->content .= $content . "\n";
+ $session = self::getSession();
+ $session->content .= $content . "\n";
}
+ /**
+ * Returns the current session namespace that stores the content.
+ *
+ * @staticvar Zend_Session_Namespace $session
+ * @return Zend_Session_Namespace
+ */
private static function getSession()
{
static $session;
@@ -74,6 +102,22 @@
return $session;
}
+ /**
+ * Returns true if there is information to output.
+ *
+ * @return boolean
+ */
+ public static function hasOutput()
+ {
+ $session = self::getSession();
+ return isset($session->content);
+ }
+
+ /**
+ * Returns and resets the content of the output/
+ *
+ * @return string Raw html content.
+ */
public static function out()
{
$session = self::getSession();
@@ -89,11 +133,23 @@
}
}
+ /**
+ * Outputs a wordwrapped string with an optional caption.
+ *
+ * @param string $var The variable to wordwrap
+ * @param string $caption Optional text descibing the variable or moment of debugging.
+ */
public static function pre($var, $caption = null)
{
self::r(wordwrap((string) $var, 120), $caption);
}
+ /**
+ * Adds the content of a variable and an optional caption to the output.
+ *
+ * @param mixed $var Any kind of variable
+ * @param string $caption Optional text descibing the variable or moment of debugging.
+ */
public static function r($var, $caption = null)
{
$session = self::getSession();
@@ -121,13 +177,26 @@
$session->content .= $content;
}
+ /**
+ * Adds multiple variables to the output (without captions).
+ *
+ * @param mixed $var_1 Any kind of variable
+ * @param mixed $var_2 Optional, any kind of variable
+ */
public static function rs($var_1, $var_2 = null)
{
foreach (func_get_args() as $var) {
self::r($var);
}
}
-
+
+ /**
+ * Adds multiple variables to the output with as caption information on the line
+ * of code that called this function.
+ *
+ * @param mixed $var_1 Any kind of variable
+ * @param mixed $var_2 Optional, any kind of variable
+ */
public static function track($var_1, $var_2 = null)
{
$trace = debug_backtrace(false);
@@ -144,7 +213,7 @@
$header .= ': ' . $trace[0]['line'];
}
-
+
foreach (func_get_args() as $var) {
self::r($var, $header);
$header = null;
Modified: trunk/library/classes/MUtil/Snippets/ModelTableSnippetAbstract.php
===================================================================
--- trunk/library/classes/MUtil/Snippets/ModelTableSnippetAbstract.php 2011-09-26 11:48:45 UTC (rev 74)
+++ trunk/library/classes/MUtil/Snippets/ModelTableSnippetAbstract.php 2011-09-26 16:29:02 UTC (rev 75)
@@ -57,6 +57,13 @@
protected $_marker;
/**
+ * Functional extension: optionally use this function to add the browse columns
+ *
+ * @var callable With signature: function(MUtil_Model_TableBridge $bridge, MUtil_Model_ModelAbstract $model)
+ */
+ public $addTableColumns;
+
+ /**
* Url parts added to each link in the resulting table
*
* @var array
@@ -71,13 +78,6 @@
public $browse = false;
/**
- * When true the post parameters are removed from the request while filtering
- *
- * @var boolean Should post variables be removed from the request?
- */
- public $removePost = false;
-
- /**
* Content to show when there are no rows.
*
* Null shows '…'
@@ -87,6 +87,13 @@
public $onEmpty = null;
/**
+ * When true the post parameters are removed from the request while filtering
+ *
+ * @var boolean Should post variables be removed from the request?
+ */
+ public $removePost = false;
+
+ /**
* 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
@@ -139,7 +146,11 @@
$bridge->setBaseUrl($this->baseUrl);
}
- $this->addBrowseTableColumns($bridge, $model);
+ if (is_callable($this->addTableColumns)) {
+ call_user_func($this->addTableColumns, $bridge, $model);
+ } else {
+ $this->addBrowseTableColumns($bridge, $model);
+ }
return $bridge->getTable();
}
Copied: trunk/library/snippets/Generic/ModelItemTableSnippet.php (from rev 74, trunk/library/classes/MUtil/Snippets/Standard/ModelVerticalTableSnippet.php)
===================================================================
--- trunk/library/snippets/Generic/ModelItemTableSnippet.php (rev 0)
+++ trunk/library/snippets/Generic/ModelItemTableSnippet.php 2011-09-26 16:29:02 UTC (rev 75)
@@ -0,0 +1,103 @@
+<?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$
+ */
+
+/**
+ * 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.
+ *
+ * @package MUtil
+ * @subpackage Gems
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @since Class available since version 1.2
+ */
+class Generic_ModelItemTableSnippet extends MUtil_Snippets_ModelVerticalTableSnippetAbstract
+{
+ /**
+ * The PHP class used to create the VerticalTableBridge.
+ *
+ * Must be instanceof MUtil_Model_VerticalTableBridge.
+ *
+ * @var string Class name
+ */
+ // protected $bridgeClass = 'Gems_Model_ThreeColumnTableBridge';
+
+ /**
+ * Shortfix to add class attribute
+ *
+ * @var string
+ */
+ protected $class = 'displayer';
+
+ /**
+ * Required
+ *
+ * @var Gems_Loader
+ */
+ protected $loader;
+
+ /**
+ * Required
+ *
+ * @var Gems_Menu
+ */
+ protected $menu;
+
+ /**
+ *
+ * @var MUtil_Model_ModelAbstract
+ */
+ protected $model;
+
+ /**
+ * Required
+ *
+ * @var Zend_Controller_Request_Abstract
+ */
+ protected $request;
+
+ /**
+ * Creates the model
+ *
+ * @return MUtil_Model_ModelAbstract
+ */
+ protected function createModel()
+ {
+ return $this->model;
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2011-09-26 11:48:51
|
Revision: 74
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=74&view=rev
Author: mennodekker
Date: 2011-09-26 11:48:45 +0000 (Mon, 26 Sep 2011)
Log Message:
-----------
Reload patient data when completed tokens where found as they might change the data
Modified Paths:
--------------
trunk/library/classes/Gems/Default/RespondentAction.php
Modified: trunk/library/classes/Gems/Default/RespondentAction.php
===================================================================
--- trunk/library/classes/Gems/Default/RespondentAction.php 2011-09-26 10:07:56 UTC (rev 73)
+++ trunk/library/classes/Gems/Default/RespondentAction.php 2011-09-26 11:48:45 UTC (rev 74)
@@ -388,7 +388,10 @@
$this->openedRespondent($data['gr2o_patient_nr'], $data['gr2o_id_organization'], $data['grs_id_user']);
// Check for completed tokens
- $this->loader->getTracker()->processCompletedTokens($data['grs_id_user'], $this->session->user_id);
+ if ($this->loader->getTracker()->processCompletedTokens($data['grs_id_user'], $this->session->user_id)) {
+ //As data might have changed due to token events... reload
+ $data = $model->applyRequest($this->getRequest(), true)->loadFirst();
+ }
if ($data['gr2o_consent'] == $model->get('gr2o_consent', 'default')) {
$url = $this->view->url(array('controller' => 'respondent', 'action' => 'edit', 'id' => $data['gr2o_patient_nr'])) . '#tabContainer-frag-3';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2011-09-26 10:08:02
|
Revision: 73
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=73&view=rev
Author: mennodekker
Date: 2011-09-26 10:07:56 +0000 (Mon, 26 Sep 2011)
Log Message:
-----------
backported from trunk spss and excel export fixes
Modified Paths:
--------------
tags/1.4.2/library/classes/Gems/Export/Spss.php
tags/1.4.2/library/classes/Gems/View/Helper/Excel.php
Modified: tags/1.4.2/library/classes/Gems/Export/Spss.php
===================================================================
--- tags/1.4.2/library/classes/Gems/Export/Spss.php 2011-09-26 10:00:57 UTC (rev 72)
+++ tags/1.4.2/library/classes/Gems/Export/Spss.php 2011-09-26 10:07:56 UTC (rev 73)
@@ -1,5 +1,4 @@
<?php
-
/**
* Copyright (c) 2011, Erasmus MC
* All rights reserved.
@@ -125,8 +124,10 @@
$answerRow = reset($answers);
$labels = array();
$types = array();
+ $fixedNames = array();
$questions = $survey->getQuestionList($language);
foreach($answerRow as $key => $value) {
+ $fixedNames[$key] = $this->fixName($key);
$options = array();
$type = $answerModel->get($key,'type');
switch ($type) {
@@ -166,18 +167,18 @@
if (isset($questions[$key])) {
$labels[$key] = $questions[$key];
}
- $response->appendBody("\n " . $key . ' '. $type);
+ $response->appendBody("\n " . $fixedNames[$key] . ' '. $type);
}
$response->appendBody(".\nCACHE.\nEXECUTE.\n");
$response->appendBody("\n*Define variable labels.\n");
foreach($labels as $key => $label) {
- $response->appendBody("VARIABLE LABELS " . $key . ' "' . $label . '".' . "\n");
+ $response->appendBody("VARIABLE LABELS " . $fixedNames[$key] . ' "' . $label . '".' . "\n");
}
$response->appendBody("\n*Define value labels.\n");
foreach($answerRow as $key => $value) {
if($options = $answerModel->get($key, 'multiOptions')) {
- $response->appendBody('VALUE LABELS ' . $key);
+ $response->appendBody('VALUE LABELS ' . $fixedNames[$key]);
foreach($options as $option=>$label) {
if($types[$key]=='F') {
//Numeric
@@ -205,7 +206,7 @@
//We should create a model with the transformations we need
//think of date translations, numers and strings
$answerRow = reset($answers);
- $spssModel = new Zsd_Export_ExportModel();
+ $spssModel = new Gems_Export_ExportModel();
foreach($answerRow as $key => $value) {
$options = array();
$type = $answerModel->get($key,'type');
@@ -263,8 +264,25 @@
* @return string
*/
public function formatString($input) {
- $output = str_replace("'", "''", $input);
+ $output = strip_tags($input);
+ $output = str_replace(array("'", "\r", "\n"), array("''", ' ', ' '), $output);
$output = "'" . $output . "'";
return $output;
}
+
+ /**
+ * Make sure the $input fieldname is correct for usage in SPSS
+ *
+ * Should start with alphanum, and contain no spaces
+ *
+ * @param string $input
+ * @return string
+ */
+ public function fixName($input) {
+ if (!preg_match ("/^([a-z]|[A-Z])+.*$/", $input)) {
+ $input = "q_" . $input;
+ }
+ $input = str_replace(array(" ","-",":",";","!","/","\\","'"), array("_","_hyph_","_dd_","_dc_","_excl_","_fs_","_bs_",'_qu_'), $input);
+ return $input;
+ }
}
\ No newline at end of file
Modified: tags/1.4.2/library/classes/Gems/View/Helper/Excel.php
===================================================================
--- tags/1.4.2/library/classes/Gems/View/Helper/Excel.php 2011-09-26 10:00:57 UTC (rev 72)
+++ tags/1.4.2/library/classes/Gems/View/Helper/Excel.php 2011-09-26 10:07:56 UTC (rev 73)
@@ -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
@@ -29,7 +29,7 @@
/**
* Outputs an array of arrays (or a Zend_Db_Table_Rowset) as a table
- *
+ *
* The first 'record' is rendered bold, being the header for the table
*
* @category Gems
@@ -49,25 +49,35 @@
Zend_Controller_Front::getInstance()->unregisterPlugin('ZFDebug_Controller_Plugin_Debug');
} catch (Exception $e) {}
$this->view->layout()->setLayout('excel');
+ if ($rowset instanceof Gems_FormattedData) {
+ $rowset->setFormatted(false);
+ }
$rowcnt = 0;
foreach ($rowset as $row) {
- if ($row instanceof Zend_Db_Table_Row) $row = $row->toArray();
- if (!is_array($row)) $row = (array) $row;
+ if ($row instanceof Zend_Db_Table_Row) {
+ $row = $row->toArray();
+ }
+ if (!is_array($row)) {
+ $row = (array) $row;
+ }
if ($rowcnt == 0) {
//Only for the first row: output headers
$output = "<table>\r\n";
$output .= "\t<thead>\r\n";
$output .= "\t\t<tr>\r\n";
foreach ($row as $name => $value) {
- $output .= "\t\t\t<th>$value</th>\r\n";
+ $output .= "\t\t\t<th>$value</th>\r\n";
}
$output .= "\t\t</tr>\r\n";
$output .= "\t</thead>\r\n";
$output .= "\t<tbody>\r\n";
- } else {
- $output .= "\t\t<tr>\r\n";
+ if ($rowset instanceof Gems_FormattedData) {
+ $rowset->setFormatted(true);
+ }
+ } else {
+ $output .= "\t\t<tr>\r\n";
foreach ($row as $name => $value) {
- $output .= "\t\t\t<td>$value</td>\r\n";
+ $output .= "\t\t\t<td>$value</td>\r\n";
}
$output .= "\t\t</tr>\r\n";
}
@@ -76,7 +86,7 @@
if (isset($output)) {
$output .= "\t</tbody>\r\n";
$output .= "</table>\r\n";
- return $output;
+ return $output;
} else {
return null;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2011-09-26 10:01:03
|
Revision: 72
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=72&view=rev
Author: mennodekker
Date: 2011-09-26 10:00:57 +0000 (Mon, 26 Sep 2011)
Log Message:
-----------
Fixing spss variable names and line breaks in text fields
Modified Paths:
--------------
trunk/library/classes/Gems/Export/Spss.php
Modified: trunk/library/classes/Gems/Export/Spss.php
===================================================================
--- trunk/library/classes/Gems/Export/Spss.php 2011-09-23 07:57:42 UTC (rev 71)
+++ trunk/library/classes/Gems/Export/Spss.php 2011-09-26 10:00:57 UTC (rev 72)
@@ -1,5 +1,4 @@
<?php
-
/**
* Copyright (c) 2011, Erasmus MC
* All rights reserved.
@@ -125,8 +124,10 @@
$answerRow = reset($answers);
$labels = array();
$types = array();
+ $fixedNames = array();
$questions = $survey->getQuestionList($language);
foreach($answerRow as $key => $value) {
+ $fixedNames[$key] = $this->fixName($key);
$options = array();
$type = $answerModel->get($key,'type');
switch ($type) {
@@ -166,18 +167,18 @@
if (isset($questions[$key])) {
$labels[$key] = $questions[$key];
}
- $response->appendBody("\n " . $key . ' '. $type);
+ $response->appendBody("\n " . $fixedNames[$key] . ' '. $type);
}
$response->appendBody(".\nCACHE.\nEXECUTE.\n");
$response->appendBody("\n*Define variable labels.\n");
foreach($labels as $key => $label) {
- $response->appendBody("VARIABLE LABELS " . $key . ' "' . $label . '".' . "\n");
+ $response->appendBody("VARIABLE LABELS " . $fixedNames[$key] . ' "' . $label . '".' . "\n");
}
$response->appendBody("\n*Define value labels.\n");
foreach($answerRow as $key => $value) {
if($options = $answerModel->get($key, 'multiOptions')) {
- $response->appendBody('VALUE LABELS ' . $key);
+ $response->appendBody('VALUE LABELS ' . $fixedNames[$key]);
foreach($options as $option=>$label) {
if($types[$key]=='F') {
//Numeric
@@ -263,8 +264,25 @@
* @return string
*/
public function formatString($input) {
- $output = str_replace("'", "''", $input);
+ $output = strip_tags($input);
+ $output = str_replace(array("'", "\r", "\n"), array("''", ' ', ' '), $output);
$output = "'" . $output . "'";
return $output;
}
+
+ /**
+ * Make sure the $input fieldname is correct for usage in SPSS
+ *
+ * Should start with alphanum, and contain no spaces
+ *
+ * @param string $input
+ * @return string
+ */
+ public function fixName($input) {
+ if (!preg_match ("/^([a-z]|[A-Z])+.*$/", $input)) {
+ $input = "q_" . $input;
+ }
+ $input = str_replace(array(" ","-",":",";","!","/","\\","'"), array("_","_hyph_","_dd_","_dc_","_excl_","_fs_","_bs_",'_qu_'), $input);
+ return $input;
+ }
}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2011-09-23 07:57:48
|
Revision: 71
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=71&view=rev
Author: mennodekker
Date: 2011-09-23 07:57:42 +0000 (Fri, 23 Sep 2011)
Log Message:
-----------
Updated new project to allow stand alone surveys
Fixed AddTracks to display only what the Gems_Project marker interfaces allow
TODO: what to do when add track/survey is not allowed? now we get a not allowed error
Modified Paths:
--------------
trunk/library/snippets/AddTracksSnippet.php
trunk/new_project/application/classes/NewProject/Escort.php
Modified: trunk/library/snippets/AddTracksSnippet.php
===================================================================
--- trunk/library/snippets/AddTracksSnippet.php 2011-09-22 14:13:27 UTC (rev 70)
+++ trunk/library/snippets/AddTracksSnippet.php 2011-09-23 07:57:42 UTC (rev 71)
@@ -1,5 +1,4 @@
<?php
-
/**
* Copyright (c) 2011, Erasmus MC
* All rights reserved.
@@ -36,8 +35,12 @@
*/
/**
- * Displays a toolbox of drop down UL's om tracks/ surveys toe te voegen.
+ * Displays a toolbox of drop down UL's to assign tracks / surveys to a patient.
*
+ * If project uses the Gems_Project_Tracks_MultiTracksInterface, show a track drowpdown
+ * If project uses the Gems_Project_Tracks_StandAloneSurveysInterface, show a survey
+ * drowpdown for both staff and patient
+ *
* A snippet is a piece of html output that is reused on multiple places in the code.
*
* Variables are intialized using the {@see MUtil_Registry_TargetInterface} mechanism.
@@ -178,23 +181,34 @@
}
/**
- * Create the snippets content
+ * Allow manual assignment of surveys/tracks to a patient
*
- * This is a stub function either override getHtmlOutput() or override render()
+ * If project uses the Gems_Project_Tracks_MultiTracksInterface, show a track drowpdown
+ * If project uses the Gems_Project_Tracks_StandAloneSurveysInterface, show a survey
+ * drowpdown for both staff and patient
*
* @param Zend_View_Abstract $view Just in case it is needed here
* @return MUtil_Html_HtmlInterface Something that can be rendered
*/
public function getHtmlOutput(Zend_View_Abstract $view)
{
- $pageRef = array(MUtil_Model::REQUEST_ID => $this->request->getParam(MUtil_Model::REQUEST_ID));
+ if ($this->escort instanceof Gems_Project_Tracks_MultiTracksInterface ||
+ $this->escort instanceof Gems_Project_Tracks_StandAloneSurveysInterface) {
- $addToLists = MUtil_Html::create()->div(array('class' => 'tooldock'));
- $addToLists->strong($this->_('Add'));
- $addToLists[] = $this->_getTracks('T', $pageRef);
- $addToLists[] = $this->_getTracks('S', $pageRef);
- $addToLists[] = $this->_getTracks('M', $pageRef);
+ $pageRef = array(MUtil_Model::REQUEST_ID => $this->request->getParam(MUtil_Model::REQUEST_ID));
- return $addToLists;
+ $addToLists = MUtil_Html::create()->div(array('class' => 'tooldock'));
+ $addToLists->strong($this->_('Add'));
+ if ($this->escort instanceof Gems_Project_Tracks_MultiTracksInterface) {
+ $addToLists[] = $this->_getTracks('T', $pageRef);
+ }
+ if ($this->escort instanceof Gems_Project_Tracks_StandAloneSurveysInterface) {
+ $addToLists[] = $this->_getTracks('S', $pageRef);
+ $addToLists[] = $this->_getTracks('M', $pageRef);
+ }
+
+ return $addToLists;
+ }
+ return null;
}
}
Modified: trunk/new_project/application/classes/NewProject/Escort.php
===================================================================
--- trunk/new_project/application/classes/NewProject/Escort.php 2011-09-22 14:13:27 UTC (rev 70)
+++ trunk/new_project/application/classes/NewProject/Escort.php 2011-09-23 07:57:42 UTC (rev 71)
@@ -1,51 +1,51 @@
<?php
-
-/**
- * Copyright (c) 2011, Erasmus MC
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Erasmus MC nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
+
+/**
+ * Copyright (c) 2011, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
include_once('GemsEscort.php');
include_once('Gems/Project/Layout/SingleLayoutInterface.php');
include_once('Gems/Project/Log/LogRespondentAccessInterface.php');
include_once('Gems/Project/Organization/MultiOrganizationInterface.php');
include_once('Gems/Project/Tracks/MultiTracksInterface.php');
-include_once('Gems/Project/Tracks/TracksOnlyInterface.php');
+include_once('Gems/Project/Tracks/StandAloneSurveysInterface.php');
class NewProject_Escort extends GemsEscort implements
Gems_Project_Layout_SingleLayoutInterface,
Gems_Project_Log_LogRespondentAccessInterface,
Gems_Project_Organization_MultiOrganizationInterface,
Gems_Project_Tracks_MultiTracksInterface,
- Gems_Project_Tracks_TracksOnlyInterface
+ Gems_Project_Tracks_StandAloneSurveysInterface
{
public function getUserOrganization() { // Gems_Project_Organization_MultiOrganizationInterface
return $this->session->user_organization_id;
}
-
+
public function getAllowedOrganizations($userId = null) { // Gems_Project_Organization_MultiOrganizationInterface
return parent::getAllowedOrganizations($userId);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2011-09-22 14:13:38
|
Revision: 70
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=70&view=rev
Author: mennodekker
Date: 2011-09-22 14:13:27 +0000 (Thu, 22 Sep 2011)
Log Message:
-----------
Fixed Spss export (forgot to rename zsd to gems)
Fixed Excel export (first row should not be formatted)
Made bulk email a separate privilege from normal mail
Fixed a problem with tableform (not used yet) and File elements
Modified Paths:
--------------
trunk/library/classes/Gems/Export/Spss.php
trunk/library/classes/Gems/Form/TableForm.php
trunk/library/classes/Gems/Menu/MenuAbstract.php
trunk/library/classes/Gems/View/Helper/Excel.php
Modified: trunk/library/classes/Gems/Export/Spss.php
===================================================================
--- trunk/library/classes/Gems/Export/Spss.php 2011-09-22 09:31:24 UTC (rev 69)
+++ trunk/library/classes/Gems/Export/Spss.php 2011-09-22 14:13:27 UTC (rev 70)
@@ -205,7 +205,7 @@
//We should create a model with the transformations we need
//think of date translations, numers and strings
$answerRow = reset($answers);
- $spssModel = new Zsd_Export_ExportModel();
+ $spssModel = new Gems_Export_ExportModel();
foreach($answerRow as $key => $value) {
$options = array();
$type = $answerModel->get($key,'type');
Modified: trunk/library/classes/Gems/Form/TableForm.php
===================================================================
--- trunk/library/classes/Gems/Form/TableForm.php 2011-09-22 09:31:24 UTC (rev 69)
+++ trunk/library/classes/Gems/Form/TableForm.php 2011-09-22 14:13:27 UTC (rev 70)
@@ -69,6 +69,8 @@
if (isset($decorators['Zend_Form_Decorator_ViewHelper'])) {
$dec1 = $decorators['Zend_Form_Decorator_ViewHelper'];
+ } elseif (isset($decorators['Zend_Form_Decorator_File'])) {
+ $dec1 = $decorators['Zend_Form_Decorator_File'];
} else {
foreach($decorators as $name=>$decorator) {
if (substr($name, 0, 5) == 'ZendX') {
Modified: trunk/library/classes/Gems/Menu/MenuAbstract.php
===================================================================
--- trunk/library/classes/Gems/Menu/MenuAbstract.php 2011-09-22 09:31:24 UTC (rev 69)
+++ trunk/library/classes/Gems/Menu/MenuAbstract.php 2011-09-22 14:13:27 UTC (rev 70)
@@ -253,7 +253,7 @@
foreach ($plans as $plan) {
$plan->addAutofilterAction();
- $plan->addAction($this->_('Bulk mail'), 'pr.token.mail', 'email', array('routeReset' => false));
+ $plan->addAction($this->_('Bulk mail'), 'pr.token.bulkmail', 'email', array('routeReset' => false));
$plan->addExcelAction();
}
Modified: trunk/library/classes/Gems/View/Helper/Excel.php
===================================================================
--- trunk/library/classes/Gems/View/Helper/Excel.php 2011-09-22 09:31:24 UTC (rev 69)
+++ trunk/library/classes/Gems/View/Helper/Excel.php 2011-09-22 14:13:27 UTC (rev 70)
@@ -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
@@ -29,7 +29,7 @@
/**
* Outputs an array of arrays (or a Zend_Db_Table_Rowset) as a table
- *
+ *
* The first 'record' is rendered bold, being the header for the table
*
* @category Gems
@@ -49,25 +49,35 @@
Zend_Controller_Front::getInstance()->unregisterPlugin('ZFDebug_Controller_Plugin_Debug');
} catch (Exception $e) {}
$this->view->layout()->setLayout('excel');
+ if ($rowset instanceof Gems_FormattedData) {
+ $rowset->setFormatted(false);
+ }
$rowcnt = 0;
foreach ($rowset as $row) {
- if ($row instanceof Zend_Db_Table_Row) $row = $row->toArray();
- if (!is_array($row)) $row = (array) $row;
+ if ($row instanceof Zend_Db_Table_Row) {
+ $row = $row->toArray();
+ }
+ if (!is_array($row)) {
+ $row = (array) $row;
+ }
if ($rowcnt == 0) {
//Only for the first row: output headers
$output = "<table>\r\n";
$output .= "\t<thead>\r\n";
$output .= "\t\t<tr>\r\n";
foreach ($row as $name => $value) {
- $output .= "\t\t\t<th>$value</th>\r\n";
+ $output .= "\t\t\t<th>$value</th>\r\n";
}
$output .= "\t\t</tr>\r\n";
$output .= "\t</thead>\r\n";
$output .= "\t<tbody>\r\n";
- } else {
- $output .= "\t\t<tr>\r\n";
+ if ($rowset instanceof Gems_FormattedData) {
+ $rowset->setFormatted(true);
+ }
+ } else {
+ $output .= "\t\t<tr>\r\n";
foreach ($row as $name => $value) {
- $output .= "\t\t\t<td>$value</td>\r\n";
+ $output .= "\t\t\t<td>$value</td>\r\n";
}
$output .= "\t\t</tr>\r\n";
}
@@ -76,7 +86,7 @@
if (isset($output)) {
$output .= "\t</tbody>\r\n";
$output .= "</table>\r\n";
- return $output;
+ return $output;
} else {
return null;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2011-09-22 09:31:30
|
Revision: 69
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=69&view=rev
Author: mennodekker
Date: 2011-09-22 09:31:24 +0000 (Thu, 22 Sep 2011)
Log Message:
-----------
fixed logging of export
Modified Paths:
--------------
trunk/library/classes/Gems/Default/ExportAction.php
Modified: trunk/library/classes/Gems/Default/ExportAction.php
===================================================================
--- trunk/library/classes/Gems/Default/ExportAction.php 2011-09-22 09:30:10 UTC (rev 68)
+++ trunk/library/classes/Gems/Default/ExportAction.php 2011-09-22 09:31:24 UTC (rev 69)
@@ -161,7 +161,7 @@
$element->setLabel($this->_('Survey'))
->setMultiOptions($surveys);
$elements[] = $element;
-
+
//Add a field to the form showing the record count. If this is too slow for large recordsets
//then remove it or make it more efficient
unset($data['records']);
@@ -246,9 +246,9 @@
if (isset($data['type'])) {
//Do the logging
- $message = join(', ', $data);
+ $message = Zend_Json::encode($data);
Gems_AccessLog::getLog()->log('export', $this->getRequest(), $message, null, true);
-
+
//And delegate the export to the right class
$exportClass = $this->export->getExport($data['type']);
$exportClass->handleExport($data, $survey, $answers, $answerModel, $language);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2011-09-22 09:30:16
|
Revision: 68
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=68&view=rev
Author: mennodekker
Date: 2011-09-22 09:30:10 +0000 (Thu, 22 Sep 2011)
Log Message:
-----------
fixed logging of export
Modified Paths:
--------------
tags/1.4.2/library/classes/Gems/Default/ExportAction.php
Modified: tags/1.4.2/library/classes/Gems/Default/ExportAction.php
===================================================================
--- tags/1.4.2/library/classes/Gems/Default/ExportAction.php 2011-09-22 09:24:47 UTC (rev 67)
+++ tags/1.4.2/library/classes/Gems/Default/ExportAction.php 2011-09-22 09:30:10 UTC (rev 68)
@@ -161,7 +161,7 @@
$element->setLabel($this->_('Survey'))
->setMultiOptions($surveys);
$elements[] = $element;
-
+
//Add a field to the form showing the record count. If this is too slow for large recordsets
//then remove it or make it more efficient
unset($data['records']);
@@ -246,9 +246,9 @@
if (isset($data['type'])) {
//Do the logging
- $message = join(', ', $data);
+ $message = Zend_Json::encode($data);
Gems_AccessLog::getLog()->log('export', $this->getRequest(), $message, null, true);
-
+
//And delegate the export to the right class
$exportClass = $this->export->getExport($data['type']);
$exportClass->handleExport($data, $survey, $answers, $answerModel, $language);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2011-09-22 09:24:55
|
Revision: 67
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=67&view=rev
Author: mennodekker
Date: 2011-09-22 09:24:47 +0000 (Thu, 22 Sep 2011)
Log Message:
-----------
Added Paths:
-----------
tags/1.4.2/library/classes/Gems/Loader.php
Removed Paths:
-------------
tags/1.4.2/library/classes/Gems/Loader.php
Deleted: tags/1.4.2/library/classes/Gems/Loader.php
===================================================================
--- tags/1.4.2/library/classes/Gems/Loader.php 2011-09-22 09:17:02 UTC (rev 66)
+++ tags/1.4.2/library/classes/Gems/Loader.php 2011-09-22 09:24:47 UTC (rev 67)
@@ -1,180 +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 Loader
- * @author Matijs de Jong <mj...@ma...>
- * @copyright Copyright (c) 2011 Erasmus MC
- * @license New BSD License
- * @version $Id$
- */
-
-/**
- *
- * @package Gems
- * @subpackage Loader
- * @copyright Copyright (c) 2011 Erasmus MC
- * @license New BSD License
- * @since Class available since version 1.4
- */
-class Gems_Loader extends Gems_Loader_LoaderAbstract
-{
- /**
- *
- * @var Gems_Events
- */
- protected $events;
-
- /**
- *
- * @var Gems_Model
- */
- protected $models;
-
- /**
- *
- * @var Gems_Pdf
- */
- protected $pdf;
-
- /**
- *
- * @var Gems_Roles
- */
- protected $roles;
-
- /**
- *
- * @var Gems_Selector
- */
- protected $selector;
-
- /**
- *
- * @var Gems_Tracker
- */
- protected $tracker;
-
- /**
- *
- * @var Gems_Util
- */
- protected $util;
-
- /**
- *
- * @var Gems_Versions
- */
- protected $versions;
-
- /**
- * Load project specific menu or general Gems menu otherwise
- *
- * @param GemsEscort $escort
- * @return Gems_Menu
- */
- public function createMenu(GemsEscort $escort)
- {
- return $this->_loadClass('Menu', true, func_get_args());
- }
-
- /**
- *
- * @return gems_Events
- */
- public function getEvents()
- {
- return $this->_getClass('events');
- }
-
- /**
- *
- * @return Gems_Model
- */
- public function getModels()
- {
- return $this->_getClass('models', 'model');
- }
-
- /**
- *
- * @return Gems_Pdf
- */
- public function getPdf()
- {
- return $this->_getClass('pdf');
- }
-
- /**
- *
- * @param GemsEscort $escort
- * @return Gems_Roles
- */
- public function getRoles(GemsEscort $escort)
- {
- return $this->_getClass('roles', null, array($escort));
- }
-
- /**
- *
- * @return Gems_Selector
- */
- public function getSelector()
- {
- return $this->_getClass('selector');
- }
-
- /**
- *
- * @return Gems_Tracker_TrackerInterface
- */
- public function getTracker()
- {
- return $this->_getClass('tracker');
- }
-
- /**
- *
- * @return Gems_Util
- */
- public function getUtil()
- {
- return $this->_getClass('util');
- }
-
- /**
- *
- * @return Gems_Versions
- */
- public function getVersions()
- {
- return $this->_getClass('versions');
- }
-}
\ No newline at end of file
Copied: tags/1.4.2/library/classes/Gems/Loader.php (from rev 66, trunk/library/classes/Gems/Loader.php)
===================================================================
--- tags/1.4.2/library/classes/Gems/Loader.php (rev 0)
+++ tags/1.4.2/library/classes/Gems/Loader.php 2011-09-22 09:24:47 UTC (rev 67)
@@ -0,0 +1,195 @@
+<?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 Loader
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @version $Id$
+ */
+
+/**
+ *
+ * @package Gems
+ * @subpackage Loader
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @since Class available since version 1.4
+ */
+class Gems_Loader extends Gems_Loader_LoaderAbstract
+{
+ /**
+ *
+ * @var Gems_Events
+ */
+ protected $events;
+
+ /**
+ *
+ * @var Gems_Export
+ */
+ protected $export;
+
+ /**
+ *
+ * @var Gems_Model
+ */
+ protected $models;
+
+ /**
+ *
+ * @var Gems_Pdf
+ */
+ protected $pdf;
+
+ /**
+ *
+ * @var Gems_Roles
+ */
+ protected $roles;
+
+ /**
+ *
+ * @var Gems_Selector
+ */
+ protected $selector;
+
+ /**
+ *
+ * @var Gems_Tracker
+ */
+ protected $tracker;
+
+ /**
+ *
+ * @var Gems_Util
+ */
+ protected $util;
+
+ /**
+ *
+ * @var Gems_Versions
+ */
+ protected $versions;
+
+ /**
+ * Load project specific menu or general Gems menu otherwise
+ *
+ * @param GemsEscort $escort
+ * @return Gems_Menu
+ */
+ public function createMenu(GemsEscort $escort)
+ {
+ return $this->_loadClass('Menu', true, func_get_args());
+ }
+
+ /**
+ *
+ * @return gems_Events
+ */
+ public function getEvents()
+ {
+ return $this->_getClass('events');
+ }
+
+ /**
+ *
+ * @return Gems_Export
+ */
+ public function getExport()
+ {
+ return $this->_getClass('export');
+ }
+
+ /**
+ *
+ * @return Gems_Model
+ */
+ public function getModels()
+ {
+ return $this->_getClass('models', 'model');
+ }
+
+ /**
+ *
+ * @return Gems_Pdf
+ */
+ public function getPdf()
+ {
+ return $this->_getClass('pdf');
+ }
+
+ /**
+ *
+ * @param GemsEscort $escort
+ * @return Gems_Roles
+ */
+ public function getRoles(GemsEscort $escort)
+ {
+ return $this->_getClass('roles', null, array($escort));
+ }
+
+ /**
+ *
+ * @return Gems_Selector
+ */
+ public function getSelector()
+ {
+ return $this->_getClass('selector');
+ }
+
+ /**
+ *
+ * @return Gems_Tracker_TrackerInterface
+ */
+ public function getTracker()
+ {
+ return $this->_getClass('tracker');
+ }
+
+ /**
+ *
+ * @return Gems_Util
+ */
+ public function getUtil()
+ {
+ return $this->_getClass('util');
+ }
+
+ /**
+ *
+ * @return Gems_Versions
+ */
+ public function getVersions()
+ {
+ return $this->_getClass('versions');
+ }
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2011-09-22 09:17:11
|
Revision: 66
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=66&view=rev
Author: mennodekker
Date: 2011-09-22 09:17:02 +0000 (Thu, 22 Sep 2011)
Log Message:
-----------
Fix, forgot to move export from project to gems loader
Modified Paths:
--------------
trunk/library/classes/Gems/Loader.php
Modified: trunk/library/classes/Gems/Loader.php
===================================================================
--- trunk/library/classes/Gems/Loader.php 2011-09-22 08:58:42 UTC (rev 65)
+++ trunk/library/classes/Gems/Loader.php 2011-09-22 09:17:02 UTC (rev 66)
@@ -54,6 +54,12 @@
/**
*
+ * @var Gems_Export
+ */
+ protected $export;
+
+ /**
+ *
* @var Gems_Model
*/
protected $models;
@@ -116,6 +122,15 @@
/**
*
+ * @return Gems_Export
+ */
+ public function getExport()
+ {
+ return $this->_getClass('export');
+ }
+
+ /**
+ *
* @return Gems_Model
*/
public function getModels()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2011-09-22 08:58:48
|
Revision: 65
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=65&view=rev
Author: mennodekker
Date: 2011-09-22 08:58:42 +0000 (Thu, 22 Sep 2011)
Log Message:
-----------
Updated versions after release
Modified Paths:
--------------
trunk/library/classes/Gems/Versions.php
trunk/library/configs/db/tables/gems__patch_levels.10.sql
Modified: trunk/library/classes/Gems/Versions.php
===================================================================
--- trunk/library/classes/Gems/Versions.php 2011-09-22 08:56:58 UTC (rev 64)
+++ trunk/library/classes/Gems/Versions.php 2011-09-22 08:58:42 UTC (rev 65)
@@ -43,12 +43,12 @@
{
public final function getBuild()
{
- return 40;
+ return 41;
}
public final function getGemsVersion()
{
- return '1.4.2';
+ return '1.4.3';
}
public function getProjectVersion()
Modified: trunk/library/configs/db/tables/gems__patch_levels.10.sql
===================================================================
--- trunk/library/configs/db/tables/gems__patch_levels.10.sql 2011-09-22 08:56:58 UTC (rev 64)
+++ trunk/library/configs/db/tables/gems__patch_levels.10.sql 2011-09-22 08:58:42 UTC (rev 65)
@@ -11,5 +11,5 @@
INSERT INTO gems__patch_levels (gpl_level, gpl_created)
VALUES
- (40, CURRENT_TIMESTAMP);
+ (41, CURRENT_TIMESTAMP);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2011-09-22 08:57:06
|
Revision: 64
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=64&view=rev
Author: mennodekker
Date: 2011-09-22 08:56:58 +0000 (Thu, 22 Sep 2011)
Log Message:
-----------
Modified Paths:
--------------
trunk/library/languages/default-nl.mo
trunk/library/languages/default-nl.po
Modified: trunk/library/languages/default-nl.mo
===================================================================
(Binary files differ)
Modified: trunk/library/languages/default-nl.po
===================================================================
--- trunk/library/languages/default-nl.po 2011-09-22 08:22:53 UTC (rev 63)
+++ trunk/library/languages/default-nl.po 2011-09-22 08:56:58 UTC (rev 64)
@@ -4,7 +4,7 @@
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-09-20 17:37+0100\n"
"PO-Revision-Date: \n"
-"Last-Translator: Matijs de Jong <mj...@ma...>\n"
+"Last-Translator: Menno Dekker <men...@er...>\n"
"Language-Team: Erasmus MGZ <mat...@ma...>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -378,7 +378,7 @@
#: classes/Gems/Menu.php:612
msgid "Changelog"
-msgstr "Logboek"
+msgstr "Changelog"
#: classes/Gems/Model.php:106
msgid "Respondent nr"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2011-09-22 08:22:59
|
Revision: 63
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=63&view=rev
Author: mennodekker
Date: 2011-09-22 08:22:53 +0000 (Thu, 22 Sep 2011)
Log Message:
-----------
Released 1.4.2
Added Paths:
-----------
tags/1.4.2/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2011-09-22 08:03:43
|
Revision: 62
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=62&view=rev
Author: mennodekker
Date: 2011-09-22 08:03:33 +0000 (Thu, 22 Sep 2011)
Log Message:
-----------
DocBlock fixes
Modified Paths:
--------------
trunk/library/classes/Gems/Email/TemplateMailer.php
Modified: trunk/library/classes/Gems/Email/TemplateMailer.php
===================================================================
--- trunk/library/classes/Gems/Email/TemplateMailer.php 2011-09-22 07:51:17 UTC (rev 61)
+++ trunk/library/classes/Gems/Email/TemplateMailer.php 2011-09-22 08:03:33 UTC (rev 62)
@@ -38,7 +38,7 @@
*
* @author Michiel Rook <mi...@to...>
* @package Gems
- * @subpackage Mail
+ * @subpackage Email
* @copyright Copyright (c) 2011 Erasmus MC
* @license New BSD License
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2011-09-22 07:51:23
|
Revision: 61
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=61&view=rev
Author: mennodekker
Date: 2011-09-22 07:51:17 +0000 (Thu, 22 Sep 2011)
Log Message:
-----------
DocBlock fixes
Modified Paths:
--------------
trunk/library/classes/Gems/JQuery/Form/Decorator/TabContainer.php
Modified: trunk/library/classes/Gems/JQuery/Form/Decorator/TabContainer.php
===================================================================
--- trunk/library/classes/Gems/JQuery/Form/Decorator/TabContainer.php 2011-09-22 07:50:40 UTC (rev 60)
+++ trunk/library/classes/Gems/JQuery/Form/Decorator/TabContainer.php 2011-09-22 07:51:17 UTC (rev 61)
@@ -1,6 +1,4 @@
<?php
-
-
/**
* Copyright (c) 2011, Erasmus MC
* All rights reserved.
@@ -28,7 +26,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @package Gems
- * @subpackage Form
+ * @subpackage JQuery
* @copyright Copyright (c) 2011 Erasmus MC
* @license New BSD License
* @version $Id$
@@ -43,7 +41,7 @@
* $Id$
* @filesource
* @package Gems
- * @subpackage Form
+ * @subpackage JQuery
*/
class Gems_JQuery_Form_Decorator_TabContainer extends ZendX_JQuery_Form_Decorator_TabContainer
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2011-09-22 07:50:46
|
Revision: 60
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=60&view=rev
Author: mennodekker
Date: 2011-09-22 07:50:40 +0000 (Thu, 22 Sep 2011)
Log Message:
-----------
DocBlock fixes
Modified Paths:
--------------
trunk/library/classes/Gems/Events.php
Modified: trunk/library/classes/Gems/Events.php
===================================================================
--- trunk/library/classes/Gems/Events.php 2011-09-22 07:23:44 UTC (rev 59)
+++ trunk/library/classes/Gems/Events.php 2011-09-22 07:50:40 UTC (rev 60)
@@ -28,7 +28,7 @@
*
*
* @package Gems
- * @subpackage Events
+ * @subpackage Event
* @author Matijs de Jong <mj...@ma...>
* @copyright Copyright (c) 2011 Erasmus MC
* @license New BSD License
@@ -39,7 +39,7 @@
* Per project overruleable event processing engine
*
* @package Gems
- * @subpackage Events
+ * @subpackage Event
* @copyright Copyright (c) 2011 Erasmus MC
* @license New BSD License
* @since Class available since version 1.4
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2011-09-22 07:23:51
|
Revision: 59
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=59&view=rev
Author: mennodekker
Date: 2011-09-22 07:23:44 +0000 (Thu, 22 Sep 2011)
Log Message:
-----------
DocBlock fixes
Modified Paths:
--------------
trunk/library/classes/Gems/Event/EventInterface.php
trunk/library/classes/Gems/Event/RoundChangedEventInterface.php
trunk/library/classes/Gems/Event/SurveyBeforeAnsweringEventInterface.php
trunk/library/classes/Gems/Event/SurveyCompletedEventInterface.php
trunk/library/classes/Gems/Exception/Coding.php
trunk/library/classes/Gems/Exception.php
trunk/library/classes/Gems/Validate/LimeSurveySoapClient.php
Modified: trunk/library/classes/Gems/Event/EventInterface.php
===================================================================
--- trunk/library/classes/Gems/Event/EventInterface.php 2011-09-21 10:11:17 UTC (rev 58)
+++ trunk/library/classes/Gems/Event/EventInterface.php 2011-09-22 07:23:44 UTC (rev 59)
@@ -1,5 +1,4 @@
<?php
-
/**
* Copyright (c) 2011, Erasmus MC
* All rights reserved.
@@ -28,7 +27,7 @@
*
*
* @package Gems
- * @subpackage Events
+ * @subpackage Event
* @author Matijs de Jong <mj...@ma...>
* @copyright Copyright (c) 2011 Erasmus MC
* @license New BSD License
@@ -40,7 +39,7 @@
* each event should implement this interface.
*
* @package Gems
- * @subpackage Events
+ * @subpackage Event
* @copyright Copyright (c) 2011 Erasmus MC
* @license New BSD License
* @since Class available since version 1.4
Modified: trunk/library/classes/Gems/Event/RoundChangedEventInterface.php
===================================================================
--- trunk/library/classes/Gems/Event/RoundChangedEventInterface.php 2011-09-21 10:11:17 UTC (rev 58)
+++ trunk/library/classes/Gems/Event/RoundChangedEventInterface.php 2011-09-22 07:23:44 UTC (rev 59)
@@ -1,5 +1,4 @@
<?php
-
/**
* Copyright (c) 2011, Erasmus MC
* All rights reserved.
@@ -28,7 +27,7 @@
*
*
* @package Gems
- * @subpackage Events
+ * @subpackage Event
* @author Matijs de Jong <mj...@ma...>
* @copyright Copyright (c) 2011 Erasmus MC
* @license New BSD License
@@ -42,7 +41,7 @@
* but then the code may be more difficult to implement.
*
* @package Gems
- * @subpackage Events
+ * @subpackage Event
* @copyright Copyright (c) 2011 Erasmus MC
* @license New BSD License
* @since Class available since version 1.4
Modified: trunk/library/classes/Gems/Event/SurveyBeforeAnsweringEventInterface.php
===================================================================
--- trunk/library/classes/Gems/Event/SurveyBeforeAnsweringEventInterface.php 2011-09-21 10:11:17 UTC (rev 58)
+++ trunk/library/classes/Gems/Event/SurveyBeforeAnsweringEventInterface.php 2011-09-22 07:23:44 UTC (rev 59)
@@ -1,5 +1,4 @@
<?php
-
/**
* Copyright (c) 2011, Erasmus MC
* All rights reserved.
@@ -28,7 +27,7 @@
*
*
* @package Gems
- * @subpackage Events
+ * @subpackage Event
* @author Matijs de Jong <mj...@ma...>
* @copyright Copyright (c) 2011 Erasmus MC
* @license New BSD License
@@ -41,7 +40,7 @@
* You can return answers that must be set in an array and they will be uploaded to the source.
*
* @package Gems
- * @subpackage Events
+ * @subpackage Event
* @copyright Copyright (c) 2011 Erasmus MC
* @license New BSD License
* @since Class available since version 1.4
Modified: trunk/library/classes/Gems/Event/SurveyCompletedEventInterface.php
===================================================================
--- trunk/library/classes/Gems/Event/SurveyCompletedEventInterface.php 2011-09-21 10:11:17 UTC (rev 58)
+++ trunk/library/classes/Gems/Event/SurveyCompletedEventInterface.php 2011-09-22 07:23:44 UTC (rev 59)
@@ -1,5 +1,4 @@
<?php
-
/**
* Copyright (c) 2011, Erasmus MC
* All rights reserved.
@@ -28,7 +27,7 @@
*
*
* @package Gems
- * @subpackage Events
+ * @subpackage Event
* @author Matijs de Jong <mj...@ma...>
* @copyright Copyright (c) 2011 Erasmus MC
* @license New BSD License
@@ -41,7 +40,7 @@
* Just return those values that have changed and they will be uploaded to the source.
*
* @package Gems
- * @subpackage Events
+ * @subpackage Event
* @copyright Copyright (c) 2011 Erasmus MC
* @license New BSD License
* @since Class available since version 1.4
Modified: trunk/library/classes/Gems/Exception/Coding.php
===================================================================
--- trunk/library/classes/Gems/Exception/Coding.php 2011-09-21 10:11:17 UTC (rev 58)
+++ trunk/library/classes/Gems/Exception/Coding.php 2011-09-22 07:23:44 UTC (rev 59)
@@ -1,34 +1,48 @@
<?php
+/**
+ * Copyright (c) 2011, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Gems Coding exception
+ *
+ * @author Matijs de Jong <mj...@ma...>
+ * @since 1.1
+ * @version 1.1
+ * @package Gems
+ * @subpackage Exception
+ */
-
-/**
- * Copyright (c) 2011, Erasmus MC
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Erasmus MC nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-class Gems_Exception_Coding extends Gems_Exception
+/**
+ * Gems Coding exception
+ *
+ * @author Matijs de Jong <mj...@ma...>
+ * @package Gems
+ * @subpackage Exception
+ */
+class Gems_Exception_Coding extends Gems_Exception
{
public function __construct($msg = '', $code = 200, Exception $previous = null)
{
Modified: trunk/library/classes/Gems/Exception.php
===================================================================
--- trunk/library/classes/Gems/Exception.php 2011-09-21 10:11:17 UTC (rev 58)
+++ trunk/library/classes/Gems/Exception.php 2011-09-22 07:23:44 UTC (rev 59)
@@ -1,36 +1,33 @@
<?php
-
-
-/**
- * Copyright (c) 2011, Erasmus MC
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Erasmus MC nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
/**
- * File description of SurveyNotFoundException
+ * Copyright (c) 2011, Erasmus MC
+ * All rights reserved.
*
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Gems Base Exception class
+ *
* @author Matijs de Jong <mj...@ma...>
* @since 1.1
* @version 1.1
@@ -39,7 +36,7 @@
*/
/**
- * Class description of SurveyNotFoundException
+ * Gems Base Exception class
*
* @author Matijs de Jong <mj...@ma...>
* @package Gems
@@ -49,7 +46,7 @@
{
/**
* Optional extra information on the exception
- *
+ *
* @var string
*/
private $info;
@@ -72,7 +69,7 @@
/**
* Returns optional extra information in the exception
- *
+ *
* @return String
*/
public function getInfo()
@@ -83,7 +80,7 @@
/**
* Optional extra information on the exception
*
- * @param string $info
+ * @param string $info
*/
public function setInfo($info)
{
Modified: trunk/library/classes/Gems/Validate/LimeSurveySoapClient.php
===================================================================
--- trunk/library/classes/Gems/Validate/LimeSurveySoapClient.php 2011-09-21 10:11:17 UTC (rev 58)
+++ trunk/library/classes/Gems/Validate/LimeSurveySoapClient.php 2011-09-22 07:23:44 UTC (rev 59)
@@ -1,33 +1,48 @@
<?php
+/**
+ * Copyright (c) 2011, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @version $Id$
+ * @package Gems
+ * @subpackage Validate
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ */
-
-/**
- * Copyright (c) 2011, Erasmus MC
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Erasmus MC nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
+/**
+ * Not used anymore, checked if we could use soap connection. As soap is no longer a reliable
+ * interface in LimeSurvey it is deprecated for now.
+ *
+ * @deprecated
+ * @package Gems
+ * @subpackage Validate
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @deprecated
+ * @license New BSD License
+ */
class LimeSurveySoapClient extends MUtil_Validate_Url
{
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2011-09-21 10:11:23
|
Revision: 58
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=58&view=rev
Author: mennodekker
Date: 2011-09-21 10:11:17 +0000 (Wed, 21 Sep 2011)
Log Message:
-----------
Fixed mail activity log accidentally moved to top level
Modified Paths:
--------------
trunk/library/classes/Gems/Menu/MenuAbstract.php
Modified: trunk/library/classes/Gems/Menu/MenuAbstract.php
===================================================================
--- trunk/library/classes/Gems/Menu/MenuAbstract.php 2011-09-21 07:31:01 UTC (rev 57)
+++ trunk/library/classes/Gems/Menu/MenuAbstract.php 2011-09-21 10:11:17 UTC (rev 58)
@@ -204,7 +204,7 @@
// MAIL ACTIVITY CONTROLLER
//$setup->addBrowsePage();
- $page = $this->addPage($this->_('Activity'), 'pr.mail.log', 'mail-log');
+ $page = $setup->addPage($this->_('Activity'), 'pr.mail.log', 'mail-log');
$page->addAutofilterAction();
$page->addExcelAction();
$page->addShowAction();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2011-09-21 07:31:07
|
Revision: 57
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=57&view=rev
Author: mennodekker
Date: 2011-09-21 07:31:01 +0000 (Wed, 21 Sep 2011)
Log Message:
-----------
Don't want to screw up the logs, so removed some actions (create, edit, delete)
Modified Paths:
--------------
trunk/library/classes/Gems/Menu/MenuAbstract.php
Modified: trunk/library/classes/Gems/Menu/MenuAbstract.php
===================================================================
--- trunk/library/classes/Gems/Menu/MenuAbstract.php 2011-09-21 07:23:20 UTC (rev 56)
+++ trunk/library/classes/Gems/Menu/MenuAbstract.php 2011-09-21 07:31:01 UTC (rev 57)
@@ -203,7 +203,11 @@
$setup = $this->addContainer($label);
// MAIL ACTIVITY CONTROLLER
- $setup->addBrowsePage($this->_('Activity'), 'pr.mail.log', 'mail-log');
+ //$setup->addBrowsePage();
+ $page = $this->addPage($this->_('Activity'), 'pr.mail.log', 'mail-log');
+ $page->addAutofilterAction();
+ $page->addExcelAction();
+ $page->addShowAction();
// MAIL Server CONTROLLER
$page = $setup->addBrowsePage($this->_('Servers'), 'pr.mail.server', 'mail-server');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2011-09-21 07:23:30
|
Revision: 56
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=56&view=rev
Author: mennodekker
Date: 2011-09-21 07:23:20 +0000 (Wed, 21 Sep 2011)
Log Message:
-----------
DocBlock fixes
Modified Paths:
--------------
trunk/library/classes/Gems/Default/LogAction.php
trunk/library/classes/Gems/Default/LogMaintenanceAction.php
trunk/library/classes/Gems/Tracker/ChangeTracker.php
trunk/library/classes/Gems/Util/Localized.php
Modified: trunk/library/classes/Gems/Default/LogAction.php
===================================================================
--- trunk/library/classes/Gems/Default/LogAction.php 2011-09-21 07:05:58 UTC (rev 55)
+++ trunk/library/classes/Gems/Default/LogAction.php 2011-09-21 07:23:20 UTC (rev 56)
@@ -1,10 +1,8 @@
<?php
-
-
/**
* Copyright (c) 2011, Erasmus MC
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
@@ -15,7 +13,7 @@
* * Neither the name of Erasmus MC nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -28,29 +26,38 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+/**
+ * Show the action log
+ *
+ * @package Gems
+ * @subpackage Default
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @since Class available since version 1.4
+ */
class Gems_Default_LogAction extends Gems_Controller_BrowseEditAction {
-
+
public $sortKey = array('glua_created' => SORT_DESC);
-
+
public $defaultPeriodEnd = 1;
public $defaultPeriodStart = -4;
public $defaultPeriodType = 'W';
-
+
public $maxPeriod = 1;
public $minPeriod = -15;
-
+
public function getAutoSearchElements(MUtil_Model_ModelAbstract $model, array $data) {
$elements = parent::getAutoSearchElements($model, $data);
-
+
if ($elements) {
$elements[] = null; // break into separate spans
}
-
+
// Create date range elements
$min = -91;
$max = 91;
$size = max(strlen($min), strlen($max));
-
+
$element = new Zend_Form_Element_Text('period_start', array('label' => $this->_('from'), 'size' => $size - 1, 'maxlength' => $size, 'class' => 'rightAlign'));
$element->addValidator(new Zend_Validate_Int());
$element->addValidator(new Zend_Validate_Between($min, $max));
@@ -85,32 +92,32 @@
$elements[] = $element;
$elements[] = null; // break into separate spans
-
+
$elements[] = $this->_('Staff:');
$sql = "SELECT glua_by, CONCAT(gsf_last_name, ', ', COALESCE(CONCAT(gsf_first_name, ' '), ''), COALESCE(gsf_surname_prefix, '')) AS name "
. "FROM gems__log_useractions "
- . "JOIN gems__staff ON glua_by = gsf_id_user";
+ . "JOIN gems__staff ON glua_by = gsf_id_user";
$elements[] = $this->_createSelectElement('glua_by', $sql, $this->_('All staff'));
-
+
$elements[] = $this->_('Patient:');
$sql = "SELECT glua_by, CONCAT(grs_last_name, ', ', COALESCE(CONCAT(grs_first_name, ' '), ''), COALESCE(grs_surname_prefix, '')) AS name "
. "FROM gems__log_useractions "
- . "JOIN gems__respondents ON glua_by = grs_id_user";
+ . "JOIN gems__respondents ON glua_by = grs_id_user";
$elements[] = $this->_createSelectElement('glua_to', $sql, $this->_('All patients'));
-
+
$elements[] = MUtil_Html::create('br');
$elements[] = $this->_('Action:');
$sql = "SELECT glac_id_action, glac_name "
. "FROM gems__log_actions ";
$elements[] = $this->_createSelectElement('glua_action', $sql, $this->_('All actions'));
-
+
return $elements;
}
-
+
public function getDataFilter(array $data) {
$filter = array();
-
-
+
+
// Check for period selected
switch ($data['date_type']) {
case 'W':
@@ -134,7 +141,7 @@
return $filter;
}
-
+
public function getDefaultSearchData()
{
return array(
@@ -145,7 +152,7 @@
}
protected function createModel($detailed, $action) {
- //MUtil_Model::$verbose=true;
+ //MUtil_Model::$verbose=true;
$model = new Gems_Model_JoinModel('Log', 'gems__log_useractions');
$model->addLeftTable('gems__log_actions', array('glua_action'=>'glac_id_action'));
$model->addLeftTable('gems__respondents', array('glua_to'=>'grs_id_user'));
Modified: trunk/library/classes/Gems/Default/LogMaintenanceAction.php
===================================================================
--- trunk/library/classes/Gems/Default/LogMaintenanceAction.php 2011-09-21 07:05:58 UTC (rev 55)
+++ trunk/library/classes/Gems/Default/LogMaintenanceAction.php 2011-09-21 07:23:20 UTC (rev 56)
@@ -1,10 +1,8 @@
<?php
-
-
/**
* Copyright (c) 2011, Erasmus MC
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
@@ -15,7 +13,7 @@
* * Neither the name of Erasmus MC nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -28,16 +26,26 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+/**
+ * The maintenace screen for the action log
+ *
+ * @package Gems
+ * @subpackage Default
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @since Class available since version 1.4
+ */
+
class Gems_Default_LogMaintenanceAction extends Gems_Controller_BrowseEditAction {
-
+
public $sortKey = array('glac_name' => SORT_ASC);
-
+
public function addFormElements(MUtil_Model_FormBridge $bridge, MUtil_Model_ModelAbstract $model, array $data, $new = false) {
$model->set('glac_name', 'elementClass', 'exhibitor');
$model->set('glac_log', 'elementClass', 'checkBox');
parent::addFormElements($bridge, $model, $data, $new);
}
-
+
protected function createModel($detailed, $action) {
//MUtil_Model::$verbose=true;
$model = new Gems_Model_JoinModel('log_maint', 'gems__log_actions', true);
@@ -46,22 +54,22 @@
return $model;
}
-
+
public function getAfterSaveRoute($data) {
Gems_AccessLog::getLog()->loadActions(true);
return parent::getAfterSaveRoute($data);
}
-
+
public function getAutoSearchElements(MUtil_Model_ModelAbstract $model, array $data) {
$elements = parent::getAutoSearchElements($model, $data);
-
+
if ($elements) {
$elements[] = null; // break into separate spans
}
-
+
$elements[] = $this->_('Log:');
$elements[] = $this->_createSelectElement('glac_log', $this->util->getTranslated()->getYesNo(), $this->_('All'));
-
+
return $elements;
}
Modified: trunk/library/classes/Gems/Tracker/ChangeTracker.php
===================================================================
--- trunk/library/classes/Gems/Tracker/ChangeTracker.php 2011-09-21 07:05:58 UTC (rev 55)
+++ trunk/library/classes/Gems/Tracker/ChangeTracker.php 2011-09-21 07:23:20 UTC (rev 56)
@@ -4,7 +4,7 @@
/**
* Copyright (c) 2011, Erasmus MC
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
@@ -15,7 +15,7 @@
* * Neither the name of Erasmus MC nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -26,24 +26,23 @@
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * File description of ChangeTracker
*
- * @author Matijs de Jong <mj...@ma...>
- * @since 1.2
- * @version 1.2
- * @package
- * @subpackage
+ *
+ * @package Gems
+ * @subpackage Tracker
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @version $Id$
*/
/**
- * Class description of ChangeTracker
*
- * @author Matijs de Jong <mj...@ma...>
- * @package
- * @subpackage
+ * @package Gems
+ * @subpackage Tracker
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @since Class available since version 1.4
*/
class Gems_Tracker_ChangeTracker
{
@@ -54,11 +53,11 @@
public $roundChangeUpdates = 0;
public $roundCompletionCauses = 0;
public $roundCompletionChanges = 0;
- public $surveyCompletionChanges = 0;
+ public $surveyCompletionChanges = 0;
public $tokenDateCauses = 0;
public $tokenDateChanges = 0;
- public function getMessages(Zend_Translate $t)
+ public function getMessages(Zend_Translate $t)
{
if ($this->checkedRespondentTracks) {
$messages[] = sprintf($t->_('Checked %d tracks.'), $this->checkedRespondentTracks);
@@ -89,10 +88,10 @@
} else {
$messages[] = $t->_('No tokens were changed.');
}
-
+
return $messages;
}
-
+
public function hasChanged()
{
return $this->resultDataChanges || $this->surveyCompletionChanges || $this->roundCompletionChanges || $this->tokenDateCauses || $this->roundChangeUpdates || $this->createdTokens;
Modified: trunk/library/classes/Gems/Util/Localized.php
===================================================================
--- trunk/library/classes/Gems/Util/Localized.php 2011-09-21 07:05:58 UTC (rev 55)
+++ trunk/library/classes/Gems/Util/Localized.php 2011-09-21 07:23:20 UTC (rev 56)
@@ -1,33 +1,49 @@
<?php
-
-/**
- * Copyright (c) 2011, Erasmus MC
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Erasmus MC nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
+
+/**
+ * Copyright (c) 2011, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * @package Gems
+ * @subpackage Util
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @version $Id$
+ */
+
+/**
+ * Localization class, allowing for project specific overrides
+ *
+ * @package Gems
+ * @subpackage Util
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ */
class Gems_Util_Localized extends Gems_Registry_TargetAbstract
{
/**
@@ -92,7 +108,7 @@
}
}
- /*
+ /*
public function formatDateTime($dateTimeValue, $showRecentTime = false)
{
if ($dateTimeValue) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|