|
From: <gem...@li...> - 2013-02-27 18:20:30
|
Revision: 1158
http://sourceforge.net/p/gemstracker/code/1158
Author: matijsdejong
Date: 2013-02-27 18:20:27 +0000 (Wed, 27 Feb 2013)
Log Message:
-----------
A better sort for these display types (apparently)
Modified Paths:
--------------
trunk/library/classes/Gems/Event/Survey/Display/AllSingleTrack.php
trunk/library/classes/Gems/Snippets/Tracker/Answers/SurveyAnswersModelSnippet.php
Modified: trunk/library/classes/Gems/Event/Survey/Display/AllSingleTrack.php
===================================================================
--- trunk/library/classes/Gems/Event/Survey/Display/AllSingleTrack.php 2013-02-27 12:26:06 UTC (rev 1157)
+++ trunk/library/classes/Gems/Event/Survey/Display/AllSingleTrack.php 2013-02-27 18:20:27 UTC (rev 1158)
@@ -47,7 +47,20 @@
class Gems_Event_Survey_Display_AllSingleTrack extends Gems_Registry_TargetAbstract implements Gems_Event_SurveyDisplayEventInterface
{
/**
+ * Set a fixed model sort.
*
+ * Leading _ means not overwritten by sources.
+ *
+ * @var array
+ */
+ protected $_fixedSort = array(
+ 'grc_success' => SORT_DESC,
+ 'gto_valid_from' => SORT_ASC,
+ 'gto_completion_time' => SORT_ASC,
+ 'gto_round_order' => SORT_ASC);
+
+ /**
+ *
* @var Zend_Translate
*/
protected $translate;
Modified: trunk/library/classes/Gems/Snippets/Tracker/Answers/SurveyAnswersModelSnippet.php
===================================================================
--- trunk/library/classes/Gems/Snippets/Tracker/Answers/SurveyAnswersModelSnippet.php 2013-02-27 12:26:06 UTC (rev 1157)
+++ trunk/library/classes/Gems/Snippets/Tracker/Answers/SurveyAnswersModelSnippet.php 2013-02-27 18:20:27 UTC (rev 1158)
@@ -47,6 +47,19 @@
class Gems_Snippets_Tracker_Answers_SurveyAnswersModelSnippet extends Gems_Tracker_Snippets_AnswerModelSnippetGeneric
{
/**
+ * Set a fixed model sort.
+ *
+ * Leading _ means not overwritten by sources.
+ *
+ * @var array
+ */
+ protected $_fixedSort = array(
+ 'grc_success' => SORT_DESC,
+ 'gto_valid_from' => SORT_ASC,
+ 'gto_completion_time' => SORT_ASC,
+ 'gto_round_order' => SORT_ASC);
+
+ /**
* Use compact view and show all tokens of the same surveyId in
* one view. Property used by respondent export
*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|